lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231113191340.17482-22-vbabka@suse.cz>
Date:   Mon, 13 Nov 2023 20:13:41 +0100
From:   Vlastimil Babka <vbabka@...e.cz>
To:     David Rientjes <rientjes@...gle.com>,
        Christoph Lameter <cl@...ux.com>,
        Pekka Enberg <penberg@...nel.org>,
        Joonsoo Kim <iamjoonsoo.kim@....com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Hyeonggon Yoo <42.hyeyoo@...il.com>,
        Roman Gushchin <roman.gushchin@...ux.dev>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, patches@...ts.linux.dev,
        Andrey Ryabinin <ryabinin.a.a@...il.com>,
        Alexander Potapenko <glider@...gle.com>,
        Andrey Konovalov <andreyknvl@...il.com>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Vincenzo Frascino <vincenzo.frascino@....com>,
        Marco Elver <elver@...gle.com>,
        Johannes Weiner <hannes@...xchg.org>,
        Michal Hocko <mhocko@...nel.org>,
        Shakeel Butt <shakeelb@...gle.com>,
        Muchun Song <muchun.song@...ux.dev>,
        Kees Cook <keescook@...omium.org>, kasan-dev@...glegroups.com,
        cgroups@...r.kernel.org, Vlastimil Babka <vbabka@...e.cz>
Subject: [PATCH 00/20] remove the SLAB allocator

The SLAB allocator has been deprecated since 6.5 and nobody has objected
so far. As we agreed at LSF/MM, we should wait with the removal until
the next LTS kernel is released. AFAIK that version hasn't been
announced yet, but assuming it would be 6.7, we can aim for 6.8 and
start exposing the removal to linux-next during the 6.7 cycle.

To keep the series reasonably sized and not pull in people from other
subsystems than mm and closely related ones, I didn't attempt to remove
every trace of unnecessary reference to dead config options in external
areas, nor in the defconfigs. Such cleanups can be sent to and handled
by respective maintainers after this is merged.

Instead I have added some patches aimed to reap some immediate benefits
of the removal, mainly by not having to split some fastpath code between
slab_common.c and slub.c anymore. But that is also not an exhaustive
effort and I expect more cleanups and optimizations will follow later.

Patch 08 updates CREDITS for the removed mm/slab.c. Please point out if
I missed someone not yet credited.

Git version: https://git.kernel.org/vbabka/l/slab-remove-slab-v1r4

Vlastimil Babka (20):
  mm/slab: remove CONFIG_SLAB from all Kconfig and Makefile
  KASAN: remove code paths guarded by CONFIG_SLAB
  KFENCE: cleanup kfence_guarded_alloc() after CONFIG_SLAB removal
  mm/memcontrol: remove CONFIG_SLAB #ifdef guards
  cpu/hotplug: remove CPUHP_SLAB_PREPARE hooks
  mm/slab: remove CONFIG_SLAB code from slab common code
  mm/mempool/dmapool: remove CONFIG_DEBUG_SLAB ifdefs
  mm/slab: remove mm/slab.c and slab_def.h
  mm/slab: move struct kmem_cache_cpu declaration to slub.c
  mm/slab: move the rest of slub_def.h to mm/slab.h
  mm/slab: consolidate includes in the internal mm/slab.h
  mm/slab: move pre/post-alloc hooks from slab.h to slub.c
  mm/slab: move memcg related functions from slab.h to slub.c
  mm/slab: move struct kmem_cache_node from slab.h to slub.c
  mm/slab: move kfree() from slab_common.c to slub.c
  mm/slab: move kmalloc_slab() to mm/slab.h
  mm/slab: move kmalloc() functions from slab_common.c to slub.c
  mm/slub: remove slab_alloc() and __kmem_cache_alloc_lru() wrappers
  mm/slub: optimize alloc fastpath code layout
  mm/slub: optimize free fast path code layout

 CREDITS                  |   12 +-
 arch/arm64/Kconfig       |    2 +-
 arch/s390/Kconfig        |    2 +-
 arch/x86/Kconfig         |    2 +-
 include/linux/slab.h     |   21 +-
 include/linux/slab_def.h |  124 --
 include/linux/slub_def.h |  204 --
 kernel/cpu.c             |    5 -
 lib/Kconfig.debug        |    1 -
 lib/Kconfig.kasan        |   11 +-
 lib/Kconfig.kfence       |    2 +-
 lib/Kconfig.kmsan        |    2 +-
 mm/Kconfig               |   50 +-
 mm/Kconfig.debug         |   16 +-
 mm/Makefile              |    6 +-
 mm/dmapool.c             |    2 +-
 mm/kasan/common.c        |   13 +-
 mm/kasan/kasan.h         |    3 +-
 mm/kasan/quarantine.c    |    7 -
 mm/kasan/report.c        |    1 +
 mm/kfence/core.c         |    4 -
 mm/memcontrol.c          |    6 +-
 mm/mempool.c             |    6 +-
 mm/slab.c                | 4026 --------------------------------------
 mm/slab.h                |  550 ++----
 mm/slab_common.c         |  231 +--
 mm/slub.c                |  597 +++++-
 27 files changed, 784 insertions(+), 5122 deletions(-)
 delete mode 100644 include/linux/slab_def.h
 delete mode 100644 include/linux/slub_def.h
 delete mode 100644 mm/slab.c

-- 
2.42.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ