From: Kees Cook <keescook@chromium.org>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: David Rientjes <rientjes@google.com>,
Christoph Lameter <cl@linux.com>,
Pekka Enberg <penberg@kernel.org>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Andrew Morton <akpm@linux-foundation.org>,
Hyeonggon Yoo <42.hyeyoo@gmail.com>,
Roman Gushchin <roman.gushchin@linux.dev>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
patches@lists.linux.dev, Andrey Ryabinin <ryabinin.a.a@gmail.com>,
Alexander Potapenko <glider@google.com>,
Andrey Konovalov <andreyknvl@gmail.com>,
Dmitry Vyukov <dvyukov@google.com>,
Vincenzo Frascino <vincenzo.frascino@arm.com>,
Marco Elver <elver@google.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@kernel.org>,
Shakeel Butt <shakeelb@google.com>,
Muchun Song <muchun.song@linux.dev>,
kasan-dev@googlegroups.com, cgroups@vger.kernel.org
Subject: Re: [PATCH 07/20] mm/mempool/dmapool: remove CONFIG_DEBUG_SLAB ifdefs
Date: Mon, 13 Nov 2023 20:31:51 -0800 [thread overview]
Message-ID: <202311132030.1B2302BA4@keescook> (raw)
In-Reply-To: <20231113191340.17482-29-vbabka@suse.cz>
On Mon, Nov 13, 2023 at 08:13:48PM +0100, Vlastimil Babka wrote:
> CONFIG_DEBUG_SLAB is going away with CONFIG_SLAB, so remove dead ifdefs
> in mempool and dmapool code.
>
> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
> ---
> mm/dmapool.c | 2 +-
> mm/mempool.c | 6 +++---
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/mm/dmapool.c b/mm/dmapool.c
> index a151a21e571b..f0bfc6c490f4 100644
> --- a/mm/dmapool.c
> +++ b/mm/dmapool.c
> @@ -36,7 +36,7 @@
> #include <linux/types.h>
> #include <linux/wait.h>
>
> -#if defined(CONFIG_DEBUG_SLAB) || defined(CONFIG_SLUB_DEBUG_ON)
> +#ifdef CONFIG_SLUB_DEBUG_ON
> #define DMAPOOL_DEBUG 1
> #endif
>
> diff --git a/mm/mempool.c b/mm/mempool.c
> index 734bcf5afbb7..62dcbeb4c2a9 100644
> --- a/mm/mempool.c
> +++ b/mm/mempool.c
> @@ -20,7 +20,7 @@
> #include <linux/writeback.h>
> #include "slab.h"
>
> -#if defined(CONFIG_DEBUG_SLAB) || defined(CONFIG_SLUB_DEBUG_ON)
> +#ifdef CONFIG_SLUB_DEBUG_ON
> static void poison_error(mempool_t *pool, void *element, size_t size,
> size_t byte)
> {
> @@ -95,14 +95,14 @@ static void poison_element(mempool_t *pool, void *element)
> kunmap_atomic(addr);
> }
> }
> -#else /* CONFIG_DEBUG_SLAB || CONFIG_SLUB_DEBUG_ON */
> +#else /* CONFIG_SLUB_DEBUG_ON */
> static inline void check_element(mempool_t *pool, void *element)
> {
> }
> static inline void poison_element(mempool_t *pool, void *element)
> {
> }
> -#endif /* CONFIG_DEBUG_SLAB || CONFIG_SLUB_DEBUG_ON */
> +#endif /*CONFIG_SLUB_DEBUG_ON */
nit: space after "*"
With that fixed:
Reviewed-by: Kees Cook <keescook@chromium.org>
--
Kees Cook
next prev parent reply other threads:[~2023-11-14 4:31 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-13 19:13 [PATCH 00/20] remove the SLAB allocator Vlastimil Babka
2023-11-13 19:13 ` [PATCH 01/20] mm/slab: remove CONFIG_SLAB from all Kconfig and Makefile Vlastimil Babka
2023-11-14 4:11 ` Kees Cook
2023-11-14 20:11 ` Vlastimil Babka
2023-11-13 19:13 ` [PATCH 02/20] KASAN: remove code paths guarded by CONFIG_SLAB Vlastimil Babka
2023-11-14 4:13 ` Kees Cook
2023-11-14 12:00 ` Marco Elver
2023-11-13 19:13 ` [PATCH 03/20] KFENCE: cleanup kfence_guarded_alloc() after CONFIG_SLAB removal Vlastimil Babka
2023-11-14 4:14 ` Kees Cook
2023-11-14 7:46 ` Marco Elver
2023-11-13 19:13 ` [PATCH 04/20] mm/memcontrol: remove CONFIG_SLAB #ifdef guards Vlastimil Babka
2023-11-14 4:14 ` Kees Cook
2023-11-14 11:14 ` Michal Hocko
2023-11-13 19:13 ` [PATCH 05/20] cpu/hotplug: remove CPUHP_SLAB_PREPARE hooks Vlastimil Babka
2023-11-14 4:20 ` Kees Cook
2023-11-14 20:12 ` Vlastimil Babka
2023-11-13 19:13 ` [PATCH 06/20] mm/slab: remove CONFIG_SLAB code from slab common code Vlastimil Babka
2023-11-14 4:30 ` Kees Cook
2023-11-14 20:19 ` Vlastimil Babka
2023-11-13 19:13 ` [PATCH 07/20] mm/mempool/dmapool: remove CONFIG_DEBUG_SLAB ifdefs Vlastimil Babka
2023-11-14 4:31 ` Kees Cook [this message]
2023-11-13 19:13 ` [PATCH 08/20] mm/slab: remove mm/slab.c and slab_def.h Vlastimil Babka
2023-11-13 19:21 ` Vlastimil Babka
2023-11-14 4:34 ` Kees Cook
2023-11-14 8:06 ` Marco Elver
2023-11-14 20:20 ` Vlastimil Babka
2023-11-13 19:13 ` [PATCH 09/20] mm/slab: move struct kmem_cache_cpu declaration to slub.c Vlastimil Babka
2023-11-14 4:35 ` Kees Cook
2023-11-13 19:13 ` [PATCH 10/20] mm/slab: move the rest of slub_def.h to mm/slab.h Vlastimil Babka
2023-11-14 4:38 ` Kees Cook
2023-11-14 20:21 ` Vlastimil Babka
2023-11-13 19:13 ` [PATCH 11/20] mm/slab: consolidate includes in the internal mm/slab.h Vlastimil Babka
2023-11-14 4:41 ` Kees Cook
2023-11-14 20:24 ` Vlastimil Babka
2023-11-13 19:13 ` [PATCH 12/20] mm/slab: move pre/post-alloc hooks from slab.h to slub.c Vlastimil Babka
2023-11-14 4:42 ` Kees Cook
2023-11-13 19:13 ` [PATCH 13/20] mm/slab: move memcg related functions " Vlastimil Babka
2023-11-14 4:44 ` Kees Cook
2023-11-14 11:15 ` Michal Hocko
2023-11-13 19:13 ` [PATCH 14/20] mm/slab: move struct kmem_cache_node " Vlastimil Babka
2023-11-14 4:44 ` Kees Cook
2023-11-13 19:13 ` [PATCH 15/20] mm/slab: move kfree() from slab_common.c " Vlastimil Babka
2023-11-14 4:45 ` Kees Cook
2023-11-13 19:13 ` [PATCH 16/20] mm/slab: move kmalloc_slab() to mm/slab.h Vlastimil Babka
2023-11-14 4:07 ` Kees Cook
2023-11-13 19:13 ` [PATCH 17/20] mm/slab: move kmalloc() functions from slab_common.c to slub.c Vlastimil Babka
2023-11-14 4:46 ` Kees Cook
2023-11-13 19:13 ` [PATCH 18/20] mm/slub: remove slab_alloc() and __kmem_cache_alloc_lru() wrappers Vlastimil Babka
2023-11-14 4:50 ` Kees Cook
2023-11-14 20:31 ` Vlastimil Babka
2023-11-13 19:14 ` [PATCH 19/20] mm/slub: optimize alloc fastpath code layout Vlastimil Babka
2023-11-13 19:14 ` [PATCH 20/20] mm/slub: optimize free fast path " Vlastimil Babka
2023-11-14 11:18 ` [PATCH 00/20] remove the SLAB allocator Michal Hocko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202311132030.1B2302BA4@keescook \
--to=keescook@chromium.org \
--cc=42.hyeyoo@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@gmail.com \
--cc=cgroups@vger.kernel.org \
--cc=cl@linux.com \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=glider@google.com \
--cc=hannes@cmpxchg.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=muchun.song@linux.dev \
--cc=patches@lists.linux.dev \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
--cc=ryabinin.a.a@gmail.com \
--cc=shakeelb@google.com \
--cc=vbabka@suse.cz \
--cc=vincenzo.frascino@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox