lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+G9fYvARTCKjbfHYEbfOjtn_s7desuAToOF4g+Z_fztzZ-myw@mail.gmail.com>
Date:   Mon, 13 Apr 2020 16:51:25 +0530
From:   Naresh Kamboju <naresh.kamboju@...aro.org>
To:     Peter Xu <peterx@...hat.com>
Cc:     open list <linux-kernel@...r.kernel.org>,
        "open list:KERNEL SELFTEST FRAMEWORK" 
        <linux-kselftest@...r.kernel.org>, linux-mm <linux-mm@...ck.org>,
        lkft-triage@...ts.linaro.org, Shuah Khan <shuah@...nel.org>,
        Anders Roxell <anders.roxell@...aro.org>,
        Christophe Leroy <christophe.leroy@....fr>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Leonardo Bras <leonardo@...ux.ibm.com>,
        Michael Ellerman <mpe@...erman.id.au>,
        Mike Rapoport <rppt@...ux.vnet.ibm.com>,
        Arnd Bergmann <arnd@...db.de>,
        Jules Irenge <jbi.octave@...il.com>,
        "Huang, Ying" <ying.huang@...el.com>,
        Pankaj Gupta <pankaj.gupta.linux@...il.com>,
        Rik van Riel <riel@...riel.com>,
        Hugh Dickins <hughd@...gle.com>,
        Minchan Kim <minchan@...nel.org>, Mel Gorman <mgorman@...e.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Mateusz Nosek <mateusznosek0@...il.com>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Kees Cook <keescook@...omium.org>,
        Vlastimil Babka <vbabka@...e.cz>,
        Hillf Danton <hdanton@...a.com>
Subject: Re: i386: selftests: vm: compaction_test: BUG: kernel NULL pointer
 dereference, address: 00000000

On Mon, 13 Apr 2020 at 03:12, Peter Xu <peterx@...hat.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@...aro.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/

- Naresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ