linux/drivers/misc
Christophe Leroy bc93a22a19 lkdtm: Fix content of section containing lkdtm_rodata_do_nothing()
On a kernel without CONFIG_STRICT_KERNEL_RWX, running EXEC_RODATA
test leads to "Illegal instruction" failure.

Looking at the content of rodata_objcopy.o, we see that the
function content zeroes only:

	Disassembly of section .rodata:

	0000000000000000 <.lkdtm_rodata_do_nothing>:
	   0:	00 00 00 00 	.long 0x0

Add the contents flag in order to keep the content of the section
while renaming it.

	Disassembly of section .rodata:

	0000000000000000 <.lkdtm_rodata_do_nothing>:
	   0:	4e 80 00 20 	blr

Fixes: e9e08a0738 ("lkdtm: support llvm-objcopy")
Cc: stable@vger.kernel.org
Cc: Kees Cook <keescook@chromium.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/8900731fbc05fb8b0de18af7133a8fc07c3c53a1.1633712176.git.christophe.leroy@csgroup.eu
2021-12-16 15:54:37 -08:00
..
altera-stapl altera-stapl: remove the unreached switch case 2020-12-09 19:53:03 +01:00
bcm-vk misc: bcm-vk: fix tty registration race 2021-09-21 16:17:15 +02:00
c2port misc: c2port: core: Make copying name from userspace more secure 2020-11-03 10:12:10 +01:00
cardreader misc: rtsx: Remove usage of the deprecated "pci-dma-compat.h" API 2021-09-14 10:57:31 +02:00
cb710 cb710: avoid NULL pointer subtraction 2021-10-05 15:50:05 +02:00
cxl cxl: Use to_pci_driver() instead of pci_dev->driver 2021-10-18 09:20:15 -05:00
echo
eeprom at24: Support probing while in non-zero ACPI D state 2021-11-03 19:03:55 +01:00
genwqe Merge 5.15-rc3 into char-misc next 2021-09-27 15:39:40 +02:00
habanalabs dma-buf: move dma-buf symbols into the DMA_BUF module namespace 2021-10-25 14:53:08 +02:00
ibmasm Char / Misc driver updates for 5.14-rc1 2021-07-05 13:42:16 -07:00
lis3lv02d misc: lis3lv02d: Make lis3lv02d_remove_fs() return void 2021-10-13 14:35:20 +02:00
lkdtm lkdtm: Fix content of section containing lkdtm_rodata_do_nothing() 2021-12-16 15:54:37 -08:00
mei Char/Misc driver update for 5.16-rc1 2021-11-04 08:21:47 -07:00
ocxl ocxl: Use pci core's DVSEC functionality 2021-10-29 11:53:52 -07:00
pvpanic pvpanic: Indentation fixes here and there 2021-09-14 11:07:13 +02:00
sgi-gru misc: sgi-gru: Convert from atomic_t to refcount_t on gru_thread_state->ts_refcnt 2021-07-21 13:50:54 +02:00
sgi-xp net: sgi-xp: use eth_hw_addr_set() 2021-10-29 13:17:21 +01:00
ti-st ti-st: use tty_write_room 2021-05-13 17:03:20 +02:00
uacce uacce: add print information if not enable sva 2021-06-09 18:53:29 +02:00
vmw_vmci VMCI: fix NULL pointer dereference when unmapping queue pair 2021-08-27 16:21:59 +02:00
ad525x_dpot-i2c.c misc: ad525x_dpot: Make ad_dpot_remove() return void 2021-10-13 14:35:37 +02:00
ad525x_dpot-spi.c misc: ad525x_dpot: Make ad_dpot_remove() return void 2021-10-13 14:35:37 +02:00
ad525x_dpot.c misc: ad525x_dpot: Make ad_dpot_remove() return void 2021-10-13 14:35:37 +02:00
ad525x_dpot.h misc: ad525x_dpot: Make ad_dpot_remove() return void 2021-10-13 14:35:37 +02:00
apds990x.c
apds9802als.c
atmel-ssc.c
bh1770glc.c
cs5535-mfgpt.c
ds1682.c
dummy-irq.c
dw-xdata-pcie.c misc: Add Synopsys DesignWare xData IP driver 2021-04-05 13:15:52 +02:00
enclosure.c misc: enclosure: replace snprintf in show functions with sysfs_emit 2021-10-22 11:25:39 +02:00
fastrpc.c dma-buf: move dma-buf symbols into the DMA_BUF module namespace 2021-10-25 14:53:08 +02:00
gehc-achc.c misc: gehc: Add SPI ID table 2021-10-05 15:47:18 +02:00
hi6421v600-irq.c mfd: hi6421-spmi-pmic: Cleanup drvdata to only include regmap 2021-10-05 08:56:08 +01:00
hisi_hikey_usb.c misc: hisi_hikey_usb: change the DT schema 2021-09-14 10:57:31 +02:00
hmc6352.c
hpilo.c misc: hpilo: map iLO shared memory by PCI revision id 2021-06-04 15:28:23 +02:00
hpilo.h misc: hpilo: map iLO shared memory by PCI revision id 2021-06-04 15:28:23 +02:00
ibmvmc.c vio: make remove callback return void 2021-03-02 22:41:23 +11:00
ibmvmc.h
ics932s401.c ics932s401: fix broken handling of errors when word reading fails 2021-05-13 17:21:54 +02:00
isl29003.c misc: isl29003: Fix typo for get/set mode 2020-12-09 19:35:34 +01:00
isl29020.c
Kconfig misc: HI6421V600_IRQ should depend on HAS_IOMEM 2021-10-05 16:07:56 +02:00
kgdbts.c kgdb: fix gcc-11 warnings harder 2021-05-21 15:05:08 +02:00
lattice-ecp3-config.c firmware: replace HOTPLUG with UEVENT in FW_ACTION defines 2021-05-13 16:14:45 +02:00
Makefile IIO / Staging driver update for 5.15-rc1 2021-09-01 09:45:57 -07:00
pch_phub.c
pci_endpoint_test.c pci-v5.15-changes 2021-09-07 19:13:42 -07:00
phantom.c
qcom-coincell.c
sram-exec.c
sram.c misc: sram: Only map reserved areas in Tegra SYSRAM 2021-08-05 14:27:46 +02:00
sram.h misc: sram: Only map reserved areas in Tegra SYSRAM 2021-08-05 14:27:46 +02:00
tifm_7xx1.c tifm: Remove usage of the deprecated "pci-dma-compat.h" API 2021-09-21 17:33:31 +02:00
tifm_core.c tifm: Remove usage of the deprecated "pci-dma-compat.h" API 2021-09-21 17:33:31 +02:00
tsl2550.c
vmw_balloon.c drivers: vmw_balloon: remove dentry pointer for debugfs 2021-03-10 09:21:02 +01:00
xilinx_sdfec.c misc: xilinx-sdfec: Drop unnecessary NULL check after container_of 2021-05-21 22:14:48 +02:00