Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp41885rwb; Mon, 28 Nov 2022 16:54:08 -0800 (PST) X-Google-Smtp-Source: AA0mqf7nKleiRQpjXywQCqDOEOJt8tls0MtnqrMs+A9sGOeQ8x7rJroVZlhQGrPmORDXrCclkEfE X-Received: by 2002:a17:907:77d6:b0:78d:e26f:bfd8 with SMTP id kz22-20020a17090777d600b0078de26fbfd8mr46207522ejc.482.1669683248436; Mon, 28 Nov 2022 16:54:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669683248; cv=none; d=google.com; s=arc-20160816; b=HrsTa0CAdPqYUtyDntWsonOskiOhOnfAcFDMCojCUUnki0W74V2j16+LOthpBhLrq/ mlOKyyjuPb+RhaFwcu1rEIxYXbSBMXttW7yoWo2kbhXih5/MxXsoCaymXhXEWZ/HTkQr NFkWVSLBifdu0kSrQNvKOl3ulTeln8NqDDLiR32OGM0cn1QjeNEmnKxpG6zuO0rzcsCI rhNu2pEj9pqvOCXHzRJXx1B8xj2ieAn7FwN9tJ0yKU3ODxHV77THv5BrKwaKOmcpYMX3 y8qBETUgPa62bwxqwu80YCwKBiiNmY+eQ1eR7V2qD+7A5zyyNlU7TlFZrEyNJfnYzI8j HhXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=12Jz0asduvf1c6TL+3azPftaorUR/sBfylrXZrFp+zY=; b=PdElp4c/Uwg/hkZhg+hwJBDSX6Z1Gr0Jpdkf+h4au/v3wfIsi/bbfTCw30xhr8yr7f ToEFZf9W3oexvplJwEVHeKzmsUz9XHEJPJOBXy/LcceKbd6PmOp1AoCDfwYoEa7RqrCI xEMdXi94zgT4zNFST+Lns8uBn/8ZX3A2mwNkzxCpvHP0ktKRw0UUnEPBRuDtUpJLH+ix qyCMXGfGUJhaaAewr9Go8nH5rs41AT5uqadJzJdDRxzm4KMD3ZxnjH1Q160guzuziR7L uXQsOwGgaVdK57FtD0S7hR1Ut0bVswufA7QQKuNtVjj0bsh5N0Er0/KKHzCXVoIZgWhm QKSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=MkrUrgs6; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z2-20020a50eb42000000b00467960d3013si9342704edp.43.2022.11.28.16.53.42; Mon, 28 Nov 2022 16:54:08 -0800 (PST) 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=@alien8.de header.s=dkim header.b=MkrUrgs6; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234712AbiK1XfD (ORCPT + 83 others); Mon, 28 Nov 2022 18:35:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234721AbiK1Xe5 (ORCPT ); Mon, 28 Nov 2022 18:34:57 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5DD2326EE for ; Mon, 28 Nov 2022 15:34:55 -0800 (PST) Received: from zn.tnic (p5de8e9fe.dip0.t-ipconnect.de [93.232.233.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 59F8D1EC04AD; Tue, 29 Nov 2022 00:34:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1669678494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=12Jz0asduvf1c6TL+3azPftaorUR/sBfylrXZrFp+zY=; b=MkrUrgs6bTJSLgq9LoicH5MyKYfcYBiZtS7m4+h0sNDQ1/yP28lsjyxXnhpvQmfGSKN5yh 9kUDGzpHDZPfFGTuMOVvMHtMll457wM4Fl7nTiWHqAk7WBODok8xwEesRusAlyQ8HK5U1E XMTvIRlabnWvg8xFfmsKlrlnODDfq+w= Date: Tue, 29 Nov 2022 00:34:50 +0100 From: Borislav Petkov To: Pawan Gupta Cc: Breno Leitao , tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, hpa@zytor.com, jpoimboe@kernel.org, peterz@infradead.org, x86@kernel.org, cascardo@canonical.com, leit@meta.com, kexec@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] x86/bugs: Explicitly clear speculative MSR bits Message-ID: References: <20221124104650.533427-1-leitao@debian.org> <20221128220358.n5vk6youcdl2er35@desk> <20221128230219.urqiol42rikdhy2u@desk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221128230219.urqiol42rikdhy2u@desk> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 On Mon, Nov 28, 2022 at 03:02:19PM -0800, Pawan Gupta wrote: > Yes thats a cleaner approach, except that the late microcode load will > ruin the MSR: > > microcode_reload_late() > microcode_check() > get_cpu_cap() > init_speculation_control() Microcode late loading ruins a lot of crap already anyway. Then I guess we'll have to look for a better place for this on the init path - I don't want any more hackery in the hw vuln nightmare code. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette