From: Peter Zijlstra <peterz@infradead.org>
To: Don Zickus <dzickus@redhat.com>
Cc: x86@kernel.org, LKML <linux-kernel@vger.kernel.org>,
Li Zhong <zhong@linux.vnet.ibm.com>
Subject: Re: [PATCH v2] x86,nmi: Fix page faults by nmiaction if kmemcheck is enabled
Date: Thu, 08 Mar 2012 22:04:34 +0100 [thread overview]
Message-ID: <1331240674.11248.427.camel@twins> (raw)
In-Reply-To: <1331240549-13120-1-git-send-email-dzickus@redhat.com>
On Thu, 2012-03-08 at 16:02 -0500, Don Zickus wrote:
> From: Li Zhong <zhong@linux.vnet.ibm.com>
>
> This patch tries to fix the problem of page fault exception caused by
> accessing nmiaction structure in nmi if kmemcheck is enabled.
>
> If kmemcheck is enabled, the memory allocated through slab are in pages
> that are marked non-present, so that some checks could be done in the
> page fault handling code ( e.g. whether the memory is read before
> written to ).
> As nmiaction is allocated in this way, so it resides in a non-present
> page. Then there is a page fault while the nmi code accessing the
> nmiaction structure, which would then cause a warning by
> WARN_ON_ONCE(in_nmi()) in kmemcheck_fault(), called by do_page_fault().
>
> v2: as Peter suggested, changed the nmiaction to use static storage.
>
> v3: as Peter suggested, use macro to shorten the codes. Also keep the
> original usage of register_nmi_handler, so users of this call doesn't
> need change.
>
> [simplified wrappers -dcz]
>
> Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
> Signed-off-by: Don Zickus <dzickus@redhat.com>
Thanks!
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
next prev parent reply other threads:[~2012-03-08 21:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-08 21:02 [PATCH v2] x86,nmi: Fix page faults by nmiaction if kmemcheck is enabled Don Zickus
2012-03-08 21:04 ` Peter Zijlstra [this message]
2012-03-09 10:12 ` Li Zhong
2012-03-09 14:24 ` Don Zickus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1331240674.11248.427.camel@twins \
--to=peterz@infradead.org \
--cc=dzickus@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=x86@kernel.org \
--cc=zhong@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).