From patchwork Wed Jun 5 07:13:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chengming Zhou X-Patchwork-Id: 13686255 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 DB2C8C27C65 for ; Wed, 5 Jun 2024 07:15:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1B4B66B00A1; Wed, 5 Jun 2024 03:15:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 13D6E6B00A2; Wed, 5 Jun 2024 03:15:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EF7956B00A3; Wed, 5 Jun 2024 03:15:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id CEDCC6B00A1 for ; Wed, 5 Jun 2024 03:15:26 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 66B8716015A for ; Wed, 5 Jun 2024 07:15:26 +0000 (UTC) X-FDA: 82195974252.13.7128297 Received: from out-176.mta1.migadu.com (out-176.mta1.migadu.com [95.215.58.176]) by imf03.hostedemail.com (Postfix) with ESMTP id 031E820013 for ; Wed, 5 Jun 2024 07:15:23 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=qxcFtNtf; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf03.hostedemail.com: domain of chengming.zhou@linux.dev designates 95.215.58.176 as permitted sender) smtp.mailfrom=chengming.zhou@linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1717571724; 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=3wNm3c6yJSA1CzslM5yifCdzkMkcRenHHavbaO4mwKI=; b=qZdgHhAHXtDOIv31umlvLsjCJog/uNY9pspRBJoMvCVp4LWmD81zxTNiRj4W5afMUWGAHV RSSufVMU4cIB5avocyKH4c7/hgfFcHssmxbtyNeM3bDccNKrsGz87EfMrOoXBN/a/Yeobl CNCmTaXg2NpdIm7tg6DfphJmOvJQSEc= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=qxcFtNtf; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf03.hostedemail.com: domain of chengming.zhou@linux.dev designates 95.215.58.176 as permitted sender) smtp.mailfrom=chengming.zhou@linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1717571724; a=rsa-sha256; cv=none; b=7CpkVVjn4RvkvXWsDjOsnbL6dnX5Asto+16Zu2DoN+SFloCfNnueZnYb9yzQ6oEXRX/8tY Lbt1YcrQsy7zQlH+IS2VNyw2l+zC0ELOk2V8x7VuEEuhKhyASm4ehdczNkIJ1MfoHIe1nk aS574Eo7WDwh9SqcneBPkBXnFMRsL+Q= X-Envelope-To: linux-mm@kvack.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1717571722; h=from:from: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; bh=3wNm3c6yJSA1CzslM5yifCdzkMkcRenHHavbaO4mwKI=; b=qxcFtNtfh4XOLj5fbDe7x94gskzCrv0IXECAZOYe8WkE/kUdaphkQyLX9x1/bqPGakkm66 qG1VyQRnpT+1yOvZwfIhsDcbUEWqmRY6lsTkfvhHku8VVhUmFlm5BsntZc0p1brvBYdsi/ mZa9huwlffIJu06AxUx8R5lzWOHx8gY= X-Envelope-To: penberg@kernel.org X-Envelope-To: roman.gushchin@linux.dev X-Envelope-To: feng.tang@intel.com X-Envelope-To: zhouchengming@bytedance.com X-Envelope-To: rientjes@google.com X-Envelope-To: linux-kernel@vger.kernel.org X-Envelope-To: akpm@linux-foundation.org X-Envelope-To: iamjoonsoo.kim@lge.com X-Envelope-To: vbabka@suse.cz X-Envelope-To: chengming.zhou@linux.dev X-Envelope-To: cl@linux.com X-Envelope-To: 42.hyeyoo@gmail.com X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Chengming Zhou Date: Wed, 05 Jun 2024 15:13:56 +0800 Subject: [PATCH v2 3/3] slab: delete useless RED_INACTIVE and RED_ACTIVE MIME-Version: 1.0 Message-Id: <20240605-b4-slab-debug-v2-3-c535b9cd361c@linux.dev> References: <20240605-b4-slab-debug-v2-0-c535b9cd361c@linux.dev> In-Reply-To: <20240605-b4-slab-debug-v2-0-c535b9cd361c@linux.dev> To: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Vlastimil Babka , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Feng Tang Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, zhouchengming@bytedance.com, Chengming Zhou X-Developer-Signature: v=1; a=ed25519-sha256; t=1717571706; l=2445; i=chengming.zhou@linux.dev; s=20240508; h=from:subject:message-id; bh=SCxsTfzjMuX8t1U69VOCpqhjoMDtoIBWEPozyzP8bk8=; b=xtPX9vMkwqmgUtdfVNek9BrOPkMLYsFLuZn30jqV0CJbb33baarp75iix+PtgEHMEQeAQoOPI CStzNIZCp8bBqhAhH4N5hrLMahSHW2KmmCWFcqj/P1yTkpDMDZxFsYn X-Developer-Key: i=chengming.zhou@linux.dev; a=ed25519; pk=kx40VUetZeR6MuiqrM7kPCcGakk1md0Az5qHwb6gBdU= X-Migadu-Flow: FLOW_OUT X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 031E820013 X-Stat-Signature: 314quihpujcorwji1idz64m4fpkryu5w X-HE-Tag: 1717571723-656643 X-HE-Meta: U2FsdGVkX18U0dETMgDF6LYHM1q7K+jZ+rOVjp+nbNuu8a8goTMgBvv0ISun7uqcXD3scuKp8j2U913WxvfPXcGA5ziT0VydaYr/zHafpbmAeSwenh3OXaICStO393J1/bahmlp8NA5tshCjKVHPaxVZ2NN3XyvazjIlCX/akXD57LYVL5w7giud3hMPIJIsjwYUbubShOVbvK4e45fW62hcbr3UyUXl/lijpPNySxFD1iKYXzc0JbQ8p8aawXe6QOVlP8UHf5e0o0oPJRAxOXcYbRCrpauQ5OpDcQ8D/oSPymeuyA9kJHqBFBXtV9UDaYELxmXfdRZxqd3yP65nBIgmjiYJmB/EBlEjBK6PcOKO99iwRxF7k/NOoUlcXItG3oPLc5Y8y9GamtnIUDPanMjdIOxN8vNxUtoxOUqAcqJIVFznNR/5JoNEqX34nfPjf/x8axk8HWNNfYb3cZLIY/68aCPUs4IXqUAQJh6Q2TtkJ4vD1cz4+Q9uw8FRDx8n8CkcthIa+pXS9QyKZ4gLCPiFbwtStSwTmcyHVXJ6tsCc1swTHTMBFSk2Ro3CB009AKBUgMFw1UwhCNzZG0jrbKNxQRP53jTYZMsJKYN9ulUabbyroXqwybe8BKNt2ne+Kwd8eQYeI0i/IrtCt3c+WKZy8GIpuMVxPR65207NFBn93tcAIXXB8jnTY5A338AJo2GFKS57pKeKmdFMRwtU8tYB7zcq2oSm/jVlxl0B+quAlXTM6Rc1+4hkXhQiB/lSpwL+Wjxrrfv+dt1TKgSNjM1CiEPTg47fsPisdYA6TEGtLUEht/T/h82rOY+Ez0/ynOyUejlyJh9tj+poxGVIXCLUbJeAkt7tckldG6I5KH6TvJlobLHIinMP23bpaD8oYC7DZaIiYAhCuiBPhnrFS+nan3PXdrveReMOw3IW7ObE+fLa4nedgASDv5ApZu4Plnj2BUwUHVY4LK+62Uk LMQYjDmn zY0JZ7931UE7w0gfMBHXuzYZxhlMBVSs1an3kWFAF9z4rirkAOu6MI46CKUnRP0B4VV8vRLGrbj94ut+uCnUmgFcAwLwaLRclsCZrfXZ07cJ34zkag203jDVpeFiZeU80Aqwafy0s3dqqDF4cR3UAzqQyjPZfBy2dJuJAqn5QSzc9GaeqyRRb+Vy9M2dVl5lkem4LT6oq4HuvLDQ= 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: These seem useless since we use the SLUB_RED_INACTIVE and SLUB_RED_ACTIVE, so just delete them, no functional change. Signed-off-by: Chengming Zhou Reviewed-by: Vlastimil Babka --- include/linux/poison.h | 7 ++----- mm/slub.c | 4 ++-- tools/include/linux/poison.h | 7 ++----- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/include/linux/poison.h b/include/linux/poison.h index 1f0ee2459f2a..9c1a035af97c 100644 --- a/include/linux/poison.h +++ b/include/linux/poison.h @@ -38,11 +38,8 @@ * Magic nums for obj red zoning. * Placed in the first word before and the first word after an obj. */ -#define RED_INACTIVE 0x09F911029D74E35BULL /* when obj is inactive */ -#define RED_ACTIVE 0xD84156C5635688C0ULL /* when obj is active */ - -#define SLUB_RED_INACTIVE 0xbb -#define SLUB_RED_ACTIVE 0xcc +#define SLUB_RED_INACTIVE 0xbb /* when obj is inactive */ +#define SLUB_RED_ACTIVE 0xcc /* when obj is active */ /* ...and for poisoning */ #define POISON_INUSE 0x5a /* for use-uninitialised poisoning */ diff --git a/mm/slub.c b/mm/slub.c index 704c662227e6..0bab0f041ab2 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1214,8 +1214,8 @@ static int check_bytes_and_report(struct kmem_cache *s, struct slab *slab, * Padding is extended by another word if Redzoning is enabled and * object_size == inuse. * - * We fill with 0xbb (RED_INACTIVE) for inactive objects and with - * 0xcc (RED_ACTIVE) for objects in use. + * We fill with 0xbb (SLUB_RED_INACTIVE) for inactive objects and with + * 0xcc (SLUB_RED_ACTIVE) for objects in use. * * object + s->inuse * Meta data starts here. diff --git a/tools/include/linux/poison.h b/tools/include/linux/poison.h index 2e6338ac5eed..e530e54046c9 100644 --- a/tools/include/linux/poison.h +++ b/tools/include/linux/poison.h @@ -47,11 +47,8 @@ * Magic nums for obj red zoning. * Placed in the first word before and the first word after an obj. */ -#define RED_INACTIVE 0x09F911029D74E35BULL /* when obj is inactive */ -#define RED_ACTIVE 0xD84156C5635688C0ULL /* when obj is active */ - -#define SLUB_RED_INACTIVE 0xbb -#define SLUB_RED_ACTIVE 0xcc +#define SLUB_RED_INACTIVE 0xbb /* when obj is inactive */ +#define SLUB_RED_ACTIVE 0xcc /* when obj is active */ /* ...and for poisoning */ #define POISON_INUSE 0x5a /* for use-uninitialised poisoning */