linux_dsm_epyc7002/drivers/misc
Tianlin Li c576eddf1c drivers/misc: sram-exec: have the callers of set_memory_*() check the return value
Right now several architectures allow their set_memory_*() family of
functions to fail, but callers may not be checking the return values.
If set_memory_*() returns with an error, call-site assumptions may be
infact wrong to assume that it would either succeed or not succeed at
all. Ideally, the failure of set_memory_*() should be passed up the call
stack, and callers should examine the failure and deal with it.

Need to fix the callers and add the __must_check attribute. They also
may not provide any level of atomicity, in the sense that the memory
protections may be left incomplete on failure. This issue likely has a
few steps on effects architectures:
  1) Have all callers of set_memory_*() helpers check the return value.
  2) Add __must_check to all set_memory_*() helpers so that new uses do
     not ignore the return value.
  3) Add atomicity to the calls so that the memory protections aren't
     left in a partial state.

This series is part of step 1. Make sram driver check the return value
of set_memory_*().

Signed-off-by: Tianlin Li <tli@digitalocean.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20191217194528.16461-1-tli@digitalocean.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-14 15:06:06 +01:00
..
altera-stapl
c2port
cardreader misc: rtsx: Add support for RTS5261 2019-11-14 13:07:48 +08:00
cb710
cxl compat_ioctl: use correct compat_ptr() translation in drivers 2019-10-23 17:23:44 +02:00
echo
eeprom Merge branch 'i2c/for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2019-12-01 18:29:36 -08:00
genwqe compat_ioctl: use correct compat_ptr() translation in drivers 2019-10-23 17:23:44 +02:00
habanalabs habanalabs: remove variable 'val' set but not used 2019-12-14 15:12:21 +02:00
ibmasm Merge branch 'work.mount0' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2019-07-19 10:42:02 -07:00
lis3lv02d lis3lv02d: switch to using input device polling mode 2019-10-10 15:24:19 +02:00
lkdtm Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-12-01 19:05:07 -08:00
mei mei: hdcp: bind only with i915 on the same PCH 2020-01-10 13:20:49 +01:00
mic misc: MIC: drop all 'comment' lines from its Kconfig 2019-10-10 15:24:20 +02:00
ocxl ocxl: Fix potential memory leak on context creation 2019-12-14 07:59:39 +11:00
sgi-gru sgi-gru: simplify procfs code some more 2019-10-10 15:24:19 +02:00
sgi-xp Char/Misc driver patches for 5.4-rc1 2019-09-18 11:14:31 -07:00
ti-st drivers/misc: ti-st: Remove unneeded variable in st_tty_open 2019-10-04 15:14:37 +02:00
vmw_vmci compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
ad525x_dpot-i2c.c
ad525x_dpot-spi.c
ad525x_dpot.c
ad525x_dpot.h
apds990x.c
apds9802als.c
atmel_tclib.c misc: atmel_tclib: use devm_platform_ioremap_resource() to simplify code 2019-10-10 15:24:19 +02:00
atmel-ssc.c
bh1770glc.c
cs5535-mfgpt.c
ds1682.c
dummy-irq.c
enclosure.c
fastrpc.c Merge 5.4-rc3 into char-misc-next 2019-10-14 07:36:49 +02:00
hmc6352.c
hpilo.c
hpilo.h misc: Use the correct style for SPDX License Identifier 2019-10-10 15:34:40 +02:00
ibmvmc.c
ibmvmc.h misc: Use the correct style for SPDX License Identifier 2019-10-10 15:34:40 +02:00
ics932s401.c
isl29003.c
isl29020.c
Kconfig misc: Fix Kconfig indentation 2019-11-20 15:09:49 +01:00
kgdbts.c
lattice-ecp3-config.c
Makefile Char/Misc driver patches for 5.4-rc1 2019-09-18 11:14:31 -07:00
pch_phub.c
pci_endpoint_test.c PCI: Add PCI_STD_NUM_BARS for the number of standard BARs 2019-10-14 10:22:26 -05:00
phantom.c
pti.c
pvpanic.c
qcom-coincell.c
sram-exec.c drivers/misc: sram-exec: have the callers of set_memory_*() check the return value 2020-01-14 15:06:06 +01:00
sram.c misc: sram: use devm_platform_ioremap_resource_wc() 2019-11-05 18:32:47 +01:00
sram.h
tifm_7xx1.c
tifm_core.c
tsl2550.c
vexpress-syscfg.c
vmw_balloon.c vmw_balloon: Fix offline page marking with compaction 2019-08-28 22:57:07 +02:00
xilinx_sdfec.c misc: xilinx_sdfec: fix spelling mistake: "Schdule" -> "Schedule" 2019-08-22 14:28:10 -07:00