From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AD9DD3857C53; Mon, 27 Nov 2023 19:55:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AD9DD3857C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1701114918; bh=PLwkjbhwWaUWMtqOBCRqlNRByhFr0FJRJdDiYsrOWCk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=tdo9h+KphD4totiG6N911J7a4FoxuhLh/snu737YqSqRTI2NJ1QS2ueEh7fTHPWXs C2OLEyV0y+Wlb1RojYOqg6Pc3bP2mSqDCB6BSEIwmLuZo/lFuqcdlHUh4dgPFXV5gr vGFNfEYZHLi0BRYR+q3/R7MT0ACKgfTB5Xa8MS4c= From: "jyescas at google dot com" To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/31076] Extra struct vm_area_struct with ---p created when PAGE_SIZE < max-page-size Date: Mon, 27 Nov 2023 19:55:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: dynamic-link X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jyescas at google dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31076 --- Comment #13 from Juan Yescas --- > > Right, but my point is if this is a hardening feature that glibc aims to > > provide it does not help if the kernel still does not provide it for the > > loader (if this is built with a different page size) and the main progr= am > > itself. Should we push for kernel to implement a similar handling? >=20 > The kernel effectively implements the munmap behavior, I think. It creates > unmapped holes, not PROT_MEM reserved holes. That is right. The kernel vm_munmap the holes for the program image and dyn= amic linker image: Code that vm_munmap the holes. https://elixir.bootlin.com/linux/v6.6.2/source/fs/binfmt_elf.c#L397 Code that loads the program image segments. https://elixir.bootlin.com/linux/v6.6.2/source/fs/binfmt_elf.c#L1165 Code that loads the dynamic linker segments. https://elixir.bootlin.com/linux/v6.6.2/source/fs/binfmt_elf.c#L397 --=20 You are receiving this mail because: You are on the CC list for the bug.=