linux-stable/drivers/misc
Kristina Martsenko a284f59cf9 lkdtm: cfi: Make PAC test work with GCC 7 and 8
[ Upstream commit f68022ae0a ]

The CFI test uses the branch-protection=none compiler attribute to
disable PAC return address protection on a function. While newer GCC
versions support this attribute, older versions (GCC 7 and 8) instead
supported the sign-return-address=none attribute, leading to a build
failure when the test is built with older compilers. Fix it by checking
which attribute is supported and using the correct one.

Fixes: 2e53b877dc ("lkdtm: Add CFI_BACKWARD to test ROP mitigations")
Reported-by: Daniel Díaz <daniel.diaz@linaro.org>
Signed-off-by: Kristina Martsenko <kristina.martsenko@arm.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/all/CAEUSe78kDPxQmQqCWW-_9LCgJDFhAeMoVBFnX9QLx18Z4uT4VQ@mail.gmail.com/
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:26:50 +01:00
..
altera-stapl
bcm-vk
c2port
cardreader Merge 5.19-rc6 into char-misc-next 2022-07-11 08:32:58 +02:00
cb710
cxl cxl: Fix refcount leak in cxl_calc_capp_routing 2022-12-31 13:26:34 +01:00
echo
eeprom eeprom: idt_89hpesx: uninitialized data in idt_dbgfs_csr_write() 2022-07-14 16:53:19 +02:00
genwqe
habanalabs habanalabs: move h/w dirty message to debug 2022-07-12 09:09:31 +03:00
ibmasm
lis3lv02d
lkdtm lkdtm: cfi: Make PAC test work with GCC 7 and 8 2022-12-31 13:26:50 +01:00
mei mei: me: fix clang -Wformat warning 2022-07-14 16:53:38 +02:00
ocxl ocxl: fix pci device refcount leak when calling get_function_0() 2022-12-31 13:26:26 +01:00
pvpanic
sgi-gru misc: sgi-gru: fix use-after-free error in gru_set_context_option, gru_fault and gru_handle_user_call_os 2022-12-31 13:26:26 +01:00
sgi-xp sgi-xp: Use the bitmap API to allocate bitmaps 2022-07-08 15:41:39 +02:00
ti-st
uacce uacce: Handle parent device removal or parent driver module rmmod 2022-07-01 10:35:08 +02:00
vmw_vmci misc/vmw_vmci: fix an infoleak in vmci_host_do_receive_datagram() 2022-11-26 09:27:51 +01:00
Kconfig misc: Add a mechanism to detect stalls on guest vCPUs 2022-07-14 16:54:17 +02:00
Makefile misc: Add a mechanism to detect stalls on guest vCPUs 2022-07-14 16:54:17 +02:00
ad525x_dpot-i2c.c
ad525x_dpot-spi.c
ad525x_dpot.c
ad525x_dpot.h
apds990x.c
apds9802als.c
atmel-ssc.c misc: update maintainer email address and description for atmel-ssc 2022-08-03 11:03:03 +02:00
bh1770glc.c
cs5535-mfgpt.c
ds1682.c
dummy-irq.c
dw-xdata-pcie.c
enclosure.c
fastrpc.c misc: fastrpc: increase maximum session count 2022-09-01 16:13:07 +02:00
gehc-achc.c
hi6421v600-irq.c
hisi_hikey_usb.c
hmc6352.c
hpilo.c
hpilo.h
ibmvmc.c
ibmvmc.h
ics932s401.c
isl29003.c
isl29020.c
kgdbts.c
lattice-ecp3-config.c
open-dice.c
pch_phub.c
pci_endpoint_test.c misc: pci_endpoint_test: Fix pci_endpoint_test_{copy,write,read}() panic 2022-10-15 08:02:59 +02:00
phantom.c
qcom-coincell.c
sram-exec.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_320.RULE 2022-06-10 14:51:36 +02:00
sram.c
sram.h
tifm_7xx1.c misc: tifm: fix possible memory leak in tifm_7xx1_switch_media() 2022-12-31 13:26:26 +01:00
tifm_core.c
tsl2550.c
vcpu_stall_detector.c misc: Add a mechanism to detect stalls on guest vCPUs 2022-07-14 16:54:17 +02:00
vmw_balloon.c - The usual batches of cleanups from Baoquan He, Muchun Song, Miaohe 2022-08-05 16:32:45 -07:00
xilinx_sdfec.c