From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.224.135 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796457712; b=wfs26oQxLzjFuU98mjueFDD/YI7Gq9ZscK3Re50joEBFt1FDUROFwt2Zc2N2rTamUPme tcRhXyAOtAcjPTJ65WP+dEpmp7zLGWVXAihY2Nea87rzCYIvKG+IJ+LvQVAtZFjAkvaQg jBnhWjeF29VZXhw0l9GpCRejgmSCiFaOs5NG+z8B0xo/2CyDs24Z4TMAvihRd3/u1DNJo Gstrusvw4MW8XBhrht7zZFKKeHl7klEjUyolRp442a4RaUdMxj1tABiUZI1iVQKuCcRrM f4XvzxuEzTd0IpDQa4aly70IesJ1hg7q1Ya3s5pM3Hb6+yVHthr1CfWR51i+sc3nEoA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796457712; 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=ZPSZySkF5pUO/9msF0qVa4Kx3hhO4gluHyEsPQIasyI=; b=NVd44tHbwX0jOVjv603l3sc84Rnyw+QEp9FfEveY/QGpApMXiNPJ/f0cKjS2K3pjWXAs 9n2HTIlZuXBXtOeDJljWIQAJzaFj0Fc4q6/SzbaaEyNXSbFzaQYTdrVTMJsbagm8N55Nf dMTxW/Nn4NT/XSgcusdOPq51Qg+turClbVEbwQUnY/6patkfo2PpS0FtVyrszKDZI1BRO giaTaANKkYBMrX4e+cIoTd/ppt3PyZhaACzJ/hOAB4Ug1FWQxYBOJQgaIqBGOEn93VdZg htdbjCnWawmmpRDkVCEQ5yFqVd8f78VnQGlMcK7ghgaZMmyogbmm2T97K43MBefAeyw== 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=JHsGxAbM; arc=none smtp.remote-ip=74.125.224.135 Received: from mail-yx2-f7.google.com (mail-yx2-f7.google.com [74.125.224.135]) (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 11A4E606A32F for ; Sat, 5 Dec 2026 08:01:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 11A4E606A32F 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=JHsGxAbM Received: by mail-yx2-f7.google.com with SMTP id 956f58d0204a3-67a3d39e406so688803d50.1 for ; Sat, 05 Dec 2026 00:01:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; t=1796457711; x=1797062511; 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=ZPSZySkF5pUO/9msF0qVa4Kx3hhO4gluHyEsPQIasyI=; b=JHsGxAbM2tto+T9VyazInjHkb1Vr1ZK026UBaqqqwNbSzh3vQGvd+IZ9f90JyAOVwP QRmcC+MLGf56+74KL0+hVkDPvfsZxJOXm5wmuy51qL2gqB5vb2Dr01a6MdacCeTXljlA aaJkZwNs6kONmabhoTsYpmEsiKcMxrHKqfvQ4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796457711; x=1797062511; 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=ZPSZySkF5pUO/9msF0qVa4Kx3hhO4gluHyEsPQIasyI=; b=hIUmW5HGHT2vffFeZOnBgfKgeQOXeS1Bx3Txi7HVZtvFuudvCwSyViK8FHy62hRx17 LJ4AOaTGHmohd/ddyT+1omCamnfdP/318ZaziVv37C7+AklarOqojxoqjKbLDsQ2IcjR jJMUlqK4+Yzsmu+Wct2074e/KEyDtrPrh09Qz269lp7CQKuDZJYWJdTvfbVxRrUFaK1q oqm7FZzFoECb4SLdK67Z3J76rCTUR5v55mgz34J99WtPZJy+53HH+U4s2/xg0O0SUGNv AZzO2QoBqf2HTRAnhfDmRcIt0oZe+c20cjynK9fcN5tO1P3aj1Oyf9ZlyyY30nkTxwx8 dk+Q== X-Forwarded-Encrypted: i=1; AL+hErH+15m64GsbJ6hndPmKueRQl12T+bdk9I/OhYOCjRB0WT1EEJkU5J+Zqkx2CdncNtV5yQ8aAU7qkqfdYKE=@vger.kernel.org X-Gm-Message-State: AB4q+uGtDpOsCjAd7eq6lI/0Td0nI47EGpHmNSmgcgwvJcRrU/1JBjwo 49989tyYfgaUlh1YHz/3ITgsRoY0aT6FPyWW+dYSBisBhPTerq4CIQVtXwtEKq8bj2E= X-Gm-Gg: AZFdTZeJP8vSQgkBdkO61SfcjX7yZKzqzTBefK5qxHLjuNMIs61MGqejdTeO9p27BXr rybyvxP0tBVeDtOO2Jh+gjEC6kFEEu9e2AIU3CUZtXaIZtiYDRv8zcgwsnPlZ97tBG3jj/INp4R FollJs2z2/VLjACLU9UMu0tKuETWR8KH8PTvvFIA6CE3tY8LwTVJv8IY9Rdkvh23H25/BgZZwxv roZbkAhDw9c1lkKm7eQuxRGTY++hxd6SBbiduxtt2K7QFx/8pttOl1fQpjm3aPA0X31ItZ3lhp2 bfWHN85776zNiKNPzzv4R894cV8+si4Uc++LG5PrqBUcP8vzi6886jahpecwOJNbIZJACP2yEI3 fcmtjcnOVOOywXIwY4XHpYzr20XrjHj90atZzgj9CuqTjxTBujssAiO2UU9Xu2JrveHI5GOKqkK Y3juiBB0kKsQ5sI8yarVkdCQYMq5paU2iMCt5TUZfkMYTvtDA+ad/kMIIzgGRnmjeO6tKLvydji EatwADdmpNiP6OZgJs/ufARIOCjzHqkfzIZra3c/FT7vFu4eLrvmaYQ3945oyXNK9U0L29LZC04 kYlXQWnFMtlZz+sHRkvXR7xvshs+sTlWEEZN4PKOmxV58aew32Qz82b6qunrSQ9OdZeIANC5G73 AZaEbg5YZrnRFC49o1vhwbHOnAOmmbsnxuYv5ULqPWqIc9qwlRajqcMYQf+pwmeO6l4/fppNB0f H1eg6a5i+sBzKGDJTTbol3HFhafExhPToqZ+2RrpFF9M6A2d10zvkOSmBAS0DQ59S74I6PwlCvE uIwxAYIyMst4meuuveTJtg= X-Received: by 2002:a05:690e:4894:10b0:67b:f414:d8a1 with SMTP id 956f58d0204a3-67f7241357fmr1627124d50.56.1796457710837; Sat, 05 Dec 2026 00:01:50 -0800 (PST) Received: from [172.18.0.2] (c-73-207-185-9.hsd1.ga.comcast.net. [73.207.185.9]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-67f0cd06396sm2134597d50.11.2026.12.05.00.01.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Dec 2026 00:01:49 -0800 (PST) Date: Sat, 05 Dec 2026 00:01:46 -0800 From: Chris Down To: Harry Yoo Cc: "Vlastimil Babka (SUSE)" , 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: References: <8b6e489a-eb73-4b2a-ac65-dfadc8c73bfc@kernel.org> Message-ID: X-Mailing-List: linux-kernel@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 Harry, Harry Yoo writes: >For SLAB_FREELIST_RANDOM and SLAB_FREELIST_HARDENED, unconditionally >compiling in the feature has negligible overhead so we could instead >let them determine default behaviour instead of introducing _DEFAULT_ON >configs. Do you mean that slab_hardening= should be able to switch these two as well? Since v2 the series only makes them default y and leaves them as build time options, because their cost didn't show up at the system level and so there didn't seem to be a reason to switch them per host. I'd prefer to keep it that way for now. If someone does need that later, the list syntax means they can be added to slab_hardening= then. >For SLAB_BUCKETS, Vlastimil is working on making it less expensive to >enable at runtime (which is inspired by your series) >https://lore.kernel.org/linux-mm/20261203-kmalloc-entry-rework-v2-0-d718dc4fd906@kernel.org > > "If this is accepted, [1] should be rebased on it as it makes the > slab_buckets boot-time handling really straightforward. In fact > CONFIG_SLAB_BUCKETS could be repurposed to only control the default > behavior, while the code is always compiled in." Yes, that sounds good to me, and it's a lot nicer than adding another config option. I'll rebase v4 on top of Vlastimil's series and drop SLAB_HARDENING_DEFAULT_ON. I tried that on top of his v2, and it does make the buckets side a lot simpler. >For KMALLOC_PARTITION_CACHES I don't have strong opinion on having >_DEFAULT_ON flag for this, but I'd argue it's fairly reasonable to >assume it's on by default when it's compiled in, as compiling in the >feature has _some_ overhead already. Agreed, I'll keep it on by default when it's built in. Thanks! Chris