Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp692132pxb; Wed, 3 Feb 2021 15:34:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJy8VH92pjzge4LFYVZZnWzvXHdq0Zxz7R0gfN9Hk/H8HpRaqIvEMlxApPp+ngKmJQv0+tnX X-Received: by 2002:a05:6402:208:: with SMTP id t8mr5527678edv.189.1612395261680; Wed, 03 Feb 2021 15:34:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612395261; cv=none; d=google.com; s=arc-20160816; b=Le/cY71EZsHxrEvl0pbH/UMDW6ERep9OMn9EeHdtPJHe85qbcabFGMl0HIgLqMmhib kSYg2qco4Jh+BzIvw6sm8v6+mGBXF5rtZQ4TxDO8JAjIsDGLIivwJ6p6X1e0QR7m68hM ISor6/eVkvPdbWtnwBGcIcsF5DQS583I1mMDj5X88KahCdJGx5wh2sSRIGUuJM849neK fxN0ozGWhve87KGtG50pvxnfqidglDhLtPk2XLOXx68VmeN40n0wRdmrQvPyu53VULcX 1f6nZJe3atrqeBkqpAdznqi9qattPbNR3lM3aO2m1x0j6tAmczKs1ZmGxW32wIjjBpDj zDSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=qk0MRndwsudTUKG83wO3htOmgtnK5DShnl+yULNhutc=; b=ieWDFc+KABIPmClnARh5/O67/u5lV6OCwdoHlztF5pUdoNKZICEha2KLrORO1k2gOR FIOxNLHT2Q0FdY7kVsdwNd5lA+ItoVJ8T82efhpPHu4XMqKBpKRArlJt7jxZyG21Dc0h 4RQU3OsX/E9bUzK2KTwoVvJK/EIerXUJLnB4F19SrPncnyPr/K/NYc2oNhMZ4uQpx1jB Lnw2nLBklJSWlx6tRtDUdjupH2SZd432B+u8lburbYyMqquiwxrOmQwvGYV75oXONWeJ S+vd5MIiMDg0FfwVW3i9MICBSE5yju3ak4MCG5CTLFh8qm2IYDn0PQWGgVw2ItlTMEfB hP0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Eazmsv3W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h15si2181706eje.285.2021.02.03.15.33.56; Wed, 03 Feb 2021 15:34:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Eazmsv3W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233660AbhBCX3f (ORCPT + 99 others); Wed, 3 Feb 2021 18:29:35 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:58763 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232880AbhBCX3b (ORCPT ); Wed, 3 Feb 2021 18:29:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612394884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qk0MRndwsudTUKG83wO3htOmgtnK5DShnl+yULNhutc=; b=Eazmsv3WGJRWmge5fhdyuOhFf9l/nWodnrm3fBI0ai9xKJli0aJVzLjou3ymW0UShMKBZO h/hI6/Yi7s05wJL3BCua7Ta0QbP/V2jodCxLBS3nUXk2PliZgE/qI7koQUwkmmCOVGu9Re /0SYmPvTQQcATmuWRqlSDVzAzsodLAw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-217-sP3f55tYM9yrX1Mu_6I9qQ-1; Wed, 03 Feb 2021 18:28:00 -0500 X-MC-Unique: sP3f55tYM9yrX1Mu_6I9qQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EA5B41083E9D; Wed, 3 Feb 2021 23:27:55 +0000 (UTC) Received: from treble (ovpn-113-81.rdu2.redhat.com [10.10.113.81]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 27B245C1B4; Wed, 3 Feb 2021 23:27:44 +0000 (UTC) Date: Wed, 3 Feb 2021 17:27:35 -0600 From: Josh Poimboeuf To: Ivan Babrou Cc: Peter Zijlstra , kernel-team , Ignat Korchagin , Hailong liu , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Andrew Morton , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Miroslav Benes , Julien Thierry , Jiri Slaby , kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-kernel , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, "Steven Rostedt (VMware)" , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , John Fastabend , KP Singh , Robert Richter , "Joel Fernandes (Google)" , Mathieu Desnoyers , Linux Kernel Network Developers , bpf@vger.kernel.org, Alexey Kardashevskiy Subject: Re: BUG: KASAN: stack-out-of-bounds in unwind_next_frame+0x1df5/0x2650 Message-ID: <20210203232735.nw73kugja56jp4ls@treble> References: <20210203190518.nlwghesq75enas6n@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 03, 2021 at 02:41:53PM -0800, Ivan Babrou wrote: > On Wed, Feb 3, 2021 at 11:05 AM Josh Poimboeuf wrote: > > > > On Wed, Feb 03, 2021 at 09:46:55AM -0800, Ivan Babrou wrote: > > > > Can you pretty please not line-wrap console output? It's unreadable. > > > > > > GMail doesn't make it easy, I'll send a link to a pastebin next time. > > > Let me know if you'd like me to regenerate the decoded stack. > > > > > > > > edfd9b7838ba5e47f19ad8466d0565aba5c59bf0 is the first bad commit > > > > > commit edfd9b7838ba5e47f19ad8466d0565aba5c59bf0 > > > > > > > > Not sure what tree you're on, but that's not the upstream commit. > > > > > > I mentioned that it's a rebased core-static_call-2020-10-12 tag and > > > added a link to the upstream hash right below. > > > > > > > > Author: Steven Rostedt (VMware) > > > > > Date: Tue Aug 18 15:57:52 2020 +0200 > > > > > > > > > > tracepoint: Optimize using static_call() > > > > > > > > > > > > > There's a known issue with that patch, can you try: > > > > > > > > http://lkml.kernel.org/r/20210202220121.435051654@goodmis.org > > > > > > I've tried it on top of core-static_call-2020-10-12 tag rebased on top > > > of v5.9 (to make it reproducible), and the patch did not help. Do I > > > need to apply the whole series or something else? > > > > Can you recreate with this patch, and add "unwind_debug" to the cmdline? > > It will spit out a bunch of stack data. > > Here's the three I'm building: > > * https://github.com/bobrik/linux/tree/ivan/static-call-5.9 > > It contains: > > * v5.9 tag as the base > * static_call-2020-10-12 tag > * dm-crypt patches to reproduce the issue with KASAN > * x86/unwind: Add 'unwind_debug' cmdline option > * tracepoint: Fix race between tracing and removing tracepoint > > The very same issue can be reproduced on 5.10.11 with no patches, > but I'm going with 5.9, since it boils down to static call changes. > > Here's the decoded stack from the kernel with unwind debug enabled: > > * https://gist.github.com/bobrik/ed052ac0ae44c880f3170299ad4af56b > > See my first email for the exact commands that trigger this. Thanks. Do you happen to have the original dmesg, before running it through the post-processing script? I assume you're using decode_stacktrace.sh? It could use some improvement, it's stripping the function offset. Also spaces are getting inserted in odd places, messing the alignment. [ 137.291837][ C0] ffff88809c409858: d7c4f3ce817a1700 (0xd7c4f3ce817a1700) [ 137.291837][ C0] ffff88809c409860: 0000000000000000 (0x0) [ 137.291839][ C0] ffff88809c409868: 00000000ffffffff (0xffffffff) [ 137.291841][ C0] ffff88809c409870: ffffffffa4f01a52 unwind_next_frame (arch/x86/kernel/unwind_orc.c:380 arch/x86/kernel/unwind_orc.c:553) [ 137.291843][ C0] ffff88809c409878: ffffffffa4f01a52 unwind_next_frame (arch/x86/kernel/unwind_orc.c:380 arch/x86/kernel/unwind_orc.c:553) [ 137.291844][ C0] ffff88809c409880: ffff88809c409ac8 (0xffff88809c409ac8) [ 137.291845][ C0] ffff88809c409888: 0000000000000086 (0x86) -- Josh