Re: [PATCH 3/3] s390/stackleak: Fix __stackleak_poison() inline assembly constraint
From: Vasily Gorbik
Date: Mon Mar 02 2026 - 10:46:29 EST
On Mon, Mar 02, 2026 at 02:35:00PM +0100, Heiko Carstens wrote:
> The __stackleak_poison() inline assembly comes with a "count" operand where
> the "d" constraint is used. "count" is used with the exrl instruction and
> "d" means that the compiler may allocate any register from 0 to 15.
>
> If the compiler would allocate register 0 then the exrl instruction would
> not or the value of "count" into the executed instruction - resulting in a
> stackframe which is only partially poisoned.
>
> Use the correct "a" constraint, which excludes register 0 from register
> allocation.
>
> Fixes: 2a405f6bb3a5 ("s390/stackleak: provide fast __stackleak_poison() implementation")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Heiko Carstens <hca@xxxxxxxxxxxxx>
> ---
> arch/s390/include/asm/processor.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Vasily Gorbik <gor@xxxxxxxxxxxxx>