NetBSD-Bugs archive

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

Re: toolchain/52675: crunching binaries improperly removes PaX notes



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

From: Christos Zoulas <christos%zoulas.com@localhost>
To: "gnats-bugs%netbsd.org@localhost" <gnats-bugs%NetBSD.org@localhost>
Cc: toolchain-manager%netbsd.org@localhost,
 gnats-admin%netbsd.org@localhost,
 netbsd-bugs%netbsd.org@localhost,
 "martin%netbsd.org@localhost" <martin%NetBSD.org@localhost>
Subject: Re: toolchain/52675: crunching binaries improperly removes PaX notes
Date: Sun, 10 Feb 2019 21:05:30 -0500

 I think that we should just stop trying to remove the notes. The mcmodel =
 note is just used on sparc64 to enable topdown vm, and the pax note is =
 always 0 on the standard rescue built binaries. If one wants to fix new =
 crunched binaries that were built with inconsistent pax note settings, =
 one call paxctl(1) to adjust the the pax note settings. One we create =
 another tool to adjust mcmodel. Removing the notes makes the situation =
 strictly worse because objcopy(1) zeros out the note sections completely =
 instead of actually moving the notes around so there are no gaps. The =
 kernel loader reads the program header notes section and loses track =
 where it is because it can't calculate the size of the zeroed notes. Of =
 course the kernel can be modified to scan the section headers instead, =
 or we can inject fake contents to the zeroed out sections, but isn't it =
 better to leave them alone in the first place, and provide tools to =
 modify them (we have one for pax, we can add one for mcmodel if that's =
 necessary).
 
 christos=
 


Home | Main Index | Thread Index | Old Index