git: f1119657d82e - stable/13 - linux: Fix a mistake in commit fb58045145

Mark Johnston markj at FreeBSD.org
Mon May 24 14:06:02 UTC 2021


The branch stable/13 has been updated by markj:

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

commit f1119657d82ee8c7c7d3fb624d6e98927e459402
Author:     Mark Johnston <markj at FreeBSD.org>
AuthorDate: 2021-05-17 02:17:53 +0000
Commit:     Mark Johnston <markj at FreeBSD.org>
CommitDate: 2021-05-24 14:05:43 +0000

    linux: Fix a mistake in commit fb58045145
    
    The change to futex_andl_smap() should have ordered stac before the
    load from a user address, otherwise it does not fix anything.
    
    Fixes:  fb58045145 ("linux: Fix SMAP-enabled futex routines")
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit 60cb98a1bd2e4ea8fda532261f7211f5d4eba9c0)
---
 sys/amd64/linux32/linux32_support.s | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/amd64/linux32/linux32_support.s b/sys/amd64/linux32/linux32_support.s
index f3ec3bd8c776..da076010c13c 100644
--- a/sys/amd64/linux32/linux32_support.s
+++ b/sys/amd64/linux32/linux32_support.s
@@ -168,8 +168,8 @@ ENTRY(futex_andl_smap)
 	movq	$VM_MAXUSER_ADDRESS-4,%rax
 	cmpq	%rax,%rsi
 	ja	futex_fault
-	movl	(%rsi),%eax
 	stac
+	movl	(%rsi),%eax
 1:	movl	%eax,%ecx
 	andl	%edi,%ecx
 #ifdef SMP


More information about the dev-commits-src-all mailing list