From patchwork Wed May 26 02:56:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 12280539 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 3A051C47087 for ; Wed, 26 May 2021 02:56:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BB3C361430 for ; Wed, 26 May 2021 02:56:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BB3C361430 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 B41FE6B0036; Tue, 25 May 2021 22:56:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A8F8F6B006E; Tue, 25 May 2021 22:56:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8E1956B0070; Tue, 25 May 2021 22:56:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0124.hostedemail.com [216.40.44.124]) by kanga.kvack.org (Postfix) with ESMTP id 53C7C6B0036 for ; Tue, 25 May 2021 22:56:29 -0400 (EDT) Received: from smtpin32.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id EA69C8783 for ; Wed, 26 May 2021 02:56:28 +0000 (UTC) X-FDA: 78181868856.32.BD0F78D Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by imf24.hostedemail.com (Postfix) with ESMTP id 24A18A0001C7 for ; Wed, 26 May 2021 02:56:22 +0000 (UTC) Received: by mail-pj1-f49.google.com with SMTP id cu11-20020a17090afa8bb029015d5d5d2175so14394014pjb.3 for ; Tue, 25 May 2021 19:56:28 -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=2UyXOnM3aTg90cC6788a9e+YlVPyj4bP+6GFHKBhjKs=; b=bkY8oi6/sNa/11XfqkFqadoUBjkjNhj9dc8K8aEyFZzSjTKdo/zJFtLx+Ct++VktBs jjRVlS/1+fJnilMtDE/UVuwVgCakfoSqYafxEQHqt754c5XdIgxY8QZ5ZTzIw0/S5v/2 VOuUASggkntzH3XtHVFOWOew3hJCey0CK/7vQ= 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=2UyXOnM3aTg90cC6788a9e+YlVPyj4bP+6GFHKBhjKs=; b=HIxI9xamjIFk8RUBNpSMIjH1VCqovRFP9dkfmmvbe5BfpixXd74UoI+6iLyOqw+CQe MOrLqbpylLTlVK6dJQn83UZ6Qw0amaX4Fq4R7bBTX3NIVJi6FEaiM3ehA8EgPZ3E3xPK 3FFMI77BT15ZeTG+KyWTrCeKBYAy0IPoy0w5ct9xbW1ELFnN/zNwG4BbWQQiUmfsNlDG gEkjhjGLsi5GW6fPaE0KgrIL7UuWkIgHLyIFTbtcBZGoBFw9liNd80VI6XokqiZyApFX bGMGESZ4q+8WYEk5mr7a2sE0IYlqiFzhyUcIN4OBove+UndDOmdhrpWzXwRLUOmRdVdV Y8bw== X-Gm-Message-State: AOAM530bel6wJMVSfkGDvJmFBJzrEZvo1XSMioeedJ5mM7kUHX8SB9iJ 8yhBPdWD5JcPWHBVCl38SEqHaA== X-Google-Smtp-Source: ABdhPJy06rJHBxm8k6TUpfg/Ldo7hmcEA2eIN6QiK0c1BOX3gy5ZuvNCUIYlFe+gO6ckxqancQILtw== X-Received: by 2002:a17:90a:bd05:: with SMTP id y5mr1557072pjr.213.1621997787719; Tue, 25 May 2021 19:56:27 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:202:201:5a1b:e4e5:eb10:8870]) by smtp.gmail.com with ESMTPSA id 5sm2966295pjo.17.2021.05.25.19.56.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 May 2021 19:56:27 -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, Petr Mladek , Joe Perches Subject: [PATCH v2 0/4] slub: Print non-hashed pointers in slub debugging Date: Tue, 25 May 2021 19:56:21 -0700 Message-Id: <20210526025625.601023-1-swboyd@chromium.org> X-Mailer: git-send-email 2.31.1.818.g46aad6cb9e-goog MIME-Version: 1.0 Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b="bkY8oi6/"; dmarc=pass (policy=none) header.from=chromium.org; spf=pass (imf24.hostedemail.com: domain of swboyd@chromium.org designates 209.85.216.49 as permitted sender) smtp.mailfrom=swboyd@chromium.org X-Stat-Signature: m9drf8u7khm8wqo5cnxacri87w9ezxy1 X-Rspamd-Queue-Id: 24A18A0001C7 X-Rspamd-Server: rspam02 X-HE-Tag: 1621997782-72187 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 force on the no hash pointer option when slub_debug is on the kernel commandline so that the prints are more meaningful. The first two patches are 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 and the slub_debug=- behavior seems to be busted. Then there's a printf fixup from Joe and the final patch is the one that force disables pointer hashing. Changes from v1 * Dropped the hexdump printing format * Forced on the no_hash_pointers option instead of pushing %px Joe Perches (1): slub: Indicate slab_fix() uses printf formats Stephen Boyd (3): slub: Restore slub_debug=- behavior slub: Actually use 'message' in restore_bytes() slub: Force on no_hash_pointers when slub_debug is enabled lib/vsprintf.c | 2 +- mm/slub.c | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) base-commit: d07f6ca923ea0927a1024dfccafc5b53b61cfecc