From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB11C248F51 for ; Wed, 26 Nov 2025 11:23:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=65.109.113.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764156234; cv=none; b=DJviQOj/KB3j9Rrhi0Y5RvmC+W+YoxnVFCHGQmeuth6KU4EidVCCdeEgS3Br6yRNd4ETZj5PwGmB3OlIefjinp0BVo/WbqFay+cVU3haz+R2fza3XyNwrENkwC6SK5VltFaQ/P90AebEvREt+qy9G7G9lCTCjSfXmhBhGG+vnRE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764156234; c=relaxed/simple; bh=v7ChRs7UfNnVbssQ8VH8QCxGtDyIGD1jRY2t+gXYaPA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jQ5IcVXUJ55Gxn+vQUGbvice3R1oDETkS0o0WgEhS6G98Hh1bE9oNLBoz3W+xDTufxtKoQaqYhJsl8oDMij+gzqwESRpIN4BqSlCQ4incT2h5BxBpR2BdC4casDjHS5zwvcqf8Hnd4kB4CEGySE6jwBRu2DqYDPCChDjCvDfUVU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de; spf=pass smtp.mailfrom=alien8.de; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b=ZHhu28Hw; arc=none smtp.client-ip=65.109.113.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alien8.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b="ZHhu28Hw" Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id F265040E00DA; Wed, 26 Nov 2025 11:23:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id sxZsoeWN_XDN; Wed, 26 Nov 2025 11:23:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1764156220; bh=qYYSZKgt1P+izil4H4ljMABfhqY14LPDJv3vyK52ctU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZHhu28HwNLeGcjVFfqD561kkY6aYNVsuvv8/Ee1g6+ctvR8ND6C205+k8mjsZrqzw mjR5EglbaMGUHQ2ze1VaM/W5FR5Ng4YFgUDmyR7xNRpzQd3pnkfUDf6MVQC+/xZAcG B180ujdupglUEBvtXK9p3UopbIOpUzE0EFuBCaNqFqUwGukYY3mHsk2DmYV9BOL+0c d8yVutvfQBqpo1zo3UalPbRBVhT5mvqnUpobdzTBBFBF6hfo7v1aJDoxdKVZGnb7Ub 8s79jLjQjY8Hf9c2TtMX7WqfikpSJcaiDQJmB1D1Pdu8GTe4QzRHWzv20c1TI+cumb NLZfQzZ6BBTG7XEpjnas6ZJ/kVm2EcapsmXnP4lqG3j7I5R+lV17CoraSWqzX6BTGV vAD2eBiPF8qVqWvUOAYzDSNom2oOqxtozMNgERZQ1CO3i3vyzTsS9+QROi06w7C2jx BH7c4Uc/CajTyXIGxH/HQjgs7yo1H4VZMcCI05tQ/hKXr0wi6Ppl76HH3JCS7SR/Uy bWL+N+nLr035UGtBBhfob3AC/svdW50mY880tTEyfSFx9b7CLEEKHqFJpZeOaEo0Ia XLjN7l2Ba+stLHjOCT6l1MEh1mtaLU4e1iqmE++1A+cnphDL9BuySdYt4R3+P3MMUL kvfHIrMY2TAEymDwjE0ik8pY= Received: from zn.tnic (p57969402.dip0.t-ipconnect.de [87.150.148.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with UTF8SMTPSA id 73F2C40E0200; Wed, 26 Nov 2025 11:23:27 +0000 (UTC) Date: Wed, 26 Nov 2025 12:23:20 +0100 From: Borislav Petkov To: Brendan Jackman Cc: "Kaplan, David" , Thomas Gleixner , Peter Zijlstra , Josh Poimboeuf , Pawan Gupta , Ingo Molnar , Dave Hansen , "x86@kernel.org" , "H . Peter Anvin" , Alexander Graf , Boris Ostrovsky , "linux-kernel@vger.kernel.org" Subject: Re: [RFC PATCH 07/56] x86/bugs: Reset spectre_v2_user mitigations Message-ID: <20251126112320.GNaSbjKPpKWNRLDLwP@fat_crate.local> References: <20251013143444.3999-1-david.kaplan@amd.com> <20251013143444.3999-8-david.kaplan@amd.com> 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 In-Reply-To: On Thu, Oct 16, 2025 at 04:13:25PM +0000, Brendan Jackman wrote: > This seems a bit over-complicated though, in practice it seems pretty > likely that just hitting people with the unexpected errors is sort of > OK? At least for the usecase I'm seeing everything through the lens of, > I think it would be. Yah, this topic does get my brain in a twist... But I think I know what the right thing to do here should be: If the admin goes and dynamically changes mitigation settings, no matter what processes have selected previously, their settings will be changed once they go through cond_mitigation(). If what userspace has selected previously and if that selection is not compatible with what the dynamic, system-wide mitigation setting got changed to, then the per-process setting will get changed. Because the admin wanted it so and the admin can do anything. It is basically the same as any other OS resource change - userspace needs to handle it and adjust to it. If the admin decides that the system wants to force mitigations on, then all processes will have to comply. It is what it is. It'll need a proper audit of all the TIF_SPEC_ and other flags and we would have to even override them and issue warnings why we do so. But I'm thinking: if the admin changes system-wide settings, the only right thing for tasks is to comply. I'd say. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette