[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170502172948.GE28132@leverpostej>
Date: Tue, 2 May 2017 18:29:48 +0100
From: Mark Rutland <mark.rutland@....com>
To: Matthias Kaehlcke <mka@...omium.org>
Cc: Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
Christoffer Dall <christoffer.dall@...aro.org>,
Marc Zyngier <marc.zyngier@....com>,
Vladimir Murzin <vladimir.murzin@....com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Grant Grundler <grundler@...omium.org>,
Greg Hackmann <ghackmann@...gle.com>,
Michael Davidson <md@...gle.com>
Subject: Re: [PATCH] arm64: Fix multiple 'asm-operand-widths' warnings
Hi,
On Mon, May 01, 2017 at 02:26:22PM -0700, Matthias Kaehlcke wrote:
> diff --git a/arch/arm64/include/asm/uaccess.h b/arch/arm64/include/asm/uaccess.h
> index 5308d696311b..7db143689694 100644
> --- a/arch/arm64/include/asm/uaccess.h
> +++ b/arch/arm64/include/asm/uaccess.h
> @@ -302,7 +302,7 @@ do { \
> " .previous\n" \
> _ASM_EXTABLE(1b, 3b) \
> : "+r" (err) \
> - : "r" (x), "r" (addr), "i" (-EFAULT))
> + : "r" ((__u64)x), "r" (addr), "i" (-EFAULT))
>
For reference, do you have the warning for this case to hand?
In __put_user_err() we make __pu_val the same type as *ptr, then we
switch on sizeof(*ptr), and pass __pu_val to __put_user_asm(), as x.
For cases 1, 2, and 4, we use "%w" as the register template.
So I can't see why we'd need this cast in __put_user_err().
I must be missing something.
Thanks,
Mark.
Powered by blists - more mailing lists