pkgsrc-Bugs archive

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

Re: pkg/53319: text relocations fixes for multimedia/mplayer others



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

From: Onno van der Linden <o.vd.linden%quicknet.nl@localhost>
To: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
Cc: gnats-bugs%netbsd.org@localhost
Subject: Re: pkg/53319: text relocations fixes for multimedia/mplayer others
Date: Tue, 14 Aug 2018 18:14:34 +0200

 On Tue, Aug 14, 2018 at 11:03:20AM +0900, Izumi Tsutsui wrote:
 > It looks the relocations require a write permission during
 > dynamic linking by ld.elf_so:
 >  https://nxr.netbsd.org/xref/src/libexec/ld.elf_so/reloc.c?a=true&r=1.112#188
 > I guess the result of the mprotect(2) depends on sysctl(3) settings:
 > > security.pax.mprotect.enabled = 1
 > > security.pax.mprotect.global = 1
 > 
 > Maybe you omitted "options PAX_MPROTECT=1" from conf/GENERIC
 >  https://nxr.netbsd.org/xref/src/sys/arch/i386/conf/GENERIC?r=1.1188#1536
 > in your own kernel config?
 
 Now that I've compiled and installed a kernel using a config file
 that has the last 20 lines from GENERIC containing among others
 all the PAX related options I'm finally seeing
 the "Cannot write-enable text segement: Permission denied" error.
 Many thanks for figuring that one out for me.
 How on earth did I miss it :-(
 
 So the question I'm asking is if it's possible to handle the
 i386 assembler option for the concerned packages somewhat
 more subtle than just noasm. Yes, the default should still
 be noasm but with an option to override it. Based on that
 option paxctl +m should be run on the created binary.
 
 There could be one x86asm supported option for ffmpeg that's
 used to not set noasm in ffmpeg*/Makefile in the i386 case
 and a check in for example PC6001VX/Makefile if ffmpeg has
 not been compiled with noasm (ffmpeg -h 2>&1 | grep noasm)
 to run paxctl +m the PC6001VX binary.
 
 Regards,
 
 Onno
 


Home | Main Index | Thread Index | Old Index