Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Oct 2024 23:06:36 GMT
From:      Brooks Davis <brooks@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 74f6ec6fe3cf - main - lib{c,sys}: .note.GNU-stack in syscall stubs
Message-ID:  <202410042306.494N6a3V077213@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by brooks:

URL: https://cgit.FreeBSD.org/src/commit/?id=74f6ec6fe3cf47cc0482cd5fb10d5c3c967bfd1f

commit 74f6ec6fe3cf47cc0482cd5fb10d5c3c967bfd1f
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2024-10-04 21:13:41 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2024-10-04 22:01:45 +0000

    lib{c,sys}: .note.GNU-stack in syscall stubs
    
    Explicitly disable executable stacks in the syscall stubs on all
    architectures.  Previously, aarch64 and riscv64 didn't include the
    .note.GNU-stack note due it being disabled by default in those ABIs.
    
    This appears to have been harmless in practice, but better to be clear
    in case a different compiler/linker has different defaults.  This also
    reduces special cases in the Makefile.
    
    Reported by:    jrtc27
    Reviewed by:    kib
    Differential Revision:  https://reviews.freebsd.org/D44883
---
 lib/libsys/Makefile.sys | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys
index d18f4bc23227..7454f5a47720 100644
--- a/lib/libsys/Makefile.sys
+++ b/lib/libsys/Makefile.sys
@@ -129,12 +129,7 @@ SYM_MAPS+=	${LIBSYS_SRCTOP}/${LIBC_ARCH}/Symbol.sys.map
 # Generated files
 CLEANFILES+=	${SASM} ${SPSEUDO}
 
-.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" || \
-    ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm"
 NOTE_GNU_STACK='\t.section .note.GNU-stack,"",%%progbits\n'
-.else
-NOTE_GNU_STACK=''
-.endif
 .if ${MACHINE_CPUARCH} == "aarch64"
 FEATURE_NOTE='\#include <sys/elf_common.h>\nGNU_PROPERTY_AARCH64_FEATURE_1_NOTE(GNU_PROPERTY_AARCH64_FEATURE_1_VAL)\n'
 .else



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202410042306.494N6a3V077213>