Date: Mon, 12 Jan 2026 18:00:07 +0000 From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: a7d9d1b19608 - stable/13 - zfs: emit .note.GNU-stack section for all ELF targets Message-ID: <696536a7.3b3cd.7cea4b26@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=a7d9d1b19608b5e1224e8b687aa2b91d714a71ed commit a7d9d1b19608b5e1224e8b687aa2b91d714a71ed Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2026-01-08 08:35:13 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2026-01-12 17:59:17 +0000 zfs: emit .note.GNU-stack section for all ELF targets On FreeBSD, linking the zfs kernel module with binutils ld 2.44 shows the following warning: ld: warning: aesni-gcm-avx2-vaes.o: missing .note.GNU-stack section implies executable stack ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker Some of the `.S` files under `module/icp/asm-x86_64/modes` check whether to emit the `.note.GNU-stack` section using: #if defined(__linux__) && defined(__ELF__) We could add `&& defined(__FreeBSD__)` to the test, but since all other `.S` files in the OpenZFS tree use: #ifdef __ELF__ it would seem more logical to use that instead. Any recent ELF platform should support these note sections by now. Reviewed by: emaste, kib, imp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D54578 (cherry picked from commit eb1b6ec7a79aff05f5f10e1d6b1c63a0d8dc5f2f) --- sys/contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-x86_64.S | 2 +- sys/contrib/openzfs/module/icp/asm-x86_64/modes/ghash-x86_64.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-x86_64.S b/sys/contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-x86_64.S index cf17b3768712..9cdc2febf418 100644 --- a/sys/contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-x86_64.S +++ b/sys/contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-x86_64.S @@ -1264,7 +1264,7 @@ atomic_toggle_boolean_nv: .popsection /* Mark the stack non-executable. */ -#if defined(__linux__) && defined(__ELF__) +#ifdef __ELF__ .section .note.GNU-stack,"",%progbits #endif diff --git a/sys/contrib/openzfs/module/icp/asm-x86_64/modes/ghash-x86_64.S b/sys/contrib/openzfs/module/icp/asm-x86_64/modes/ghash-x86_64.S index bf3724a23eae..57442e92155c 100644 --- a/sys/contrib/openzfs/module/icp/asm-x86_64/modes/ghash-x86_64.S +++ b/sys/contrib/openzfs/module/icp/asm-x86_64/modes/ghash-x86_64.S @@ -717,7 +717,7 @@ gcm_ghash_avx: .popsection /* Mark the stack non-executable. */ -#if defined(__linux__) && defined(__ELF__) +#ifdef __ELF__ .section .note.GNU-stack,"",%progbits #endifhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?696536a7.3b3cd.7cea4b26>
