Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp269268pxj; Thu, 3 Jun 2021 06:19:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCooUFt5Y2bRAoWTyFT6MLqObiZBH/IT90Am90a35MssT6MGmR9pEuTtyDLVrfDnexVkDr X-Received: by 2002:a17:906:b06:: with SMTP id u6mr25335416ejg.199.1622726363190; Thu, 03 Jun 2021 06:19:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622726363; cv=none; d=google.com; s=arc-20160816; b=cDILarrL1BxRPAMsLseorS7/8dIyxxUbVUHAUlUY0iDScYXXg/UZxE7nogUFBbBV87 Ze0iU/9sylvZgOABg0QwNWUeAJtc0GhTa/Z3AEqWsvGIwXn77yruZWuFrpR2DiwuLu4H FOWvol1FOEtv4AZGOsVfDbIE3O2FrTgyniWBmpT7ygFDVxRKLVBOk44STAXQWiAvTdNR f9wQI5zEKxlIVwxL5GHJeSgv/jh74dS5SNRRAdoQyxLUOWVI8uEYL1akq7ejc3gQEato vEZekb1KPrKQDWQzd3NCOjDynVcHwTntgMxEBx3HIp7YSs4YcLrsp2FD9dzelLOYnyCv xpCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=in/G7fzdUcdCv5ZvDLh1mBytHpj8YQlTgchvITKLgrI=; b=gGPQgSoFu16ujEoY7gUPTT6bTFX2XKJ/1N8SMJK1NbGlqTUF4+ZbuBe9yZsnKlLviM Ip6an3ZM9qU+kLns13mtWZMHLKISNeDt0ohvRzrwYeRiOBbUuaL5EboBRDAsNPkSC6To UtcojFSlIORKLNJOct0QvG3LltdO3rFz+xke0y5d64eTmYw2IW90XZdi8ppBc12vgDY2 oYcKoVzXNaGczLCbpnv7w7BRdZ4awdvYl2aW8ebIeCdlC11XBJoFd8r+7qT4ZpWRT2OE bJlqq88WpgE2vTm01XU5/igZin10MSrPWHxcI+yWi57IeYGyX3/RYDJLhTdvsOV9Jz2e AWvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=s2HVubBU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id kz13si2156738ejc.335.2021.06.03.06.19.00; Thu, 03 Jun 2021 06:19:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=s2HVubBU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231357AbhFCNRK (ORCPT + 99 others); Thu, 3 Jun 2021 09:17:10 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:53350 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230131AbhFCNRK (ORCPT ); Thu, 3 Jun 2021 09:17:10 -0400 Received: from relay2.suse.de (unknown [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 4C46A1FD3D; Thu, 3 Jun 2021 13:15:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1622726125; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=in/G7fzdUcdCv5ZvDLh1mBytHpj8YQlTgchvITKLgrI=; b=s2HVubBUAFMVIIBjzD6M5Q/51LKPRFDNTX+TTbtibiMCt35kBNIuyO8UTr91ktRk6WvVrg YUozOtp8nzkqaAWHnmIdwXvE/+KbqCVhfJqKoVvLJ+12M5gUE/Rg/qrXlMDhnHrMQ6vOuG nUTUy6G7nHvpT3jxMX9wAubNQ0SlcCk= Received: from suse.cz (unknown [10.100.224.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id C6390A3B8B; Thu, 3 Jun 2021 13:15:24 +0000 (UTC) Date: Thu, 3 Jun 2021 15:15:24 +0200 From: Petr Mladek To: Stephen Boyd Cc: Andrew Morton , linux-kernel@vger.kernel.org, Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Vlastimil Babka , linux-mm@kvack.org, Joe Perches Subject: Re: [PATCH v3 4/4] slub: Force on no_hash_pointers when slub_debug is enabled Message-ID: References: <20210601182202.3011020-1-swboyd@chromium.org> <20210601182202.3011020-5-swboyd@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210601182202.3011020-5-swboyd@chromium.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 2021-06-01 11:22:02, Stephen Boyd wrote: > Obscuring the pointers that slub shows when debugging makes for some > confusing slub debug messages: > > Padding overwritten. 0x0000000079f0674a-0x000000000d4dce17 > > Those addresses are hashed for kernel security reasons. If we're trying > to be secure with slub_debug on the commandline we have some big > problems given that we dump whole chunks of kernel memory to the kernel > logs. Let's force on the no_hash_pointers commandline flag when > slub_debug is on the commandline. This makes slub debug messages more > meaningful and if by chance a kernel address is in some slub debug > object dump we will have a better chance of figuring out what went > wrong. > > Note that we don't use %px in the slub code because we want to reduce > the number of places that %px is used in the kernel. This also nicely > prints a big fat warning at kernel boot if slub_debug is on the > commandline so that we know that this kernel shouldn't be used on > production systems. > > Signed-off-by: Stephen Boyd Acked-by: Petr Mladek Best Regards, Petr