Skip to contentSkip to conversation

Drop obsolete configs from hardening.config

PATCH Applied Lukas Bulwahn 2 participants 4 messages Feb 8, 2024 – Feb 10, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Drop obsolete configs from hardening.config

Dear Kees,

here are two patches cleaning up the hardening config fragment from obsolete config options.

Feel free to squash them if you think they should not be two separate commits.

Lukas

Lukas Bulwahn (2):
hardening: drop obsolete UBSAN_SANITIZE_ALL from config fragment
hardening: drop obsolete DRM_LEGACY from config fragment

 kernel/configs/hardening.config | 4 ----
 1 file changed, 4 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/2 hardening: drop obsolete UBSAN_SANITIZE_ALL from config fragment

Commit 7a628f818499 ("ubsan: Remove CONFIG_UBSAN_SANITIZE_ALL") removes the config UBSAN_SANITIZE_ALL, but one reference to that config is left in the hardening.config fragment.

Drop this reference in hardening.config fragment.

Note that CONFIG_UBSAN is still enabled in the hardening.config fragment, so the functionality when using this fragment remains the same.

---
 kernel/configs/hardening.config | 1 -
 1 file changed, 1 deletion(-)
kernel/configs/hardening.config +0 -1
index 95a400f042b1..4dc0cd342ced 100644
@@ -44,7 +44,6 @@ CONFIG_UBSAN_BOUNDS=y
 # CONFIG_UBSAN_BOOL
 # CONFIG_UBSAN_ENUM
 # CONFIG_UBSAN_ALIGNMENT
-CONFIG_UBSAN_SANITIZE_ALL=y
 
 # Linked list integrity checking.
 CONFIG_LIST_HARDENED=y
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/2 hardening: drop obsolete DRM_LEGACY from config fragment

In reply to Lukas Bulwahn

Commit 94f8f319cbcb ("drm: Remove Kconfig option for legacy support (CONFIG_DRM_LEGACY)") removes the config DRM_LEGACY, but one reference to that config is left in the hardening.config fragment.

As there is no drm legacy driver left, we do not need to recommend this attack surface reduction anymore.

Drop this reference in hardening.config fragment.

---
 kernel/configs/hardening.config | 3 ---
 1 file changed, 3 deletions(-)
kernel/configs/hardening.config +0 -3
index 4dc0cd342ced..ed126d7b5e83 100644
@@ -92,6 +92,3 @@ CONFIG_SYN_COOKIES=y
 
 # Attack surface reduction: Use the modern PTY interface (devpts) only.
 # CONFIG_LEGACY_PTYS is not set
-
-# Attack surface reduction: Use only modesetting video drivers.
-# CONFIG_DRM_LEGACY is not set
Signature · 1 line
2.17.1
Applied
#3 lore raw
In reply to Lukas Bulwahn
Quoted 8 lines · Lukas Bulwahn

here are two patches cleaning up the hardening config fragment from obsolete config options.

Feel free to squash them if you think they should not be two separate commits.

Lukas

[...]

Applied to for-next/hardening, thanks!

[1/2] hardening: drop obsolete UBSAN_SANITIZE_ALL from config fragment

      https://git.kernel.org/kees/c/8ab2b5398287
[2/2] hardening: drop obsolete DRM_LEGACY from config fragment
      https://git.kernel.org/kees/c/8dafd56868ef

Take care,

Signature · 1 line
Kees Cook