Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1664985

Re: [PATCH] x86/mm: Split read_cr3() into read_cr3_pa() and __read_cr3()

From Borislav Petkov <bp@alien8.de>
Newsgroups linux.kernel
Subject Re: [PATCH] x86/mm: Split read_cr3() into read_cr3_pa() and __read_cr3()
Date 2017-06-13 18:20 +0200
Message-ID <tRWHT-1JS-3@gated-at.bofh.it> (permalink)
References <tRBk7-52r-57@gated-at.bofh.it> <tRQj8-6bD-25@gated-at.bofh.it> <tRWye-1GR-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Jun 13, 2017 at 09:00:01AM -0700, Andy Lutomirski wrote:
> 1. Make sure that every read_cr3() instance got converted.  I didn't
> want a mid-air collision with someone else's patch in which it would
> appear to apply and compile but the result would randomly fail on PCID
> systems.

Right.

> 2. Make users realize that CR3 ain't what it used to be.  __read_cr3()
> means "return this complicated register value -- I know what I'm
> doing" and read_cr3_pa() means "give me the PA".

Agreed with the _pa thing.

> Maybe we could rename __read_cr3() to read_cr3_raw()?  If we really
> wanted lots of clarity, __read_cr4() could become read_cr4_noshadow(),
> I suppose.

Yeah, both make sense to me. I like the _raw thing and the _noshadow
too, as they actually say what the function *really* does.

In any case, the __ variant is less descriptive than having:

read_crX_pa
read_crX_raw
read_crX_noshadow

and so on which actually say what they each do and when you wonder which
to use, you know.

> What do you think?  My general preference is to clean this up after
> the rest of the big patchsets (SME and PCID) land.

Of course.

Thanks.

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] x86/mm: Split read_cr3() into read_cr3_pa() and __read_cr3() Andy Lutomirski <luto@kernel.org> - 2017-06-12 19:30 +0200
  Re: [PATCH] x86/mm: Split read_cr3() into read_cr3_pa() and  __read_cr3() Ingo Molnar <mingo@kernel.org> - 2017-06-13 08:50 +0200
  Re: [PATCH] x86/mm: Split read_cr3() into read_cr3_pa() and  __read_cr3() Borislav Petkov <bp@alien8.de> - 2017-06-13 11:30 +0200
    Re: [PATCH] x86/mm: Split read_cr3() into read_cr3_pa() and __read_cr3() Andy Lutomirski <luto@kernel.org> - 2017-06-13 18:10 +0200
      Re: [PATCH] x86/mm: Split read_cr3() into read_cr3_pa() and  __read_cr3() Borislav Petkov <bp@alien8.de> - 2017-06-13 18:20 +0200
  [tip:x86/mm] x86/mm: Split read_cr3() into read_cr3_pa() and  __read_cr3() tip-bot for Andy Lutomirski <tipbot@zytor.com> - 2017-06-13 12:20 +0200

csiph-web