linux/drivers/nvmem
Thomas Weißschuh 6bef98bafd nvmem: core: limit cell sysfs permissions to main attribute ones
The cell sysfs attribute should not provide more access to the nvmem
data than the main attribute itself.
For example if nvme_config::root_only was set, the cell attribute
would still provide read access to everybody.

Mask out permissions not available on the main attribute.

Fixes: 0331c61194 ("nvmem: core: Expose cells through sysfs")
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240628113704.13742-5-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-03 16:37:51 +02:00
..
layouts
Kconfig
Makefile
apple-efuses.c
bcm-ocotp.c
brcm_nvram.c
core.c nvmem: core: limit cell sysfs permissions to main attribute ones 2024-07-03 16:37:51 +02:00
imx-iim.c
imx-ocotp-ele.c
imx-ocotp-scu.c
imx-ocotp.c
internals.h
jz4780-efuse.c
lan9662-otpc.c
layerscape-sfp.c
layouts.c
lpc18xx_eeprom.c
lpc18xx_otp.c
meson-efuse.c
meson-mx-efuse.c
microchip-otpc.c
mtk-efuse.c
mxs-ocotp.c
nintendo-otp.c
qcom-spmi-sdam.c
qfprom.c
qoriq-efuse.c
rave-sp-eeprom.c
rmem.c
rockchip-efuse.c
rockchip-otp.c
sc27xx-efuse.c
sec-qfprom.c
snvs_lpgpr.c
sprd-efuse.c
stm32-bsec-optee-ta.c
stm32-bsec-optee-ta.h
stm32-romem.c
sunplus-ocotp.c
sunxi_sid.c
u-boot-env.c
uniphier-efuse.c
vf610-ocotp.c
zynqmp_nvmem.c