NetBSD-Bugs archive

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

Re: port-sparc/60838: sparc fails to enforce RLIMIT_DATA on exec



The following reply was made to PR port-sparc/60838; it has been noted by GNATS.

From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: gnats-bugs%NetBSD.org@localhost, netbsd-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: port-sparc/60838: sparc fails to enforce RLIMIT_DATA on exec
Date: Fri, 2 Oct 2026 17:19:01 +0000

 > Date: Fri, 2 Oct 2026 16:43:03 +0000
 > From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
 >=20
 > Is it expected that sparc executables have only RX and RWX segments,
 > no separate R or RW segments?  Does sparc have some stupid ABI design
 > that is incompatible with W^X?
 
 Answer: looks like yes, the sparc and sparc64 PLT design in the SysV
 ABI relies on writable text at runtime to resolve symbols in PLT
 stubs, and that's what we do:
 
 https://nxr.NetBSD.org/xref/src/sys/arch/sparc/include/elf_support.h?r=3D1.=
 1#31
 https://nxr.NetBSD.org/xref/src/libexec/ld.elf_so/arch/sparc/mdreloc.c?r=3D=
 1.60#480
 
 And the .plt section is the only one having both write and execute
 flags in all the executables I checked.
 
 Apparently the VxWorks ABI supports secure-PLT through GOT indirection
 like ~every other architecture these days, but while binutils supports
 the VxWorks ABI and some people were talking about adapting it to what
 is presumably a SysV ABI context twenty years ago, it looks like that
 never happened:
 
 https://sourceware.org/pipermail/binutils/2006-March/046258.html
 



Home | Main Index | Thread Index | Old Index