lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 10 Mar 2016 15:26:25 +0100
From:	Hans-Christian Noren Egtvedt <egtvedt@...fundet.no>
To:	Mans Rullgard <mans@...sr.com>
Cc:	Haavard Skinnemoen <hskinnemoen@...il.com>,
	Andy Shevchenko <andy.shevchenko@...il.com>,
	Guenter Roeck <linux@...ck-us.net>,
	Sudip Mukherjee <sudipm.mukherjee@...il.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] avr32: fix asm operand constraint in cmpxchg()

Around Thu 10 Mar 2016 14:23:49 +0000 or thereabout, Mans Rullgard wrote:
> If the 'old' operand to cmpxchg() is a constant wider than 21 bits,
> linking fails with a "relocation truncated to fit: R_AVR32_21S" error.
> 
> Fix this by replacing the "i" constraint with "Ks21" which makes the
> compiler use a temporary register for out of range constants.
> 
> Signed-off-by: Mans Rullgard <mans@...sr.com>
> ---
> This fixes link errors in linux-next with CONFIG_AIO_THREAD enabled.

Good find, thank you for fixing.

Acked-by: Hans-Christian Noren Egtvedt <egtvedt@...fundet.no>

I'll push this for next merge window.

> ---
>  arch/avr32/include/asm/cmpxchg.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/avr32/include/asm/cmpxchg.h b/arch/avr32/include/asm/cmpxchg.h
> index 366bbeaeb405..572739b4c4b4 100644
> --- a/arch/avr32/include/asm/cmpxchg.h
> +++ b/arch/avr32/include/asm/cmpxchg.h
> @@ -57,7 +57,7 @@ static inline unsigned long __cmpxchg_u32(volatile int *m, unsigned long old,
>  		"	brne	1b\n"
>  		"2:\n"
>  		: [ret] "=&r"(ret), [m] "=m"(*m)
> -		: "m"(m), [old] "ir"(old), [new] "r"(new)
> +		: "m"(m), [old] "Ks21r"(old), [new] "r"(new)
>  		: "memory", "cc");
>  	return ret;
>  }
-- 
mvh
Hans-Christian Egtvedt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ