From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A81EEC433E0 for ; Wed, 17 Mar 2021 07:49:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7926464F79 for ; Wed, 17 Mar 2021 07:49:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229863AbhCQHs0 (ORCPT ); Wed, 17 Mar 2021 03:48:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230202AbhCQHsL (ORCPT ); Wed, 17 Mar 2021 03:48:11 -0400 Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE3C6C06174A for ; Wed, 17 Mar 2021 00:48:10 -0700 (PDT) Received: by mail-qv1-xf34.google.com with SMTP id g8so978302qvx.1 for ; Wed, 17 Mar 2021 00:48:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=btQk/571WPXOLRNGWmF0j/+OmLEhVuOUexCPHcpCZx0=; b=QL8u6TGl+3a2WsVabpO4KATQNI6e9Hhu1B3qAUkU9UJ5GLQrAjbrXGIYLt+HggEwHk wYiEI80YewbedAws5JcOE9V0fZbS+M4TKHCOY/0t+QqePgCf4137RKyAX81T2qqKMaz3 IR3Od4O3op9t3TxqwpkOACvI70wSNfSaJNnFmOB7J6RgzwSKwyPJHCUCIjvCwGGCad1X 1471nba0x4pth0NTbNrvEJnuqlMyFLPcCocgEGYmQetmeOEGm+iUHf5v80FMNRtTQCCq b6XE00NVWL2SqSfRx2PBB5nxrZ5/Qqri4V3AsBGh9hUXUOenDX8NDAwanNNM7GR/9TCl FK2Q== 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=btQk/571WPXOLRNGWmF0j/+OmLEhVuOUexCPHcpCZx0=; b=obWck1BMW9NcxR8SXg0Ez+2jMut0SDo1W1nSykhNTQum6Ru8ijOWZ6CsBXUwPlggdj h12x4KW46stR6ibqv+IrwBvF3T6ZMGH9vgdRNETD6e5ynEArM2nT/n2PpcmqrhTH2InC M3gI+YXO3L3S8eJQswBHwzUzvlNJ+kUDmUB9X65eHcc/iDWFt7gZ1tkucMcRyi6YxGao rRKz78r5PGlEQrUthkhaqpS9YryzRjqU4mZ0qBoURSzbJ8710RHTlPY+XFN25HgDYAMb ddQKeWAit84zQZm3PfiJ0nfDogZImixHcld89vORRZSDEBV2kOqmz37/x+IFS48+0k6S FzNA== X-Gm-Message-State: AOAM533L0hmvyVrdgYO9tpRmhCgxJMdXc+ORpz6gnilAXr3/cEi3AItf JzzcEw2jyjIW1DMSITVsnuYTN9Cxa9ocW31i8JNWoQ== X-Google-Smtp-Source: ABdhPJxKysoN3vBI2CACYHFn97THSD/zihm3s6XrfUVyvAAdSCBB3dWitGdhszi6FKxipStzIhsBOK4PgeQxMLQDCt4= X-Received: by 2002:a05:6214:1870:: with SMTP id eh16mr4078540qvb.23.1615967289939; Wed, 17 Mar 2021 00:48:09 -0700 (PDT) MIME-Version: 1.0 References: <00000000000069802205bda22b7f@google.com> <20210316155102.GP1463@shell.armlinux.org.uk> In-Reply-To: From: Dmitry Vyukov Date: Wed, 17 Mar 2021 08:47:58 +0100 Message-ID: Subject: Re: [syzbot] kernel panic: corrupted stack end in openat To: Arnd Bergmann Cc: Russell King - ARM Linux admin , syzbot , Linus Walleij , Linux ARM , Andrew Morton , LKML , Linux-MM , syzkaller-bugs , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 16, 2021 at 5:28 PM Arnd Bergmann wrote: > > On Tue, Mar 16, 2021 at 5:13 PM Dmitry Vyukov wrote: > > > > On Tue, Mar 16, 2021 at 5:03 PM Arnd Bergmann wrote: > > > > > > On Tue, Mar 16, 2021 at 4:51 PM Russell King - ARM Linux admin > > > wrote: > > > > On Tue, Mar 16, 2021 at 04:44:45PM +0100, Arnd Bergmann wrote: > > > > > On Tue, Mar 16, 2021 at 11:17 AM Dmitry Vyukov wrote: > > > > > > The compiler is gcc version 10.2.1 20210110 (Debian 10.2.1-6) > > > > > > > > > > Ok, building with Ubuntu 10.2.1-1ubuntu1 20201207 locally, that's > > > > > the closest I have installed, and I think the Debian and Ubuntu versions > > > > > are generally quite close in case of gcc since they are maintained by > > > > > the same packagers. > > > > > > > > ... which shouldn't be a problem - that's just over 1/4 of the stack > > > > space. Could it be the syzbot's gcc is doing something weird and > > > > inflating the stack frames? > > > > > > It's possible, I think that's really unlikely given that it's just Debian's > > > gcc, which is as close to mainline as the version I was using. > > > > > > Uwe's DEBUG_STACKOVERFLOW patch from a while ago might > > > help if this was the problem though: > > > https://lore.kernel.org/linux-arm-kernel/20200108082913.29710-1-u.kleine-koenig@pengutronix.de/ > > > > > > My best guess is something going wrong in the interrupt > > > that triggered the preempt_schedule() which ended up calling > > > task_stack_end_corrupted() in schedule_debug(), as you suggested > > > earlier. > > > > FWIW I see slightly larger frames with the config: > > > > 073ab64 : > > 8073ab64: e1a0c00d mov ip, sp > > 8073ab68: e92ddff0 push {r4, r5, r6, r7, r8, r9, sl, > > fp, ip, lr, pc} > > 8073ab6c: e24cb004 sub fp, ip, #4 > > 8073ab70: e24ddfa7 sub sp, sp, #668 ; 0x29c > > Yes, this is the one that the compiler complained about when warning > for stack over 600 bytes. It's not called in this call chain though. > > > page_alloc can also do reclaim, I had the impression that reclaim can > > be quite heavy-weight in all respects. > > Yes, that is another possibility. What writable file systems or swap > do you normally have mounted that it could be writing to, and on > what storage device? The root fs is ext4 on virtio-blk. There are also several dozens of shrinkers that can be called during reclaim: https://elixir.bootlin.com/linux/latest/C/ident/unregister_shrinker From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EBA7DC433E0 for ; Wed, 17 Mar 2021 07:50:11 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7324564F7B for ; Wed, 17 Mar 2021 07:50:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7324564F7B Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8xIO2bYsnez/t7tOrdqAJ1Op0hFWdhmxQXs0cNtKn14=; b=rBmxIJcOgoAdaNYisydNhz4fK sPVPKg0sjx1I50Kqx5VAWAlaTdQH/dbfbzTYR3b6/Uj/iZqkuQsArU/vs/g9RIsRqSib9aBgkmtrM qkblu3SFo02qfcobZ+kCLyoP/Q1RkxD+wQYMlSaQmJEBlEn1MpD9TYpb8/tFSlP88FOq7EivdYhq2 sPRDuMjFbYfNKexU1t/M/ExvDI58QbIowaVnOMUEtCGOjJvLCxTCVlP6uGaYkjiYN7v+UwpLazU5v 8odeK6Q+KanIojbho8i8SZFPDDWS4uy2Y295BLMS37vOH9929m4zmz1NxuFeDGIaACEG12SbP0q2w tT3dzqguQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lMQue-002gbM-VW; Wed, 17 Mar 2021 07:48:17 +0000 Received: from mail-qv1-xf33.google.com ([2607:f8b0:4864:20::f33]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lMQuZ-002gaJ-FZ for linux-arm-kernel@lists.infradead.org; Wed, 17 Mar 2021 07:48:14 +0000 Received: by mail-qv1-xf33.google.com with SMTP id t16so935983qvr.12 for ; Wed, 17 Mar 2021 00:48:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=btQk/571WPXOLRNGWmF0j/+OmLEhVuOUexCPHcpCZx0=; b=QL8u6TGl+3a2WsVabpO4KATQNI6e9Hhu1B3qAUkU9UJ5GLQrAjbrXGIYLt+HggEwHk wYiEI80YewbedAws5JcOE9V0fZbS+M4TKHCOY/0t+QqePgCf4137RKyAX81T2qqKMaz3 IR3Od4O3op9t3TxqwpkOACvI70wSNfSaJNnFmOB7J6RgzwSKwyPJHCUCIjvCwGGCad1X 1471nba0x4pth0NTbNrvEJnuqlMyFLPcCocgEGYmQetmeOEGm+iUHf5v80FMNRtTQCCq b6XE00NVWL2SqSfRx2PBB5nxrZ5/Qqri4V3AsBGh9hUXUOenDX8NDAwanNNM7GR/9TCl FK2Q== 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=btQk/571WPXOLRNGWmF0j/+OmLEhVuOUexCPHcpCZx0=; b=iPKqYbnoWgGMmvSSD7mRdh5T5luIBmX4CSou9LXtCeHHMxn/lcOL6u2Mvod5eLCgwO BnNwB7GMkZN5L72MK5QWyE7RXOhf/ZU/kWR5ru9h5kjo4ipfJ3sqGXQ5srERGeEh1SjP B1jM3dSrYELcj+Gd1YOP/Bako+quKzThCt5jqLByBrQwa5eQdL6uJhUt2mWuyfi7CqsF CgyOzSmBBDopcNqJ5c+OmCf1H4L8gm9lLIsGOV9LCnxZiy8IDW4qjmGX/aQXmjmcfKGd tY2p2iTt4CjV0c5BwHvtKhlk0wQ2wVds+jfpUNzBBu85/q5NG05g1foOTRjCrcP3pWxl xbwA== X-Gm-Message-State: AOAM532a6R2kZAUqabM2itKOs4j0irFBpAoeAE+GAUSEFYh6zF2e6v0i XmSk26zY87R1eRIjM9LHiCV2oi9ttxfS9zwmd1o3IQ== X-Google-Smtp-Source: ABdhPJxKysoN3vBI2CACYHFn97THSD/zihm3s6XrfUVyvAAdSCBB3dWitGdhszi6FKxipStzIhsBOK4PgeQxMLQDCt4= X-Received: by 2002:a05:6214:1870:: with SMTP id eh16mr4078540qvb.23.1615967289939; Wed, 17 Mar 2021 00:48:09 -0700 (PDT) MIME-Version: 1.0 References: <00000000000069802205bda22b7f@google.com> <20210316155102.GP1463@shell.armlinux.org.uk> In-Reply-To: From: Dmitry Vyukov Date: Wed, 17 Mar 2021 08:47:58 +0100 Message-ID: Subject: Re: [syzbot] kernel panic: corrupted stack end in openat To: Arnd Bergmann Cc: Russell King - ARM Linux admin , syzbot , Linus Walleij , Linux ARM , Andrew Morton , LKML , Linux-MM , syzkaller-bugs , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210317_074811_692437_BDE826C1 X-CRM114-Status: GOOD ( 26.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Mar 16, 2021 at 5:28 PM Arnd Bergmann wrote: > > On Tue, Mar 16, 2021 at 5:13 PM Dmitry Vyukov wrote: > > > > On Tue, Mar 16, 2021 at 5:03 PM Arnd Bergmann wrote: > > > > > > On Tue, Mar 16, 2021 at 4:51 PM Russell King - ARM Linux admin > > > wrote: > > > > On Tue, Mar 16, 2021 at 04:44:45PM +0100, Arnd Bergmann wrote: > > > > > On Tue, Mar 16, 2021 at 11:17 AM Dmitry Vyukov wrote: > > > > > > The compiler is gcc version 10.2.1 20210110 (Debian 10.2.1-6) > > > > > > > > > > Ok, building with Ubuntu 10.2.1-1ubuntu1 20201207 locally, that's > > > > > the closest I have installed, and I think the Debian and Ubuntu versions > > > > > are generally quite close in case of gcc since they are maintained by > > > > > the same packagers. > > > > > > > > ... which shouldn't be a problem - that's just over 1/4 of the stack > > > > space. Could it be the syzbot's gcc is doing something weird and > > > > inflating the stack frames? > > > > > > It's possible, I think that's really unlikely given that it's just Debian's > > > gcc, which is as close to mainline as the version I was using. > > > > > > Uwe's DEBUG_STACKOVERFLOW patch from a while ago might > > > help if this was the problem though: > > > https://lore.kernel.org/linux-arm-kernel/20200108082913.29710-1-u.kleine-koenig@pengutronix.de/ > > > > > > My best guess is something going wrong in the interrupt > > > that triggered the preempt_schedule() which ended up calling > > > task_stack_end_corrupted() in schedule_debug(), as you suggested > > > earlier. > > > > FWIW I see slightly larger frames with the config: > > > > 073ab64 : > > 8073ab64: e1a0c00d mov ip, sp > > 8073ab68: e92ddff0 push {r4, r5, r6, r7, r8, r9, sl, > > fp, ip, lr, pc} > > 8073ab6c: e24cb004 sub fp, ip, #4 > > 8073ab70: e24ddfa7 sub sp, sp, #668 ; 0x29c > > Yes, this is the one that the compiler complained about when warning > for stack over 600 bytes. It's not called in this call chain though. > > > page_alloc can also do reclaim, I had the impression that reclaim can > > be quite heavy-weight in all respects. > > Yes, that is another possibility. What writable file systems or swap > do you normally have mounted that it could be writing to, and on > what storage device? The root fs is ext4 on virtio-blk. There are also several dozens of shrinkers that can be called during reclaim: https://elixir.bootlin.com/linux/latest/C/ident/unregister_shrinker _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel