Commit 2a19be61 authored by Vlastimil Babka's avatar Vlastimil Babka
Browse files

mm/slab: remove CONFIG_SLAB from all Kconfig and Makefile



Remove CONFIG_SLAB, CONFIG_DEBUG_SLAB, CONFIG_SLAB_DEPRECATED and
everything in Kconfig files and mm/Makefile that depends on those. Since
SLUB is the only remaining allocator, remove the allocator choice, make
CONFIG_SLUB a "def_bool y" for now and remove all explicit dependencies
on SLUB or SLAB as it's now always enabled. Make every option's verbose
name and description refer to "the slab allocator" without refering to
the specific implementation. Do not rename the CONFIG_ option names yet.

Everything under #ifdef CONFIG_SLAB, and mm/slab.c is now dead code, all
code under #ifdef CONFIG_SLUB is now always compiled.

Reviewed-by: default avatarKees Cook <keescook@chromium.org>
Reviewed-by: default avatarChristoph Lameter <cl@linux.com>
Acked-by: default avatarDavid Rientjes <rientjes@google.com>
Tested-by: default avatarDavid Rientjes <rientjes@google.com>
Reviewed-by: default avatarHyeonggon Yoo <42.hyeyoo@gmail.com>
Tested-by: default avatarHyeonggon Yoo <42.hyeyoo@gmail.com>
Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
parent 0445ee00
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -154,7 +154,7 @@ config ARM64
	select HAVE_MOVE_PUD
	select HAVE_PCI
	select HAVE_ACPI_APEI if (ACPI && EFI)
	select HAVE_ALIGNED_STRUCT_PAGE if SLUB
	select HAVE_ALIGNED_STRUCT_PAGE
	select HAVE_ARCH_AUDITSYSCALL
	select HAVE_ARCH_BITREVERSE
	select HAVE_ARCH_COMPILER_H
+1 −1
Original line number Diff line number Diff line
@@ -146,7 +146,7 @@ config S390
	select GENERIC_TIME_VSYSCALL
	select GENERIC_VDSO_TIME_NS
	select GENERIC_IOREMAP if PCI
	select HAVE_ALIGNED_STRUCT_PAGE if SLUB
	select HAVE_ALIGNED_STRUCT_PAGE
	select HAVE_ARCH_AUDITSYSCALL
	select HAVE_ARCH_JUMP_LABEL
	select HAVE_ARCH_JUMP_LABEL_RELATIVE
+1 −1
Original line number Diff line number Diff line
@@ -169,7 +169,7 @@ config X86
	select HAS_IOPORT
	select HAVE_ACPI_APEI			if ACPI
	select HAVE_ACPI_APEI_NMI		if ACPI
	select HAVE_ALIGNED_STRUCT_PAGE		if SLUB
	select HAVE_ALIGNED_STRUCT_PAGE
	select HAVE_ARCH_AUDITSYSCALL
	select HAVE_ARCH_HUGE_VMAP		if X86_64 || X86_PAE
	select HAVE_ARCH_HUGE_VMALLOC		if X86_64
+0 −1
Original line number Diff line number Diff line
@@ -1985,7 +1985,6 @@ config FAULT_INJECTION
config FAILSLAB
	bool "Fault-injection capability for kmalloc"
	depends on FAULT_INJECTION
	depends on SLAB || SLUB
	help
	  Provide fault-injection capability for kmalloc.

+3 −8
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ menuconfig KASAN
		     (HAVE_ARCH_KASAN_SW_TAGS && CC_HAS_KASAN_SW_TAGS)) && \
		    CC_HAS_WORKING_NOSANITIZE_ADDRESS) || \
		   HAVE_ARCH_KASAN_HW_TAGS
	depends on (SLUB && SYSFS && !SLUB_TINY) || (SLAB && !DEBUG_SLAB)
	depends on SYSFS && !SLUB_TINY
	select STACKDEPOT_ALWAYS_INIT
	help
	  Enables KASAN (Kernel Address Sanitizer) - a dynamic memory safety
@@ -78,7 +78,7 @@ config KASAN_GENERIC
	bool "Generic KASAN"
	depends on HAVE_ARCH_KASAN && CC_HAS_KASAN_GENERIC
	depends on CC_HAS_WORKING_NOSANITIZE_ADDRESS
	select SLUB_DEBUG if SLUB
	select SLUB_DEBUG
	select CONSTRUCTORS
	help
	  Enables Generic KASAN.
@@ -89,13 +89,11 @@ config KASAN_GENERIC
	  overhead of ~50% for dynamic allocations.
	  The performance slowdown is ~x3.

	  (Incompatible with CONFIG_DEBUG_SLAB: the kernel does not boot.)

config KASAN_SW_TAGS
	bool "Software Tag-Based KASAN"
	depends on HAVE_ARCH_KASAN_SW_TAGS && CC_HAS_KASAN_SW_TAGS
	depends on CC_HAS_WORKING_NOSANITIZE_ADDRESS
	select SLUB_DEBUG if SLUB
	select SLUB_DEBUG
	select CONSTRUCTORS
	help
	  Enables Software Tag-Based KASAN.
@@ -110,12 +108,9 @@ config KASAN_SW_TAGS
	  May potentially introduce problems related to pointer casting and
	  comparison, as it embeds a tag into the top byte of each pointer.

	  (Incompatible with CONFIG_DEBUG_SLAB: the kernel does not boot.)

config KASAN_HW_TAGS
	bool "Hardware Tag-Based KASAN"
	depends on HAVE_ARCH_KASAN_HW_TAGS
	depends on SLUB
	help
	  Enables Hardware Tag-Based KASAN.

Loading