Re: kernel panic: Attempted to kill init!

2021-03-10 Thread Palash Oswal
> The kernel stack is not very useful in this case, it's a common faulting > stack. > Maybe it will shed some light if you install gdb in the image, attach > it to the systemd process, then trigger the segfault and then unwind > stack in the systemd process at the time of fault, dump registers, >

Re: kernel panic: Attempted to kill init!

2021-03-10 Thread Dmitry Vyukov
On Wed, Mar 10, 2021 at 10:02 AM Palash Oswal wrote: > > On Tue, Mar 9, 2021 at 7:58 PM Al Viro wrote: > > Lovely. So something in that sequence of syscalls manages to trigger > > segfault in unrelated process. What happens if you put it to sleep > > right after open_by_handle_at() (e.g. by

Re: kernel panic: Attempted to kill init!

2021-03-10 Thread Palash Oswal
On Tue, Mar 9, 2021 at 7:58 PM Al Viro wrote: > Lovely. So something in that sequence of syscalls manages to trigger > segfault in unrelated process. What happens if you put it to sleep > right after open_by_handle_at() (e.g. by read(2) from fd 0, etc.)? Added read(2) call in the reproducer,

Re: kernel panic: Attempted to kill init!

2021-03-09 Thread Palash Oswal
On Tue, Mar 9, 2021 at 8:36 PM Dmitry Vyukov wrote: > FWIW the code looks reasonable: > > All code > >0: 00 00add%al,(%rax) >2: 00 00add%al,(%rax) >4: 41 57push %r15 >6: 41 56push %r14 >8: 41

Re: kernel panic: Attempted to kill init!

2021-03-09 Thread Eric W. Biederman
Al Viro writes: > On Tue, Mar 09, 2021 at 11:29:14AM +0530, Palash Oswal wrote: > >> I observe the following result(notice the segfault in systemd): >> root@sandbox:~# ./repro >> [9.457767] got to 221 >> [9.457791] got to 183 >> [9.459144] got to 201 >> [9.459471] got to 208 >> [

Re: kernel panic: Attempted to kill init!

2021-03-09 Thread Dmitry Vyukov
On Tue, Mar 9, 2021 at 3:31 PM Al Viro wrote: > > I observe the following result(notice the segfault in systemd): > > root@sandbox:~# ./repro > > [9.457767] got to 221 > > [9.457791] got to 183 > > [9.459144] got to 201 > > [9.459471] got to 208 > > [9.459773] got to 210 > > [

Re: kernel panic: Attempted to kill init!

2021-03-09 Thread Al Viro
On Tue, Mar 09, 2021 at 11:29:14AM +0530, Palash Oswal wrote: > I observe the following result(notice the segfault in systemd): > root@sandbox:~# ./repro > [9.457767] got to 221 > [9.457791] got to 183 > [9.459144] got to 201 > [9.459471] got to 208 > [9.459773] got to 210 > [

Re: kernel panic: Attempted to kill init!

2021-03-08 Thread Palash Oswal
On Mon, Mar 8, 2021 at 10:50 PM Al Viro wrote: > I'd suggest to add printk(KERN_ERR "got to %d", __LINE__); in fs/fhandle.c at > beginning of do_handle_open() > right before each copy_from_user() in handle_to_path() > right before and right after the call of

Re: kernel panic: Attempted to kill init!

2021-03-08 Thread Al Viro
y((void*)0x2000, "\x0a\x00\x00\x00\x02\x00\x00\x00\x4b\x0d", 10); > syscall(__NR_open_by_handle_at, r[0], 0x2000ul, 0x2f00ul); > return 0; > } > > This reproducer only worked on the syzkaller instance disk image that > I was using. I am adding the syzkaller report from

kernel panic: Attempted to kill init!

2021-03-08 Thread Palash Oswal
turn 0; } This reproducer only worked on the syzkaller instance disk image that I was using. I am adding the syzkaller report from a second instance for the same issue: Report #2 Syzkaller hit 'kernel panic: Attempted to kill init!' bug. Kernel panic - not syncing: Attempted to kill init! exitcode=

Re: kernel panic: Attempted to kill init! (2)

2017-12-28 Thread Dmitry Vyukov
On Thu, Dec 28, 2017 at 10:20 AM, syzbot wrote: > Hello, > > syzkaller hit the following crash on > 6084b576dca2e898f5c101baef151f7bfdbb606d > git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master > compiler: gcc (GCC)

Re: kernel panic: Attempted to kill init! (2)

2017-12-28 Thread Dmitry Vyukov
On Thu, Dec 28, 2017 at 10:20 AM, syzbot wrote: > Hello, > > syzkaller hit the following crash on > 6084b576dca2e898f5c101baef151f7bfdbb606d > git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console output