Skip to content

Commit 9ec2236

Browse files
committed
Merge tag 'hardening-v6.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull hardening fixes from Kees Cook: - gcc plugins: Avoid Kconfig warnings with randstruct (Nathan Chancellor) - MAINTAINERS: Add security/Kconfig.hardening to hardening section (Nathan Chancellor) - MAINTAINERS: Add unsafe_memcpy() to the FORTIFY review list * tag 'hardening-v6.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: MAINTAINERS: Add security/Kconfig.hardening to hardening section hardening: Adjust dependencies in selection of MODVERSIONS MAINTAINERS: Add unsafe_memcpy() to the FORTIFY review list
2 parents fb9b767 + 045244d commit 9ec2236

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

MAINTAINERS

+2
Original file line numberDiff line numberDiff line change
@@ -8914,6 +8914,7 @@ F: include/linux/fortify-string.h
89148914
F: lib/fortify_kunit.c
89158915
F: lib/memcpy_kunit.c
89168916
F: lib/test_fortify/*
8917+
K: \bunsafe_memcpy\b
89178918
K: \b__NO_FORTIFY\b
89188919

89198920
FPGA DFL DRIVERS
@@ -12345,6 +12346,7 @@ F: include/linux/randomize_kstack.h
1234512346
F: kernel/configs/hardening.config
1234612347
F: lib/usercopy_kunit.c
1234712348
F: mm/usercopy.c
12349+
F: security/Kconfig.hardening
1234812350
K: \b(add|choose)_random_kstack_offset\b
1234912351
K: \b__check_(object_size|heap_object)\b
1235012352
K: \b__counted_by\b

security/Kconfig.hardening

+2-2
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ choice
340340
config RANDSTRUCT_FULL
341341
bool "Fully randomize structure layout"
342342
depends on CC_HAS_RANDSTRUCT || GCC_PLUGINS
343-
select MODVERSIONS if MODULES
343+
select MODVERSIONS if MODULES && !COMPILE_TEST
344344
help
345345
Fully randomize the member layout of sensitive
346346
structures as much as possible, which may have both a
@@ -356,7 +356,7 @@ choice
356356
config RANDSTRUCT_PERFORMANCE
357357
bool "Limit randomization of structure layout to cache-lines"
358358
depends on GCC_PLUGINS
359-
select MODVERSIONS if MODULES
359+
select MODVERSIONS if MODULES && !COMPILE_TEST
360360
help
361361
Randomization of sensitive kernel structures will make a
362362
best effort at restricting randomization to cacheline-sized

0 commit comments

Comments
 (0)