From nobody Tue Jun 16 09:00:57 2026 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 972B1256C8B; Fri, 17 Apr 2026 14:57:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.97.179.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776437852; cv=none; b=oxDcZmDi2yFtxanMztxeBhEFzWJ5B3jw0+wZC2An3ithVCe3LVzQ5XvcF6xNh2lLBT2R2qJdn0KdN6yxNH+z7yMAIrsLvQZT4a9NSJpKOp8VNHtlgCcP3Yn9baQPzkao1XMKXQ5VG1mJypwibQ9HX5kVbDGQcLjzDq3TRnAVP7A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776437852; c=relaxed/simple; bh=QLeK3C0ZGjE1cKjaWsVgBYa5OpEyXxdIShuf9G/PzS0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=l3Z81ubkMIA90lkUW2l+7/zLk1qE7s8iSzq9gqoblYEw43CPdd1l5ABhg7Ye8Z26MtF/HKCj/e19aZjQZLbP3MZ7by+2adqxOcrDjRVCwVRIbQiE9Pk0bv3tfzi5cKc6aN89Md2LUnklub3UhOLFIKPmBmzBqc79xGbINzifJ/4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com; spf=pass smtp.mailfrom=igalia.com; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b=mzMy48QV; arc=none smtp.client-ip=213.97.179.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=igalia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b="mzMy48QV" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Cc:To:In-Reply-To:References:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=27eU/J0Zc/hAfFBGC44jb/O35+RxI2J909Uggxl8/vg=; b=mzMy48QVGDIVFYGyu7BE9uQKxQ hXAx6ka7Jy+yD96rfP+cZqCaE6kQPSa+DdZJP6Q3MQpkwIJOuqSSNb6LAAaxXZAHCPdebEcpzngvf uZrdvuSOUB6llYq77QwXOSu4zylE2OS9OMkB7C7U6kxCLHp5uAD0koERRvZG0XQTxE03cBIs6lXH9 pMfYyEGkCsZDA9IbHXB2Z3kanJOwM2J4/sA1i+IMs0WF7p1GZMZizstGD1PFXrXFACYjsNqmKM4so L7VxytNBzUI4mUP+ktR7XZnYYeYXbpnVlffTFuRxZbV9W9kO5dkWyFKIbXVJ0lK4T3l11czz4ALlQ dIAyuxaw==; Received: from [187.57.76.127] (helo=[192.168.15.100]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1wDkcy-00HVwL-Ec; Fri, 17 Apr 2026 16:57:04 +0200 From: =?utf-8?q?Andr=C3=A9_Almeida?= Date: Fri, 17 Apr 2026 11:56:10 -0300 Subject: [PATCH RFC 1/2] arm64: vdso: Prepare for robust futex unlock support Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260417-tonyk-robust_arm-v1-1-03aa64e2ff1a@igalia.com> References: <20260417-tonyk-robust_arm-v1-0-03aa64e2ff1a@igalia.com> In-Reply-To: <20260417-tonyk-robust_arm-v1-0-03aa64e2ff1a@igalia.com> To: Catalin Marinas , Will Deacon , Thomas Gleixner , Mark Rutland , Mathieu Desnoyers , Sebastian Andrzej Siewior , Carlos O'Donell , Peter Zijlstra , Florian Weimer , Rich Felker , Torvald Riegel , Darren Hart , Ingo Molnar , Davidlohr Bueso , Arnd Bergmann , "Liam R . Howlett" , Uros Bizjak , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, kernel-dev@igalia.com, LKML , =?utf-8?q?Andr=C3=A9_Almeida?= X-Mailer: b4 0.15.1 There will be a VDSO function to unlock non-contended robust futexes in user space. The unlock sequence is racy vs. clearing the list_pending_op pointer in the task's robust list head. To plug this race the kernel needs to know the critical section window so it can clear the pointer when the task is interrupted within that race window. The window is determined by labels in the inline assembly. Signed-off-by: Andr=C3=A9 Almeida --- RFC: Those symbols can't be found by the linker after patch 2/2, it fails w= ith: ld: arch/arm64/kernel/vdso.o: in function `vdso_futex_robust_unlock_update_= ips': arch/arm64/kernel/vdso.c:72:(.text+0x200): undefined reference to `__futex_= list64_try_unlock_cs_success' ld: arch/arm64/kernel/vdso.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against= symbol `__futex_list64_try_unlock_cs_success' which may bind externally ca= n not be used when making a shared object; recompile with -fPIC arch/arm64/kernel/vdso.c:72:(.text+0x200): dangerous relocation: unsupporte= d relocation --- arch/arm64/include/asm/vdso.h | 4 ++++ arch/arm64/kernel/vdso.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/arch/arm64/include/asm/vdso.h b/arch/arm64/include/asm/vdso.h index 232b46969088..182fde1df3dd 100644 --- a/arch/arm64/include/asm/vdso.h +++ b/arch/arm64/include/asm/vdso.h @@ -18,6 +18,10 @@ =20 extern char vdso_start[], vdso_end[]; extern char vdso32_start[], vdso32_end[]; +extern char __futex_list64_try_unlock_cs_success[], __futex_list64_try_unl= ock_cs_end[]; +#ifdef CONFIG_COMPAT +extern char __futex_list32_try_unlock_cs_success[], __futex_list32_try_unl= ock_cs_end[]; +#endif =20 #endif /* !__ASSEMBLER__ */ =20 diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c index 592dd8668de4..42a82e73a774 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -57,6 +58,32 @@ static struct vdso_abi_info vdso_info[] __ro_after_init = =3D { #endif /* CONFIG_COMPAT_VDSO */ }; =20 +#ifdef CONFIG_FUTEX_ROBUST_UNLOCK +static void vdso_futex_robust_unlock_update_ips(enum vdso_abi abi, struct = mm_struct *mm) +{ + unsigned long vdso =3D (unsigned long) mm->context.vdso; + struct futex_mm_data *fd =3D &mm->futex; + + /* + * RFC: won't compile due to undefined reference to `__futex_list64_try_u= nlock_cs_...` + + if (abi =3D=3D VDSO_ABI_AA64) { + futex_set_vdso_cs_range(fd, 0, vdso, (uintptr_t) __futex_list64_try_unlo= ck_cs_success, + (uintptr_t) __futex_list64_try_unlock_cs_end, false); + } + +#ifdef CONFIG_COMPAT + if (abi =3D=3D VDSO_ABI_AA32) { + futex_set_vdso_cs_range(fd, 1, vdso, (uintptr_t) __futex_list32_try_unlo= ck_cs_success, + (uintptr_t) __futex_list32_try_unlock_cs_end, true); + } +#endif + */ +} +#else +static inline void vdso_futex_robust_unlock_update_ips(enum vdso_abi abi, = struct mm_struct *mm) { } +#endif /* CONFIG_FUTEX_ROBUST_UNLOCK */ + static int vdso_mremap(const struct vm_special_mapping *sm, struct vm_area_struct *new_vma) { @@ -134,6 +161,8 @@ static int __setup_additional_pages(enum vdso_abi abi, if (IS_ERR(ret)) goto up_fail; =20 + vdso_futex_robust_unlock_update_ips(abi, mm); + return 0; =20 up_fail: --=20 2.53.0 From nobody Tue Jun 16 09:00:57 2026 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C73BC343D64; Fri, 17 Apr 2026 14:57:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.97.179.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776437851; cv=none; b=RCLtcD17g1q6IyvEZl4bxDxE8FYCGda3V1w96W4a+KR7Jud8fFY9Jjfi29RETgvw2ZSUCt7Z+gVv0E3jJlSCg6gzaGMGaMgetyAnYuTpnft+jsAafUiHpOjh7ArBE6cugaLbXtjWj75RXoYkeH3roENWci2nDAz5nvP9iqiVUhw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776437851; c=relaxed/simple; bh=v87hpKQEGkW7KuK5FAr5Np6KBqMTib72w+/v4wnOaqQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NDStdBf98No8sX6df6mIgXGN78CIRB++2X81VaCh8xBwyVZEQZk6MfBURNPnaWbyuJ/NCmkC0N9T3MmaFADF7kzDWyzyt4y5ikm6c8n3Uf8OMSkmzf4miRRNMPGoA4N8QTGzkZUnQAXgcrpkcvPNdySglSdOukbJq4EjmonckEA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com; spf=pass smtp.mailfrom=igalia.com; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b=BPyQ1CFr; arc=none smtp.client-ip=213.97.179.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=igalia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b="BPyQ1CFr" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Cc:To:In-Reply-To:References:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=1NGdwlYbSqtyrzey1R4pNywcB64VCt682zZe8IioClA=; b=BPyQ1CFrIFaCQ6gx5O7A+2+t66 kOWYt9BMVPD1JGB/owLsKm/+f1Snl/KNd2wcv/bLHt98rmUWK+6FTReZm1kNZE/ClrjLMVriQ/v9q 6P98MS1F1FF6Mx1vdN+YM0C7SxB1gCFmvocsaO93qRbmGv0ys3RG4OOyNBp7QUMcajXY+p5jQnUiv QWF7lohayDR+7SvVCX3sXy28e0kWENOLCqx4t7IvYyTnLYARc/KapOmmS0GawqpLKpnhASIUepwoj udyRRejNOR7PQb/eMHneW38FX/yCZHx7KT5pmx1/sbmR1TjrHAsq7HLrXezGs3rpI0T/tcSY+oAv2 YFwbS08w==; Received: from [187.57.76.127] (helo=[192.168.15.100]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1wDkd4-00HVwL-1y; Fri, 17 Apr 2026 16:57:10 +0200 From: =?utf-8?q?Andr=C3=A9_Almeida?= Date: Fri, 17 Apr 2026 11:56:11 -0300 Subject: [PATCH RFC 2/2] arm64: vdso: Implement __vdso_futex_robust_try_unlock() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260417-tonyk-robust_arm-v1-2-03aa64e2ff1a@igalia.com> References: <20260417-tonyk-robust_arm-v1-0-03aa64e2ff1a@igalia.com> In-Reply-To: <20260417-tonyk-robust_arm-v1-0-03aa64e2ff1a@igalia.com> To: Catalin Marinas , Will Deacon , Thomas Gleixner , Mark Rutland , Mathieu Desnoyers , Sebastian Andrzej Siewior , Carlos O'Donell , Peter Zijlstra , Florian Weimer , Rich Felker , Torvald Riegel , Darren Hart , Ingo Molnar , Davidlohr Bueso , Arnd Bergmann , "Liam R . Howlett" , Uros Bizjak , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, kernel-dev@igalia.com, LKML , =?utf-8?q?Andr=C3=A9_Almeida?= X-Mailer: b4 0.15.1 Based on the x86 implementation, implement the vDSO function for unlocking a robust futex correctly. Commit xxxxxxxxxxxx ("x86/vdso: Implement __vdso_futex_robust_try_unlock()"= ) has the full explanation about why this mechanism is needed. The unlock assembly sequence for arm64 is: __futex_list64_try_unlock_cs_start: ldxr x3, [x0] // Load the value at *futex cmp x1, x3 // Compare with TID b.ne __futex_list64_try_unlock_cs_end stlxr w1, xzr, [x0] // Try to clear *futex cbnz w1, __futex_list64_try_unlock_cs_start __futex_list64_try_unlock_cs_success: str xzr, [x2] // After clearing *futex, clear *op_pending __futex_list64_try_unlock_cs_end: The decision regarding if the pointer should be cleared or not lies on chec= king the condition flag zero: return (regs->user_regs.pstate & PSR_Z_BIT) ? (void __user *) regs->user_regs.regs[2] : NULL; If it's not zero, that means that the comparassion worked and the kernel sh= ould clear op_pending (if userspace didn't managed to) stored at x2. Signed-off-by: Andr=C3=A9 Almeida --- RFC: - Should I duplicate the explanation found in the x86 commit or can I just point to it? - Only LL/SC for now but I can add LSE later if this looks good - It the objdump I see that op_pending is store at x2. But how stable is t= his, how can I write it in a way that's always x2? --- arch/arm64/Kconfig | 1 + arch/arm64/include/asm/futex_robust.h | 35 +++++++++++++ arch/arm64/kernel/vdso/Makefile | 9 +++- arch/arm64/kernel/vdso/vdso.lds.S | 4 ++ .../kernel/vdso/vfutex_robust_list_try_unlock.c | 59 ++++++++++++++++++= ++++ 5 files changed, 107 insertions(+), 1 deletion(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 427151a9db7f..e10cb97a51c7 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -249,6 +249,7 @@ config ARM64 select HAVE_RELIABLE_STACKTRACE select HAVE_POSIX_CPU_TIMERS_TASK_WORK select HAVE_FUNCTION_ARG_ACCESS_API + select HAVE_FUTEX_ROBUST_UNLOCK select MMU_GATHER_RCU_TABLE_FREE select HAVE_RSEQ select HAVE_RUST if RUSTC_SUPPORTS_ARM64 diff --git a/arch/arm64/include/asm/futex_robust.h b/arch/arm64/include/asm= /futex_robust.h new file mode 100644 index 000000000000..f2b7a2b15cb5 --- /dev/null +++ b/arch/arm64/include/asm/futex_robust.h @@ -0,0 +1,35 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_ARM64_FUTEX_ROBUST_H +#define _ASM_ARM64_FUTEX_ROBUST_H + +#include + +static __always_inline void __user *arm64_futex_robust_unlock_get_pop(stru= ct pt_regs *regs) +{ + /* + * RFC: According to the objdump bellow, x2 is the address of + * op_pending. How stable is this? + + <__futex_list64_try_unlock_cs_start>: + ldxr x3, [x0] + cmp x1, x3 + b.ne d7c <__futex_list64_try_unlock_cs_end> // b.any + stlxr w1, xzr, [x0] + cbnz w1, d64 <__futex_list64_try_unlock_cs_start> + + <__futex_list64_try_unlock_cs_success>: + str xzr, [x2] + + <__futex_list64_try_unlock_cs_end>: + mov w0, w3 + ret + */ + + return (regs->user_regs.pstate & PSR_Z_BIT) ? NULL + : (void __user *) regs->user_regs.regs[2]; +} + +#define arch_futex_robust_unlock_get_pop(regs) \ + arm64_futex_robust_unlock_get_pop(regs) + +#endif /* _ASM_ARM64_FUTEX_ROBUST_H */ diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makef= ile index 7dec05dd33b7..a65893d8100e 100644 --- a/arch/arm64/kernel/vdso/Makefile +++ b/arch/arm64/kernel/vdso/Makefile @@ -9,7 +9,8 @@ # Include the generic Makefile to check the built vdso. include $(srctree)/lib/vdso/Makefile.include =20 -obj-vdso :=3D vgettimeofday.o note.o sigreturn.o vgetrandom.o vgetrandom-c= hacha.o +obj-vdso :=3D vgettimeofday.o note.o sigreturn.o vgetrandom.o vgetrandom-c= hacha.o \ + vfutex_robust_list_try_unlock.o =20 # Build rules targets :=3D $(obj-vdso) vdso.so vdso.so.dbg @@ -45,9 +46,11 @@ CC_FLAGS_ADD_VDSO :=3D -O2 -mcmodel=3Dtiny -fasynchronou= s-unwind-tables =20 CFLAGS_REMOVE_vgettimeofday.o =3D $(CC_FLAGS_REMOVE_VDSO) CFLAGS_REMOVE_vgetrandom.o =3D $(CC_FLAGS_REMOVE_VDSO) +CFLAGS_REMOVE_vfutex_robust_list_try_unlock.o =3D $(CC_FLAGS_REMOVE_VDSO) =20 CFLAGS_vgettimeofday.o =3D $(CC_FLAGS_ADD_VDSO) CFLAGS_vgetrandom.o =3D $(CC_FLAGS_ADD_VDSO) +CFLAGS_vfutex_robust_list_try_unlock.o =3D $(CC_FLAGS_ADD_VDSO) =20 ifneq ($(c-gettimeofday-y),) CFLAGS_vgettimeofday.o +=3D -include $(c-gettimeofday-y) @@ -57,6 +60,10 @@ ifneq ($(c-getrandom-y),) CFLAGS_vgetrandom.o +=3D -include $(c-getrandom-y) endif =20 +ifneq ($(c-vfutex_robust_list_try_unlock-y),) + CFLAGS_vfutex_robust_list_try_unlock.o +=3D -include $(c-vfutex_robust_l= ist_try_unlock-y) +endif + targets +=3D vdso.lds CPPFLAGS_vdso.lds +=3D -P -C -U$(ARCH) =20 diff --git a/arch/arm64/kernel/vdso/vdso.lds.S b/arch/arm64/kernel/vdso/vds= o.lds.S index 52314be29191..33ce58516580 100644 --- a/arch/arm64/kernel/vdso/vdso.lds.S +++ b/arch/arm64/kernel/vdso/vdso.lds.S @@ -104,6 +104,10 @@ VERSION __kernel_clock_gettime; __kernel_clock_getres; __kernel_getrandom; + __vdso_futex_robust_list64_try_unlock; +#ifdef CONFIG_COMPAT + __vdso_futex_robust_list32_try_unlock; +#endif local: *; }; } diff --git a/arch/arm64/kernel/vdso/vfutex_robust_list_try_unlock.c b/arch/= arm64/kernel/vdso/vfutex_robust_list_try_unlock.c new file mode 100644 index 000000000000..a9089d3cacfc --- /dev/null +++ b/arch/arm64/kernel/vdso/vfutex_robust_list_try_unlock.c @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +#include +#include + +#define LABEL(name, sz) __stringify(__futex_list##sz##_try_unlock_cs_##nam= e) + +#define GLOBLS(sz) ".globl " LABEL(start, sz) ", " LABEL(success, sz) ", "= LABEL(end, sz) "\n" + +__u32 __vdso_futex_robust_list64_try_unlock(__u32 *lock, __u32 tid, __u64 = *pop) +{ + __u32 val, result; + + asm volatile ( + GLOBLS(64) + " prfm pstl1strm, %[lock] \n" + LABEL(start, 64)": \n" + " ldxr %[val], %[lock] \n" + " cmp %[tid], %[val] \n" + " bne " LABEL(end, 64)" \n" + " stlxr %w[result], xzr, %[lock] \n" + " cbnz %w[result], " LABEL(start, 64)" \n" + LABEL(success, 64)": \n" + " str xzr, %[pop] \n" + LABEL(end, 64)": \n" + + : [val] "=3D&r" (val), [result] "=3Dr" (result) + : [tid] "r" (tid), [lock] "Q" (*lock), [pop] "Q" (*pop) + : "memory" + ); + + return val; +} + +#ifdef CONFIG_COMPAT +__u32 __vdso_futex_robust_list32_try_unlock(__u32 *lock, __u32 tid, __u32 = *pop) +{ + __u32 val, result; + + asm volatile ( + GLOBLS(32) + " prfm pstl1strm, %[lock] \n" + LABEL(start, 32)": \n" + " ldxr %w[val], %[lock] \n" + " cmp %w[tid], %w[val] \n" + " bne " LABEL(end, 32)" \n" + " stlxr %w[result], wzr, %w[lock] \n" + " cbnz %w[result], " LABEL(start, 32)" \n" + LABEL(success, 32)": \n" + " str wzr, %w[pop] \n" + LABEL(end, 32)": \n" + + : [val] "=3D&r" (val), [result] "=3Dr" (result) + : [tid] "r" (tid), [lock] "Q" (*lock), [pop] "Q" (*pop) + : "memory" + ); + + return val; +} +#endif --=20 2.53.0