From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E3393374E7D for ; Mon, 11 May 2026 13:07:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778504876; cv=none; b=qYA376MAE98vQGov8PzvhOZaWUuuFsq5+0sEAZ/XWhdWXF4LLksCSoGfuH93MplJU6UQKa0lmxLozSYYtUmF2T3b5Mx+TMRZNWPf06eHUMidIgbhLIDfdm5Mv88FxVnqsxM/kGV/iedQETKhtdn9ANP+8ZobR6typt1yxkcR2sk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778504876; c=relaxed/simple; bh=Ve14qOZB6IijyDTsiUWPeGOsSOLkx/bw4m6bBMVawZI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hn2PWCLUUQKixiOcGdNo+f48yF9ObcfME49HNMM//XTTUwOhnig0GqbfLSQgJLEnwc2woTekPVrtrj5ANDWkiXg3shoOUf6AFOScNCCgYobfJQJjMWFyAicX7EZB5+Q++Z4rQeBQp2sAPVn+g6cNWvm2QA38nWARhTRd7vKp9+E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=Sgx4Hd7t; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="Sgx4Hd7t" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-48a7fe4f40bso50063745e9.0 for ; Mon, 11 May 2026 06:07:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1778504873; x=1779109673; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=dy6auEdvCgEB/rpn78rKFNSXFt4boyLgJAQZRyoszRY=; b=Sgx4Hd7t/RaHjeot9to0FZJbg69DzCtbk3E4JQijbOL6WRKzProjRkyTJvxfdyLrA0 MNndxcNIIvFHpnVEdiGykqkcLf4TUrFD8D6haDgQVgTvcuJM2EZE6FvVSI/OKrpCFeoP fkvdfGJmgR/xakZVyXfJ9D3ujIqir2k9ATayT2ATTHzm/42Q/glhPo5Yok0k0N3tYz4T jnPnB0Z0Ro1JhL8Ho0lmTpMa6hrpKv1XN0CCIddQv335vKPmDYtx97yMt5PYuniTRns3 C//lwPmsm9N5RcBi5PXTso/FhhwcvrJa+eOZAvT6N9TdHl4qEOg+IgNV500RroAz4EIS n1CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778504873; x=1779109673; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dy6auEdvCgEB/rpn78rKFNSXFt4boyLgJAQZRyoszRY=; b=e/3MRcfa+mD1HxwIToeOUfEWyg7IdU1C7Wo+buvLl04+T6k86OziFJtQsSq2VyrVDl 03R1jIjMiIWdVj1t0H+yaDuI0FX8LaDR2rY0bUCS4KGGjNKi2SNUfu0b+34kGFcwC0f0 VhR5JVO2ZQIQyEoE21qWaJx5Bh57WWqC4pH6IWoAH+YF+X6+NET8LlHElmaJziXCTDIe CIHG0gQIwSN56ac0oIJ0tCbnpqjppu8tnfkCwV44tqP3C6Jk5pdtz2LMXDcVxrVHmWxc HwT/27fv1HDRc5yRRO8idgnH0v2c/eLy3Uu+thcfyj39DGfEP0huHLpM9oXE5t6DDlJn Wm1w== X-Forwarded-Encrypted: i=1; AFNElJ8WXVktSSMUHW/WgqLMVn2Yb8gqlyFurFeIW4lOAeFKc7OyYqLRGDh7Huqwq79PICz3KNptxuw3fWkub80=@vger.kernel.org X-Gm-Message-State: AOJu0YzBnztLwDyRWWZML/XC/K82lExinciFpXK0J6ldfcYuEI+WOAo3 RPnMoE1tfxVAxMOMWLURJNnv4zccCGzqG6L+BlL7l7tHB5c6BM0idRpuuI0/UicNMuA= X-Gm-Gg: Acq92OF4iuQAVCXbbDIEaZNDsMivkzIuCr0c/g1/GCIUnMT6K1F7izjx2yT53S8wFdL PW3dImE9WSEKc1lPjSNwOva/LuTHwZomvjQPoPFjyw5ywgAgEyrUvoz4vwoHp5dstMCZVjlZFF/ P5bXdOGLLc2CKT0O/LpSK4PMK780DZkEfCmyDg/rge71vglbbkqC7L4TyHuicSzIbXl+de+4p+y u14daVr1t6z0gl29xCYLLSYzN2blr5luaH/HpCj9QsQA417Ncu3g3lZZb+TQh8De78vpQBGJrkA hojGuxdFffa4os3ycqlWTjSYZBvivSF5yO9vN32eISf09CPWAX7VSDhMtCaW2FpG/CWh40lB9GH Q+sseQQw7Mx3FRnpTL4UIgrMcbsLH1TBr14Yrx1TwLj6NvGzKSklYhpXUbm/CELXRkniEH5be5f hZHsHkOnNauduz+x1CV+jZsphE81LXl4/72qZT X-Received: by 2002:a05:600c:4512:b0:489:284:44ab with SMTP id 5b1f17b1804b1-48e51e1deedmr377040195e9.12.1778504873215; Mon, 11 May 2026 06:07:53 -0700 (PDT) Received: from localhost (109-81-87-110.rct.o2.cz. [109.81.87.110]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48e7040a9a9sm321328475e9.9.2026.05.11.06.07.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 May 2026 06:07:52 -0700 (PDT) Date: Mon, 11 May 2026 15:07:51 +0200 From: Michal Hocko To: Breno Leitao Cc: Sasha Levin , Andrew Morton , corbet@lwn.net, skhan@linuxfoundation.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, gregkh@linuxfoundation.org Subject: Re: [PATCH] killswitch: add per-function short-circuit mitigation primitive Message-ID: References: <20260507070547.2268452-1-sashal@kernel.org> <20260508135630.a380e3c187b59e4c04e6f358@linux-foundation.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Mon 11-05-26 04:41:38, Breno Leitao wrote: > On Fri, May 08, 2026 at 05:47:04PM -0400, Sasha Levin wrote: > > On Fri, May 08, 2026 at 01:56:30PM -0700, Andrew Morton wrote: > > > On Thu, 7 May 2026 03:05:45 -0400 Sasha Levin wrote: > > > > > > > When a (security) issue goes public, fleets stay exposed until a patched kernel > > > > is built, distributed, and rebooted into. > > > > > > > > For many such issues the simplest mitigation is to stop calling the buggy > > > > function. Killswitch provides that. An admin writes: > > > > > > > > echo "engage af_alg_sendmsg -1" \ > > > > > /sys/kernel/security/killswitch/control > > > > > > It certainly sounds useful, but what would I know. How do we hunt down > > > suitable operations people (aka "target audience") to find out how > > > useful this is to them? > > > > I'm not entierly sure here... If folks have suggestions on folks to loop in, > > that'll be great! > > I work with these issues at Meta, and this approach would address a real > need we have. > > While livepatch could theoretically solve this problem, it's less suited > for rapid mitigation for a couple of reasons: > > 1) Livepatch rollout is inherently slower due to the blast radius if a > bug exists in the livepatch mechanism itself. > > 2) It's common to run hundreds of different kernel versions across a > fleet. Since livepatch is kernel-specific, a single CVE suddenly > requires building and deploying hundreds of individual livepatches— > far less practical than a simple sysfs write. LP is certainly a more laborous solution. I guess this is quite clear. It is also much safer option as it deals with all implementation details like consistency. All that is not done for fun. I am really wondering how admins are expected to a) know which kernel functions are ok/safe to disable and b) when it is safe to do so without introducing unsafe kernel state or introduce an outright bug that way. Thiking about this I can see how waiting for an official LP can be time consuming and sometimes creating those is far from trivial. But would it make sense to have automated LP creation tooling available that would allow to return early from a function and relly on the existing infrastructure to do the right thing? -- Michal Hocko SUSE Labs