From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.180 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795929677; b=YBYOvUcHb8MhwAvJjRaXWsqxpuh1t1lO+/NSgfg4VNd9F4coSn+pY9R5LQolQacAuGNY w3cUwKzAPKWHOaRV9FkeUZYKadJDRDqWirrzsMVHnjt3ykv0ZHJS0C37CT7rURpul2Y+4 QNH7WGGfmAl2bqQ8IdQ6egvnB/1zM5SjNSqyrOa6ofQbMz/pMwjRIwOf3UtoVaYZ7N40m hkoYIw5/nyQUmwrY+2+H08/pWH0V3XUY8vDO1kU18KIe+5kAWTdAHYUW8pfIwyIdxGbg7 EFt5e8OPW1ACQmIqMAEYICDaaFHpazDm86htgVXiapTE1jITpXNV972mq29YJh/ma8A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795929677; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Date:From:To:Cc:Subject:In-Reply-To:References:Message-ID: MIME-Version:Content-Type:Content-Disposition:User-Agent; bh=IYw01PHk9RMJHthy0gSw6B5M2B+JQ+uuoFp5Y+I2ldw=; b=nedf53HdZZabyL+BYQDtl98GbzUlkutoAnDBjoQHiQ31R8TpTgaguWbKSVOo1SozhSg0 nzBXCkShbE3ct1MIvn6BaiqN63v6HgD0vJXHDixMtlZEV1hiZbbTg+fY0smSBC2g9AS8h dSQxmJEWSe8wVR6X18HOQXFmaXlMFkVjwVg/TBrLoUMOxAtChhbiM8Yuv7v8ANA7iaLX/ BQV2Ohb4KxHpulbJqjWMJd5ZX+KBXZyqSDz8wEKr+fJAzVbUr4RwM7CxHja1zjz/x91xC D5Ue76JjKPsZF3ijUE+Y9TjxZmaxDIFDDiyyT7Yk4o5VQpyL49J0yb/BR9bo5lfbiLw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=chrisdown.name; spf=pass smtp.mailfrom=chrisdown.name; dkim=pass header.d=chrisdown.name header.i=@chrisdown.name header.a=rsa-sha256 header.s=google header.b=d+zIH1gi; arc=none smtp.remote-ip=209.85.128.180 Received: from mail-yw1-f180.google.com (mail-yw1-f180.google.com [209.85.128.180]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C09CF606A32D for ; Sun, 29 Nov 2026 05:21:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C09CF606A32D Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=chrisdown.name Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chrisdown.name Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chrisdown.name header.i=@chrisdown.name header.a=rsa-sha256 header.s=google header.b=d+zIH1gi Received: by mail-yw1-f180.google.com with SMTP id 00721157ae682-8b503e2a87bso95048917b3.3 for ; Sat, 28 Nov 2026 21:21:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; t=1795929676; x=1796534476; darn=vger.kernel.org; h=user-agent:content-disposition:content-type:mime-version:message-id :references:in-reply-to:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=IYw01PHk9RMJHthy0gSw6B5M2B+JQ+uuoFp5Y+I2ldw=; b=d+zIH1gistEn9Lf4sWXtblv+FQDla505gAsnclvgiuRdrPUMsAzFlaTunpjhy9VBaG H5oExXO+o1+/u2JfILKACTuGV0R8p3pwxUJD/5fBsImzqxo9mXVktPyOroT50W3ACI86 Chw68pLe61ckx25EcnciU5nA/4ufn3O9cHq9E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795929676; x=1796534476; h=user-agent:content-disposition:content-type:mime-version:message-id :references:in-reply-to:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=IYw01PHk9RMJHthy0gSw6B5M2B+JQ+uuoFp5Y+I2ldw=; b=GtEjE/oAzCwVHPY6ijWD9Ne0FU5UtNifAMBd3RZmdaaWfv1Fbh7Yel9xNgxNNxD9FA PP8H2BfQ31F0+m+38QEN8NEL+shqtQvIO5wGRxxCFKNM6YxERotQiMslQhld3Cq6Bypj ik0X19UT0FM14lsgveHwdS5q8bh8e/7u05ZJGQreGj3hjzqODFGW5CPLi7acDYCEu/X9 LM5rsQsUetmuljO3+kq/ZQSLpw7W6MLnFyoxSLvrSYwbvRfB8lBAiJuG2KaLKs5NuGzb 3rwttkpVETvqIAhG4JGqpbBuqdLGsnJW7MQCJ0Ozbe3BjloxbGlOEdy3E9EOfiQTNbUM lkwQ== X-Forwarded-Encrypted: i=1; AL+hErGewvQlakQsQxOjqQY1zOmAcqjldW5QFtuEvr0fE9qmh1A3VzquOw8udPuSjO5aXgM3EI8nt8BybeA=@vger.kernel.org X-Gm-Message-State: APuU4Z9CXPqvxZWbrZenYHWgslKGIixhTniYBeiJ1VxZpdUNEVSsw2WR NVq74/np9UY+eT3pwKu8xr1QiiMrw7J7Ntjk8y0ybVOKaCSzTgU/cKsuV62hEkJ+6R8= X-Gm-Gg: AZFdTZcGEzwHaIlU+L85bpFfpCJPkktECjmkSu8vRR+ILGi1Xl3hTkEj5KqHuATTxZ5 87SGC0EiKTxcxyYXRyl4M5cFdlKuubmcviT3uYCBtPs7IdH/OWsvkZTuFGCMYA89koldwVm+GCA 7aIcExb19t01JSndsAFW9ZQjt5M1zfCqJrlurCVXQ8w8ZQeuTtsDs+c8tGaUwymzAZp/1dDtrlU KJpsW46TItBlly6vaBTJusggQYShPoVzS2b8QluMnw7y/3qjSKVf3EjTJQ7QsZr+auonxwK83vh IqCPYYn/2itHedhB+s9BIU9yzlbXzKu9cvjNkrKQN9jhBQQZq4H5taPrJi2cDTzMTo8nCQKuiiU 4rgu8E4wvP68payLTKDfGMd3fEaDDqPOc0Q9m64K8tk/5sQuAgS2NZ4jG303UYLoBDvZpy02o9V InD1x35f7mcavbKFD3L9THkF++qDB01drE2Zdom3Va+yfjd9KYJwszmtH5Cx55hNpdLz1WavLcW T786N5vbhfKUjhcm062RC6w7R4lx/JrZy6GPpE7r0ugCHKVMWHA7q+nDIYxy51An/3weJnrW1iv qbXK2GdiiHaOB3eMkM6N1M6jzNvy4COIN+XOW7L88o1j+nC1HyahgJ0aVun2O47IxmT713uQTa/ geZ8LHa76/QQquI5u/TVm8T5r//5GRG6E2TFNbTtjmXtO5/CFdJy5F19cCCECUoDQLqKKhSt16b JO9XHHEIyRObDATWNeQYjGYr0lDOlGXjyOfuT6h4dJiDeM+77YlYXQQGUMYUqSWhNlbXVhu3yEv NzSlY3EZA3n4hi5xi2+SPM= X-Received: by 2002:a05:690c:c9b:b0:8b4:d8f4:8cba with SMTP id 00721157ae682-8b5205041d4mr136900727b3.59.1795929675921; Sat, 28 Nov 2026 21:21:15 -0800 (PST) Received: from [172.20.0.2] (c-73-207-185-9.hsd1.ga.comcast.net. [73.207.185.9]) by smtp.gmail.com with ESMTPSA id 00721157ae682-8b520309d3esm113870017b3.30.2026.11.28.21.21.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Nov 2026 21:21:14 -0800 (PST) Date: Sat, 28 Nov 2026 21:21:11 -0800 From: Chris Down To: "Vlastimil Babka (SUSE)" Cc: Harry Yoo , Andrew Morton , Hao Li , Christoph Lameter , David Rientjes , Roman Gushchin , Kees Cook , Marco Elver , GONG Ruiqi , Jonathan Corbet , linux-mm@kvack.org, linux-hardening@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@meta.com Subject: Re: [PATCH v3 0/6] mm/slab: Support selecting slab hardening features at boot In-Reply-To: <8b6e489a-eb73-4b2a-ac65-dfadc8c73bfc@kernel.org> References: <8b6e489a-eb73-4b2a-ac65-dfadc8c73bfc@kernel.org> Message-ID: X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/2.4.3 (cc9e3943) (2026-10-09) Hi Vlastimil, Vlastimil Babka (SUSE) writes: >I'm not thrilled about the "default to on". We usually do these features >opt-in. Now our distro kernel would likely need to have these "disable this" >options in the default command line, with documentation to remove it for a >hardened setup. > >But yeah doing it opt-in, the hardened setups would now have to start >passing the extra params to enable this, even if until now enabling the >config option was enough. Also not great, but we can argue they are still >the minority? > >Of course there's always the possibility of adding another _DEFAUT_ON >configs. Not great either. Sigh. Yes, it is ugly. Given that Harry asked for one of those [1], how about a single SLAB_HARDENING_DEFAULT_ON for both features in v4? With it set to n, a distro kernel can build them in and a hardened setup only needs to add slab_hardening=on (slab_hardening= will replace slab_buckets= and kmalloc_partition= in v4, as Marco suggested [2]). It can still default to y in order that existing configs don't quietly lose these features. The downside is that SLAB_BUCKETS defaults to SLAB_FREELIST_HARDENED, which this series makes default y, so a defconfig kernel would get the buckets built in and on at boot. Or would you rather have n anyway, with hardening.config setting it to y? Thanks! Chris [1] https://lore.kernel.org/r/avdbfEfQHpF9Ez-e@thinkstation [2] https://lore.kernel.org/r/CANpmjNP0cWB_670hYj7p+Dd=do1qEu4XHeW+c7sTv-MXi0UBTg@mail.gmail.com