From patchwork Mon Nov 20 18:34:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlastimil Babka X-Patchwork-Id: 13461879 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2A0AC5AD4C for ; Mon, 20 Nov 2023 18:34:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DEF5B6B039C; Mon, 20 Nov 2023 13:34:45 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A0CAA6B03AC; Mon, 20 Nov 2023 13:34:45 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8B0A56B03A9; Mon, 20 Nov 2023 13:34:45 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 59EEC6B03AC for ; Mon, 20 Nov 2023 13:34:45 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 3B2A4120A17 for ; Mon, 20 Nov 2023 18:34:45 +0000 (UTC) X-FDA: 81479183730.01.1C6049F Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf22.hostedemail.com (Postfix) with ESMTP id 04A58C0024 for ; Mon, 20 Nov 2023 18:34:42 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=FPhfQvkV; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=7Bn+lpV9; spf=pass (imf22.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1700505283; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=5GrBCfvjCtpiJqa8ygwZPoxY8exS+14FRB1r254RD0U=; b=ErCZF0xwXXSgE+M8f4W+2bjA3VL7o1neo1iOMaKwRJhkJsruVxDdEqW7TeuO03MNKu3b5j Dy+4qC+qXTVgbslDO62U5fO6zmM+7uD3naZAMGbBagitlltRVrlwT864+lDzPVD2M9DgNW 5yMcVY75X4O36qYO8CUI6Ij9Y8Q6eF0= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=FPhfQvkV; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=7Bn+lpV9; spf=pass (imf22.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1700505283; a=rsa-sha256; cv=none; b=XNaaUPwM3ZgVCM0ajce1uF6HZoD6FrVj8uUuFESpxPN1joLmPs3WSH7eLT23BLK1fxRpNS Tuz/1GX5BYzgi81u1npgqXh7OWnXcZbETbUSSu6v9HtZGU34squgBCnH7rn+Ne6VOKiFlJ sKuU8uQC2ulujgtICZVvjghqPRf30Qg= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 60AD51F8AA; Mon, 20 Nov 2023 18:34:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1700505281; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5GrBCfvjCtpiJqa8ygwZPoxY8exS+14FRB1r254RD0U=; b=FPhfQvkViYNNlLlkqIEvH6iJhcWdFbB1ez85bYh8m3z0ThOtjlrGrlmkMjnw1bYrcZgkBZ s6BizyqBVl8v6MFrHNRVozqNd5S2ikSD9cqJht54OgsPIAffS3/d1cwqTw3lAUtEvsWuJR FLk+oJYbPTunJNoefJgvn9jcqiA5k9s= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1700505281; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5GrBCfvjCtpiJqa8ygwZPoxY8exS+14FRB1r254RD0U=; b=7Bn+lpV9eESttWXYK2/IDuDAs+80Cw4I8lxuhU97Ce0QM22jBm6pBGT4R79YoOPE2qKvAP JIqClnPt2p9h8XCg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 30A8113912; Mon, 20 Nov 2023 18:34:41 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id EAFrC8GmW2UUMgAAMHmgww (envelope-from ); Mon, 20 Nov 2023 18:34:41 +0000 From: Vlastimil Babka Date: Mon, 20 Nov 2023 19:34:19 +0100 Subject: [PATCH v2 08/21] mm/mempool/dmapool: remove CONFIG_DEBUG_SLAB ifdefs MIME-Version: 1.0 Message-Id: <20231120-slab-remove-slab-v2-8-9c9c70177183@suse.cz> References: <20231120-slab-remove-slab-v2-0-9c9c70177183@suse.cz> In-Reply-To: <20231120-slab-remove-slab-v2-0-9c9c70177183@suse.cz> To: David Rientjes , Christoph Lameter , Pekka Enberg , Joonsoo Kim Cc: Andrew Morton , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Roman Gushchin , Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Vincenzo Frascino , Marco Elver , Johannes Weiner , Michal Hocko , Shakeel Butt , Muchun Song , Kees Cook , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, cgroups@vger.kernel.org, linux-hardening@vger.kernel.org, Vlastimil Babka X-Mailer: b4 0.12.4 X-Rspamd-Queue-Id: 04A58C0024 X-Rspam-User: X-Stat-Signature: rmnk6o7tmz8mymh6skkeinfkfj8wuynh X-Rspamd-Server: rspam01 X-HE-Tag: 1700505282-227218 X-HE-Meta: U2FsdGVkX1+TY9BO5CotnePCgtGOlKk5dsBskgTtO+38hDCsj7zkcDoLJIR88gGMYAKHrWjHWtf7X+2j/1uSyhpE0UvtKjeYbwn7o5nY3qQ2V+PJd57jJ6BHhtiJoHtBPr2M7RmzAyjdl2cw9x/O5o7D49Vc+toM9GA9xLtIh81zCVSOvjBIW6xuPrctTyRxtJSkCJjz21DC5xSuByScmhqA+20BGYiyJl85XRPp7+QstgYj01it05qm7AW5ZNN/XbmtBYMHQnckjDljCQXumd7gPVHuNSpEw/CoR1h26ZGW9ojBhs8jUg1Ku0pch//3+rIzP6R1ByEBd/67MccNlELir/KwIQoYmdlasd//8euyf/fo4ie/9fXGziybo8chk83/3AYjSoHFkKTNQ4riYVFUXedwnhPBjB5QVto/qt8gL0WZfcnpiXMSaT+H/x8miC6GJJgeILWoHL7i5biurUvhSJUv8uJnrLiHSQFbIesklAKaRiNqAtMjLe+sfDRZT9ebTH7qWD98/ocU9KfyDyFPgVoXqE1yuEuUeXMnIJYDbQ4wNsTkz/b8MM9sL0re2XvH088ZFRVdVr/ku12mNlQBWHaexJDDZC9f6oh5F6rawxLQmstgOJMAHd3gYa62YMWxMSVeYLPTTBHW2TQtdGKtNxNxcwxyWnSvvZA+n8n1rhQ8T/ikW0buoxzmMGSB5hSQ/fSKsOiuhvz92mHBtU2dh2D2KveGe/WTQuPWuP5WJ2HO02bZlMdLqObxfy8HeFD32PKvfM45SnhJ0jPMN3cXy0zez8eEuT/YwcCp1Fvd0llD7WIc6yIc75WyPCy1clorVzF8PYEWN2ZMzj2ojkY71KWOyTqkR76n9B+0IXRLAN9AX7y/TYHxx13FsEomJCZ00ldDwcuqpF8/QxFTfusrBLPxP+pOHPmjBmgdbXeuiE7rCiXENLRKAdQh3oxj1K2HxSg2yxBgqulknkL z+7aanXK scxL7MA+veSELUJx/zQp1vDry+cwsGXIDy8Yjq47ZIAlm9OzkRTwbkwwro4jiDzV6cBmtZ7m40jeU5RbdDJmgU3V/bWBbnUCXcOcyt2LjeVSKrh+K7Xwvf1qcLAkB8S2xDKDFRH3W3vKkoosLb+2597YvxAZ5fvqlhbQSoc/tEO81IyjKDOZINfE7zeBzNHLwEa1loWPdMZJYznqt29TOtbdD2YkPH9Hkila/SsR0gw4QMqtF/scAVoAQ5jyT3vvqRk9Dip/f+qrA3s87sT2dBrdb/OGc0ORL8RbrkhK/tyI2zeNExER126tZGOuVEOrpnx1V/KXey503HUbKZwIHUrKgLENeb0uoUoCTNAAJ+HPgWT9mjxRDSE32hk0xzr9P4BaJYd5LKFTU7Ul+HcZC8AnIThMXr7FKmsNf X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: CONFIG_DEBUG_SLAB is going away with CONFIG_SLAB, so remove dead ifdefs in mempool and dmapool code. Reviewed-by: Kees Cook Signed-off-by: Vlastimil Babka Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> --- 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 #include -#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..4759be0ff9de 100644 --- a/mm/mempool.c +++ b/mm/mempool.c @@ -20,7 +20,7 @@ #include #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 */ static __always_inline void kasan_poison_element(mempool_t *pool, void *element) {