Re: "BUG: using smp_processor_id() in preemptible" with KPTI on 4.14.11

From: Thomas Zeitlhofer
Date: Sun Jan 07 2018 - 19:50:15 EST


On Sun, Jan 07, 2018 at 09:53:19AM +0100, Thomas Zeitlhofer wrote:
> On Sun, Jan 07, 2018 at 09:17:18AM +0100, Greg Kroah-Hartman wrote:
> > On Sat, Jan 06, 2018 at 10:38:38PM +0100, Thomas Zeitlhofer wrote:
[...]
> > > While solving the previous problem, this patch also introduces new
> > > "fun and games"...
> > >
> > > Now, terminating a systemd-nspawn container, reliably crashes the
> > > host (so far tested only on Haswell, if that matters). Once, I was
> > > able to capture the following trace:
> >
> > Is this also reproducable on Linus's tree right now?
>
> It is reproducible with this patch on top of 4.15-rc6 (might be able
> to test Linus's current tree later that day).

Some more testing showed that this is not caused by the patch after all,
sorry for the noise.

The crash happens quite reliably, but with a rather low probability it
does not occur. When I have tested 4.14.11 without the patch it was
obviously such a low probability event - in the meantime 4.14.11 without
the patch also crashed. The situation is also unchanged with 4.15-rc7.

Interestingly, it happens only when using the boot switch "-b", i.e.:

systemd-nspawn -b -D <path to rootfs>

_and_ terminating the container by pressing ^] three times. Other
combinations (e.g., no "-b" and terminating with ^]^]^], "-b" and
terminating by running shutdown inside the container) work just fine.
Anyway, this is already off-topic and might be subject to a different
thread...

Thanks,

Thomas