Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp532170imm; Fri, 12 Oct 2018 02:23:59 -0700 (PDT) X-Google-Smtp-Source: ACcGV63cBIQwYHniqL4LeuMKuf0kH73QliiO6RJKRfc54YvJnEsJIJ5egRqFqLQSZD+nCQkhEkoM X-Received: by 2002:a63:1c1b:: with SMTP id c27-v6mr4782576pgc.351.1539336239811; Fri, 12 Oct 2018 02:23:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539336239; cv=none; d=google.com; s=arc-20160816; b=RlV+9er1hWfQQ5mjJ8FKH2FBlB0BGn7nnBOCdC/5Y52PAPGXgC5a8y3eyIINfg370m jw/EYxi4ivKdke0bOjk0J32McWvXnNbJ199S/16Q5PUW54uY3pyZQSwXglyySW5o3DMz LRAgFEqwtttJu/H8MjR+EgiTwzoJN8OxemM2BrsjjnojZMdGk8O+gXOqEisH1fj6zzWk 1yjQnc1gqsBSK2PEyyykSizZJCvDOgQDNtgG+45GZ4otCJYIlEPfE2OfjiKgKAPD30Oc zsmdXRCL3pZoek6GaP+rudQc2ikA6hXD78UW3ssUmFCOqrOJptcAiUtKetkNhOA/nWCQ G97g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-filter; bh=4br5cc1c4V+j8qJwAuLFhofv8IrlVaJ0uqbTFD7+NKM=; b=Ir5pmhxD75GJ4TKuEL8fewy3pKJJLPz++vgQTTcpyjTKpk9HaDCCktujd4GAqvPqTb QQJDNnJpEMhOuGGlAosVAxqPLyFt6JZxQOO4K7PsM3gbD6P6ts0Pzz0g25gYzWgT8q9L K0PY1+JPHwg9xN5cdhWtu72r6HNER1zfhDfK7HpwOgaJ0AmUyn+VKiDQMBso2+L4fRQ3 BmDwK1Ml/pFBcFDmd4cuCzYmPjWIJEMFUE7mMS78AfmRtAboVx405TDgU6AwW1e7hYG8 x/YcU6/dBPNy0+GPPEpo0sROZduAdgHWCufchZ8QuFp20ytZj9YqJNN4JyLeBfYz4lqM DhPg== 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 b34-v6si638894plc.428.2018.10.12.02.23.45; Fri, 12 Oct 2018 02:23:59 -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 S1728265AbeJLQxc (ORCPT + 99 others); Fri, 12 Oct 2018 12:53:32 -0400 Received: from smtp.dei.uc.pt ([193.137.203.253]:60426 "EHLO smtp.dei.uc.pt" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728021AbeJLQxc (ORCPT ); Fri, 12 Oct 2018 12:53:32 -0400 Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) (user=sneves mech=PLAIN bits=0) by smtp.dei.uc.pt (8.15.2/8.15.2) with ESMTPSA id w9C9L1Et023524 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 12 Oct 2018 10:21:07 +0100 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.dei.uc.pt w9C9L1Et023524 Received: by mail-ed1-f53.google.com with SMTP id x31-v6so10846958edd.8 for ; Fri, 12 Oct 2018 02:21:07 -0700 (PDT) X-Gm-Message-State: ABuFfoh49TJs6Rd56p++gnyZa2vatwaiuRqnO3/L/Sw1IqsfgeJCUwZO dCfzBQYu+SAuT58qQSuDBEiC/G3Fiwvwn+6+RpQ= X-Received: by 2002:a17:906:e1ce:: with SMTP id gp14-v6mr6335446ejb.221.1539336061564; Fri, 12 Oct 2018 02:21:01 -0700 (PDT) MIME-Version: 1.0 References: <20181011185458.10186-1-kristen@linux.intel.com> In-Reply-To: From: Samuel Neves Date: Fri, 12 Oct 2018 10:20:25 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] x86: entry: flush the cache if syscall error To: Andy Lutomirski Cc: kristen@linux.intel.com, Kernel Hardening , Thomas Gleixner , Ingo Molnar , bp@alien8.de, "H. Peter Anvin" , "the arch/x86 maintainers" , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-FCTUC-DEI-SIC-MailScanner-Information: Please contact helpdesk@dei.uc.pt for more information X-FCTUC-DEI-SIC-MailScanner-ID: w9C9L1Et023524 X-FCTUC-DEI-SIC-MailScanner: Found to be clean X-FCTUC-DEI-SIC-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-60.1, required 3.252, autolearn=not spam, ALL_TRUSTED -10.00, BAYES_00 -0.10, L_SMTP_AUTH -50.00) X-FCTUC-DEI-SIC-MailScanner-From: sneves@dei.uc.pt X-Spam-Status: No Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 11, 2018 at 8:25 PM Andy Lutomirski wrote: > What exactly is this trying to protect against? And how many cycles > should we expect L1D_FLUSH to take? As far as I could measure, I got 1660 cycles per wrmsr 0x10b, 0x1 on a Skylake chip, and 1220 cycles on a Skylake-SP.