2017-12-01 14:04:13

by Mark Rutland

[permalink] [raw]
Subject: Re: [PATCH v2 00/18] arm64: Unmap the kernel whilst running in userspace (KAISER)

Hi Will,

On Thu, Nov 30, 2017 at 04:39:28PM +0000, Will Deacon wrote:
> Hi again,
>
> This is version two of the patches previously posted here:
>
> http://lists.infradead.org/pipermail/linux-arm-kernel/2017-November/542751.html
>
> Changes since v1 include:
>
> * Based on v4.15-rc1
> * Trampoline moved into FIXMAP area
> * Explicit static key replaced by cpu cap
> * Disable SPE for userspace profiling if kernel unmapped at EL0
> * Changed polarity of cpu feature to match config option
> * Changed command-line option so we can force on in future if necessary
> * Changed Falkor workaround to invalidate different page within 2MB region
> * Reworked alternative sequences in entry.S, since the NOP slides with
> kaiser=off were measurable

This generally looks good to me.

For patches patches 1-10, 13-15, and 17, feel free to add:

Reviewed-by: Mark Rutland <[email protected]>

(assuming you fix up the issue Robin spotted on patch 14).

Thanks,
Mark.


2017-12-01 17:50:24

by Will Deacon

[permalink] [raw]
Subject: Re: [PATCH v2 00/18] arm64: Unmap the kernel whilst running in userspace (KAISER)

Hi Mark,

On Fri, Dec 01, 2017 at 02:04:06PM +0000, Mark Rutland wrote:
> On Thu, Nov 30, 2017 at 04:39:28PM +0000, Will Deacon wrote:
> > Hi again,
> >
> > This is version two of the patches previously posted here:
> >
> > http://lists.infradead.org/pipermail/linux-arm-kernel/2017-November/542751.html
> >
> > Changes since v1 include:
> >
> > * Based on v4.15-rc1
> > * Trampoline moved into FIXMAP area
> > * Explicit static key replaced by cpu cap
> > * Disable SPE for userspace profiling if kernel unmapped at EL0
> > * Changed polarity of cpu feature to match config option
> > * Changed command-line option so we can force on in future if necessary
> > * Changed Falkor workaround to invalidate different page within 2MB region
> > * Reworked alternative sequences in entry.S, since the NOP slides with
> > kaiser=off were measurable
>
> This generally looks good to me.
>
> For patches patches 1-10, 13-15, and 17, feel free to add:
>
> Reviewed-by: Mark Rutland <[email protected]>

Thanks for going through this. Do you have any ideas about what we could
rename the command-line option to? I'll get us started:

- kaiser=
- hidekernel=
- unmapkernel=
- hardenkaslr=
- swuan=

...

Will

2017-12-01 17:58:21

by Mark Rutland

[permalink] [raw]
Subject: Re: [PATCH v2 00/18] arm64: Unmap the kernel whilst running in userspace (KAISER)

On Fri, Dec 01, 2017 at 05:50:26PM +0000, Will Deacon wrote:
> On Fri, Dec 01, 2017 at 02:04:06PM +0000, Mark Rutland wrote:
> > On Thu, Nov 30, 2017 at 04:39:28PM +0000, Will Deacon wrote:
> Thanks for going through this. Do you have any ideas about what we could
> rename the command-line option to? I'll get us started:
>
> - kaiser=
> - hidekernel=
> - unmapkernel=
> - hardenkaslr=
> - swuan=

Off all of these, I think "unmapkernel" is the clear winner, since it
says what it does in the tin (even if it misses the when).

I'll have a think over the weekend.

Thanks,
Mark.

2017-12-01 18:02:47

by Dave Hansen

[permalink] [raw]
Subject: Re: [PATCH v2 00/18] arm64: Unmap the kernel whilst running in userspace (KAISER)

On 12/01/2017 09:58 AM, Mark Rutland wrote:
> On Fri, Dec 01, 2017 at 05:50:26PM +0000, Will Deacon wrote:
>> On Fri, Dec 01, 2017 at 02:04:06PM +0000, Mark Rutland wrote:
>>> On Thu, Nov 30, 2017 at 04:39:28PM +0000, Will Deacon wrote:
>> Thanks for going through this. Do you have any ideas about what we could
>> rename the command-line option to? I'll get us started:
>>
>> - kaiser=
>> - hidekernel=
>> - unmapkernel=
>> - hardenkaslr=
>> - swuan=
> Off all of these, I think "unmapkernel" is the clear winner, since it
> says what it does in the tin (even if it misses the when).
>
> I'll have a think over the weekend.

On the x86 side we've been leaning toward renaming kaiser to something
like "user pagetable isolation", so the boot parameter is something like
"noupti".

But I think the consensus is definitely to get rid of "kaiser".

2017-12-01 18:14:54

by Will Deacon

[permalink] [raw]
Subject: Re: [PATCH v2 00/18] arm64: Unmap the kernel whilst running in userspace (KAISER)

On Fri, Dec 01, 2017 at 10:02:43AM -0800, Dave Hansen wrote:
> On 12/01/2017 09:58 AM, Mark Rutland wrote:
> > On Fri, Dec 01, 2017 at 05:50:26PM +0000, Will Deacon wrote:
> >> On Fri, Dec 01, 2017 at 02:04:06PM +0000, Mark Rutland wrote:
> >>> On Thu, Nov 30, 2017 at 04:39:28PM +0000, Will Deacon wrote:
> >> Thanks for going through this. Do you have any ideas about what we could
> >> rename the command-line option to? I'll get us started:
> >>
> >> - kaiser=
> >> - hidekernel=
> >> - unmapkernel=
> >> - hardenkaslr=
> >> - swuan=
> > Off all of these, I think "unmapkernel" is the clear winner, since it
> > says what it does in the tin (even if it misses the when).
> >
> > I'll have a think over the weekend.
>
> On the x86 side we've been leaning toward renaming kaiser to something
> like "user pagetable isolation", so the boot parameter is something like
> "noupti".
>
> But I think the consensus is definitely to get rid of "kaiser".

Ok, good. I'm happy to follow your lead on the name if it's likely to be
resolved in the next week or so.

Will

2017-12-11 02:24:11

by Shanker Donthineni

[permalink] [raw]
Subject: Re: [PATCH v2 00/18] arm64: Unmap the kernel whilst running in userspace (KAISER)


Hi Will,

I tested v2 patch series on Centriq2400 server platform successfully, no regression so far. And also
we applied internal patches on top of the branch "kpti" and verified kaiser feature.

Tested-by: Shanker Donthineni <[email protected]>


--
Shanker Donthineni
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.