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: <ccc783075aac4ee2b0b43c4644cc992f@AcuMS.aculab.com>
Date:   Tue, 22 Dec 2020 09:34:35 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Palmer Dabbelt' <palmer@...belt.com>,
        "linux-riscv@...ts.infradead.org" <linux-riscv@...ts.infradead.org>
CC:     "daniel.lezcano@...aro.org" <daniel.lezcano@...aro.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "kernel-team@...roid.com" <kernel-team@...roid.com>,
        Palmer Dabbelt <palmerdabbelt@...gle.com>,
        "kernel test robot" <lkp@...el.com>
Subject: RE: [PATCH] clocksource: clint: Avoid remove __iomem in
 get_cycles_hi()

From: Palmer Dabbelt
> Sent: 22 December 2020 05:33
> 
> From: Palmer Dabbelt <palmerdabbelt@...gle.com>
> 
> This cast loses the __iomem qualifier from clint_timer_val, which
> triggers an sparse warning.
> 
> Reported-by: kernel test robot <lkp@...el.com>
> Signed-off-by: Palmer Dabbelt <palmerdabbelt@...gle.com>
> ---
>  drivers/clocksource/timer-clint.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clocksource/timer-clint.c b/drivers/clocksource/timer-clint.c
> index 6cfe2ab73eb0..83a8b38d46f6 100644
> --- a/drivers/clocksource/timer-clint.c
> +++ b/drivers/clocksource/timer-clint.c
> @@ -63,7 +63,7 @@ static struct riscv_ipi_ops clint_ipi_ops = {
>  #define clint_get_cycles()	readq_relaxed(clint_timer_val)
>  #else
>  #define clint_get_cycles()	readl_relaxed(clint_timer_val)
> -#define clint_get_cycles_hi()	readl_relaxed(((u32 *)clint_timer_val) + 1)
> +#define clint_get_cycles_hi()	readl_relaxed(((u32 __iomem *)clint_timer_val) + 1)
>  #endif

The correct fix is (probably) to define clint_timer_val as u32 on 32bit systems.

Oh - and get rid of those #defines, they are only used in the
functions just below them.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ