Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp243279ybt; Mon, 6 Jul 2020 08:17:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoIDWjpdQne3nMsSEdc42mOW6oKjPRK29+DZEQMoj5pDv1GqgaEcTHI3nAXqmrr59dSiWC X-Received: by 2002:a50:8467:: with SMTP id 94mr55433110edp.249.1594048649872; Mon, 06 Jul 2020 08:17:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594048649; cv=none; d=google.com; s=arc-20160816; b=jj5ENxVn7oM3MnRnAqEEqRo94fwU/8FF+ea/T2vy5PcvAhQ0pzl7kW+7LqEm1h/cgt K174YZQ5UPzRcNMCu7axkOsTZReUYJ1hYEjyUYYnddlA0IHUrDzUXneeYztB6s6JHIr6 G76CGNjfX2PVTUqatr7rB1DB+c0ZENcCXh3ATgJ78SltuxSBX87CTUSlCI5nSqdkGfpt +VuMZPcSX9oS9xhzCj+XQzDto4fXXdCe0CZIdI06TVxa4c2yzXZHM4naAy7EErzWYBjw N9MGjoZjOTNXD/f9UHzf44j5FY8+W1Ph7r8hFEhvj4lJVgUAxVDl87Zzrd0zP5Lm99IZ lXMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=DsNO+/1JsvNJbroP7auXk8XsvL1r19S8fjPApteHYN8=; b=TG1B+t8gF9TH0UUR2IsL92FOGQ+ZV1FCBamWuklZH+vLokrIKiFsBCXPgDYvjHdWbz ssyGwF1cb2gNxT3IDfM9l/R5qGAeB/ww2mJfAmZF3h4o11bMnB4pEFO2lu3EGbOBOgz+ HolhzDaHMKbaUr1Ka26h3szdPojDJvGSJJqIy39nZMt7EY/aiPNL5h8VGQiDsK4ZygJs o9T/o/qdkZYaopVPZfJ8JqY/LwPZe1zYMQmslcO64mgkTwZq7RCLtyaTCWwUED18SIrR 8XDELwlpN5bsD5DVnjALf0KospM9tGbksA6vpfNCwuyhaCtYJoqnEK0sFyMTW7FaTwZY ElSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=EPvISo3L; dkim=neutral (no key) header.i=@vger.kernel.org; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y21si12746789edt.483.2020.07.06.08.17.06; Mon, 06 Jul 2020 08:17:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=EPvISo3L; dkim=neutral (no key) header.i=@vger.kernel.org; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729297AbgGFPPD (ORCPT + 99 others); Mon, 6 Jul 2020 11:15:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729197AbgGFPPC (ORCPT ); Mon, 6 Jul 2020 11:15:02 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCC34C061755 for ; Mon, 6 Jul 2020 08:15:02 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1594048501; 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: in-reply-to:in-reply-to:references:references; bh=DsNO+/1JsvNJbroP7auXk8XsvL1r19S8fjPApteHYN8=; b=EPvISo3L8lTW3nOG0l4QQjdLDPqehXQWSPg0uYBgQTwb/2KQxNxocE0nezNIW5Nq/KVq6B TXH102N4t2a5WS8VwMNASYBNsgk67x/zpJ7XEnRKaugcvYhV8meFiXbPG78mBYFwaeQAxv zg+zd4gXAqmNkBikmYsIrdMRJ2D3yFBElYFkh8HO5ujoWdFgoKJzSi53fj6vBd3nDbvLV4 rIENbVz7M85G4SO8HBc9GLb6Wr6KwfUOfzcPy+88EuRleXoCxdVmDqMoWg1KypPYvkXwUQ t9MTuN+PUKLCPXmh6cKnGhfsI8DSUQpcI/eOvlW7ExDWJCmqoHnXeKP/+wTAzA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1594048501; 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: in-reply-to:in-reply-to:references:references; bh=DsNO+/1JsvNJbroP7auXk8XsvL1r19S8fjPApteHYN8=; b=QJ0oiGCoBT5kpWsl8vz/8h8yGNN+XQ7VSxBpK8tMLdSxgUOfZB3+GWDcizxQgEQ4YgVBlH 9ZrSQdbAF/oaEwDw== To: Sean Christopherson , Mihai Carabas Cc: linux-kernel@vger.kernel.org, mingo@redhat.com, bp@alien8.de, x86@kernel.org, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com Subject: Re: [PATCH RFC 0/7] CPU feature evaluation after microcode late loading In-Reply-To: <20200702184216.GG3575@linux.intel.com> References: <1593703107-8852-1-git-send-email-mihai.carabas@oracle.com> <20200702184216.GG3575@linux.intel.com> Date: Mon, 06 Jul 2020 17:15:00 +0200 Message-ID: <87r1tor7yj.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sean Christopherson writes: > On Thu, Jul 02, 2020 at 06:18:20PM +0300, Mihai Carabas wrote: >> This RFC patch set aims to provide the ability to re-evaluate all CPU >> features and take proper bug mitigation in place after a microcode >> late loading. >> >> This was debated last year and this patch set implements a subset of >> point #2 from Thomas Gleixner's idea: >> https://lore.kernel.org/lkml/alpine.DEB.2.21.1909062237580.1902@nanos.tec.linutronix.de/ An incomplete and dangerous subset. > KVM aside, it wouldn't surprise in the least if there is other code in the > kernel that captures bug state locally. This series feels like it needs a > fair bit of infrastructure to either detect conflicting usage at build time > or actively prevent consuming stale state at runtime. > > There's also the problem of the flags being exposed to userspace via > /proc/cpuinfo, though I suppose that's userspace's problem to not shoot > itself in the foot. User space is the least of my worries. Inconsistent kernel state as I described in my mail referenced above is the far more dangerous issue. And just reevaluating some bits is not covering the whole problem. Microcode can bring substantial changes and as long as we don't have any clear advise and documentation from the vendors it's all wishful thinking. Thanks, tglx