[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <ea23ca6b-0893-1303-524c-a7e07d909931@i-love.sakura.ne.jp>
Date: Thu, 27 May 2021 22:16:56 +0900
From: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
To: "joey.jiaojg" <joey.jiaojg@...il.com>,
Dmitry Vyukov <dvyukov@...gle.com>
Cc: syzbot <syzbot+6fb8ff5211d3e821398f@...kaller.appspotmail.com>,
LKML <linux-kernel@...r.kernel.org>,
syzkaller-bugs <syzkaller-bugs@...glegroups.com>
Subject: Re: [syzbot] unexpected kernel reboot (5)
On 2021/05/27 21:15, joey.jiaojg wrote:
> I tested on qemu and Android device, not found the reboot.
> Any kernel version different?
Kernel version needs to be v5.11-rc5+ because this reproducer
depends on commit f2d6c2708bd8 ("kernfs: wire up ->splice_read
and ->splice_write"). Also, this reproducer depends on contents
of /sys/power/state file.
----------
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/sendfile.h>
int main(int argc, char *argv[])
{
const int fd = open("/sys/power/state", O_RDWR);
off_t offset = 7;
/* Assumes that 3 bytes from offset 7 in /sys/power/state are "mem". */
sendfile(fd, fd, &offset, 3);
return 0;
}
----------
On 2021/05/27 21:19, joey.jiaojg wrote:
> Or we can add glob code like
> /sys/**/*:-/sys/power/state to exclude.
Well, since /sys/ includes mount points for other filesystems such as
securityfs ( /sys/kernel/security/ ), debugfs ( /sys/kernel/debug/ )
and cgroup ( /sys/fs/cgroup/ ), just excluding this specific file is not
sufficient. I think we have to start from removing glob["/sys/**/*"] .
Powered by blists - more mailing lists