All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Kosina <jikos@kernel.org>
To: Dave Hansen <dave.hansen@linux.intel.com>,
	Andy Lutomirski <luto@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>
Cc: Joerg Roedel <jroedel@suse.de>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Nicolai Stange <nstange@suse.de>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] x86/mm: Remove in_nmi() warning from 64bit implementation of vmalloc_fault()
Date: Wed, 24 Apr 2019 09:04:57 +0200 (CEST)	[thread overview]
Message-ID: <nycvar.YFH.7.76.1904240902280.9803@cbobk.fhfr.pm> (raw)

From: Jiri Kosina <jkosina@suse.cz>

In-NMI warnings have been added to vmalloc_fault() via ebc8827f75 ("x86: 
Barf when vmalloc and kmemcheck faults happen in NMI") back in the time 
when our NMI entry code could not cope with nested NMIs.

These days, it's perfectly fine to take a fault in NMI context and we 
don't have to care about the fact that IRET from the fault handler might 
cause NMI nesting.

This warning has already been removed from 32bit implementation of 
vmalloc_fault() in 6863ea0cda8 ("x86/mm: Remove in_nmi() warning from 
vmalloc_fault()"), but 64bit version was omitted.

Remove the bogus warning also from 64bit implementation of vmalloc_fault().

Fixes: 6863ea0cda8 ("x86/mm: Remove in_nmi() warning from vmalloc_fault()")
Reported-by: Nicolai Stange <nstange@suse.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
---
 arch/x86/mm/fault.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 667f1da36208..5eaf67e8314f 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -359,8 +359,6 @@ static noinline int vmalloc_fault(unsigned long address)
 	if (!(address >= VMALLOC_START && address < VMALLOC_END))
 		return -1;
 
-	WARN_ON_ONCE(in_nmi());
-
 	/*
 	 * Copy kernel mappings over when needed. This can also
 	 * happen within a race in page table update. In the later

-- 
Jiri Kosina
SUSE Labs


             reply	other threads:[~2019-04-24  7:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-24  7:04 Jiri Kosina [this message]
2019-04-24  7:26 ` [PATCH] x86/mm: Remove in_nmi() warning from 64bit implementation of vmalloc_fault() Peter Zijlstra
2019-04-24  7:31   ` Jiri Kosina
2019-04-24 11:11 ` [tip:x86/mm] x86/mm: Remove in_nmi() warning from 64-bit " tip-bot for Jiri Kosina

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=nycvar.YFH.7.76.1904240902280.9803@cbobk.fhfr.pm \
    --to=jikos@kernel.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jroedel@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=nstange@suse.de \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.