Re: [GIT PULL] x86/mm changes for v4.21

2019-02-07 Thread Andy Lutomirski
> On Feb 7, 2019, at 2:53 PM, Linus Torvalds > wrote: > >> On Thu, Feb 7, 2019 at 1:24 PM Andy Lutomirski wrote: >> >> How bad would it be to set CR0.CD while fiddling with the page tables rather >> than masking the address? > > I would suggest against it. When you disable caching,

Re: [GIT PULL] x86/mm changes for v4.21

2019-02-07 Thread Linus Torvalds
On Thu, Feb 7, 2019 at 1:24 PM Andy Lutomirski wrote: > > How bad would it be to set CR0.CD while fiddling with the page tables rather > than masking the address? I would suggest against it. When you disable caching, things don't just go "slightly slower". Everything comes to a screeching halt,

Re: [GIT PULL] x86/mm changes for v4.21

2019-02-07 Thread Andy Lutomirski
> On Feb 7, 2019, at 10:46 AM, Luck, Tony wrote: > >> On Thu, Feb 07, 2019 at 10:07:28AM -0800, Andy Lutomirski wrote: >> Joining this thread late... >> >> This is all IMO rather crazy. How about we fiddle with CR0 to turn off >> the cache, then fiddle with page tables, then turn caching

Re: [GIT PULL] x86/mm changes for v4.21

2019-02-07 Thread Luck, Tony
On Thu, Feb 07, 2019 at 10:07:28AM -0800, Andy Lutomirski wrote: > Joining this thread late... > > This is all IMO rather crazy. How about we fiddle with CR0 to turn off > the cache, then fiddle with page tables, then turn caching on? Or, heck, > see if there’s some chicken bit we can set to

Re: [GIT PULL] x86/mm changes for v4.21

2019-02-07 Thread Luck, Tony
On Thu, Feb 07, 2019 at 06:57:20PM +0100, Peter Zijlstra wrote: > Something like so then? AFAICT CLFLUSH will also #GP if feed it crap. Correct. CFLUSH will also #GP on a non-canonical address. > - __flush_tlb_one_kernel(__cpa_addr(cpa, i)); > +

Re: [GIT PULL] x86/mm changes for v4.21

2019-02-07 Thread Andy Lutomirski
> On Feb 7, 2019, at 9:57 AM, Peter Zijlstra wrote: > >> On Thu, Feb 07, 2019 at 09:36:00AM -0800, Luck, Tony wrote: >>> On Thu, Feb 07, 2019 at 03:01:31PM +0100, Peter Zijlstra wrote: On Thu, Feb 07, 2019 at 11:50:52AM +, Linus Torvalds wrote: If you re-generate the canonical

Re: [GIT PULL] x86/mm changes for v4.21

2019-02-07 Thread Peter Zijlstra
On Thu, Feb 07, 2019 at 09:36:00AM -0800, Luck, Tony wrote: > On Thu, Feb 07, 2019 at 03:01:31PM +0100, Peter Zijlstra wrote: > > On Thu, Feb 07, 2019 at 11:50:52AM +, Linus Torvalds wrote: > > > If you re-generate the canonical address in __cpa_addr(), now we'll > > > actually have the real

Re: [GIT PULL] x86/mm changes for v4.21

2019-02-07 Thread Luck, Tony
On Thu, Feb 07, 2019 at 03:01:31PM +0100, Peter Zijlstra wrote: > On Thu, Feb 07, 2019 at 11:50:52AM +, Linus Torvalds wrote: > > If you re-generate the canonical address in __cpa_addr(), now we'll > > actually have the real virtual address around for a lot of code-paths > > (pte lookup etc),

Re: [GIT PULL] x86/mm changes for v4.21

2019-02-07 Thread Peter Zijlstra
On Thu, Feb 07, 2019 at 11:50:52AM +, Linus Torvalds wrote: > If you re-generate the canonical address in __cpa_addr(), now we'll > actually have the real virtual address around for a lot of code-paths > (pte lookup etc), which was what people wanted to avoid in the first > place. Note that

Re: [GIT PULL] x86/mm changes for v4.21

2019-02-07 Thread Linus Torvalds
On Thu, Feb 7, 2019 at 10:18 AM Peter Zijlstra wrote: > > So now the question is where to put it back in, I'm thinking this might > want to be in __cpa_addr(). Wasn't one of the goals to *not* keep the real virtual address around to avoid speculation, since we don't want some random speculation

Re: [GIT PULL] x86/mm changes for v4.21

2019-02-07 Thread Peter Zijlstra
On Wed, Feb 06, 2019 at 04:17:42PM -0800, Luck, Tony wrote: > fe0937b24ff5 ("x86/mm/cpa: Fold cpa_flush_range() and cpa_flush_array() into > a single cpa_flush() function") Boris pointed me at this gem: c7486104a5ce ("x86/mce: Fix set_mce_nospec() to avoid #GP fault") (can I just revel at

Re: [GIT PULL] x86/mm changes for v4.21

2019-02-07 Thread Peter Zijlstra
On Wed, Feb 06, 2019 at 04:33:54PM -0800, Dave Hansen wrote: > I wonder if the patches that you bisected to just changed the flushing > from being CR3-based (and not taking an address) to being INVPCID-based, > and taking an address that is sensitive to canonicality. That is indeed one of the

Re: [GIT PULL] x86/mm changes for v4.21

2019-02-06 Thread Dave Hansen
On 2/6/19 4:17 PM, Luck, Tony wrote: > [ 93.491692] RAX: RBX: RCX: > 99623f2c3f70 > [ 93.499658] RDX: 2e6b58da0121 RSI: RDI: > 7fff9981feeab000 ... > Potentially the problem might be a non-canonical address passed down > by the

Re: [GIT PULL] x86/mm changes for v4.21

2019-02-06 Thread Luck, Tony
On Tue, Dec 25, 2018 at 12:11:06AM +0100, Ingo Molnar wrote: > Peter Zijlstra (9): > x86/mm/cpa: Add ARRAY and PAGES_ARRAY selftests > x86/mm/cpa: Add __cpa_addr() helper > x86/mm/cpa: Make cpa_data::vaddr invariant > x86/mm/cpa: Simplify the code after making cpa->vaddr

Re: [GIT PULL] x86/mm changes for v4.21

2018-12-26 Thread pr-tracker-bot
The pull request you sent on Tue, 25 Dec 2018 00:11:06 +0100: > git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-mm-for-linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/e57d9f638af9673f38d9f09de66fa0a28303127d Thank you! -- Deet-doot-dot, I am a