kernel: Activate CONFIG_HARDENED_USERCOPY for all targets
authorHauke Mehrtens <hauke@hauke-m.de>
Sat, 22 Apr 2023 13:52:56 +0000 (15:52 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 29 Apr 2023 19:56:53 +0000 (21:56 +0200)
This activates CONFIG_HARDENED_USERCOPY for the remaining targets. This
adds additional checks in the copy_from_user() and copy_to_user()
functions.

This was not activated for ARCHS38 before because of a bug in the Linux
kernel 5.4 till 5.14, which as fixed and is described here:
https://github.com/foss-for-synopsys-dwc-arc-processors/linux/issues/15

I do not know why this was deactivated for mt7629 and rockchip.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/archs38/config-5.15
target/linux/mediatek/mt7629/config-5.15
target/linux/rockchip/armv8/config-5.10
target/linux/rockchip/armv8/config-5.15

index 5e180aaf99bc683a0e338921ac9fdd00343d1bf0..d4b1c5ab6021de20caa411ce0f2eebafaf2b1ff2 100644 (file)
@@ -110,7 +110,6 @@ CONFIG_GPIO_GENERIC=y
 CONFIG_GPIO_SNPS_CREG=y
 CONFIG_GRACE_PERIOD=y
 CONFIG_HANDLE_DOMAIN_IRQ=y
-# CONFIG_HARDENED_USERCOPY is not set
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HZ_PERIODIC=y
index 32f75d6528be767525bb2b0d1e7408547badba50..46104ece48f4cc1720706f442074b88425e5a562 100644 (file)
@@ -131,7 +131,6 @@ CONFIG_GENERIC_TIME_VSYSCALL=y
 CONFIG_GENERIC_VDSO_32=y
 CONFIG_GPIO_CDEV=y
 CONFIG_HANDLE_DOMAIN_IRQ=y
-# CONFIG_HARDENED_USERCOPY is not set
 CONFIG_HARDEN_BRANCH_PREDICTOR=y
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_HAS_DMA=y
index 1488da23a8b5c5c6880857a4785f00b134adc114..220b0ec198efd1adcbf6be83b8cad8625e86f7a3 100644 (file)
@@ -249,7 +249,6 @@ CONFIG_GPIO_DWAPB=y
 CONFIG_GPIO_GENERIC=y
 CONFIG_GPIO_GENERIC_PLATFORM=y
 CONFIG_HANDLE_DOMAIN_IRQ=y
-# CONFIG_HARDENED_USERCOPY is not set
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
index 5f94e0c9f223ba239f30b0463b9ed7a5d9c0aafa..d6377f905f0a176fa5f7c2db987bc0b5bb4639df 100644 (file)
@@ -248,7 +248,6 @@ CONFIG_GPIO_GENERIC=y
 CONFIG_GPIO_GENERIC_PLATFORM=y
 CONFIG_GPIO_ROCKCHIP=y
 CONFIG_HANDLE_DOMAIN_IRQ=y
-# CONFIG_HARDENED_USERCOPY is not set
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y