Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp667274pxb; Wed, 3 Feb 2021 14:47:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJzCSFyxufh4jvLRJu644+RRQtyURcV+t6w0tbBO3Sy5BZUBWBlIdeBI3S4jGSyilS8i3rQK X-Received: by 2002:a17:906:1308:: with SMTP id w8mr5292418ejb.396.1612392438269; Wed, 03 Feb 2021 14:47:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612392438; cv=none; d=google.com; s=arc-20160816; b=twlNyGSPBAkNvFR4AG9+hZOrf59E7IVYgFg6iyphEWuYLabbGrqgUUxBA36wyuYilh lEzHW17iRNKPZiZh7xRWypeKnSDpU2z7iKiy1bVnfkgHGNYXQQeRDKJmtswkzHMzkZah YReaEpqrio/tS92Xjaw7uaU9q2REDeT4pu2Hy3kVCOAVDB4ueJTHmhI1I1d5vi9MyyXx XR9DbF0hvR2qSX6S7nBHgtBNwqmovBhk5sSJv9Psa3p/VyootM0xpfu+VpqSzzwRRi4x jGAlgld3NXiB2+KkJCbpIoVHZseI1IiDgD1ecRhp3n7x57lFaH1KNQ76qCnPjVdqlSb5 /1Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=FumwaWvzHZWVNE5DDIsNdn258CZK4DlZwzfhawRHFFU=; b=uQahuD4sZgyb4LIPw8rc1WpEehzubTI2WOJSQvxY3eiCJpjJ1Mq8wSBo+vQPyKn5ZG q2xpvajanbZx6PFsbjlMI0epOlUPvXoBtGs87veiEZczY9cU0PpCzNNmOMYXWbqWKnye wGYrn2P5vn//gv6IbetXFL46ONT+gtzqTxqWObQsDhnV6Y6A48IhwSJq95qatetCg5QB BbOskTJL/mgXIhBocEd50uuI8nOt46Dq6jzmYYUWmEkaNz1/DgmZB47p924UU4uOvc+m dsBUknYGMgeIr88aCWjnZa3np8jfNJ2aFS+zbjFSI93Qf6VJgBjnclAlmJG0IplLJehP v7aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google header.b=BKh7HWRt; 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=REJECT sp=REJECT dis=NONE) header.from=cloudflare.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k9si2225358edx.173.2021.02.03.14.46.51; Wed, 03 Feb 2021 14:47:18 -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=@cloudflare.com header.s=google header.b=BKh7HWRt; 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=REJECT sp=REJECT dis=NONE) header.from=cloudflare.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233058AbhBCWm5 (ORCPT + 99 others); Wed, 3 Feb 2021 17:42:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232366AbhBCWm4 (ORCPT ); Wed, 3 Feb 2021 17:42:56 -0500 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C096C061573 for ; Wed, 3 Feb 2021 14:42:05 -0800 (PST) Received: by mail-lj1-x234.google.com with SMTP id l12so1043877ljc.3 for ; Wed, 03 Feb 2021 14:42:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudflare.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FumwaWvzHZWVNE5DDIsNdn258CZK4DlZwzfhawRHFFU=; b=BKh7HWRt5QJP2ZHOVPSFF1wrdrwqUM37KNsTjNzom5tGNnPIJ9vw2p0eKaZW9IlCGj PRQAlgqXV+HlNMYI+NXDD4iUgxVBON3yb1Gb7JvZ7Qh7f5vcNjvMQbyHbIbrbLHDsDQK F8FxKVZ0QMQBKcXhm9xzGbFs25ys7XxOURSKs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FumwaWvzHZWVNE5DDIsNdn258CZK4DlZwzfhawRHFFU=; b=MjdA3zBnFHSoIHqSU7kgHUxvHuk1rL7NN7lmLTv7RR2M22HeBjPrplQBNnxEEljSca ZJ1EeCi4pu4G/Se3MtadUlgaiye+UrjiY/1cI9k/5XNW+AgNaBwtIS+ZYhaw++uiUl6H W6vJsBWLOU+xiI8t5T6vYU2nwYivHLgYivDDhLSPIAPMdtv0MuE/5br8kNXUOzw0HQED /VP0/INuiToloshRhPb7CXpbOWnqg2ge8S1G/Bj712fupAIcbasskpCAvcuTkHn1fwB8 HBUnDljeHZvoiACF4RfNoVWBcEnNZlTvjRQRU7RR6lURNfEJdH+541NBHvhBxWjq+0RC dV9w== X-Gm-Message-State: AOAM532Wg3NaA2sPTWK72FWQEHOZcoQFr+yL8kXPua3Ve8o2f9dA5c5c eEzi1PCFeTjh+roRgwB+m8DSzPH3LD3wntGTel66ig== X-Received: by 2002:a2e:3a18:: with SMTP id h24mr2987085lja.170.1612392124007; Wed, 03 Feb 2021 14:42:04 -0800 (PST) MIME-Version: 1.0 References: <20210203190518.nlwghesq75enas6n@treble> In-Reply-To: <20210203190518.nlwghesq75enas6n@treble> From: Ivan Babrou Date: Wed, 3 Feb 2021 14:41:53 -0800 Message-ID: Subject: Re: BUG: KASAN: stack-out-of-bounds in unwind_next_frame+0x1df5/0x2650 To: Josh Poimboeuf 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.