From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D0CBC37AA78 for ; Wed, 18 Mar 2026 08:22:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773822120; cv=none; b=bRO9GN5JznUoH04k+lrFIKC8M6XffFzDingkTP4RIHbHlCK0edaua3CTmzmwm9MtR19nLXNUn5eZZVvi4hD376drGvxUv9oBkbcaTl+GybGFGqBf3JygAfgdU/64ahin4NpTQrRXnIQHIPiXICvyyERLYnE+A9sm6T+Rm/Z9xZ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773822120; c=relaxed/simple; bh=5hSoCCFKtJ1kFUpn6D1XBN1ahHMI3yAWzhNObhL7xxI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=DaCqJBCt/HXSUxO/kHYytbqiV77Kf5CRGIc0y0UshoSj538GquhH8z+sc5+MMGR8O1uk5JQ8/MdqA7cLIdfjcLsG+Z1zWlNRPTjUzstbOiJmbbPtJP+nfiYYLhI0HD3ZVGn1pCB5uQXMgJ6M71MakFD9iO9/J/peXnwcEPiIwts= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JYF/EV7D; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JYF/EV7D" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2D56C2BC9E; Wed, 18 Mar 2026 08:21:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1773822120; bh=5hSoCCFKtJ1kFUpn6D1XBN1ahHMI3yAWzhNObhL7xxI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=JYF/EV7DrF2XCJwQP12AfsvTdCqXIOp7KSl1OWxZLejPezka11CCMXmthMEwZvlaA nwX1DAiuV7bbvEzTYVe1VqP/EEoF5HbfC0Ft56jesBAuABPzHPv5Q7YsECHr+406Wm 2GDPIO1N2kVDXvv8eTt8tXMc/Z/9L7+Gry4azdtOK/LMXCjml8h7wa+2uIHZMF2mhN pXsBAlohHMwL8f1uO3mgoM1kr8B4efcSMPamuJfjKEsOeGHPrQCWg9AQ9LBwuIugrL HlOS3OsYERz68erNICmdO48RHHV+B8C1qk8Ay9EhHRTbfwHbZMWLF1o6DfwTLlK5cZ k3stuv9b2L7OA== From: Thomas Gleixner To: Uros Bizjak , LKML Cc: Mathieu Desnoyers , =?utf-8?Q?Andr?= =?utf-8?Q?=C3=A9?= Almeida , 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" Subject: Re: [patch 8/8] x86/vdso: Implement __vdso_futex_robust_try_unlock() In-Reply-To: <64921c86-b4f1-43f8-b03e-addbd1be19a0@gmail.com> References: <20260316162316.356674433@kernel.org> <20260316164951.484640267@kernel.org> <64921c86-b4f1-43f8-b03e-addbd1be19a0@gmail.com> Date: Wed, 18 Mar 2026 09:21:56 +0100 Message-ID: <87tsudmtsr.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Tue, Mar 17 2026 at 16:33, Uros Bizjak wrote: > On 3/16/26 18:13, Thomas Gleixner wrote: >> +#ifdef CONFIG_COMPAT > > The following asm template can be substantially improved. In theory. >> +# define ASM_CLEAR_PTR \ >> + " testl $1, (%[pop]) \n" \ > > Please use byte-wide instruction, TESTB with address operand modifier, > "%a[pop]" instead of "(%[pop])": > > testb $1, %a[pop] New fangled %a syntax seems to work. Didn't know about that. Though I'm not convinced that this is an improvement. At least not for someone who is used to read/write plain old school ASM for several decades. >> + " jz .Lop64 \n" \ >> + " movl $0, (%[pad]) \n" \ > > Here you can reuse zero-valued operand "val" and use address operand > modifier. Please note %k modifier. > > movl %k[val], %a[pad] ... > movq %[val], %a[pad] But this one does not and _cannot_ work. Error: incorrect register `%rcx' used with `l' suffix Which is obvious because of the initalization: [val] "r" (0UL) which makes it explicitely R$$. If you change the initialization back to [val] "r" (0) // or (0U) the failure unsurprisingly becomes Error: incorrect register `%ecx' used with `q' suffix So much for the theory.... >> + ASM_PAD_CONSTRAINT tons of useless quoted text >> +#endif /* _ASM_X86_FUTEX_ROBUST_H */ Can you please trim your replies properly? Thanks, tglx