Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Apr 2026 04:45:36 +0000
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 62a19cd59b54 - main - i386: mark the stack as non-executable
Message-ID:  <69e1baf0.33fd2.1370e827@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=62a19cd59b54a030c21a5529ed491ba2060140ca

commit 62a19cd59b54a030c21a5529ed491ba2060140ca
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2026-04-17 04:41:49 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2026-04-17 04:44:18 +0000

    i386: mark the stack as non-executable
    
    Sponsored by:           Netflix
    Reviewed by:            jhb
    Differential Revision:  https://reviews.freebsd.org/D56411
---
 sys/crypto/aesni/aeskeys_i386.S | 2 ++
 sys/i386/i386/bioscall.S        | 2 ++
 sys/i386/i386/exception.S       | 2 ++
 sys/i386/i386/locore.S          | 2 ++
 sys/i386/i386/mpboot.S          | 2 ++
 sys/i386/i386/sigtramp.S        | 2 ++
 sys/i386/i386/support.S         | 2 ++
 sys/i386/i386/swtch.S           | 2 ++
 sys/kern/subr_ticks.S           | 2 ++
 9 files changed, 18 insertions(+)

diff --git a/sys/crypto/aesni/aeskeys_i386.S b/sys/crypto/aesni/aeskeys_i386.S
index 770c21dbf938..789d1641c25e 100644
--- a/sys/crypto/aesni/aeskeys_i386.S
+++ b/sys/crypto/aesni/aeskeys_i386.S
@@ -269,3 +269,5 @@ ENTRY(aesni_set_deckey)
 	retl
 	.cfi_endproc
 END(aesni_set_deckey)
+
+	.section .note.GNU-stack,"",%progbits
diff --git a/sys/i386/i386/bioscall.S b/sys/i386/i386/bioscall.S
index d4b13a7012fa..304707182267 100644
--- a/sys/i386/i386/bioscall.S
+++ b/sys/i386/i386/bioscall.S
@@ -156,3 +156,5 @@ CNAME(bios16_jmp):
 	pushl	%ecx			/* return address */
 	movl	$KCSEL,4(%esp)
 	lret				/* reload %cs on the way out */
+
+	.section .note.GNU-stack,"",%progbits
diff --git a/sys/i386/i386/exception.S b/sys/i386/i386/exception.S
index a2a59db3c836..394f59f4f82b 100644
--- a/sys/i386/i386/exception.S
+++ b/sys/i386/i386/exception.S
@@ -682,3 +682,5 @@ outofnmi:
 #endif
 
 ENTRY(end_exceptions)
+
+	.section .note.GNU-stack,"",%progbits
diff --git a/sys/i386/i386/locore.S b/sys/i386/i386/locore.S
index dd9bdfc6c532..e51f1a237d9e 100644
--- a/sys/i386/i386/locore.S
+++ b/sys/i386/i386/locore.S
@@ -449,3 +449,5 @@ END(identify_cpu)
 ENTRY(hypercall_page)
 	.skip	0x1000, 0x90	/* Fill with "nop"s */
 #endif
+
+	.section .note.GNU-stack,"",%progbits
diff --git a/sys/i386/i386/mpboot.S b/sys/i386/i386/mpboot.S
index a5367d57a88e..2ab3a6bde034 100644
--- a/sys/i386/i386/mpboot.S
+++ b/sys/i386/i386/mpboot.S
@@ -279,3 +279,5 @@ BOOTMP2:
 	.globl	bootMP_size
 bootMP_size:
 	.long	BOOTMP2 - BOOTMP1
+
+	.section .note.GNU-stack,"",%progbits
diff --git a/sys/i386/i386/sigtramp.S b/sys/i386/i386/sigtramp.S
index 11e13d3ded60..ad4157279fd1 100644
--- a/sys/i386/i386/sigtramp.S
+++ b/sys/i386/i386/sigtramp.S
@@ -133,3 +133,5 @@ szosigcode:
 sz_lcall_tramp:
 	.long	esigcode-lcall_tramp
 #endif
+
+	.section .note.GNU-stack,"",%progbits
diff --git a/sys/i386/i386/support.S b/sys/i386/i386/support.S
index 982108a0b968..e5e39c9ec5d4 100644
--- a/sys/i386/i386/support.S
+++ b/sys/i386/i386/support.S
@@ -586,3 +586,5 @@ ENTRY(cpu_sync_core)
 	pushl	%eax
 	iretl
 END(cpu_sync_core)
+
+	.section .note.GNU-stack,"",%progbits
diff --git a/sys/i386/i386/swtch.S b/sys/i386/i386/swtch.S
index ad7c1d16c788..a82bcefd494e 100644
--- a/sys/i386/i386/swtch.S
+++ b/sys/i386/i386/swtch.S
@@ -453,3 +453,5 @@ ENTRY(resumectx)
 	xorl	%eax,%eax
 	lret
 END(resumectx)
+
+	.section .note.GNU-stack,"",%progbits
diff --git a/sys/kern/subr_ticks.S b/sys/kern/subr_ticks.S
index 5cb994293d91..29f44c7b2f78 100644
--- a/sys/kern/subr_ticks.S
+++ b/sys/kern/subr_ticks.S
@@ -40,3 +40,5 @@ ticks	=ticksl + TICKS_OFFSET
 	.type jiffies, %object
 jiffies	= ticksl
 	.size jiffies, __SIZEOF_LONG__
+
+	.section .note.GNU-stack,"",%progbits


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69e1baf0.33fd2.1370e827>