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: <13261104-4544-b198-0d0c-0d39651f27c9@linaro.org>
Date:   Mon, 6 Feb 2023 10:45:03 +0000
From:   Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To:     arinc9.unal@...il.com,
        Rafał Miłecki <zajec5@...il.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Willem-Jan de Hoog <wdehoog@...londelft.nl>,
        Florian Fainelli <f.fainelli@...il.com>
Cc:     Arınç ÜNAL <arinc.unal@...nc9.com>,
        Rafał Miłecki <rafal@...ecki.pl>,
        linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
        erkin.bozoglu@...ont.com
Subject: Re: [PATCH v2 2/2] nvmem: brcm_nvram: use bcm47xx buffered data



On 06/02/2023 10:16, arinc9.unal@...il.com wrote:
> From: Willem-Jan de Hoog <wdehoog@...londelft.nl>
> 
> The bcm47xx module has a copy of the NVRAM data in ram. When available, use
> this one instead of reading from io memory since it causes mtd/ubi to fail.
> 
> [ arinc.unal@...nc9.com: Improved patch subject and log ]
> 
> Signed-off-by: Willem-Jan de Hoog <wdehoog@...londelft.nl>
> Signed-off-by: Arınç ÜNAL <arinc.unal@...nc9.com>
> ---
>   drivers/nvmem/brcm_nvram.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/nvmem/brcm_nvram.c b/drivers/nvmem/brcm_nvram.c
> index 34130449f2d2..f74bcb1c948e 100644
> --- a/drivers/nvmem/brcm_nvram.c
> +++ b/drivers/nvmem/brcm_nvram.c
> @@ -33,6 +33,12 @@ struct brcm_nvram_header {
>   static int brcm_nvram_read(void *context, unsigned int offset, void *val,
>   			   size_t bytes)
>   {
> +#ifdef CONFIG_BCM47XX_NVRAM
> +
Hmm this is not the right way to fix/add support for this, consider 
adding SoC specific compatible and based on that you can take right 
choice at runtime.

there are 2 issues with this patch which you should probably consider.
1. no dependency expressed in any way in Kconfig.
2. If we build these as modules everything will break as the symbol is 
not exported.


--srini
> +	return bcm47xx_nvram_read(offset, val, bytes);
> +
> +#else
> +
>   	struct brcm_nvram *priv = context;
>   	u8 *dst = val;
>   
> @@ -40,6 +46,8 @@ static int brcm_nvram_read(void *context, unsigned int offset, void *val,
>   		*dst++ = readb(priv->base + offset++);
>   
>   	return 0;
> +
> +#endif
>   }
>   
>   static int brcm_nvram_add_cells(struct brcm_nvram *priv, uint8_t *data,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ