Re: [PATCH 05/23] x86, kaiser: unmap kernel from userspace page tables (core patch)

From: Andrea Arcangeli
Date: Fri Jan 05 2018 - 06:50:22 EST


Hi Yisheng and Dave,

On Thu, Jan 04, 2018 at 10:29:53PM -0800, Dave Hansen wrote:
> On 01/04/2018 10:16 PM, Yisheng Xie wrote:
> > BTW, we have just reported a bug caused by kaiser[1], which looks like
> > caused by SMEP. Could you please help to have a look?
> >
> > [1] https://lkml.org/lkml/2018/1/5/3
>
> Please report that to your kernel vendor. Your EFI page tables have the
> NX bit set on the low addresses. There have been a bunch of iterations
> of this, but you need to make sure that the EFI kernel mappings don't
> get _PAGE_NX set on them. Look at what __pti_set_user_pgd() does in
> mainline.

Yisheng could you file a report on the vendor bz?

>From my part of course I'm fine to discuss it here, but it's not fair
to use lkml bandwidth for this, sorry for the noise.

The vast majority of the hardware boots fine and isn't running into
this. This is the first time I hear about this, sorry about that.

I fixed it with the upstream solution, greatly appreciated the pointer
Dave. I don't have hardware to verify it though so we've to follow up
on bz.

Thanks,
Andrea