Messages in this thread | | | Date | Thu, 20 Nov 2014 00:13:21 +0100 | From | Frederic Weisbecker <> | Subject | Re: frequent lockups in 3.18rc4 |
| |
On Wed, Nov 19, 2014 at 03:07:17PM -0800, Andy Lutomirski wrote: > On Wed, Nov 19, 2014 at 3:00 PM, Frederic Weisbecker <fweisbec@gmail.com> wrote: > > Note that's non-sleeping faults. So probably most places are fine except > > a few of them that really don't want exception to mess up some state. I > > can imagine some entry code that really don't want that. > > Any non-IST fault at all on the kernel_stack reference in system_call > is instant root on non-SMAP systems and instant double-fault or more > challenging root on SMAP systems. The issue is that rsp is > user-controlled, so the CPU cannot deliver a non-IST fault safely.
Heh.
> > > > Is kernel stack allocated by vmalloc or alloc_percpu()? > > DEFINE_PER_CPU(unsigned long, kernel_stack) > > Note that I'm talking about kernel_stack, not the kernel stack itself.
Ah. Note, static allocation like DEFINE_PER_CPU() is probably fine. The issue is on dynamic allocations: alloc_percpu().
> The actual stack is regular linearly-mapped memory, although I plan on > trying to change that, complete with all kinds of care to avoid double > faults.
If you do so, you must really ensure that the resulting memory will never fault.
| |