The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=755c1e039adfd68ecf4d5954e13fe54263c34a03
commit 755c1e039adfd68ecf4d5954e13fe54263c34a03 Author: Ryan Libby <[email protected]> AuthorDate: 2026-05-16 20:24:45 +0000 Commit: Ryan Libby <[email protected]> CommitDate: 2026-05-16 20:24:45 +0000 kernel: address executable stack warnings in amd64 gcc build Mark assembly files as not requiring executable stacks. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D56946 --- sys/amd64/amd64/cpu_switch.S | 2 ++ sys/amd64/amd64/efirt_support.S | 2 ++ sys/amd64/amd64/exception.S | 2 ++ sys/amd64/amd64/kexec_tramp.S | 2 ++ sys/amd64/amd64/locore.S | 2 ++ sys/amd64/amd64/mpboot.S | 2 ++ sys/amd64/amd64/support.S | 2 ++ sys/amd64/amd64/xen-locore.S | 2 ++ sys/amd64/ia32/ia32_sigtramp.S | 2 ++ sys/amd64/sgx/sgx_support.S | 2 ++ sys/amd64/vmm/amd/svm_support.S | 2 ++ sys/amd64/vmm/intel/vmx_support.S | 2 ++ sys/crypto/aesni/aeskeys_amd64.S | 2 ++ sys/dev/hyperv/vmbus/amd64/vmbus_vector.S | 2 ++ sys/tools/vdso_wrap.S | 2 ++ 15 files changed, 30 insertions(+) diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S index 17ff8005e3cd..21e55e64d74a 100644 --- a/sys/amd64/amd64/cpu_switch.S +++ b/sys/amd64/amd64/cpu_switch.S @@ -496,3 +496,5 @@ sw1wait: cmpq %rcx, %rdx je 1b jmp sw1cont + + .section .note.GNU-stack,"",%progbits diff --git a/sys/amd64/amd64/efirt_support.S b/sys/amd64/amd64/efirt_support.S index 54578f573750..671fd52e5016 100644 --- a/sys/amd64/amd64/efirt_support.S +++ b/sys/amd64/amd64/efirt_support.S @@ -117,3 +117,5 @@ ENTRY(efi_rt_fault) END(efi_rt_fault) efi_rt_panic_str: .asciz "efi_rt_arch_call: too many args" + + .section .note.GNU-stack,"",%progbits diff --git a/sys/amd64/amd64/exception.S b/sys/amd64/amd64/exception.S index babfbacf92ef..5ff75fb65740 100644 --- a/sys/amd64/amd64/exception.S +++ b/sys/amd64/amd64/exception.S @@ -1373,3 +1373,5 @@ gsbase_load_fault: #ifdef HWPMC_HOOKS ENTRY(end_exceptions) #endif + + .section .note.GNU-stack,"",%progbits diff --git a/sys/amd64/amd64/kexec_tramp.S b/sys/amd64/amd64/kexec_tramp.S index 6a2de676bc35..297a2a715a10 100644 --- a/sys/amd64/amd64/kexec_tramp.S +++ b/sys/amd64/amd64/kexec_tramp.S @@ -89,3 +89,5 @@ CNAME(kexec_saved_image): CNAME(kexec_do_reboot_size): .globl kexec_do_reboot_size .quad . - kexec_do_reboot + + .section .note.GNU-stack,"",%progbits diff --git a/sys/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S index 2be555b25160..d0b67d8872b9 100644 --- a/sys/amd64/amd64/locore.S +++ b/sys/amd64/amd64/locore.S @@ -194,3 +194,5 @@ ENTRY(la57_trampoline_end) .globl bootstack .space BOOTSTACK_SIZE /* space for bootstack - temporary stack */ bootstack: + + .section .note.GNU-stack,"",%progbits diff --git a/sys/amd64/amd64/mpboot.S b/sys/amd64/amd64/mpboot.S index e3d940088f14..5929b529147b 100644 --- a/sys/amd64/amd64/mpboot.S +++ b/sys/amd64/amd64/mpboot.S @@ -276,3 +276,5 @@ entry_64: wrmsr jmp init_secondary + + .section .note.GNU-stack,"",%progbits diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S index 27694a95653c..09d4ef85b087 100644 --- a/sys/amd64/amd64/support.S +++ b/sys/amd64/amd64/support.S @@ -1996,3 +1996,5 @@ ENTRY(cpu_sync_core) pushq %rdx iretq END(cpu_sync_core) + + .section .note.GNU-stack,"",%progbits diff --git a/sys/amd64/amd64/xen-locore.S b/sys/amd64/amd64/xen-locore.S index ed2aae038b6d..8ee135f45400 100644 --- a/sys/amd64/amd64/xen-locore.S +++ b/sys/amd64/amd64/xen-locore.S @@ -206,3 +206,5 @@ gdt32: .long 0x0000ffff # %ds, %es, %ss .long 0x00cf9200 gdt32end: + + .section .note.GNU-stack,"",%progbits diff --git a/sys/amd64/ia32/ia32_sigtramp.S b/sys/amd64/ia32/ia32_sigtramp.S index 1a80f78a3234..8d700e1fe912 100644 --- a/sys/amd64/ia32/ia32_sigtramp.S +++ b/sys/amd64/ia32/ia32_sigtramp.S @@ -138,3 +138,5 @@ __vdso_lcall_tramp: ud2 #endif .p2align 1 + + .section .note.GNU-stack,"",%progbits diff --git a/sys/amd64/sgx/sgx_support.S b/sys/amd64/sgx/sgx_support.S index 4816f178e657..53fe359f3f41 100644 --- a/sys/amd64/sgx/sgx_support.S +++ b/sys/amd64/sgx/sgx_support.S @@ -66,3 +66,5 @@ sgx_onfault: popq %rbx POP_FRAME_POINTER ret + + .section .note.GNU-stack,"",%progbits diff --git a/sys/amd64/vmm/amd/svm_support.S b/sys/amd64/vmm/amd/svm_support.S index 26bf36b98f71..225a2a83e7b1 100644 --- a/sys/amd64/vmm/amd/svm_support.S +++ b/sys/amd64/vmm/amd/svm_support.S @@ -155,3 +155,5 @@ ENTRY(svm_launch) VLEAVE ret END(svm_launch) + + .section .note.GNU-stack,"",%progbits diff --git a/sys/amd64/vmm/intel/vmx_support.S b/sys/amd64/vmm/intel/vmx_support.S index 877e377f892d..9a3c6b3fd80b 100644 --- a/sys/amd64/vmm/intel/vmx_support.S +++ b/sys/amd64/vmm/intel/vmx_support.S @@ -268,3 +268,5 @@ ENTRY(vmx_call_isr) VLEAVE ret END(vmx_call_isr) + + .section .note.GNU-stack,"",%progbits diff --git a/sys/crypto/aesni/aeskeys_amd64.S b/sys/crypto/aesni/aeskeys_amd64.S index 667e64f441a5..8ae4a54a3d8d 100644 --- a/sys/crypto/aesni/aeskeys_amd64.S +++ b/sys/crypto/aesni/aeskeys_amd64.S @@ -219,3 +219,5 @@ ENTRY(aesni_set_deckey) retq .cfi_endproc END(aesni_set_deckey) + + .section .note.GNU-stack,"",%progbits diff --git a/sys/dev/hyperv/vmbus/amd64/vmbus_vector.S b/sys/dev/hyperv/vmbus/amd64/vmbus_vector.S index a15041ae7e32..f7479dc1f6f8 100644 --- a/sys/dev/hyperv/vmbus/amd64/vmbus_vector.S +++ b/sys/dev/hyperv/vmbus/amd64/vmbus_vector.S @@ -40,3 +40,5 @@ movq %rsp, %rdi call vmbus_handle_intr jmp doreti + + .section .note.GNU-stack,"",%progbits diff --git a/sys/tools/vdso_wrap.S b/sys/tools/vdso_wrap.S index 5a815fd6f499..865a7f1e14aa 100644 --- a/sys/tools/vdso_wrap.S +++ b/sys/tools/vdso_wrap.S @@ -46,3 +46,5 @@ VDSO_BLOB_START(VDSO_NAME): VDSO_BLOB_END(VDSO_NAME): .globl VDSO_BLOB_SIZE(VDSO_NAME) .set VDSO_BLOB_SIZE(VDSO_NAME), . - VDSO_BLOB_START(VDSO_NAME) + + .section .note.GNU-stack,"",%progbits
