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: <20230310110045.22387796@xps-13>
Date:   Fri, 10 Mar 2023 11:00:45 +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,
        Alexander Stein <alexander.stein@...tq-group.com>
Subject: Re: [PATCH v2 09/21] nvmem: core: return -ENOENT if nvmem cell is
 not found

Hi Srinivas,

srinivas.kandagatla@...aro.org wrote on Fri, 10 Mar 2023 09:57:54 +0000:

> On 07/03/2023 16:53, Miquel Raynal wrote:
> > From: Michael Walle <michael@...le.cc>
> > 
> > Prior to commit 3cb05fdbaed6 ("nvmem: core: add an index parameter to
> > the cell") of_nvmem_cell_get() would return -ENOENT if the cell wasn't
> > found. Particularly, if of_property_match_string() returned -EINVAL,
> > that return code was passed as the index to of_parse_phandle(), which
> > then detected it as invalid and returned NULL. That led to an return
> > code of -ENOENT.
> > 
> > With the new code, the negative index will lead to an -EINVAL of
> > of_parse_phandle_with_optional_args() which pass straight to the
> > caller and break those who expect an -ENOENT.
> > 
> > Fix it by always returning -ENOENT.
> > 
> > Fixes: efff2655ab0f ("nvmem: core: add an index parameter to the cell")
> > Reported-by: Alexander Stein <alexander.stein@...tq-group.com>
> > Signed-off-by: Michael Walle <michael@...le.cc>
> > Signed-off-by: Miquel Raynal <miquel.raynal@...tlin.com>
> > ---  
> 
> Already applied.

Yes, sorry, Michael spotted it as well, I wasn't based on the right
branch. v3 is udpated on this regard.

Thanks,
Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ