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=-0.6 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 936B7C48BC2 for ; Sun, 27 Jun 2021 10:06:48 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 F0CC561C21 for ; Sun, 27 Jun 2021 10:06:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F0CC561C21 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4GCRGt1Lctz309F for ; Sun, 27 Jun 2021 20:06:46 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=p9T5+L2z; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::531; helo=mail-pg1-x531.google.com; envelope-from=npiggin@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=p9T5+L2z; dkim-atps=neutral Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4GCRGN4w1wz2yXL for ; Sun, 27 Jun 2021 20:06:18 +1000 (AEST) Received: by mail-pg1-x531.google.com with SMTP id h4so12674076pgp.5 for ; Sun, 27 Jun 2021 03:06:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:subject:to:cc:references:in-reply-to:mime-version :message-id:content-transfer-encoding; bh=qx7jFbauN+SVdhiKkCVLkyTvwBxJeGfju7ZFqDPsKts=; b=p9T5+L2zzXlJKvDsZS2j6nAlG2UgQMuye2bKUPtnfHrT/uo5aRSjglhZHMmQUt6bl4 0ofni6CHvmydFy1E5e411/tCSymZIdRT9kx+NfcTNq0NencP0qbB4ReGXqrzeeUSR8kU 2Whjht9MlcZQwt/xuWIp6yoapIOieAEBTH5ng5h8P7x00D6UfVLHMwAJCD0fMvh/P0ri kQYKCakAd8zKP3uS+uP9ruzWOaH1+8czT2NNjIa1LgnC5IYQhcuIEOw5aX/UGp+aiIAk 3t7W7sc26ojO1Xdss2QedB8NE6Y/qhZB2pW+YYa4eJhiYnOBlYrTB2iLt1n6lGmZyVo9 YXEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:to:cc:references:in-reply-to :mime-version:message-id:content-transfer-encoding; bh=qx7jFbauN+SVdhiKkCVLkyTvwBxJeGfju7ZFqDPsKts=; b=Kut7dS+FrYQLcI7ste/to09GcQim1FVZl9ySow7vHe4EAiKc4howsY0ipGaEE3irQY MZTMxGmxm6nIFydKQws1B8c4NED5b4IbBQgBv312nS98vb/4Deon4fqV1DHdwzwMSs9y IMBlymZHsAqX+UPoLiIJ1O7TJtZygW2D4gI9lbDUuCLIBlDu/4JSnahTn0YJPRKIbifR RqtH8AHkyc806c3F5emPn3Jt0xYRUPq61tAf3RpVy5OS2zIIx4L3Rd3g+5whXaqlkXy/ vq/1m4AGAax0PlAACEiGTfxH5jCzaElPMTLOmnJ8duSdSt+fU6lf2EbYKnUfOyfAc4ej sh2Q== X-Gm-Message-State: AOAM531jYB07RvdzBT5eoOL7SH1YObdbYIAPUlFsACqSjsWSe979CChK jPvR5S/2GPglKR0mMj8uhTAmw4R3xuM= X-Google-Smtp-Source: ABdhPJxSy35/NSnHHqCnWoEb/m93S6KOMyo63xHR2jf7m2dy8Ezuc1gtlnxtZ2QTi1wFsf1nM1moKg== X-Received: by 2002:aa7:8605:0:b029:30a:30f:af5e with SMTP id p5-20020aa786050000b029030a030faf5emr9323980pfn.19.1624788373582; Sun, 27 Jun 2021 03:06:13 -0700 (PDT) Received: from localhost (60-242-147-73.tpgi.com.au. [60.242.147.73]) by smtp.gmail.com with ESMTPSA id s7sm10719163pjr.11.2021.06.27.03.06.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Jun 2021 03:06:13 -0700 (PDT) Date: Sun, 27 Jun 2021 20:06:07 +1000 From: Nicholas Piggin Subject: Re: [powerpc][next-20210625] Kernel warning(arch/powerpc/kernel/interrupt.c:518) during boot To: linuxppc-dev@lists.ozlabs.org, Sachin Sant References: <478A3DE4-159E-4FF8-92B4-6550F72951E6@linux.vnet.ibm.com> <1624733491.pxug6c02ws.astroid@bobo.none> In-Reply-To: <1624733491.pxug6c02ws.astroid@bobo.none> MIME-Version: 1.0 Message-Id: <1624788248.0kxmv878xd.astroid@bobo.none> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-next@vger.kernel.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Excerpts from Nicholas Piggin's message of June 27, 2021 4:57 am: > Excerpts from Sachin Sant's message of June 26, 2021 11:52 pm: >> Following kernel warning is seen while booting 5.13.0-rc7-next-20210625 >> on POWER9 LPAR. >>=20 >> [ 40.573592] ------------[ cut here ]------------ >> [ 40.573604] WARNING: CPU: 6 PID: 4743 at arch/powerpc/kernel/interrup= t.c:518 interrupt_exit_kernel_prepare+0x280/0x2a0 >> [ 40.573614] Modules linked in: dm_mod bonding nft_ct nf_conntrack nf_= defrag_ipv6 nf_defrag_ipv4 ip_set rfkill nf_tables libcrc32c nfnetlink sunr= pc pseries_rng xts uio_pdrv_genirq uio vmx_crypto sch_fq_codel ip_tables ex= t4 mbcache jbd2 sd_mod t10_pi sg ibmvscsi ibmveth scsi_transport_srp fuse >> [ 40.573649] CPU: 6 PID: 4743 Comm: dracut-install Not tainted 5.13.0-= rc7-next-20210625 #1 >> [ 40.573655] NIP: c000000000032990 LR: c00000000000c958 CTR: 00000000= 0048dd1c >> [ 40.573660] REGS: c0000000414db640 TRAP: 0700 Not tainted (5.13.0-= rc7-next-20210625) >> [ 40.573664] MSR: 8000000000021033 CR: 28044288 = XER: 00000000 >> [ 40.573674] CFAR: c0000000000327a4 IRQMASK: 1=20 >> GPR00: c00000000000c958 c0000000414db8e0 c0000000029bbd00= c0000000414db9a0=20 >> GPR04: 8000000000001033 0000000000000093 0000000000000048= ffffffffffffffbf=20 >> GPR08: 0000000000000008 0000000000000000 0000000000000003= 0000000000000010=20 >> GPR12: 0000000000004000 c000000005587a00 0000000101dc15a8= 0000000101dc1590=20 >> GPR16: 0000000101dc05a8 00007fffc7abe353 00007fffb7926740= 0000000000000000=20 >> GPR20: 00007fffc7ab7ae0 fffffffffffff000 0000000000000006= c000000043cbbc00=20 >> GPR24: 0000000000000000 000001003da495d0 0000000000000000= 0000000000000000=20 >> GPR28: 0000000000000000 fcffffffffffffff 0000000000000000= c0000000414db9a0=20 >> [ 40.573725] NIP [c000000000032990] interrupt_exit_kernel_prepare+0x28= 0/0x2a0 >> [ 40.573730] LR [c00000000000c958] interrupt_return_srr_user_restart+0= x34/0x118 >=20 > BTW this isn't a restart but a kernel exit. I'll have to update labels=20 > to make this clear. >=20 >> [ 40.573736] Call Trace: >> [ 40.573738] [c0000000414db8e0] [c000000043cbbc00] 0xc000000043cbbc00 = (unreliable) >> [ 40.573744] [c0000000414db930] [c00000000000c958] interrupt_return_sr= r_user_restart+0x34/0x118 >> [ 40.573751] --- interrupt: 300 at strnlen_user+0x74/0x240 >> [ 40.573756] NIP: c00000000070ccf4 LR: c00000000048a460 CTR: 00000000= 0003fffe >> [ 40.573760] REGS: c0000000414db9a0 TRAP: 0300 Not tainted (5.13.0-= rc7-next-20210625) >> [ 40.573764] MSR: 8000000000001033 CR: 48044228 = XER: 20040000 >> [ 40.573774] CFAR: c00000000048a45c DAR: 000001003da495d0 DSISR: 40000= 000 IRQMASK: 0=20 >> GPR00: c00000000048a44c c0000000414dbc40 c0000000029bbd00= 0000000000000000=20 >> GPR04: 0000000000200000 0000000000000030 c000000043cbbc00= 000001003da495d0=20 >> GPR08: a8aaaaaaaaaaaaaa bcffffffffffffff 000001003da495d0= 0000000000000000=20 >> GPR12: 0000000000004000 c000000005587a00 0000000101dc15a8= 0000000101dc1590=20 >> GPR16: 0000000101dc05a8 00007fffc7abe353 00007fffb7926740= 0000000000000000=20 >> GPR20: 00007fffc7ab7ae0 fffffffffffff000 0000000000000006= c000000043cbbc00=20 >> GPR24: 0000000000000000 000001003da495d0 0000000000000000= 0000000000000000=20 >> GPR28: 0000000000000000 c000000043b6a000 c000000043cbbc00= 0000000000000000=20 >> [ 40.573826] NIP [c00000000070ccf4] strnlen_user+0x74/0x240 >> [ 40.573830] LR [c00000000048a460] copy_strings.isra.42+0xb0/0x350 >=20 > So there's definitely IRQMASK=3D0 and no MSR[EE]=3D0 in this frame, which= is=20 > what the warning was. >=20 > I'd say either something hasn't set PACA_IRQ_HARD_DIS properly, so EE=20 > doesn't get enabled when irqs are restored, or maybe the change to > arch_local_irq_restore(). Less likely that the stack got messed up. >=20 > Can you try run with CONFIG_PPC_IRQ_SOFT_MASK_DEBUG=3Dy ? Nevermind, I think I've found the problem. Some code runs in the implicit soft-mask region without expecting to be masked. Working on a fix... Thanks, Nick