From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============3403835245338062399==" MIME-Version: 1.0 From: Sergey Senozhatsky To: lkp@lists.01.org Subject: Re: [ 0.003333] BUG: KASAN: use-after-scope in console_unlock+0x605/0xcc0 Date: Fri, 01 Dec 2017 10:32:30 +0900 Message-ID: <20171201013230.GB22663@jagdpanzerIV> In-Reply-To: <20171130143006.76eebrxp5rpwdtok@wfg-t540p.sh.intel.com> List-Id: --===============3403835245338062399== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On (11/30/17 22:30), Fengguang Wu wrote: > On Thu, Nov 30, 2017 at 05:29:09PM +0900, Sergey Senozhatsky wrote: > > On (11/30/17 09:16), Dmitry Vyukov wrote: > > [..] > > > > to be honest, this backtrace hardly makes any sense to me. > > > > > > > > vprintk_emit() > > > > reserve_standard_io_resources() > > > > __flush_tlb_all() > > > > vprintk_emit() > > > > __down_trylock_console_sem() > > > > wake_up_klogd() > > > > console_unlock() > > > > > > > > I need some help here. > > > = > > > = > > > You can try dirty patch from here: > > > https://groups.google.com/d/msg/kasan-dev/iDb5bhcMBT0/55QzwWaHAwAJ > > > It should make KASAN print the exact variable name and frame where it > > > was allocated. > > = > > would be good if Fengguang can try this out. I can't reproduce the > > problem on my x86 box (linux-next and Linus's trees both work fine > > for me with KASAN + lockdep + TRACE_IRQ). > = > Attached is the dmesg with Dmitry's patch. The new output is: > = > [ 0.003333] frame offset: 32 > [ 0.003333] desc: '2 32 4 3 __u 96 8 3 __u ' > [ 0.003333] func: console_unlock+0x0/0xcc0 thanks! -ss --===============3403835245338062399==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751911AbdLABcg (ORCPT ); Thu, 30 Nov 2017 20:32:36 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:36887 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751217AbdLABcf (ORCPT ); Thu, 30 Nov 2017 20:32:35 -0500 X-Google-Smtp-Source: AGs4zMYl9L6q3nsWEdesyZTZw23qcia9Tz2mil6XzyedV6805fwqg+SrjUqfHCDK7ZnxWq7fltFkGQ== Date: Fri, 1 Dec 2017 10:32:30 +0900 From: Sergey Senozhatsky To: Fengguang Wu Cc: Sergey Senozhatsky , Dmitry Vyukov , LKML , Petr Mladek , Sergey Senozhatsky , Steven Rostedt , Linus Torvalds , Ingo Molnar , Aleksey Makarov , Nicolas Pitre , Nikitas Angelinas , LKP , kasan-dev Subject: Re: [ 0.003333] BUG: KASAN: use-after-scope in console_unlock+0x605/0xcc0 Message-ID: <20171201013230.GB22663@jagdpanzerIV> References: <20171130022655.2e5ehqmf3lyi4jy3@wfg-t540p.sh.intel.com> <20171130064712.GA488@jagdpanzerIV> <20171130082909.GA469@jagdpanzerIV> <20171130143006.76eebrxp5rpwdtok@wfg-t540p.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171130143006.76eebrxp5rpwdtok@wfg-t540p.sh.intel.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (11/30/17 22:30), Fengguang Wu wrote: > On Thu, Nov 30, 2017 at 05:29:09PM +0900, Sergey Senozhatsky wrote: > > On (11/30/17 09:16), Dmitry Vyukov wrote: > > [..] > > > > to be honest, this backtrace hardly makes any sense to me. > > > > > > > > vprintk_emit() > > > > reserve_standard_io_resources() > > > > __flush_tlb_all() > > > > vprintk_emit() > > > > __down_trylock_console_sem() > > > > wake_up_klogd() > > > > console_unlock() > > > > > > > > I need some help here. > > > > > > > > > You can try dirty patch from here: > > > https://groups.google.com/d/msg/kasan-dev/iDb5bhcMBT0/55QzwWaHAwAJ > > > It should make KASAN print the exact variable name and frame where it > > > was allocated. > > > > would be good if Fengguang can try this out. I can't reproduce the > > problem on my x86 box (linux-next and Linus's trees both work fine > > for me with KASAN + lockdep + TRACE_IRQ). > > Attached is the dmesg with Dmitry's patch. The new output is: > > [ 0.003333] frame offset: 32 > [ 0.003333] desc: '2 32 4 3 __u 96 8 3 __u ' > [ 0.003333] func: console_unlock+0x0/0xcc0 thanks! -ss