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: <20110918093559.GB28953@liondog.tnic>
Date:	Sun, 18 Sep 2011 11:35:59 +0200
From:	Borislav Petkov <bp@...en8.de>
To:	Brian Gerst <brgerst@...il.com>
Cc:	Andreas Mohr <andi@...as.de>,
	Arkaprava Basu <arkaprava.basu@...il.com>,
	linux-kernel@...r.kernel.org
Subject: Re: TLB flush question (x86_64)

On Sat, Sep 17, 2011 at 07:37:59PM -0400, Brian Gerst wrote:
> On Sat, Sep 17, 2011 at 3:12 PM, Andreas Mohr <andi@...as.de> wrote:
> > Hi,
> >
> > decided to reply since there hasn't been any activity yet.
> >
> >> Is there any particular reason why
> >> the entire address space is flushed from the tlb while only a range of
> >> virtual address space was supposedly required to be flushed?
> >
> > While this particular function has actually changed in less medieval
> > kernel versions, it would be nice if someone knew an answer to that,
> > especially since TLB activity may have grave performance implications.
> >
> 
> x86 hardware can only flush single pages or the whole TLB.  It would
> be possible to loop over a small set of pages and invalidate each one,
> but the threshold for where that becomes more efficient than flushing
> everything is difficult to determine.

... also, TLBs in current CPUs are highly optimized beasts so that the
cost of a full rewalk is paid only very seldomly by caching even partial
translations in lower level TLBs (L2), etc.

And also, flush_tlb_mm ends up modifying CR3 which doesn't flush the
global mappings.

-- 
Regards/Gruss,
    Boris.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ