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]
Message-ID: <nycvar.YSQ.7.76.1901051106410.1783@knanqh.ubzr>
Date:   Sat, 5 Jan 2019 11:12:18 -0500 (EST)
From:   Nicolas Pitre <nicolas.pitre@...aro.org>
To:     Stefan Agner <stefan@...er.ch>
cc:     linux@...linux.org.uk, ndesaulniers@...gle.com,
        natechancellor@...il.com, arnd@...db.de, ard.biesheuvel@...aro.org,
        peterz@...radead.org, mingo@...hat.com, will.deacon@....com,
        julien.thierry@....com, mark.rutland@....com,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v2 2/3] ARM: uaccess: use unified assembler language
 syntax

On Thu, 3 Jan 2019, Stefan Agner wrote:

> Convert the conditional infix to a postfix to make sure this inline
> assembly is unified syntax. Since gcc assumes non-unified syntax
> when emitting ARM instructions, make sure to define the syntax as
> unified.
> 
> This allows to use LLVM's integrated assembler.
> 
> Signed-off-by: Stefan Agner <stefan@...er.ch>
> ---
> Changes since v1:
> - Explicitly use unified syntax for inline assembly
> 
> 
>  arch/arm/include/asm/uaccess.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h
> index 6390a40f16e7..a50f9b4e2574 100644
> --- a/arch/arm/include/asm/uaccess.h
> +++ b/arch/arm/include/asm/uaccess.h
> @@ -86,7 +86,8 @@ static inline void set_fs(mm_segment_t fs)
>  #define __range_ok(addr, size) ({ \
>  	unsigned long flag, roksum; \
>  	__chk_user_ptr(addr);	\
> -	__asm__("adds %1, %2, %3; sbcccs %1, %1, %0; movcc %0, #0" \
> +	__asm__(".syntax unified\n" \
> +		"adds %1, %2, %3; sbcscc %1, %1, %0; movcc %0, #0" \

Instead of sprinkling ".syntax unified" around, you could consider 
including <asm/unified.h> when needed.


Nicolas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ