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]
Date:   Sat, 07 Jul 2018 17:21:28 -0400
From:   Rik van Riel <riel@...riel.com>
To:     Mike Galbraith <efault@....de>, linux-kernel@...r.kernel.org
Cc:     x86@...nel.org, luto@...nel.org, dave.hansen@...ux.intel.com,
        mingo@...nel.org, kernel-team@...com, tglx@...utronix.de,
        songliubraving@...com, hpa@...or.com
Subject: Re: [PATCH 5/7] x86,tlb: only send page table free TLB flush to
 lazy TLB CPUs

On Sat, 2018-07-07 at 14:26 +0200, Mike Galbraith wrote:
> On Fri, 2018-06-29 at 10:29 -0400, Rik van Riel wrote:
> > diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
> > index e59214ec52b1..c4073367219d 100644
> > --- a/arch/x86/mm/tlb.c
> > +++ b/arch/x86/mm/tlb.c
> > @@ -718,14 +718,47 @@ void tlb_flush_remove_tables_local(void *arg)
> >  	}
> >  }
> >  
> > +static void mm_fill_lazy_tlb_cpu_mask(struct mm_struct *mm,
> > +				      struct cpumask* lazy_cpus)
> > +{
> > +	int cpu;
> > +
> > +	for_each_cpu(cpu, mm_cpumask(mm)) {
> > +		if (!per_cpu(cpu_tlbstate.is_lazy, cpu))
> > +			cpumask_set_cpu(cpu, lazy_cpus);
> > +	}
> > +}
> > +
> >  void tlb_flush_remove_tables(struct mm_struct *mm)
> >  {
> >  	int cpu = get_cpu();
> > +	cpumask_var_t lazy_cpus;
> > +
> > +	if (cpumask_any_but(mm_cpumask(mm), cpu) >= nr_cpu_ids)
> > +		return;
> 
> A put_cpu() went missing.

Doh!

Thank you for spotting that, I will fix
that in the next version!

-- 
All Rights Reversed.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ