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: <86blvqsyq0.wl-maz@kernel.org>
Date:   Wed, 11 Sep 2019 15:18:31 +0100
From:   Marc Zyngier <maz@...nel.org>
To:     Talel Shenhar <talel@...zon.com>
Cc:     <robh+dt@...nel.org>, <tglx@...utronix.de>, <jason@...edaemon.net>,
        <mark.rutland@....com>, <nicolas.ferre@...rochip.com>,
        <mchehab+samsung@...nel.org>, <shawn.lin@...k-chips.com>,
        <gregkh@...uxfoundation.org>, <dwmw@...zon.co.uk>,
        <benh@...nel.crashing.org>, <linux-kernel@...r.kernel.org>,
        <devicetree@...r.kernel.org>
Subject: Re: [PATCH v2 3/3] soc: amazon: al-pos: cast to u64 before left shifting

On Tue, 10 Sep 2019 20:05:10 +0100,
Talel Shenhar <talel@...zon.com> wrote:
> 
> Fix wrap around for pos errors on addresses above 32 bit.
> 
> Reported-by: kbuild test robot <lkp@...el.com>
> Signed-off-by: Talel Shenhar <talel@...zon.com>
> ---
>  drivers/soc/amazon/al_pos.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/amazon/al_pos.c b/drivers/soc/amazon/al_pos.c
> index a865111..e95e1fc 100644
> --- a/drivers/soc/amazon/al_pos.c
> +++ b/drivers/soc/amazon/al_pos.c
> @@ -49,7 +49,7 @@ static irqreturn_t al_pos_irq_handler(int irq, void *info)
>  	writel(0, pos->mmio_base + AL_POS_ERROR_LOG_1);
>  
>  	addr = FIELD_GET(AL_POS_ERROR_LOG_0_ADDR_LOW, log0);
> -	addr |= (FIELD_GET(AL_POS_ERROR_LOG_1_ADDR_HIGH, log1) << 32);
> +	addr |= (((u64)FIELD_GET(AL_POS_ERROR_LOG_1_ADDR_HIGH, log1)) << 32);
>  	request_id = FIELD_GET(AL_POS_ERROR_LOG_1_REQUEST_ID, log1);
>  	bresp = FIELD_GET(AL_POS_ERROR_LOG_1_BRESP, log1);
>  
> -- 
> 2.7.4
> 

This fix should be squashed into the previous patch.

Thanks,

	M.

-- 
Jazz is not dead, it just smells funny.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ