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  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:   Sun, 24 Mar 2019 20:55:59 +0530
From:   Gaurav Kohli <gkohli@...eaurora.org>
To:     Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
        linux-kernel@...r.kernel.org
Cc:     linux-arm-msm@...r.kernel.org,
        Shiraz Hashim <shashim@...eaurora.org>
Subject: Re: [PATCH v0] nvmem: core: Export nvmem cell info to userspace


On 3/22/2019 8:53 PM, Srinivas Kandagatla wrote:
>
>
> On 20/03/2019 05:53, Gaurav Kohli wrote:
>> From: Shiraz Hashim <shashim@...eaurora.org>
>>
>> Existing nvmem framework export full register space
>> as nvmem binary, but not exporting child node of nvmem
>> which is nvmem cell. Kernel can read the specific cell
>> by using nvmem_cell_read but userspace don't have such
>> provision.
>>
>> Add framework to export nvmem cell as well, So
>> userspace can use it directly.
>>
>> Signed-off-by: Shiraz Hashim <shashim@...eaurora.org>
>> Signed-off-by: Gaurav Kohli <gkohli@...eaurora.org>
>> Co-developed-by: Gaurav Kohli <gkohli@...eaurora.org>
>>
>> diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
>
> Thankyou for the patch.
>
> Why do you need such provision when the userspace can just get the 
> cell values using correct offset and size.
> This will also bring over head of managing entries dynamically + 
> confusing userspace abi.
>
> Unless you have a valid reason or usecase I don't see the need for this.


Hi Srinivas,


This is mainly for user space convenience, In existing implementation 
they have to do manipulation according

to offset and bit, And with present patch, they just have to do cat for 
cell name and which can also be easily maintainable

for different soc. But with current, it is difficult to maintain users 
space code as each time we have to change user space code according to bit.


This would also help to expose certain bit only as per the bit parameter 
mentioned in dt node, which would also help to protect exposing of

other bits to user space.

>
> thanks,
> srini

-- 
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center,
Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.

Powered by blists - more mailing lists