NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

PR/55043 CVS commit: [netbsd-9] src/libexec/ld.elf_so

The following reply was made to PR toolchain/55043; it has been noted by GNATS.

From: "Martin Husemann" <>
Subject: PR/55043 CVS commit: [netbsd-9] src/libexec/ld.elf_so
Date: Sun, 8 Mar 2020 10:22:29 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sun Mar  8 10:22:29 UTC 2020
 Modified Files:
 	src/libexec/ld.elf_so [netbsd-9]: headers.c map_object.c rtld.c
 Log Message:
 Pull up following revision(s) (requested by thorpej in ticket #758):
 	libexec/ld.elf_so/map_object.c: revision 1.61
 	libexec/ld.elf_so/headers.c: revision 1.68
 	libexec/ld.elf_so/rtld.c: revision 1.203
 PT_GNU_RELRO segments are arranged such that their vaddr + memsz ends
 on a linker common page size boundary.  However, if the common page size
 used by the linker is less than the VM page size being used by the kernel,
 this can end up in the middle of a VM page and when the region is write-
 protected, this can cause objects in neighboring .data to get incorrectly
 write-protected, resulting in a crash.
 Avoid this situation by calculating the end of the RELRO region not by
 rounding memsz up to the VM page size, but rather by adding vaddr + memsz
 and then truncating to the VM page size.
 Fixes PR toolchain/55043.
 XXX pullup-9
 To generate a diff of this commit:
 cvs rdiff -u -r1.65 -r1.65.2.1 src/libexec/ld.elf_so/headers.c
 cvs rdiff -u -r1.60 -r1.60.2.1 src/libexec/ld.elf_so/map_object.c
 cvs rdiff -u -r1.197.2.2 -r1.197.2.3 src/libexec/ld.elf_so/rtld.c
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Home | Main Index | Thread Index | Old Index