Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp2533956rdg; Mon, 14 Aug 2023 05:51:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHHcY+SNKFOpsbH3lLit9tE2paF/0Aglh/J5TzydLNuwjOm60sH2b5gmD5uAmFuRHYCFvgf X-Received: by 2002:a05:6808:1487:b0:3a7:2599:e2b with SMTP id e7-20020a056808148700b003a725990e2bmr11712234oiw.5.1692017466062; Mon, 14 Aug 2023 05:51:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692017466; cv=none; d=google.com; s=arc-20160816; b=AGH1uFh50Cg4BXPBUIafhFZkXLcvrbUF5BNFLLo0CwZf5RsE2TvUGHSq4C+oUEMtbX R0OPb6yn10Mbjn2OC+Fab21L8YxmxZIwE01tqVj8NpUDbDD6P7JwR4jQzoWoq9Ebezlr JB6j8Jy8TgSENL2Ki7w3CE/nZVZ0pj9OVw5dbleDcYRE3brFvHNYjzMOC4eYmuJzcQ2O I0ZbPKvKbfYFsp3orkwagyuFDaAebFhTvp8/dJQzHFeHkUpyzSgLRfY4aVfUzqPzruqz CojsxObUY5PJNumxPJllVzaJsKtbzb+D5hUSUKTJ+JKRyRZIc1D/GiR36XGnoZXDuDyH GMMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:user-agent:message-id :dkim-signature; bh=UPLaEzNE8Ub4tdTij9UMa81BMLeus6lxHe2rDMIHscM=; fh=peNdKtoaHORv8ioI0fQqXw+cwM1nrXfQL3z4QxaFnyg=; b=UTLWO2+6laoivNm0I4zzCguRrGRpJlisgVVJyHwHpYzPnMK5g+Rg48AdBl/oEFzODn 0derz/ZcFDilwLplTIzBD8xOEVmEog/P0GJs9FWc080mDB+IH8PFJgvNbLj9Jt2FHdkc i8QL7rb+rHWmrmz7MsyQDsKsSaUeWh4H+emNbet6HFQAFee4SKcIGcvnlhxlOqQBJF2M JJpO7chcMWZJw4nhAYMNnvZ+cfEtaiNWWb/A7fxijjFTz0Bv9ekWO7M9pMU/CYZ2JZlC BR8npunhjOnNYnhX4D2yrHtCwCARA7pNpru+qTY/phKYtddLHR11xQM26HMUyTv1a5DU FxSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=VSzU9J9U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 196-20020a6300cd000000b0055fce913d52si7847047pga.761.2023.08.14.05.50.54; Mon, 14 Aug 2023 05:51:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=VSzU9J9U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234285AbjHNMUK (ORCPT + 99 others); Mon, 14 Aug 2023 08:20:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231609AbjHNMTi (ORCPT ); Mon, 14 Aug 2023 08:19:38 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8736B183 for ; Mon, 14 Aug 2023 05:19:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Subject:Cc:To:From:Date:Message-ID: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To:References; bh=UPLaEzNE8Ub4tdTij9UMa81BMLeus6lxHe2rDMIHscM=; b=VSzU9J9UpjTc7Oc+POVy3Bkvac OGJW1CEHefckCLqw23P3rS0Q3De6biBn45Pv+lVkW4cDx8Wdn3j8nTgoRulvi7c6MyS+e+PXDw0IY lNPtgBhtedNdH5GFEruSsUONEEl2U5EZLIeZMltaLQB4LW196tGCFcEzMDKEuMJYjUofQe7QNVQ9x hCWFqW5O4tIQs8PV8DLht0PPzEq2TtpuaBDDNxXxONLmG0XgDYT9bk6WlzrTGbTRLsVmIeUyPpiiX igl5qqcH6evqoIc4TQrrkGh9hoyHrJSq+mKB9JFAcsSfEUrU+F5nEvfvFC250XBdJFTSMbfjpiWSa GoM9sUyA==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1qVWXY-001t44-Ae; Mon, 14 Aug 2023 12:19:20 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id C6F00300137; Mon, 14 Aug 2023 14:19:19 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 0) id ABADA20410DA1; Mon, 14 Aug 2023 14:19:19 +0200 (CEST) Message-ID: <20230814114426.057251214@infradead.org> User-Agent: quilt/0.66 Date: Mon, 14 Aug 2023 13:44:26 +0200 From: Peter Zijlstra To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, David.Kaplan@amd.com, Andrew.Cooper3@citrix.com, jpoimboe@kernel.org, gregkh@linuxfoundation.org, nik.borisov@suse.com Subject: [PATCH v2 00/11] Fix up SRSO stuff X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! Second version of the SRSO fixes/cleanup. I've redone some, reorderd most and left out the interface bits entirely for now. Although I do strongly feel the extra interface is superfluous (and ugly). This is based on top of current tip/x86/urgent 833fd800bf56. The one open techinical issue I have with the mitigation is the alignment of the RET inside srso_safe_ret(). The details given for retbleed stated that RET should be on a 64byte boundary, which is not the case here. I'll go prod at bringing the rest of the patches forward after I stare at some other email.