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: <3a055da0-fd88-4ec0-b006-9ccd382e9cc6@app.fastmail.com>
Date:   Wed, 24 May 2023 13:18:28 +0200
From:   "Arnd Bergmann" <arnd@...db.de>
To:     "Naresh Kamboju" <naresh.kamboju@...aro.org>,
        "open list" <linux-kernel@...r.kernel.org>,
        linux-stable <stable@...r.kernel.org>,
        linux-mm <linux-mm@...ck.org>, "LTP List" <ltp@...ts.linux.it>,
        lkft-triage@...ts.linaro.org, "X86 ML" <x86@...nel.org>
Cc:     "Thomas Gleixner" <tglx@...utronix.de>,
        "Andy Lutomirski" <luto@...nel.org>,
        "Ingo Molnar" <mingo@...hat.com>,
        "Dave Hansen" <dave.hansen@...ux.intel.com>,
        "Andrew Morton" <akpm@...ux-foundation.org>,
        "Dan Carpenter" <dan.carpenter@...aro.org>,
        "Anders Roxell" <anders.roxell@...aro.org>
Subject: Re: qemu-x86_64 compat: LTP: controllers: RIP: 0010:__alloc_pages

On Wed, May 24, 2023, at 11:02, Naresh Kamboju wrote:
> While running LTP controllers following kernel crash noticed on qemu-x86_64
> compat mode with stable-rc 6.3.4-rc2.
>
> Reported-by: Linux Kernel Functional Testing <lkft@...aro.org>
>
>  Linux version 6.3.4-rc2 (tuxmake@...make) (x86_64-linux-gnu-gcc
> (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1
> SMP PREEMPT_DYNAMIC @1684862676
> ..
> ./runltp -f controllers
> ...
> cpuset_inherit 11 TPASS: cpus: Inherited information is right!
> cpuset_inherit 13 TPASS: mems: Inherited information is right!
> <4>[ 1130.117922] int3: 0000 [#1] PREEMPT SMP PTI
> <4>[ 1130.118132] CPU: 0 PID: 32748 Comm: cpuset_inherit_ Not tainted
> 6.3.4-rc2 #1
> <4>[ 1130.118216] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009),
> BIOS 1.14.0-2 04/01/2014
> <4>[ 1130.118320] RIP: 0010:__alloc_pages+0xeb/0x340
> <4>[ 1130.118605] Code: 48 c1 e0 04 48 8d 84 01 00 13 00 00 48 89 45
> a8 8b 05 d9 31 cf 01 85 c0 0f 85 05 02 00 00 89 d8 c1 e8 03 83 e0 03
> 89 45 c0 66 <90> 41 89 df 41 be 01 00 00 00 f6 c7 04 75 66 44 89 e6 89
> df e8 ec

I haven't figured out what is going on here, but I tracked down
the trapping instruction <90> to the middle of the 'xchg   %ax,%ax'
two-byte nop in:

ffffffff814218f4:       83 e0 03                and    $0x3,%eax
ffffffff814218f7:       89 45 c0                mov    %eax,-0x40(%rbp)
ffffffff814218fa:       66 90                   xchg   %ax,%ax
ffffffff814218fc:       41 89 df                mov    %ebx,%r15d
ffffffff814218ff:       41 be 01 00 00 00       mov    $0x1,%r14d

which in turn is the cpusets_enabled() check in prepare_alloc_pages().

static inline bool cpusets_enabled(void)
{       
        return static_branch_unlikely(&cpusets_enabled_key);
}

static __always_inline bool arch_static_branch(struct static_key *key, bool branch)
{
        asm_volatile_goto("1:"
                "jmp %l[l_yes] # objtool NOPs this \n\t"
                JUMP_TABLE_ENTRY
                : :  "i" (key), "i" (2 | branch) : : l_yes);

        return false;
l_yes:
        return true;
}

I don't see any changes related to this between 6.3.3 and 6.3.4-rc2.

       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ