Re: [PATCH v2 x86 1/2] fix page faults by nmiaction in nmi ifkmemcheck is enabled

From: Peter Zijlstra
Date: Mon Mar 05 2012 - 12:56:08 EST


On Mon, 2012-03-05 at 10:54 -0500, Don Zickus wrote:
> This is one way of doing this. I was trying to avoid this when I rewrote the
> nmi handlers, because everyone kept screwing up the structs. I thought it
> would be safer to have callers pass in data based on an api instead.

Apparently kmemcheck marks pages as non-present and does magic in the
fault handler. Having the action thing allocated meant kmemcheck also
marks that thing as non-present in the page-tables, the list iteration
from NMI context would then fault and things would go funny.

There's two ways out, help kmemcheck with a new annotation (which of
course starts with checking if there isn't already such a thing).

Or this one, avoid the action things from being allocated, this
side-steps kmemcheck and avoids the problem thusly.

Sadly this patch doesn't at all mention the first possibility and why
that isn't a feasible approach. A well...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/