Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp119481lqr; Wed, 5 Jun 2024 00:16:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWQWTrwoBw322IvLo59hM8mgloj/QSi7Kp9cQTHn5PKe5pYLScGqDYL7Wo3fhh2RPkBQW90Q3h5h5DAaRIyUTt7bp9vdkupTLO+WaZ7fg== X-Google-Smtp-Source: AGHT+IGi9FGHY6M4Z33+mHnpu+FkjYzbjN8VMhdJ7X/AdouH4tarMdETnXOejkvVxUK09Y7GVxV8 X-Received: by 2002:a17:90a:640f:b0:2bf:9eb3:cea7 with SMTP id 98e67ed59e1d1-2c27cc4ecfdmr2578531a91.24.1717571763017; Wed, 05 Jun 2024 00:16:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717571763; cv=pass; d=google.com; s=arc-20160816; b=kHq98IqpVyPlkcDbrN6vVuk9PIMDbh/bJ0o9SxexvRRplr73A7YcEyBiyBrOwMgEfX rT4q18+CNYhiwNM7h6Fs1IuDmQQDj1JngsFqN3YnnD7TRJb3rXbsyWHlYZ6gZY1h3XYg SGyrkAwx1GLiLxPPBIaKcLI5KnaN1DH4gAc72yiO/Vpi2mwzcGr0YL956Gq2H9/qYR6s /zk8uQdt9kCpmriCuayMvbQ/yDGslxeFMlGtwx7uuXh9qqbwOiNvG3fLvWN+8BkwT3LA T79mSyvCls6syStwPSBO3e+SwemBjUWNU3JvpJZt5Ln0E+BFa/rWtm0wEsfWLjpoW7ZR 1YEA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:from :dkim-signature; bh=MgQ54wqpPyu/de/IC92RsymjWefuXxvvmWin5jNjSXQ=; fh=aAcHoaoscyWZDK/c0LWwA/7SqDW92Zbn0KNW0yzusYI=; b=VoPoZVQwmIovMN7t1C8ZfencJTfv45mnJyzdDzmROcjRW/tRnNvh9+W208Mtzd+Eph FFIH1fBTfMoP4yN8D4+JR8rhIVRGZLWEoe50LgZWpCfXUVPcu+TRtA2tBDYfbL9SvdF7 pjgTF7uf7KzsSsWMVNXlQ1SILe/MPU96Lrc7vDKikBYxjLfqLtyLH9sA6PyqCoY2iuOH TmeFjcFblJDE2dRPsG3ZkHydavzbiopTOFgBGj/1ut4MPCKbHlAFWMjX1ZSGK/rkWBxt tQkUOWkJ3JVltVqGFu6GE4YZYpVl7yRcib0MN2FOjYfZO08ciP00jeEsJxYHcmB8ZNmz I2PQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=NKUe4OPq; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-201853-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201853-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c2806bd60asi724154a91.97.2024.06.05.00.16.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 00:16:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-201853-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=NKUe4OPq; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-201853-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201853-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A52D22866A9 for ; Wed, 5 Jun 2024 07:16:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BE4F718F2FE; Wed, 5 Jun 2024 07:15:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="NKUe4OPq" Received: from out-186.mta1.migadu.com (out-186.mta1.migadu.com [95.215.58.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 988C118C343 for ; Wed, 5 Jun 2024 07:15:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.186 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717571718; cv=none; b=QeOJEoiEbDK7lMZW2yweJdlOkgrv9/b8jInf9Iccs76TWV36nifNhboRGKfVfoUbyMei5aQOjjiUeVXw/xXO+JNjCgAq6fLaTt5xad2CTEPuvTuN3NaL+TpAXLlqHccJ9mhRFb0j/wo9ay8kL5AW5hu466MzQXVHwxdH0hN+etI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717571718; c=relaxed/simple; bh=NUq4hUMFyN/6UPuWAGO3h695blPsgWsaqsOr34MSY/E=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=l9gt7J5FRFTlM75r6qZazZNxTPz0ensdRrZ69JTGZ/cgff3yvOw9JqfkXOEzQ5dE1ChAKY3YqIPmBiSDHBmtw3n4UNatM5kR5B/BjFC5nILfp6Yahg6eV4oWcaUFtmYA1tuEhH+1jfUT/O4dX0D23dRBWLZHjpc8vxOZRBrfR3Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=NKUe4OPq; arc=none smtp.client-ip=95.215.58.186 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: linux-mm@kvack.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1717571710; 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; bh=MgQ54wqpPyu/de/IC92RsymjWefuXxvvmWin5jNjSXQ=; b=NKUe4OPqpSUR+OR0Mazu4CTFXw74QR/uNWe4nUmch5P9NkbUpRewOT9h9o33Kzh/vMMUcy grwy/JjedJmanJJ0m11fEWNiw1JJjOlIyRuA2rqQQ1wI3ojtkWashhBWUdjVg2FG2YRAVt kH7g5Bkga45BiE7fUFm/+FSm6ubcSpM= 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 Subject: [PATCH v2 0/3] slab: fix and cleanup of slub_debug Date: Wed, 05 Jun 2024 15:13:53 +0800 Message-Id: <20240605-b4-slab-debug-v2-0-c535b9cd361c@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIADEQYGYC/3XMQQ6DIBCF4auYWXcaINRCV96jcSEy6CRGG6jEx nj3Uvdd/i953w6JIlOCR7VDpMyJl7mEulTQj908ELIvDUooLW7KoNOYps6hJ7cOKL2Rdxt6a+s OyucVKfB2es+29MjpvcTPyWf5W/9JWaJAU1tNQRuhfGgmntft6ilDexzHF2LHNJSqAAAA 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=1717571705; l=1377; i=chengming.zhou@linux.dev; s=20240508; h=from:subject:message-id; bh=NUq4hUMFyN/6UPuWAGO3h695blPsgWsaqsOr34MSY/E=; b=+ms+kPaOg2SJvqKFwZFq2Vqt+ZOIoeYlDeMC/ug+gvORklv4nOem+bSIiRiBIk3E8HfRT1/WW RHu6lPGP1vxBwtz3hvdDs+7HMG9DQAe/q1avhaeuD7WC4Hx7rDdnC1I X-Developer-Key: i=chengming.zhou@linux.dev; a=ed25519; pk=kx40VUetZeR6MuiqrM7kPCcGakk1md0Az5qHwb6gBdU= X-Migadu-Flow: FLOW_OUT Changes in v2: - Change check_object() to do all the checks without skipping, report their specific error findings in check_bytes_and_report() but not print_trailer(). Once all checks were done, if any found an error, print the trailer once from check_object(), suggested by Vlastimil. - Consolidate the two cases with flags & SLAB_RED_ZONE and make the complex conditional expressions a little prettier and add comments about extending right redzone, per Vlastimil. - Add Reviewed-by from Feng Tang. - Link to v1: https://lore.kernel.org/r/20240528-b4-slab-debug-v1-0-8694ef4802df@linux.dev Hello, This series includes minor fix and cleanup of slub_debug, please see the commits for details. Signed-off-by: Chengming Zhou --- Chengming Zhou (3): slab: make check_object() more consistent slab: don't put freepointer outside of object if only orig_size slab: delete useless RED_INACTIVE and RED_ACTIVE include/linux/poison.h | 7 ++---- mm/slub.c | 60 +++++++++++++++++++++++--------------------- tools/include/linux/poison.h | 7 ++---- 3 files changed, 36 insertions(+), 38 deletions(-) --- base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 change-id: 20240528-b4-slab-debug-1d8179fc996a Best regards, -- Chengming Zhou