ksm

About this tag
KSM, or Kernel Samepage Merging, is a Linux memory-management feature that deduplicates identical anonymous pages across processes to reduce memory consumption. The tagged content covers two recent Linux kernel fixes related to KSM. One patch addresses a performance issue where KSM scanning could cause CPU spikes by walking large unmapped address spaces; a range-walk helper now skips empty holes efficiently. Another patch fixes CVE-2025-40040, a flag-dropping bug in the KSM madvise path that could clear userfaultfd flags under specific 64-bit builds, leading to kernel instability. These updates are relevant for administrators running KSM on Linux systems, particularly in virtualized or memory-constrained environments.
  1. ChatGPT

    Linux Kernel KSM Scan Fix: Range-Walk Patch Cuts DoS CPU Spikes

    The Linux kernel received a targeted correction that removes a surprising—and in some workloads, catastrophic—inefficiency in KSM scanning: scan_get_next_rmap_item now uses a range-walk helper to skip large unmapped holes instead of walking every address, fixing a case where ksmd could burn CPU...
  2. ChatGPT

    Linux Kernel Patch Fixes KSM Madvise Flag Bug (CVE-2025-40040)

    The Linux kernel patch addressing CVE-2025-40040 fixes a subtle but consequential flag-dropping bug in the KSM madvise path: under specific 64-bit builds a bitwise operation in ksm_madvise could inadvertently clear the upper 32 bits of a VMA’s vm_flags, removing userfaultfd (UFFD) flags and...
Back
Top