<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/nvmem/nvmem-sysfs.c, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/nvmem/nvmem-sysfs.c?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/nvmem/nvmem-sysfs.c?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2020-03-25T18:23:49Z</updated>
<entry>
<title>nvmem: core: remove nvmem_sysfs_get_groups()</title>
<updated>2020-03-25T18:23:49Z</updated>
<author>
<name>Srinivas Kandagatla</name>
<email>srinivas.kandagatla@linaro.org</email>
</author>
<published>2020-03-25T13:19:51Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=844003052719375bad24a740fed5d32c5a18efaf'/>
<id>urn:sha1:844003052719375bad24a740fed5d32c5a18efaf</id>
<content type='text'>
Now that we are using is_bin_visible callback, we do not need
nvmem_sysfs_get_groups() anymore so move all the relevant data-structures
and code to core.c

Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20200325131951.31887-3-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: core: use is_bin_visible for permissions</title>
<updated>2020-03-25T18:23:48Z</updated>
<author>
<name>Srinivas Kandagatla</name>
<email>srinivas.kandagatla@linaro.org</email>
</author>
<published>2020-03-25T13:19:50Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=664f0549380cd5bee2cdac0a6ccfe21bdf74e027'/>
<id>urn:sha1:664f0549380cd5bee2cdac0a6ccfe21bdf74e027</id>
<content type='text'>
By using is_bin_visible callback to set permissions will remove a
large list of attribute groups. These group permissions can be
dynamically derived in the callback.

Also add checks for read/write callbacks and set permissions accordingly.

Suggested-by: Greg KH &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20200325131951.31887-2-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: check for NULL reg_read and reg_write before dereferencing</title>
<updated>2020-03-19T06:41:03Z</updated>
<author>
<name>Nicholas Johnson</name>
<email>nicholas.johnson-opensource@outlook.com.au</email>
</author>
<published>2020-03-10T13:22:52Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=3c91ef69a3e94f78546b246225ed573fbf1735b4'/>
<id>urn:sha1:3c91ef69a3e94f78546b246225ed573fbf1735b4</id>
<content type='text'>
Return -EPERM if reg_read is NULL in bin_attr_nvmem_read() or if
reg_write is NULL in bin_attr_nvmem_write().

This prevents NULL dereferences such as the one described in
03cd45d2e219 ("thunderbolt: Prevent crash if non-active NVMem file is
read")

Signed-off-by: Nicholas Johnson &lt;nicholas.johnson-opensource@outlook.com.au&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20200310132257.23358-10-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: Use the same permissions for eeprom as for nvmem</title>
<updated>2019-07-30T16:22:20Z</updated>
<author>
<name>Jean Delvare</name>
<email>jdelvare@suse.de</email>
</author>
<published>2019-07-28T16:42:55Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e70d8b287301eb6d7c7761c6171c56af62110ea3'/>
<id>urn:sha1:e70d8b287301eb6d7c7761c6171c56af62110ea3</id>
<content type='text'>
The compatibility "eeprom" attribute is currently root-only no
matter what the configuration says. The "nvmem" attribute does
respect the setting of the root_only configuration bit, so do the
same for "eeprom".

Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Fixes: b6c217ab9be6 ("nvmem: Add backwards compatibility support for older EEPROM drivers.")
Reviewed-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Cc: Andrew Lunn &lt;andrew@lunn.ch&gt;
Cc: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Link: https://lore.kernel.org/r/20190728184255.563332e6@endymion
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: core: add NVMEM_SYSFS Kconfig</title>
<updated>2019-04-25T17:44:33Z</updated>
<author>
<name>Srinivas Kandagatla</name>
<email>srinivas.kandagatla@linaro.org</email>
</author>
<published>2019-04-16T09:59:24Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=ae0c2d725512f32a0d1a25f0cf2f07616d33a72e'/>
<id>urn:sha1:ae0c2d725512f32a0d1a25f0cf2f07616d33a72e</id>
<content type='text'>
Many nvmem providers are not very keen on having default sysfs
nvmem entry, as most of the usecases for them are inside kernel
itself. And in some cases read/writes to some areas in nvmem are
restricted and trapped at secure monitor level, so accessing them
from userspace would result in board reboots.

This patch adds new NVMEM_SYSFS Kconfig to make binary sysfs entry
an optional one. This provision will give more flexibility to users.
This patch also moves existing sysfs code to a new file so that its
not compiled in when its not really required.

Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Reviewed-by: Gaurav Kohli &lt;gkohli@codeaurora.org&gt;
Tested-by: Gaurav Kohli &lt;gkohli@codeaurora.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
