Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp767121imm; Fri, 12 Oct 2018 06:26:53 -0700 (PDT) X-Google-Smtp-Source: ACcGV62ByEo1maEUrQTAe9+XrU8lUm+T0+/Evhp1u/BWQF6Lt4ne5srlkHSHmQA4he72Rs4oFI/l X-Received: by 2002:a17:902:b182:: with SMTP id s2-v6mr5949160plr.84.1539350813332; Fri, 12 Oct 2018 06:26:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539350813; cv=none; d=google.com; s=arc-20160816; b=fpAVYAtfxB7htF6/F4rPPy95PKOgypYyFXJ6YVHAmlDCulrNjdlYSRw16AsVYxdkqR Le8esBBdlexayny6/b4576/bymS9B4LgmzlBDzLC+oSicFZZGA4vlXchhwn23djB9wfe +edpgnM/f5qd3W156+JqibPTyEeSACJ1CGYBfugmF3HbPFd4WAxk4rt6faPJqMknI6Pc uULRItUZOXkiI2Q4jrZCVnjEYYBIQNGV1BnQm8UKp9I13IC9AO9YGirqf/0cViHRcnUm k39Hw6k/HFPqpCtME6Xc2fFtCj8AGl8FZUsJvMAqft/Wco55dx0u/9sm183OK3K+JjPz dGjQ== 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-signature; bh=F1bN5G+XKGxUs+23Ib3MwF0bz1K1t5vyGLPbrQpB528=; b=zt2sCbZ1mza/QIqS0EoaA8x+vfbo0dJagyDjg9aGRIEGNlN0ZYmvshddZ2tXD624Jf ELnCEy66FEMMtqAoB+bIo4Bz/Ioib1EaxfLwZO/CLO6oHm7BGXmuUtmKkZUA1DeMZxKA E6iYrHI9dhazcp16vu6TuYfIxXc4u8Tc07h3qhs1beFTkSBXsRagVY8NsTUhxcl5o+Mr 2AEtgU/l00Kto585r6cwAiF1kjvapti+zpdpLT2WVcHam3BbfmUf7VGsnbKIsF9snsUZ EaqeXT4Q9dnyChf4INOxx/bANSn2GlQ/Vhb5sNvkZ2wzRJNhUZGyY9KJU1YkC1Kd1Y9Z puxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Z1WKYKsy; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k65-v6si1275417pfj.115.2018.10.12.06.26.37; Fri, 12 Oct 2018 06:26:53 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=Z1WKYKsy; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728697AbeJLU6l (ORCPT + 99 others); Fri, 12 Oct 2018 16:58:41 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:32919 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728484AbeJLU6k (ORCPT ); Fri, 12 Oct 2018 16:58:40 -0400 Received: by mail-ot1-f67.google.com with SMTP id q50so12379290otd.0 for ; Fri, 12 Oct 2018 06:26:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=F1bN5G+XKGxUs+23Ib3MwF0bz1K1t5vyGLPbrQpB528=; b=Z1WKYKsyAfvPowq5lkcn19UyCPjtwVJhEvh/9ETxSW+/QC1Rw5jA88iECYizFcPLdn a40LbctNnqCauDRgQhg2m939bElCpm6dp/B4gGfm5TmxI+N8VvcK1wmcItz+qNX6nbH7 OEeQXfIna68Isa5eFRxQsDPBKyJBjEkiA0F9553VOnKp/s8oKq1mr8GCERmKVJIyDAeA paa6J95PN+mkGZeqP6Ik2OHD6ppKacANMTZALCWnB3uyIeOL/UkB7WyPXxqJNqx0/UmD YoCBuef/SQ0WvkWzM2gRnUEDtzEf8ctb81QhRcP5C/KUEU7BjswZLIvSK/jsDlQDY5GC Ck6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=F1bN5G+XKGxUs+23Ib3MwF0bz1K1t5vyGLPbrQpB528=; b=iuLPR9E7oKlcbkPgh2ln84WPJ5KxYF4S4RHv6MLelFFU/vA01qkjyuqXr1Fnl7W9qn ENLPjkCtURaUt1fKhfvxUR74Q3viTYDoU256JBOPXhBHtzFzOnvdNZh5WXEf8pF5eqn7 pH68FtdKoQQehZRYfknF4B0OHUOc5Zsh2yC0Z0BUDTsquukFTfJ+Plbke9gsOTEc2Kiw 3H4FcqLNhN2c6LBH2CQkz3ysPmOvo+4LzVYb8o+oewbqRrjUoflozUVy7W3eRyLHAkiR 33Jg7dbp1VeQ88sRsyy93gP+unWTbm3E9QNAbzF13PdFVE4Sa6neBYStIl4a6FV7YXK2 OBwQ== X-Gm-Message-State: ABuFfogEmJSB8F8WbyPryLk6jzwT0jOXiQQXI2ZOmCkR1jP+bryJ6tJQ vU/AqdFN+CluaxAhzekYCnXMAU8Bgu+Y2oSlE85YhQ== X-Received: by 2002:a9d:49ac:: with SMTP id g44mr4078970otf.198.1539350773154; Fri, 12 Oct 2018 06:26:13 -0700 (PDT) MIME-Version: 1.0 References: <20181011185458.10186-1-kristen@linux.intel.com> In-Reply-To: From: Jann Horn Date: Fri, 12 Oct 2018 15:25:46 +0200 Message-ID: Subject: Re: [PATCH] x86: entry: flush the cache if syscall error To: sneves@dei.uc.pt Cc: Andy Lutomirski , kristen@linux.intel.com, Kernel Hardening , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , "the arch/x86 maintainers" , kernel list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 12, 2018 at 11:41 AM Samuel Neves wrote: > > 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. Is that with L1D mostly empty, with L1D mostly full with clean lines, or with L1D full of dirty lines that need to be written back?