From patchwork Tue Jun 1 18:21:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 12292055 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 D3132C47080 for ; Tue, 1 Jun 2021 18:22:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 863AE613AD for ; Tue, 1 Jun 2021 18:22:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 863AE613AD 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 076526B006C; Tue, 1 Jun 2021 14:22:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0266C6B006E; Tue, 1 Jun 2021 14:22:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DE2BE6B0070; Tue, 1 Jun 2021 14:22:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0085.hostedemail.com [216.40.44.85]) by kanga.kvack.org (Postfix) with ESMTP id AC9556B006C for ; Tue, 1 Jun 2021 14:22:06 -0400 (EDT) Received: from smtpin40.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 3C1B48249980 for ; Tue, 1 Jun 2021 18:22:06 +0000 (UTC) X-FDA: 78205974252.40.D4F856F Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by imf24.hostedemail.com (Postfix) with ESMTP id ACA63A000247 for ; Tue, 1 Jun 2021 18:21:53 +0000 (UTC) Received: by mail-pj1-f52.google.com with SMTP id i22so212169pju.0 for ; Tue, 01 Jun 2021 11:22:05 -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=N590ERPxxGg8/dMTw4VCa6qnq3T7bZw0OnBgJ+94JC0=; b=myeIShlJLASAlCPHOcNqaie+PXracNEfNlGHIyAKJ1GTdY5P0EcciI6cHQi+P/+PUq gUb0gM4Ir3sOoY5AFs0MZ7Z5FnGtvcUh+KdQcuZYeSwhQ/8S1jm44wmazpaqqz3uhJId tuLdQRXk4a/EFPccoKuGvjvT0ELpQsmQWZQlQ= 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=N590ERPxxGg8/dMTw4VCa6qnq3T7bZw0OnBgJ+94JC0=; b=Uv+u534nzg09XqJreDDTayCTzmMEvYvjU8Kx5t7w2EwRa576CHomniAD0SzeKbYiWp Smpjd3FIch4rTPyGhiqmIe8EbhYQPQuZ8B26uASs3Qv1VUljMSN1YPBq6xYXJ/kOPbP3 kiHpWYyMfqYsqM863FPe5yQpIH2P/PGe1gA0A105tik0f+SC8a3owHCtk/LhD1rhysfb BV/pEBkas+2O0DVIw/rLrl29pfKdDRXBFZDprMtTw1j8v8GYyd0HkXQXRBR37+ghZ0+s 0X0FB6g/sLuQEPEzrD7fU7T16PqaEKbSlpUfCxSP4aUQ7NeX9rKr3J7fq7SrX8sqfg/M gSjQ== X-Gm-Message-State: AOAM532KINCtuABzB6U1rmUxqgNBwb7Vi68vowaurqGrOiRtPJ29F2bX mlDP5i21c1KXKpES8yaCMN6uE3rp1Yx4HA== X-Google-Smtp-Source: ABdhPJycRHp/Fs/mycv/09GBfTzFmVr3DcT4Qh/upYDbYbTpuP7W+MVvQmpZ0VnO3Sk2j3TqxcfvJg== X-Received: by 2002:a17:90a:4f0a:: with SMTP id p10mr1225781pjh.36.1622571724975; Tue, 01 Jun 2021 11:22:04 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:202:201:ee82:b2a7:c8bd:18e7]) by smtp.gmail.com with ESMTPSA id g29sm14510982pgm.11.2021.06.01.11.22.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Jun 2021 11:22:04 -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 v3 0/4] slub: Print non-hashed pointers in slub debugging Date: Tue, 1 Jun 2021 11:21:58 -0700 Message-Id: <20210601182202.3011020-1-swboyd@chromium.org> X-Mailer: git-send-email 2.32.0.rc0.204.g9fa02ecfa5-goog MIME-Version: 1.0 Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=myeIShlJ; dmarc=pass (policy=none) header.from=chromium.org; spf=pass (imf24.hostedemail.com: domain of swboyd@chromium.org designates 209.85.216.52 as permitted sender) smtp.mailfrom=swboyd@chromium.org X-Stat-Signature: gwrkdifsc9zj1fekyjjwwj83ncjku8qr X-Rspamd-Queue-Id: ACA63A000247 X-Rspamd-Server: rspam02 X-HE-Tag: 1622571713-498503 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 v2 (https://lore.kernel.org/r/20210526025625.601023-1-swboyd@chromium.org): * Fixed up Fixes tag on first first patch * Picked up acks * Moved decl of no_hash_pointers() to kernel.h 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 include/linux/kernel.h | 2 ++ lib/vsprintf.c | 2 +- mm/slub.c | 13 ++++++++++--- 3 files changed, 13 insertions(+), 4 deletions(-) base-commit: d07f6ca923ea0927a1024dfccafc5b53b61cfecc