From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gaurav Kohli Subject: Re: [PATCH v2] nvmem: core: Set no-read-write provider to avoid userspace read/write Date: Wed, 20 Mar 2019 21:20:28 +0530 Message-ID: <5f11070f-bf9b-c313-9a78-e412a2fb2908@codeaurora.org> References: <1552831940-7327-1-git-send-email-gkohli@codeaurora.org> <48a71861-c60b-7fe7-d4af-5269cd7c20eb@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <48a71861-c60b-7fe7-d4af-5269cd7c20eb@linaro.org> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Srinivas Kandagatla , linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org On 3/20/2019 8:04 PM, Srinivas Kandagatla wrote: > > > On 17/03/2019 14:12, Gaurav Kohli wrote: >> Current nvmem framework allows user space to read all register space >> populated by nvmem binary file, In case we don't want to expose value >> of registers to userspace and only want kernel space to read cell >> value from nvmem_cell_read_u32. >> >> To protect the same, Add no-read-write property to prevent read >> from userspace. >> > > Can you explain the real need of this? > Is there any issue you are noticing while reading nvmem content from > userspace? > Hi Srinivas, No, We are not observing any issue, nvmem is dumping the data properly. But there are certain register, which we don't want to expose to user space and want kernel space can only read via nvmem_cell_read. In existing design, even if we read cell from kernel space, nvmem binary files is still populated to user space unconditionally. Regards Gaurav > I don't think this is the right way to do this, its misleading in many > ways. Also this should not be a part of DT binding. > > If we decide that we need this feature, then better way to do this > using a new Kernel config. > > 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.