From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Takashi Iwai <tiwai@suse.de>
Cc: Dmitry Vyukov <dvyukov@google.com>,
syzbot
<bot+63583aefef5457348dcfa06b87d4fd1378b26b09@syzkaller.appspotmail.com>,
aaron.lu@intel.com, alsa-devel@alsa-project.org,
Michal Hocko <mhocko@suse.com>, Jan Kara <jack@suse.cz>,
Minchan Kim <minchan@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
ying.huang@intel.com, syzkaller-bugs@googlegroups.com,
LKML <linux-kernel@vger.kernel.org>,
linux-mm@kvack.org, Takashi Iwai <tiwai@suse.com>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
shli@fb.com, David Rientjes <rientjes@google.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Andrew Morton <akpm@linux-foundation.org>,
zi.yan@cs.rutgers.edu, Matthew Wilcox <willy@linux.intel.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Subject: Re: [alsa-devel] BUG: soft lockup
Date: Thu, 2 Nov 2017 12:09:51 +0300 [thread overview]
Message-ID: <20171102090951.drjf7wc2urcmtla5@node.shutemov.name> (raw)
In-Reply-To: <s5hshdxay1t.wl-tiwai@suse.de>
[-- Attachment #1: Type: text/plain, Size: 659 bytes --]
On Thu, Nov 02, 2017 at 09:23:58AM +0100, Takashi Iwai wrote:
>
> Currently the least ALSA timer interrupt period is limited to 1ms.
> Does it still too much?
>
> Can the reproducer triggers it reliably? If yes, could you forward
> it, too (and config as well), so that I'll try to dig down more exact
> code paths?
All of that is part of original report:
http://lkml.kernel.org/r/94eb2c19df188b1926055cf13c21@google.com
marc.info hasn't stored repro.c for some reasone. Attached.
I've just check it reproduces reliably for me in KVM.
I also checked that it's not specific to THP -- still trigirable with huge
pages disabled.
--
Kirill A. Shutemov
[-- Attachment #2: repro.c --]
[-- Type: text/x-c, Size: 4156 bytes --]
// autogenerated by syzkaller (http://github.com/google/syzkaller)
#define _GNU_SOURCE
#include <fcntl.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <unistd.h>
static uintptr_t syz_open_dev(uintptr_t a0, uintptr_t a1, uintptr_t a2)
{
if (a0 == 0xc || a0 == 0xb) {
char buf[128];
sprintf(buf, "/dev/%s/%d:%d", a0 == 0xc ? "char" : "block",
(uint8_t)a1, (uint8_t)a2);
return open(buf, O_RDWR, 0);
} else {
char buf[1024];
char* hash;
strncpy(buf, (char*)a0, sizeof(buf));
buf[sizeof(buf) - 1] = 0;
while ((hash = strchr(buf, '#'))) {
*hash = '0' + (char)(a1 % 10);
a1 /= 10;
}
return open(buf, a2, 0);
}
}
static void test();
void loop()
{
while (1) {
test();
}
}
long r[64];
void test()
{
memset(r, -1, sizeof(r));
r[0] = syscall(__NR_mmap, 0x20000000ul, 0xfff000ul, 0x3ul, 0x32ul,
0xfffffffffffffffful, 0x0ul);
memcpy((void*)0x203a2000, "\x2e\x2f\x66\x69\x6c\x65\x30\x00", 8);
*(uint64_t*)0x20000fe0 = (uint64_t)0x0;
*(uint64_t*)0x20000fe8 = (uint64_t)0x2710;
*(uint64_t*)0x20000ff0 = (uint64_t)0x77359400;
*(uint64_t*)0x20000ff8 = (uint64_t)0x0;
r[6] = syscall(__NR_utimes, 0x203a2000ul, 0x20000fe0ul);
r[7] = syscall(__NR_getdents64, 0xfffffffffffffffful, 0x2076e000ul,
0x0ul);
memcpy((void*)0x20c67ff1,
"\x2f\x64\x65\x76\x2f\x73\x6e\x64\x2f\x74\x69\x6d\x65\x72\x00",
15);
r[9] = syz_open_dev(0x20c67ff1ul, 0x0ul, 0x0ul);
*(uint32_t*)0x205a3fcc = (uint32_t)0x0;
*(uint32_t*)0x205a3fd0 = (uint32_t)0x2;
*(uint32_t*)0x205a3fd4 = (uint32_t)0x0;
*(uint32_t*)0x205a3fd8 = (uint32_t)0xffffffffffffffff;
*(uint32_t*)0x205a3fdc = (uint32_t)0x0;
*(uint8_t*)0x205a3fe0 = (uint8_t)0x0;
*(uint8_t*)0x205a3fe1 = (uint8_t)0x0;
*(uint8_t*)0x205a3fe2 = (uint8_t)0x0;
*(uint8_t*)0x205a3fe3 = (uint8_t)0x0;
*(uint8_t*)0x205a3fe4 = (uint8_t)0x0;
*(uint8_t*)0x205a3fe5 = (uint8_t)0x0;
*(uint8_t*)0x205a3fe6 = (uint8_t)0x0;
*(uint8_t*)0x205a3fe7 = (uint8_t)0x0;
*(uint8_t*)0x205a3fe8 = (uint8_t)0x0;
*(uint8_t*)0x205a3fe9 = (uint8_t)0x0;
*(uint8_t*)0x205a3fea = (uint8_t)0x0;
*(uint8_t*)0x205a3feb = (uint8_t)0x0;
*(uint8_t*)0x205a3fec = (uint8_t)0x0;
*(uint8_t*)0x205a3fed = (uint8_t)0x0;
*(uint8_t*)0x205a3fee = (uint8_t)0x0;
*(uint8_t*)0x205a3fef = (uint8_t)0x0;
*(uint8_t*)0x205a3ff0 = (uint8_t)0x0;
*(uint8_t*)0x205a3ff1 = (uint8_t)0x0;
*(uint8_t*)0x205a3ff2 = (uint8_t)0x0;
*(uint8_t*)0x205a3ff3 = (uint8_t)0x0;
*(uint8_t*)0x205a3ff4 = (uint8_t)0x0;
*(uint8_t*)0x205a3ff5 = (uint8_t)0x0;
*(uint8_t*)0x205a3ff6 = (uint8_t)0x0;
*(uint8_t*)0x205a3ff7 = (uint8_t)0x0;
*(uint8_t*)0x205a3ff8 = (uint8_t)0x0;
*(uint8_t*)0x205a3ff9 = (uint8_t)0x0;
*(uint8_t*)0x205a3ffa = (uint8_t)0x0;
*(uint8_t*)0x205a3ffb = (uint8_t)0x0;
*(uint8_t*)0x205a3ffc = (uint8_t)0x0;
*(uint8_t*)0x205a3ffd = (uint8_t)0x0;
*(uint8_t*)0x205a3ffe = (uint8_t)0x0;
*(uint8_t*)0x205a3fff = (uint8_t)0x0;
r[47] = syscall(__NR_ioctl, r[9], 0x40345410ul, 0x205a3fccul);
r[48] = syscall(__NR_ioctl, r[9], 0x54a2ul);
memcpy((void*)0x20bd8000,
"\x2f\x64\x65\x76\x2f\x73\x65\x71\x75\x65\x6e\x63\x65\x72\x32"
"\x00",
16);
r[50] = syscall(__NR_openat, 0xffffffffffffff9cul, 0x20bd8000ul,
0x101000ul, 0x0ul);
*(uint32_t*)0x20d1e000 = (uint32_t)0xffffffffffffffff;
*(uint32_t*)0x20d1e004 = (uint32_t)0x730e;
*(uint32_t*)0x20d1e008 = (uint32_t)0x7;
*(uint32_t*)0x20d1e00c = (uint32_t)0x3;
*(uint8_t*)0x20d1e010 = (uint8_t)0xffffffffffffffff;
*(uint8_t*)0x20d1e011 = (uint8_t)0x80000001;
*(uint8_t*)0x20d1e012 = (uint8_t)0x4610;
*(uint8_t*)0x20d1e013 = (uint8_t)0x9;
*(uint32_t*)0x20d1e014 = (uint32_t)0x8;
*(uint32_t*)0x20d1e018 = (uint32_t)0x9;
*(uint32_t*)0x20d1e01c = (uint32_t)0x7;
*(uint32_t*)0x20d1e020 = (uint32_t)0x1;
r[63] = syscall(__NR_ioctl, r[50], 0x5402ul, 0x20d1e000ul);
}
int main()
{
int i;
for (i = 0; i < 8; i++) {
if (fork() == 0) {
loop();
return 0;
}
}
sleep(1000000);
return 0;
}
next prev parent reply other threads:[~2017-11-02 9:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-01 19:54 BUG: soft lockup syzbot
2017-11-01 19:57 ` Dmitry Vyukov
2017-11-02 8:23 ` [alsa-devel] " Takashi Iwai
2017-11-02 9:09 ` Kirill A. Shutemov [this message]
2017-11-06 10:39 ` Takashi Iwai
2017-11-06 10:42 ` Dmitry Vyukov
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=20171102090951.drjf7wc2urcmtla5@node.shutemov.name \
--to=kirill@shutemov.name \
--cc=aaron.lu@intel.com \
--cc=akpm@linux-foundation.org \
--cc=alsa-devel@alsa-project.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=bot+63583aefef5457348dcfa06b87d4fd1378b26b09@syzkaller.appspotmail.com \
--cc=dvyukov@google.com \
--cc=jack@suse.cz \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=minchan@kernel.org \
--cc=peterz@infradead.org \
--cc=rientjes@google.com \
--cc=sfr@canb.auug.org.au \
--cc=shli@fb.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=tiwai@suse.com \
--cc=tiwai@suse.de \
--cc=willy@linux.intel.com \
--cc=ying.huang@intel.com \
--cc=zi.yan@cs.rutgers.edu \
/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).