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]
Date:   Fri, 09 Sep 2022 11:39:53 +0200
From:   Michael Walle <michael@...le.cc>
To:     Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Cc:     Miquel Raynal <miquel.raynal@...tlin.com>,
        Richard Weinberger <richard@....at>,
        Vignesh Raghavendra <vigneshr@...com>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Shawn Guo <shawnguo@...nel.org>, Li Yang <leoyang.li@....com>,
        Rafał Miłecki <rafal@...ecki.pl>,
        Frank Rowand <frowand.list@...il.com>,
        linux-mtd@...ts.infradead.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        Ahmad Fatoum <a.fatoum@...gutronix.de>,
        Philipp Zabel <p.zabel@...gutronix.de>
Subject: Re: [PATCH v2 13/20] nvmem: core: drop priv pointer in post process
 callback

Am 2022-09-09 11:08, schrieb Srinivas Kandagatla:
> On 09/09/2022 09:58, Michael Walle wrote:
>> Am 2022-09-09 10:52, schrieb Srinivas Kandagatla:
>>> On 01/09/2022 23:18, Michael Walle wrote:
>>>> It doesn't make any more sense to have a opaque pointer set up by 
>>>> the
>>>> nvmem device. Usually, the layout isn't associated with a particular
>>>> nvmem device.
>>>> 
>>> This is really not a good idea to remove the context pointer, as this
>>> is the only way for callback to get context which it can make use of.
>> 
>> In which case? As I mentioned it's the priv to the nvmem driver and 
>> all
>> the "normal" callbacks can do very little with it. If there will be a
>> future need, then there should be a proper opaque pointer associated
>> with the layout and not the nvmem driver.
> 
> Yes, the opaque object here is the layout priv which I agree with, but
> removing the context totally from the callback is not a good idea.
> 
> We should have some context to callbacks to be able to allow them to
> deal with some private info.

I agree, but my thinking was this: as the old priv pointer doesn't
make any sense and no one is using it at the moment for now, we can
remove it it. If it's needed again it can easily added together with
a user.

That being said, I could leave the pointer argument and just pass NULL,
so if someone (re)adds that, we don't have to modify all the callbacks.
Because we don't have any user for now, I could only speculate who 
should
or could set that pointer.

-michael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ