linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Naresh Kamboju <naresh.kamboju@linaro.org>
Cc: open list <linux-kernel@vger.kernel.org>,
	"open list:KERNEL SELFTEST FRAMEWORK" 
	<linux-kselftest@vger.kernel.org>, linux-mm <linux-mm@kvack.org>,
	lkft-triage@lists.linaro.org, Shuah Khan <shuah@kernel.org>,
	Anders Roxell <anders.roxell@linaro.org>,
	Christophe Leroy <christophe.leroy@c-s.fr>,
	Andrew Morton <akpm@linux-foundation.org>,
	Leonardo Bras <leonardo@linux.ibm.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Mike Rapoport <rppt@linux.vnet.ibm.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Jules Irenge <jbi.octave@gmail.com>,
	"Huang, Ying" <ying.huang@intel.com>,
	Pankaj Gupta <pankaj.gupta.linux@gmail.com>,
	Rik van Riel <riel@surriel.com>, Hugh Dickins <hughd@google.com>,
	Minchan Kim <minchan@kernel.org>, Mel Gorman <mgorman@suse.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Mateusz Nosek <mateusznosek0@gmail.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Kees Cook <keescook@chromium.org>,
	Vlastimil Babka <vbabka@suse.cz>, Hillf Danton <hdanton@sina.com>
Subject: Re: i386: selftests: vm: compaction_test: BUG: kernel NULL pointer dereference, address: 00000000
Date: Mon, 13 Apr 2020 10:14:29 -0400	[thread overview]
Message-ID: <20200413141429.GE38470@xz-x1> (raw)
In-Reply-To: <CA+G9fYvARTCKjbfHYEbfOjtn_s7desuAToOF4g+Z_fztzZ-myw@mail.gmail.com>

On Mon, Apr 13, 2020 at 04:51:25PM +0530, Naresh Kamboju wrote:
> On Mon, 13 Apr 2020 at 03:12, Peter Xu <peterx@redhat.com> wrote:
> > And since this one is very easy to reproduce, I finally noticed that
> > we have wrongly enabled uffd-wp on x86_32, which is definely not going
> > to work... Because we'll use bit 2 of swap entry assuming that's the
> > uffd-wp bit, while that's part of swp offset on 32bit systems.
> >
> > Naresh, could you try whether below change fixes the issue for you?
> >
> > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> > index 8d078642b4be..7ac524d1316e 100644
> > --- a/arch/x86/Kconfig
> > +++ b/arch/x86/Kconfig
> > @@ -149,7 +149,7 @@ config X86
> >         select HAVE_ARCH_TRACEHOOK
> >         select HAVE_ARCH_TRANSPARENT_HUGEPAGE
> >         select HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD if X86_64
> > -       select HAVE_ARCH_USERFAULTFD_WP         if USERFAULTFD
> > +       select HAVE_ARCH_USERFAULTFD_WP         if X86_64 && USERFAULTFD
> >         select HAVE_ARCH_VMAP_STACK             if X86_64
> >         select HAVE_ARCH_WITHIN_STACK_FRAMES
> >         select HAVE_ASM_MODVERSIONS
> >
> 
> Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
> 
> The above patch tested and did not notice the crash.
> + cd /opt/kselftests/default-in-kernel/vm/
> + ./compaction_test
> No of huge pages allocated = 297
> + ./compaction_test
> [   46.059785] kauditd_printk_skb: 15 callbacks suppressed
> [   46.059786] audit: type=1334 audit(1586776582.927:25): prog-id=17 op=UNLOAD
> [   46.071997] audit: type=1334 audit(1586776582.927:26): prog-id=16 op=UNLOAD
> No of huge pages allocated = 160
> 
> Full test log,
> https://lkft.validation.linaro.org/scheduler/job/1362495#L1308
> 
> Build artifacts.
> https://builds.tuxbuild.com/w0ol7cCsGan0wzPp7bNqkg/

Thanks!  I'll post a formal patch soon.

-- 
Peter Xu


  reply	other threads:[~2020-04-13 14:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-12  6:54 i386: selftests: vm: compaction_test: BUG: kernel NULL pointer dereference, address: 00000000 Naresh Kamboju
2020-04-12 21:41 ` Peter Xu
2020-04-13 11:21   ` Naresh Kamboju
2020-04-13 14:14     ` Peter Xu [this message]
2020-04-13 17:53 ` Dave Hansen

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=20200413141429.GE38470@xz-x1 \
    --to=peterx@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=anders.roxell@linaro.org \
    --cc=arnd@arndb.de \
    --cc=bigeasy@linutronix.de \
    --cc=christophe.leroy@c-s.fr \
    --cc=dave.hansen@linux.intel.com \
    --cc=hdanton@sina.com \
    --cc=hughd@google.com \
    --cc=jbi.octave@gmail.com \
    --cc=keescook@chromium.org \
    --cc=leonardo@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkft-triage@lists.linaro.org \
    --cc=mateusznosek0@gmail.com \
    --cc=mgorman@suse.de \
    --cc=minchan@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=naresh.kamboju@linaro.org \
    --cc=pankaj.gupta.linux@gmail.com \
    --cc=riel@surriel.com \
    --cc=rppt@linux.vnet.ibm.com \
    --cc=shuah@kernel.org \
    --cc=vbabka@suse.cz \
    --cc=ying.huang@intel.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).