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] [day] [month] [year] [list]
Message-ID: <e6d6dcb1-9bdf-fab1-75d6-379b6d04dac8@synopsys.com>
Date:   Fri, 3 Apr 2020 22:00:00 +0000
From:   Vineet Gupta <Vineet.Gupta1@...opsys.com>
To:     Eugeniy Paltsev <Eugeniy.Paltsev@...opsys.com>,
        "linux-snps-arc@...ts.infradead.org" 
        <linux-snps-arc@...ts.infradead.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Alexey Brodkin" <Alexey.Brodkin@...opsys.com>
Subject: Re: [PATCH] ARC: Fix ICCM & DCCM runtime size checks

On 4/2/20 10:54 AM, Eugeniy Paltsev wrote:
> As of today the ICCM and DCCM size checks are incorrectly using
> mismatched units (KiB checked against bytes). The CONFIG_ARC_DCCM_SZ
> and CONFIG_ARC_ICCM_SZ are in KiB, but the size calculated in
> runtime and stored in cpu->dccm.sz and cpu->iccm.sz is in bytes.
>
> Fix that.
>
> Reported-by: Paul Greco <pmgreco@...ibm.com>
> Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@...opsys.com>

LGTM. Will be added after merge window !

Thx,
-Vineet

> ---
>  arch/arc/kernel/setup.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c
> index aa41af6ef4ac..efdedf83b954 100644
> --- a/arch/arc/kernel/setup.c
> +++ b/arch/arc/kernel/setup.c
> @@ -11,6 +11,7 @@
>  #include <linux/clocksource.h>
>  #include <linux/console.h>
>  #include <linux/module.h>
> +#include <linux/sizes.h>
>  #include <linux/cpu.h>
>  #include <linux/of_clk.h>
>  #include <linux/of_fdt.h>
> @@ -409,12 +410,12 @@ static void arc_chk_core_config(void)
>  	if ((unsigned int)__arc_dccm_base != cpu->dccm.base_addr)
>  		panic("Linux built with incorrect DCCM Base address\n");
>  
> -	if (CONFIG_ARC_DCCM_SZ != cpu->dccm.sz)
> +	if (CONFIG_ARC_DCCM_SZ * SZ_1K != cpu->dccm.sz)
>  		panic("Linux built with incorrect DCCM Size\n");
>  #endif
>  
>  #ifdef CONFIG_ARC_HAS_ICCM
> -	if (CONFIG_ARC_ICCM_SZ != cpu->iccm.sz)
> +	if (CONFIG_ARC_ICCM_SZ * SZ_1K != cpu->iccm.sz)
>  		panic("Linux built with incorrect ICCM Size\n");
>  #endif
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ