linux/drivers/misc
Kees Cook 464e86b4ab lkdtm: Avoid more compiler optimizations for bad writes
It seems at least Clang is able to throw away writes it knows are
destined for read-only memory, which makes things like the WRITE_RO test
fail, as the write gets elided. Instead, force the variable to be
volatile, and make similar changes through-out other tests in an effort
to avoid needing to repeat fixing these kinds of problems. Also includes
pr_err() calls in failure paths so that kernel logs are more clear in
the failure case.

Reported-by: Prasad Sodagudi <psodagud@codeaurora.org>
Suggested-by: Sami Tolvanen <samitolvanen@google.com>
Fixes: 9ae113ce5f ("lkdtm: add tests for additional page permissions")
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20200625203704.317097-2-keescook@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-29 18:41:39 +02:00
..
altera-stapl altera-stapl: altera_get_note: prevent write beyond end of 'key' 2020-03-03 08:02:57 +01:00
c2port
cardreader misc: rtsx_usb: Constify struct usb_device_id 2020-06-29 18:39:45 +02:00
cb710
cxl cxl: Fix kobject memleak 2020-06-29 18:12:53 +02:00
echo treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
eeprom Linux 5.6-rc7 2020-03-26 12:09:58 +01:00
genwqe misc: genwqe: Constify struct pci_error_handlers 2020-06-29 18:39:44 +02:00
habanalabs habanalabs: increase h/w timer when checking idle 2020-06-24 12:35:23 +03: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 lkdtm: Avoid more compiler optimizations for bad writes 2020-06-29 18:41:39 +02:00
mei mei: me: add MEI device for KBP with ITPS capability 2020-06-29 18:40:26 +02:00
mic mic: vop: Constify static structs 2020-06-29 18:39:44 +02:00
ocxl ocxl: Fix misleading comment 2020-05-20 23:39:57 +10:00
sgi-gru mmap locking API: convert mmap_sem comments 2020-06-09 09:39:14 -07:00
sgi-xp sgi-xp: make some symbols static in xpc_main.c 2020-04-23 16:55:23 +02:00
ti-st drivers/misc: ti-st: remove redundant assignment to variables i and flags 2020-01-14 15:16:51 +01:00
uacce uacce: Remove mm_exit() op 2020-05-29 14:52:53 +02:00
vmw_vmci vmci_host: get rid of pointless access_ok() 2020-05-29 11:06:38 -04:00
ad525x_dpot-i2c.c
ad525x_dpot-spi.c
ad525x_dpot.c
ad525x_dpot.h
apds990x.c
apds9802als.c
atmel-ssc.c
atmel_tclib.c misc: atmel_tclib: use devm_platform_ioremap_resource() to simplify code 2019-10-10 15:24:19 +02:00
bh1770glc.c
cs5535-mfgpt.c
ds1682.c
dummy-irq.c
enclosure.c scsi: enclosure: Fix stale device oops with hot replug 2020-01-10 01:38:40 -05:00
fastrpc.c misc: fastrpc: fix potential fastrpc_invoke_ctx leak 2020-05-15 16:21:08 +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 misc: isl29020: add missed pm_runtime_disable 2020-01-14 15:06:07 +01:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
kgdbts.c maccess: rename probe_kernel_{read,write} to copy_{from,to}_kernel_nofault 2020-06-17 10:57:41 -07:00
lattice-ecp3-config.c
Makefile bus: vexpress-config: Merge vexpress-syscfg into vexpress-config 2020-05-13 12:42:46 -05:00
pch_phub.c
pci_endpoint_test.c misc: pci_endpoint_test: Add Device ID for RZ/G2E PCIe controller 2020-05-19 16:46:12 +02:00
phantom.c
pti.c Char/Misc driver changes for 5.6-rc1 2020-01-29 10:35:54 -08:00
pvpanic.c misc: pvpanic: add crash loaded event 2020-01-14 15:07:37 +01:00
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 misc: tsl2550: remove redundant initialization to variable r 2020-01-14 15:16:51 +01:00
vmw_balloon.c vmw_balloon: Explicitly include linux/io.h for virt_to_phys() 2019-12-10 10:15:48 +01:00
xilinx_sdfec.c misc: xilinx-sdfec: convert get_user_pages() --> pin_user_pages() 2020-05-27 11:09:26 +02:00