Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2433766rdb; Mon, 20 Nov 2023 10:35:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IEWErIuPETFmR4SarMwWFsiYTWHuAkboGbZ3+3DqWkdHzAc/OaAgKtIPAaBFZmwuIdvGGSq X-Received: by 2002:a17:90b:4a82:b0:285:1e91:370c with SMTP id lp2-20020a17090b4a8200b002851e91370cmr3660648pjb.21.1700505305591; Mon, 20 Nov 2023 10:35:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700505305; cv=none; d=google.com; s=arc-20160816; b=Jk/O05M8fxO6D3S0T7anTDyCzWpu4Nan0QL+/51Vjs5IozXO6+Xkqqhh+uVpABeY8y gbOMwZpfjAeosnZLvZ6b8My0zHHe8cGpziwUpu2ng4zOjUWaEEqTXQzbp2hx9/8Uz3b0 XglHxi7lIENIIDO2NaFIMY9CQqtJ8Xdl6GQN9XphWkFNVm9ykSQH/jNCfwQzLYuUByvg LLqIZ7Xph3KdV9IV8xgZev2JLbgByqRPxGISmN02Sv89+KvOcx9C51+YKu6mlr9MIciI StmjtVQMeAPqihAzIteaivYC48X7T4ezpCCaielmU2lISjT1XxIMZlBRflqoCSyPCEZV ySHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature:dkim-signature; bh=5GrBCfvjCtpiJqa8ygwZPoxY8exS+14FRB1r254RD0U=; fh=ONqwzSuNvSIo96fWAp0pW54nN9xAdzTfApSlC7LEvRU=; b=C+wQaUmuCYJF5OhNWQqhkv+W0QgLg1QLHK5CfkB6NkMLu9UJkfFQjFwMZ9soK+UpiD rEpLj55pdFWVCasJ9z0GNnn0mcEPWLuSSDv3KiE74j1xPekNKsxy8Mk4FCsoBxl5Svyw V0jH2dhPZuJZJBVA/h1DYJCdLq//sQ5Bzy5kMwOc/dakPiPlz0llutkyTpxD7fVRCz9Q itPRnW1um3+WS+IJFGWJlFDYJ1S60mJ1HupdbXJAz3mko1bLJVs9WWB3eUNOAmRXvhti JKLnfDl4BEfXQp+3vTTva/XmBpKp2PRqxzkSa6qn000X9AdCbOSdf2zSes7UR69fDCQu AmZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=FPhfQvkV; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=7Bn+lpV9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id p9-20020a170902bd0900b001cc53dbf53dsi8214745pls.648.2023.11.20.10.35.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 10:35:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=FPhfQvkV; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=7Bn+lpV9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 3A0F880FA9CA; Mon, 20 Nov 2023 10:35:00 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232414AbjKTSex (ORCPT + 99 others); Mon, 20 Nov 2023 13:34:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232218AbjKTSeq (ORCPT ); Mon, 20 Nov 2023 13:34:46 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF680E7; Mon, 20 Nov 2023 10:34:42 -0800 (PST) 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 Authentication-Results: smtp-out2.suse.de; none X-Spam-Score: 1.30 X-Spamd-Result: default: False [1.30 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLY(-4.00)[]; MID_RHS_MATCH_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_RATELIMIT(0.00)[to_ip_from(RL563rtnmcmc9sawm86hmgtctc)]; BAYES_SPAM(5.10)[100.00%]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_TWELVE(0.00)[24]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_CC(0.00)[linux-foundation.org,gmail.com,linux.dev,google.com,arm.com,cmpxchg.org,kernel.org,chromium.org,kvack.org,vger.kernel.org,googlegroups.com,suse.cz]; RCVD_COUNT_TWO(0.00)[2]; SUSPICIOUS_RECIPS(1.50)[] X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 20 Nov 2023 10:35:00 -0800 (PST) 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 --- 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) { -- 2.42.1