From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by kanga.kvack.org (Postfix) with ESMTP id 8A93A6B0253 for ; Mon, 12 Oct 2015 07:44:53 -0400 (EDT) Received: by wicgb1 with SMTP id gb1so145549246wic.1 for ; Mon, 12 Oct 2015 04:44:53 -0700 (PDT) Received: from mail-wi0-x233.google.com (mail-wi0-x233.google.com. [2a00:1450:400c:c05::233]) by mx.google.com with ESMTPS id gx9si15362413wib.86.2015.10.12.04.44.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Oct 2015 04:44:52 -0700 (PDT) Received: by wicgb1 with SMTP id gb1so46956864wic.1 for ; Mon, 12 Oct 2015 04:44:52 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <561B9C79.8030003@suse.cz> References: <561B9C79.8030003@suse.cz> From: Dmitry Vyukov Date: Mon, 12 Oct 2015 13:44:32 +0200 Message-ID: Subject: Re: GPF in shm_lock ipc Content-Type: text/plain; charset=UTF-8 Sender: owner-linux-mm@kvack.org List-ID: To: Vlastimil Babka Cc: Andrew Morton , dave@stgolabs.net, dave.hansen@linux.intel.com, Hugh Dickins , Joe Perches , sds@tycho.nsa.gov, Oleg Nesterov , "Kirill A. Shutemov" , Rik van Riel , mhocko@suse.cz, gang.chen.5i5j@gmail.com, Peter Feiner , aarcange@redhat.com, "linux-mm@kvack.org" , LKML , syzkaller@googlegroups.com, Kostya Serebryany , Alexander Potapenko , Andrey Konovalov , Sasha Levin On Mon, Oct 12, 2015 at 1:41 PM, Vlastimil Babka wrote: > On 10/12/2015 11:55 AM, Dmitry Vyukov wrote: >> >> Hello, >> >> The following program crashes kernel: >> >> // autogenerated by syzkaller (http://github.com/google/syzkaller) >> #include >> #include >> #include >> >> int main() >> { >> long r0 = syscall(SYS_shmget, 0x0ul, 0x2ul, 0x8ul); >> long r1 = syscall(SYS_shmat, r0, 0x20000000ul, 0x0ul); >> long r2 = syscall(SYS_mremap, 0x20000000ul, 0x1000ul, >> 0x3000ul, 0x3ul, 0x207f9000ul); >> long r19 = syscall(SYS_shmctl, r0, 0x0ul, 0); >> long r20 = syscall(SYS_remap_file_pages, 0x207f9000ul, >> 0x3000ul, 0x0ul, 0x7ul, 0x0ul); >> return 0; >> } >> >> On commit dd36d7393d6310b0c1adefb22fba79c3cf8a577c >> (git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git) >> >> ------------[ cut here ]------------ >> WARNING: CPU: 2 PID: 2636 at ipc/shm.c:162 shm_open+0x74/0x80() >> Modules linked in: >> CPU: 2 PID: 2636 Comm: a.out Not tainted 4.3.0-rc3+ #37 >> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs >> 01/01/2011 >> ffffffff81bcb43c ffff88081bf0bd70 ffffffff812fe8d6 0000000000000000 >> ffff88081bf0bda8 ffffffff81051ff1 ffffffffffffffea ffff88081b896ca8 >> ffff880819b81620 ffff8800bbaa6d00 ffff880819b81600 ffff88081bf0bdb8 >> Call Trace: >> [< inline >] __dump_stack lib/dump_stack.c:15 >> [] dump_stack+0x44/0x5e lib/dump_stack.c:50 >> [] warn_slowpath_common+0x81/0xc0 kernel/panic.c:447 >> [] warn_slowpath_null+0x15/0x20 kernel/panic.c:480 >> [< inline >] shm_lock ipc/shm.c:162 >> [] shm_open+0x74/0x80 ipc/shm.c:196 >> [] shm_mmap+0x4e/0x80 ipc/shm.c:399 (discriminator 2) >> [] mmap_region+0x3c4/0x5e0 mm/mmap.c:1627 >> [] do_mmap+0x2f7/0x3d0 mm/mmap.c:1402 >> [< inline >] do_mmap_pgoff include/linux/mm.h:1930 >> [< inline >] SYSC_remap_file_pages mm/mmap.c:2694 > > > Hmm what kind of stack unwinder catches inlines? Some external patch, based > on debuginfo? We use the following script to symbolize kernel stack traces. It adds file:line info and inlined frames. https://github.com/google/sanitizers/blob/master/address-sanitizer/tools/kasan_symbolize.py -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org