Re: [PATCH 09/13] x86/kconfig/64: Enable popular MM options in the defconfig

From: Jann Horn
Date: Mon Jun 16 2025 - 14:34:51 EST


On Sat, Jun 14, 2025 at 12:39 PM Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> On Thu, May 15, 2025 at 03:27:15PM +0200, Ingo Molnar wrote:
> > Since the x86 defconfig aims to be a distro kernel work-alike with
> > fewer drivers and a shorter build time, enable the following
> > MM options that are typically enabled on major Linux distributions:
> >
> > - ACPI_HOTPLUG_MEMORY, ZSWAP, SLAB hardening, MEMORY_HOTPLUG,
> > MEMORY_HOTREMOVE, PAGE_REPORTING, KSM, higher DEFAULT_MMAP_MIN_ADDR,
> > MEMORY_FAILURE, HWPOISON_INJECT, TRANSPARENT_HUGEPAGE,
> > TRANSPARENT_HUGEPAGE_MADVISE, IDLE_PAGE_TRACKING, ZONE_DEVICE
> > DEVICE_PRIVATE, ANON_VMA_NAME, USERFAULTFD, multi-gen LRU.
> >
> > Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
>
> > +CONFIG_KSM=y
>
> Isn't this thing like a giant security fail?

Yeah. (Though to actually do anything interesting, it requires root to
opt-in by enabling it through sysfs, and also requires the application
to opt in.)