Received: by 10.213.65.68 with SMTP id h4csp1550216imn; Thu, 15 Mar 2018 02:59:49 -0700 (PDT) X-Google-Smtp-Source: AG47ELvOX8eqY7gaoVBKEbPr42WdGPmD5U13xWZy/oQS1UMhcP2EtPAkwR3Og7x/svUFPfiAV7HE X-Received: by 10.99.119.195 with SMTP id s186mr6387273pgc.453.1521107989384; Thu, 15 Mar 2018 02:59:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521107989; cv=none; d=google.com; s=arc-20160816; b=i/J1jm74PWPE1A8WvkxEIiVjTuxKRwBLxOAMq2b6JvgdtUt7TG6/nEAxwYVeFEUsDR Mv9PL5yF8HG8GAP58K78tUnV089ghGa8wQ43CnhS6qVdmonSDtFx0GF2sk4np/DBJkgD 6/nUqSf8v5UmqfZ9KypR2ewrrmudlrIME/uV89wmFk1QJkaEKFGAVLQWfM6wC3plINk+ fBssYNM6KUpUp67+X2njpQFeYRjyXRtdmXvLnvqiLulWhdLcJLwXnyHBajxkt4mS96ug 9WEFB9KL3VkyuNqWMBpEx56qFg1Klsa79wx/yb3gghw2cegyrKIPI128fqy77vsTyi4b SSGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=4KpTrJEdovCujo8UaMOgKRzZI7NwR9hcYybjiDtR3/A=; b=IXbuuhJYkSnH8H+9RP1LUkyxDSru0AcRROfZw0FX1FibKBVLMJu/TTh8SQVtQbyi2D pQtjk2VMmgL1FLinKDPcXc6G/oX+JUKn1KaeWTia7G+K9CEKnO2SBLxPOiKI+2ge6NNM 63w0JdbKMXvSAVVj7DXW8sx7zsZpjeos7r36sElGG02lFzJdMXVBeAqCqfCpK2TiTdsG fXLCmyH/00gbqJ1wagutdqiMrloNZH6bao6+/m4BkHqqWd2qK0G/BbSIOdy/Apu04XcZ tOuLKIlGgwcFnxaYAeAo7R6cIny+2ymf20Q0CS8xJqX+C96Bg8Zqx4AuHP703XUB6PT7 Xdog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m1si3316000pff.43.2018.03.15.02.59.34; Thu, 15 Mar 2018 02:59:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751829AbeCOJ6n (ORCPT + 99 others); Thu, 15 Mar 2018 05:58:43 -0400 Received: from mail.skyhub.de ([5.9.137.197]:59602 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751467AbeCOJ6m (ORCPT ); Thu, 15 Mar 2018 05:58:42 -0400 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de Received: from mail.skyhub.de ([127.0.0.1]) by localhost (blast.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id CXsLDYeFgrMO; Thu, 15 Mar 2018 10:58:25 +0100 (CET) Received: from pd.tnic (p200300EC2BC921000DB0D181F40EDD09.dip0.t-ipconnect.de [IPv6:2003:ec:2bc9:2100:db0:d181:f40e:dd09]) (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 2968F1EC05D3; Thu, 15 Mar 2018 10:58:25 +0100 (CET) Date: Thu, 15 Mar 2018 10:58:03 +0100 From: Borislav Petkov To: Henrique de Moraes Holschuh Cc: X86 ML , Emanuel Czirai , Ashok Raj , Tom Lendacky , LKML , Arjan Van De Ven Subject: Re: [PATCH 2/2] x86/microcode: Fix CPU synchronization routine Message-ID: <20180315095803.GB27816@pd.tnic> References: <20180314183615.17629-1-bp@alien8.de> <20180314183615.17629-2-bp@alien8.de> <20180315010014.xsedkarzrgqiunxf@khazad-dum.debian.net> <20180315010152.GE11061@pd.tnic> <20180315040132.m3i3ozykkbjrxa66@khazad-dum.debian.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180315040132.m3i3ozykkbjrxa66@khazad-dum.debian.net> User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org + Arjan. On Thu, Mar 15, 2018 at 01:01:32AM -0300, Henrique de Moraes Holschuh wrote: > A reasonably well-known paper on intel microcode updates[1] profiled > that very well, years ago (2013). The information about a linear > increase in update time versus update size comes from that paper (I did > not attempt to reproduce his findings, though). WTF? If I read this paper correctly: http://www.inertiawar.com/microcode/ it is injecting faults and attempting to manipulate some size field - I'm guessing the encrypted data size. And I'm also guessing that if you manipulate that size, it would simply take a lot longer to attempt to decrypt and verify that it is broken microcode and reject it. So it is not actually a real update - it is just taking a lot longer to reject it. Now, I'm talking about genuine microcode updates. And that paper also claims that they take thousands of cycles. Now let's look at your previous, hm, "statement": > Intel takes anything from twenty thousand cycles to several *million* > cycles per core, proportional to microcode update size. So you took a fault injection measurement out of context to claim that *regular* microcode updates take millions of cycles. So you had to say something - doesn't matter if it is apples and oranges - as long as it is dramatic. Fuck the truth. > When I measured my Xeon X5550 workstation doing an early update, the > Xeon took about 1M cycles for the BSP, and 800k cycles for the APs (see > below). > > To measure that, as far as I recall I just did a rdtsc right before the RDTSC gets executed speculatively, so you need barriers around it. I hope you added them. > wrmsr, and another right after, and stashed the result somewhere to be > able to print it out later in the BSP's case. I repeated the process > (by rebooting) a few times. There was a *lot* of variation, but not > enough to get it wrong by an order of magnitude. > > I am surprised that this would be news to you, though. It is not like I > have been quiet about how expensive these updates are on Intel over the > past years every time I sent you a patch related to this... Frankly, I don't take you seriously. Even less so after this. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.