From patchwork Thu May 20 01:35:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 12268723 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3877CC433ED for ; Thu, 20 May 2021 01:35:44 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D0E3161355 for ; Thu, 20 May 2021 01:35:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D0E3161355 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 565BE6B006C; Wed, 19 May 2021 21:35:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 515B86B006E; Wed, 19 May 2021 21:35:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3DD106B0070; Wed, 19 May 2021 21:35:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0040.hostedemail.com [216.40.44.40]) by kanga.kvack.org (Postfix) with ESMTP id 0D2696B006C for ; Wed, 19 May 2021 21:35:42 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 899CE582B for ; Thu, 20 May 2021 01:35:42 +0000 (UTC) X-FDA: 78159892524.22.A0A8A42 Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by imf10.hostedemail.com (Postfix) with ESMTP id CFEC040B8CD3 for ; Thu, 20 May 2021 01:35:40 +0000 (UTC) Received: by mail-pj1-f46.google.com with SMTP id o17-20020a17090a9f91b029015cef5b3c50so4531322pjp.4 for ; Wed, 19 May 2021 18:35:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=qMxNESd1nnW1kTHWLNEtfCLTGQb9RWPJzewtiKfvmJY=; b=aravIQ2bTNwRMj7Fd4Q2v4zNOLC74wfZOaqO1UCgYraFYWp28ovaFC05Un3Wz1IsIC MneVBdd8LTg7Ff1W80TNa/G2YRvnC4u6fMMLANMSnHSYqwtdtRPGFqpeIZXcaUnNKFC2 d8Wd9G16q3gcMfZWCKvDlb4gGOqeuMP60JekM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=qMxNESd1nnW1kTHWLNEtfCLTGQb9RWPJzewtiKfvmJY=; b=Teza4NCTuxV7sj0V6VLqHYENJa8aXxeCd1rx5YrKqrqVn9lq08qZ/WfVpK0Kcs0Wun Bp0LvxdKKFBDOgKODX6W3WD9S/4ysj1oMUDWKHzUjdh5y/yQekAJ9xonHypLsjGqBoGF slWg4T9LWKzxnS1G14Ng6h5PmVKeDMRcbW63Hy6k7rGCKwolhDBkb3xunBudCA1ZZhHh BLERju+ifgufN4zAP6YTHoTugn9RknewKh4c7qs0eeBN3D67XHZnJ2aSMtNCXXA8T8hm Yt6RYJow5rRKmohD54wD2kre07xtbRBXddn+ObgPTGoWgV7DxT4z1AM8+jY+magWMXH7 OntA== X-Gm-Message-State: AOAM532MS2w+67Pcyxkr1rHQ21zA5ubp2OTx20I5K1V5GNHP+ErjzOGQ UKO1YMGG0KcSMwPdP43cUjrC9A== X-Google-Smtp-Source: ABdhPJzOsRUfmlmBKiIkg4MVA3VhqnS/L700ejRySsi7ZuxD87BVXOfYFiwcudoc5KtWpZjBbzn1Zw== X-Received: by 2002:a17:902:7683:b029:ec:a434:1921 with SMTP id m3-20020a1709027683b02900eca4341921mr2845004pll.67.1621474541172; Wed, 19 May 2021 18:35:41 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:202:201:200b:db75:4e6c:8b96]) by smtp.gmail.com with ESMTPSA id m20sm5097368pjq.40.2021.05.19.18.35.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 May 2021 18:35:40 -0700 (PDT) From: Stephen Boyd To: Andrew Morton Cc: linux-kernel@vger.kernel.org, Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Vlastimil Babka , linux-mm@kvack.org Subject: [PATCH 0/3] slub: Print non-hashed pointers in slub debugging Date: Wed, 19 May 2021 18:35:36 -0700 Message-Id: <20210520013539.3733631-1-swboyd@chromium.org> X-Mailer: git-send-email 2.31.1.751.gd2f1c929bd-goog MIME-Version: 1.0 Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=aravIQ2b; dmarc=pass (policy=none) header.from=chromium.org; spf=pass (imf10.hostedemail.com: domain of swboyd@chromium.org designates 209.85.216.46 as permitted sender) smtp.mailfrom=swboyd@chromium.org X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: CFEC040B8CD3 X-Stat-Signature: 8iosew7rixa17s1a3uddyhiz8i83mgwo X-HE-Tag: 1621474540-35789 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: I was doing some debugging recently and noticed that my pointers were being hashed while slub_debug was on the kernel commandline. Let's make the prints in here meaningful in that case by pushing %px throughout. Alternatively, we could force on no_hash_pointers if slub_debug is on the commandline. Maybe that would be better? The final patch is just something else I noticed while looking at the code. The message argument is never used so the debugging messages are not as clear as they could be. Stephen Boyd (3): lib/hexdump: Add a raw pointer printing format for slub debugging slub: Print raw pointer addresses when debugging slub: Actually use 'message' in restore_bytes() include/linux/printk.h | 1 + lib/hexdump.c | 12 ++++++++++-- mm/slub.c | 24 ++++++++++++------------ 3 files changed, 23 insertions(+), 14 deletions(-) base-commit: 6efb943b8616ec53a5e444193dccf1af9ad627b5