From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A16CC5B552 for ; Mon, 9 Jun 2025 15:24:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 98BDB6B009D; Mon, 9 Jun 2025 11:24:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9633D6B009E; Mon, 9 Jun 2025 11:24:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8796C6B00A1; Mon, 9 Jun 2025 11:24:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 673BB6B009D for ; Mon, 9 Jun 2025 11:24:51 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 0D8F71D464D for ; Mon, 9 Jun 2025 15:24:51 +0000 (UTC) X-FDA: 83536234782.23.FBA06EA Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by imf17.hostedemail.com (Postfix) with ESMTP id 69DD140005 for ; Mon, 9 Jun 2025 15:24:49 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="tTG/SW1V"; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf17.hostedemail.com: domain of kees@kernel.org designates 172.234.252.31 as permitted sender) smtp.mailfrom=kees@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1749482689; h=from:from:sender: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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ig/TZzEzV3c3GKvBm06xIEQLQ20uCxgZYInNhqG74e0=; b=0+kbU9KjxrajfkTkQCykwzAWuqhgFgFAYrw655BTXDLJGmKU1DDrhQ/OwKbjH+L+0fggDR sptRbNwznkZFTEuXcz31a5CwY6afTok8wQ8sxlHlJvoWCg0yq/1B1IWg3H8dzPCXS8RK3D UCRLdv6JlEUMKkVdegLh1TmknYe4uDY= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="tTG/SW1V"; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf17.hostedemail.com: domain of kees@kernel.org designates 172.234.252.31 as permitted sender) smtp.mailfrom=kees@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1749482689; a=rsa-sha256; cv=none; b=SJw855JI+S3o70dtxg3BwlpKt7tqAWzR8k4ejW2/6pSUfH8JAb8oHpFaY4Bppjk/Kgd3H6 lh1d22/x6zGpvU3YIntdc6IvVlIR4xeOEoKm3e0W67GYWdKk00ZV2GDvyl3CJ2UX0Wk7z0 iNsyLc0RUJTgHBAE8QxBh6x67RcbcHg= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 1845A43C50; Mon, 9 Jun 2025 15:24:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE3B5C4CEEB; Mon, 9 Jun 2025 15:24:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1749482687; bh=ozjXpJHyeUzJv7RP45tM13BD+asvs0L+N0AGD1q7nAk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tTG/SW1VeshB/wdGO8XLzIf0hdyKLbl1+KLe8EridFc899vFQW0d6ONCeyFLYsHW5 V59dAkT9Ep6Fs7nZMRPuONnctbLRkaVWhIASGcFHmen8JrPq5B4buiGitfIJf3CVP3 3fP65nd/2wdXYmpO4UXj5RFF9yoYWjeLR2iEn8TzlPU66JvaTzE6KEYWO8t0rJNvGL ai7uFP5EQTZbYyqRMbVpF172LgDudE4jtD8dcDNZfmtRXfUh3Md28yHE/cWMYtetWU eA6a8JgrbzFqkCj+siPjSf6t2D6QXPu70eVKysRyk8wuZT9uFXlmDzWTmR3tZujpk7 3ixrHVeRTM5Yg== Date: Mon, 9 Jun 2025 08:24:47 -0700 From: Kees Cook To: Petr Mladek Cc: Sergio Perez Gonzalez , Vlastimil Babka , David Rientjes , Bagas Sanjaya , Jonathan Corbet , Steven Rostedt , Andy Shevchenko , Rasmus Villemoes , Sergey Senozhatsky , Andrew Morton , Christoph Lameter , Pekka Enberg , Joonsoo Kim , Roman Gushchin , Harry Yoo , "Paul E. McKenney" , Randy Dunlap , Tamir Duberstein , Miguel Ojeda , Alice Ryhl , linux-doc@vger.kernel.org, linux-mm@kvack.org, Thomas Huth , "Borislav Petkov (AMD)" , Ard Biesheuvel , Greg Kroah-Hartman , Andreas Hindborg , Stephen Boyd , linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH v2] slab: Decouple slab_debug and no_hash_pointers Message-ID: <202506090823.33ED63C@keescook> References: <20250415170232.it.467-kees@kernel.org> <202506051314.D6EDFA91D@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 69DD140005 X-Stat-Signature: 4uf7wrfw78867hzuw1rn3sn8rc8cusqx X-Rspam-User: X-HE-Tag: 1749482689-797783 X-HE-Meta: U2FsdGVkX18YcONIfcPBK4lZV7SO50hDsI6CiA8YsedLEdO5oO6C0wI81uKtK6wCmzrqlrsCjayzli/7IjscyVmpNcgNVetxqBQkx/HGg/W0c1Y5gRGonaQ/8ILm9R1DvlUV8d6lIVNyqlxXB9WEvg0yOL9RPyhCjvqFdBXnxVBcfWfG/jPnmVnQDrhAFEOT9kHbSrlzWe5JASdcQdrKM3t7GO0cx+RJsAAyZHcXrGtwvHhmm4b1J8W9zXROVYc8h/8/pVkOA3t0WTgi0st3u2NiK+U4/NXoIEKLyhrXSh5FL7DxbyU+SzzKs+UhWV0bbYXQpkz/iKU0Wrk76O02VdjF8HqLl9w1JztRzTljVLjXX46svPOeH+HBYsTKC/PGB994vhtyHvk6qZsDW6ETCHpJoKrqqwNkcZS9+5BYJQz9FEsQm77h3bxhkMh4ASsBMN6+mUlXrMXb8zbTwFvv1KZqogtldedkraz3T6sdUvOsLDmUm8SX6ODrKEwxa3XW3qfw3QZizbFCQlyXEqWfUndCYFLmgWGiRO+DbfAtz5o0gdTR/HUvYzJde8LsrbSieP2sS8DPp5k/OzdPqDRm5Wt2cls3GAe7K454jkOtASre3370EBFupYnEmOt2AADexy93AYEG7M9YhFctov/qOspucJn0Rz9iiXMwRVw7nfiO8gBxzuVMuoCIgD6c0jQI3l+jG5lrKfhSLP2t6fix5R9VvREWKpes2h2zri8UE8kBSCTz+goPUE5s9D/99c7gTK4289jb6jvz7JnUNBeRPvItcZMyWWCMb0AaClMIdYNEgTtJcH2vgSv6qoQlmAKT+3z2aRH47Dn4lfBwLE2+VcKXxTzobtsjEbYVIe47bNPVVv6UWzN6+b1oZlmsAQXZHr8kEMcfpiQqyzJQatFWwgGo+OnEoAw4r0XqTs9pv5zeVv3sCTUjtKt0a4j/IwDX6F8RDXfYMLZWQTm9NTW y3b02G7e N5YB0 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: List-Subscribe: List-Unsubscribe: On Mon, Jun 09, 2025 at 04:39:25PM +0200, Petr Mladek wrote: > On Thu 2025-06-05 13:15:32, Kees Cook wrote: > > On Wed, Apr 16, 2025 at 02:06:21PM +0200, Petr Mladek wrote: > > > On Tue 2025-04-15 10:02:33, Kees Cook wrote: > > > > Some system owners use slab_debug=FPZ (or similar) as a hardening option, > > > > but do not want to be forced into having kernel addresses exposed due > > > > to the implicit "no_hash_pointers" boot param setting.[1] > > > > > > > > Introduce the "hash_pointers" boot param, which defaults to "auto" > > > > (the current behavior), but also includes "always" (forcing on hashing > > > > even when "slab_debug=..." is defined), and "never". The existing > > > > "no_hash_pointers" boot param becomes an alias for "hash_pointers=never". > > > > > > > > This makes it possible to boot with "slab_debug=FPZ hash_pointers=always". > > > > > > > > Link: https://github.com/KSPP/linux/issues/368 [1] > > > > Fixes: 792702911f58 ("slub: force on no_hash_pointers when slub_debug is enabled") > > > > Co-developed-by: Sergio Perez Gonzalez > > > > Signed-off-by: Sergio Perez Gonzalez > > > > Acked-by: Vlastimil Babka > > > > Acked-by: David Rientjes > > > > Reviewed-by: Bagas Sanjaya > > > > Signed-off-by: Kees Cook > > > > > > Tested-by: Petr Mladek > > > Reviewed-by: Petr Mladek > > > > > > I am going to wait few more days for a potential feedback. > > > I'll queue it for 6.16 unless anyone complains. > > > > Hi, > > > > Is this still planned for 6.16? I just noticed it wasn't in -next, and > > we're almost to the end of the merge window... > > I am terribly sorry. I have forgot this patch... > > I have just pushed it into printk/linux.git, branch > for-6.17-hash_pointers. > > Also I updated the documentation, aka applied the diff > from https://lore.kernel.org/r/202504181307.254F81843@keescook > See > https://web.git.kernel.org/pub/scm/linux/kernel/git/printk/linux.git/commit/?h=for-6.17-hash_pointers&id=de1c831a7898f164c1c2703c6b2b9e4fb4bebefc > > As the branch name suggests, I am going to push it for 6.17. > If it is too late for you then please let me know. As long as it's in -next and scheduled to land, I'm happy. I'd always like it earlier, but the less workflow disruption the better! :) Thanks! -Kees -- Kees Cook