Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Naresh Kamboju" <naresh.kamboju@linaro.org>,
	"open list" <linux-kernel@vger.kernel.org>,
	linux-stable <stable@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>, "LTP List" <ltp@lists.linux.it>,
	lkft-triage@lists.linaro.org, "X86 ML" <x86@kernel.org>
Cc: "Thomas Gleixner" <tglx@linutronix.de>,
	"Andy Lutomirski" <luto@kernel.org>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Dave Hansen" <dave.hansen@linux.intel.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Dan Carpenter" <dan.carpenter@linaro.org>,
	"Anders Roxell" <anders.roxell@linaro.org>
Subject: Re: qemu-x86_64 compat: LTP: controllers: RIP: 0010:__alloc_pages
Date: Wed, 24 May 2023 13:18:28 +0200	[thread overview]
Message-ID: <3a055da0-fd88-4ec0-b006-9ccd382e9cc6@app.fastmail.com> (raw)
In-Reply-To: <CA+G9fYvVZ9WF-2zfrYeo3xnWNra0QGxLzei+b4yANZwEvr5CYw@mail.gmail.com>

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@linaro.org>
>
>  Linux version 6.3.4-rc2 (tuxmake@tuxmake) (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

  reply	other threads:[~2023-05-24 11:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-24  9:02 qemu-x86_64 compat: LTP: controllers: RIP: 0010:__alloc_pages Naresh Kamboju
2023-05-24 11:18 ` Arnd Bergmann [this message]
2023-05-24 12:54   ` David Laight
2023-05-24 14:07 ` Peter Zijlstra
2023-05-24 16:09   ` Naresh Kamboju
2023-05-24 17:54     ` Peter Zijlstra
2023-05-24 20:33       ` Arnd Bergmann
2023-05-25 12:22         ` Naresh Kamboju

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=3a055da0-fd88-4ec0-b006-9ccd382e9cc6@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=akpm@linux-foundation.org \
    --cc=anders.roxell@linaro.org \
    --cc=dan.carpenter@linaro.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkft-triage@lists.linaro.org \
    --cc=ltp@lists.linux.it \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=naresh.kamboju@linaro.org \
    --cc=stable@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox