lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <66defe09-51f1-3def-6e5a-7a9c07430f65@oracle.com>
Date:   Fri, 31 May 2019 10:51:17 +0800
From:   Zhenzhong Duan <zhenzhong.duan@...cle.com>
To:     Andy Lutomirski <luto@...nel.org>
Cc:     LKML <linux-kernel@...r.kernel.org>, srinivas.eeda@...cle.com,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        X86 ML <x86@...nel.org>
Subject: Re: [PATCH] x86/mm/tlb: Do partial TLB flush when possible


On 2019/5/30 22:15, Andy Lutomirski wrote:
> On Thu, May 30, 2019 at 12:56 AM Zhenzhong Duan
> <zhenzhong.duan@...cle.com> wrote:
>> This is a small optimization to stale TLB flush, if there is one new TLB
>> flush, let it choose to do partial or full flush. or else, the stale
>> flush take over and do full flush.
> I think this is invalid because:
>
>> +       if (unlikely(f->new_tlb_gen <= local_tlb_gen &&
>> +           local_tlb_gen + 1 == mm_tlb_gen)) {
>> +               /*
>> +                * For stale TLB flush request, if there will be one new TLB
>> +                * flush coming, we leave the work to the new IPI as it knows
>> +                * partial or full TLB flush to take, or else we do the full
>> +                * flush.
>> +                */
>> +               trace_tlb_flush(reason, 0);
>> +               return;
> We do indeed know that the TLB will get flushed eventually, but we're
> actually providing a stronger guarantee that the TLB will be
> adequately flushed by the time we return.  Otherwise, after
> flush_tlb_mm_range(), there will be a window in which the TLB isn't
> flushed yet.

You are right. I didn't notice this point, sorry for the noise.

Zhenzhong

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ