From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5852C43217 for ; Mon, 28 Nov 2022 23:35:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234719AbiK1XfD (ORCPT ); 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> 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