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: <20230310114510.0867e0bd@xps-13>
Date:   Fri, 10 Mar 2023 11:45:10 +0100
From:   Miquel Raynal <miquel.raynal@...tlin.com>
To:     Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Cc:     linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Michael Walle <michael@...le.cc>,
        Rafał Miłecki <rafal@...ecki.pl>,
        Robert Marko <robert.marko@...tura.hr>,
        Luka Perkov <luka.perkov@...tura.hr>,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
        Rob Herring <robh+dt@...nel.org>,
        Frank Rowand <frowand.list@...il.com>,
        devicetree@...r.kernel.org
Subject: Re: [PATCH v2 11/21] nvmem: core: handle the absence of expected
 layouts

Hi Srinivas,

srinivas.kandagatla@...aro.org wrote on Fri, 10 Mar 2023 10:30:14 +0000:

> On 07/03/2023 16:53, Miquel Raynal wrote:
> > Make nvmem_layout_get() return -EPROBE_DEFER while the expected layout
> > is not available. This condition cannot be triggered today as nvmem
> > layout drivers are initialed as part of an early init call, but soon
> > these drivers will be converted into modules and be initialized with a
> > standard priority, so the unavailability of the drivers might become a
> > reality that must be taken care of.
> > 
> > Let's anticipate this by telling the caller the layout might not yet be
> > available. A probe deferral is requested in this case.
> > 
> > Please note this does not affect any nvmem device not using layouts,
> > because an early check against the "nvmem-layout" container presence
> > will return NULL in this case.
> > 
> > Signed-off-by: Miquel Raynal <miquel.raynal@...tlin.com>
> > Tested-by: Michael Walle <michael@...le.cc>
> > ---
> >   drivers/nvmem/core.c | 10 +++++++++-
> >   1 file changed, 9 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
> > index b9be1faeb7be..51fd792b8d70 100644
> > --- a/drivers/nvmem/core.c
> > +++ b/drivers/nvmem/core.c
> > @@ -755,7 +755,7 @@ EXPORT_SYMBOL_GPL(nvmem_layout_unregister);
> >   static struct nvmem_layout *nvmem_layout_get(struct nvmem_device *nvmem)
> >   {  
> 
> Any reason why this is not part of 10/21?

Yes, I would like to credit everybody for his work, so Michael for the
base implementation and myself for the module sitaution handling,
arguing this is two different features. May we keep these separated?

> kernel doc for nvmem_layout_get needs updating with this behavior.

There is no kdoc for nvmem_layout_get, do you want one ? I thought the
comment where this function is called would be more descriptive (and
read by interested people).

Thanks,
Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ