lkml.org 
[lkml]   [2016]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] Linux VM workaround for Knights Landing A/D leak
    From
    Date
    On 06/14/2016 09:47 AM, Nadav Amit wrote:
    > Lukasz Anaczkowski <lukasz.anaczkowski@intel.com> wrote:
    >
    >> > From: Andi Kleen <ak@linux.intel.com>
    >> > +void fix_pte_leak(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
    >> > +{
    > Here there should be a call to smp_mb__after_atomic() to synchronize with
    > switch_mm. I submitted a similar patch, which is still pending (hint).
    >
    >> > + if (cpumask_any_but(mm_cpumask(mm), smp_processor_id()) < nr_cpu_ids) {
    >> > + trace_tlb_flush(TLB_LOCAL_SHOOTDOWN, TLB_FLUSH_ALL);
    >> > + flush_tlb_others(mm_cpumask(mm), mm, addr,
    >> > + addr + PAGE_SIZE);
    >> > + mb();
    >> > + set_pte(ptep, __pte(0));
    >> > + }
    >> > +}

    Shouldn't that barrier be incorporated in the TLB flush code itself and
    not every single caller (like this code is)?

    It is insane to require individual TLB flushers to be concerned with the
    barriers.

    \
     
     \ /
      Last update: 2016-06-14 19:41    [W:4.246 / U:0.096 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site