Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp61090rwl; Tue, 28 Mar 2023 20:56:23 -0700 (PDT) X-Google-Smtp-Source: AKy350ZJs4cVUC4zSqihh/6nbwSDshFb/NuoAlUOhveeP8hAUX9gDsbmbpVVpdqKVRaw+LseePbe X-Received: by 2002:a05:6402:34c7:b0:500:2a9d:1870 with SMTP id w7-20020a05640234c700b005002a9d1870mr882528edc.13.1680062183432; Tue, 28 Mar 2023 20:56:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680062183; cv=none; d=google.com; s=arc-20160816; b=efCmMT6bvSxl+/UefantWFT6wqsPglgnNknB+/ICGS2vxS8VFil6ZsHE6bbOnb4CJX bWQ5Fu6VczYGPfocyeCJJcLwPB2ZXOa2dr9EzgWLlmLsHwoWtiIqV1onkwQlLk2kbK6A +pNpDEFvdbrIsTgaFhbJIJJqpTshX/GSDikZS6xOGNQhD8OD76ZPiMU3ZZHdQxBWhfd2 1FJNjvammpJtVEd2SPE6RIG2mtET9LQa+dARIQNLOrORMBQhEYHaHCopJ08KSndEOuTY PM0PKgfgRQ7xVrKiSxnQEystxWuCU5i6EFpQ2M5DOHa66ZQ6/wZKISEKnnc0+fef35ZC fhng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=sxGaqLyKO1TN0pSBe4xZ3Bl0DqqI6clzZtcK/yjTF7U=; b=TlnJtCp7F5HhuIMy4/rIa3AhPYAOtg2FrmzrZWNeS29m3/hxnUjQ7/kw030wtFhnLY WvfFh12liyvdYCFw5rS0ydHb+Zkx9ngV9ghrEiCW2oDnkCogj7YrYpa0SNzmVIjzt6zj RzyKint7fvUOjnBmYKiycCC2cFLXYtNlFq+UPyNIUs/7jTGD4c7c408BNNRqadgRRUHO x3xEcGrjixk6CzFE/vh6A2t4z8ZR6dtjbgI8c8/EKGNLozkcWjLY9pEVg+wMYYgt4eIr N94YJy3P3NTtJ/0IsOiOFldL8e7GxFYYhROF3t2/H3LM9bZV2r8Ow4of0EF2OpJqLMRb GLmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=Bg6O58r7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ca18-20020aa7cd72000000b004c149276875si29632349edb.301.2023.03.28.20.55.57; Tue, 28 Mar 2023 20:56:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=Bg6O58r7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229669AbjC2DxC (ORCPT + 99 others); Tue, 28 Mar 2023 23:53:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbjC2DxA (ORCPT ); Tue, 28 Mar 2023 23:53:00 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C928D30F5 for ; Tue, 28 Mar 2023 20:52:33 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id j24so14277013wrd.0 for ; Tue, 28 Mar 2023 20:52:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1680061952; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=sxGaqLyKO1TN0pSBe4xZ3Bl0DqqI6clzZtcK/yjTF7U=; b=Bg6O58r7hoxolYUP1MmFER3k3jKGZGxL4khw0OL6OElNmfbPi6G/IugpY79p8r2NQC Ix0IOyILyuOfKT8r1+tse0+BW5VOKD3SofIWK50yyjF1ywrvY8OcMsjZ8LXGGn2AQuKh 7PgD69LIPjUrG1SS98FPfbhCpqqodi2fWRwda0BvQ70uKepeVqvqSxDUOdSTc49Qt0mf sQYFY1V+gHsec7OuksjC6rBWNtM0Yv89y6wXTFkKW/X31UHnJOHoi95A7mFLwjmzBhWp EoMUvqJGe8dyTgmuAi9r3TxKdWq7eW85N2jRTDGnaqKvkfD+Fw1fofX8OYvMvh3I5WvZ ME4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680061952; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sxGaqLyKO1TN0pSBe4xZ3Bl0DqqI6clzZtcK/yjTF7U=; b=L1okUIUTelEwRpR9X6RDAW1Y2/CVMWok1M3dfrFEqewpEwIST1wmmFFGOBHCR58kIv ho1ejJuFwQ8Elvfta3SWxEW1+RbDfHRe5HQvJf7cQb1cBKtTeLdcPFYl87WMzoE7kHpe flgS83MLklZFmo3DdWnTqqxbllAqCxJY14jepdosunU5EYJZu3oMUHm6We618c60rZ/7 X6fNiqF3ZuhjqbS66/oeU8/0La1I99Nyyu+MeCuOb/4oXTf5AKo6r6zMJRbW/18KBBeh Ve9VDt9yUB26psMqvoCgZiDyeyv5xZ01saACwog3NkL6jvBLHBzWxTo5SDn9hSq53WFs NATA== X-Gm-Message-State: AAQBX9fUoVRur7cn+MxYrfg03Q4j8y3ohzfPoRlHU8LreTMV31FDhvss kOdjuRlxulGrVSyNsvaS9K9BcZT5a4NAJcxIVLK0XLzbLLImTjbc2a0= X-Received: by 2002:adf:db4b:0:b0:2ce:ac97:6f51 with SMTP id f11-20020adfdb4b000000b002ceac976f51mr2959523wrj.13.1680061952265; Tue, 28 Mar 2023 20:52:32 -0700 (PDT) MIME-Version: 1.0 References: <20230327115642.1610-1-cuiyunhui@bytedance.com> In-Reply-To: From: =?UTF-8?B?6L+Q6L6J5bSU?= Date: Wed, 29 Mar 2023 11:52:21 +0800 Message-ID: Subject: Re: [External] Re: [PATCH] riscv/fault: Dump user opcode bytes on fatal faults To: Conor Dooley Cc: paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Conor, On Wed, Mar 29, 2023 at 1:03=E2=80=AFAM Conor Dooley wro= te: > riscv/fault: Dump user opcode bytes on fatal faults > > I think you can drop the /fault, we don't usually use prefixes that like > for RISC-V. > ok, i'll update it on v2 > > In this way, we found the problem: in the system bringup , it is > > precisely that we have not enabled the floating point function. > > What do you mean by that "have not enabled the floating point function"? The related cpu feature(COMPAT_HWCAP_ISA_F) is not enabled in the riscv_fill_hwcap function interface. > > So when an exception occurs, it is necessary to dump the instruction > > that caused the exception, like x86/fault (ba54d856a9d8). > > That's not the usual format for referring to commits, checkpatch should > complain about that. ok, i'll update it on v2. > > > > Logs: > > [ 0.822481] Run /init as init process > > [ 0.837569] init[1]: unhandled signal 4 code 0x1 at 0x000000000005e0= 28 in bb[10000+5fe000] > > [ 0.932292] CPU: 0 PID: 1 Comm: init Not tainted 5.14.0-rc4-00048-g4= a843c9043e8-dirty #138 > > 5.14-rc4?, oof! Need to get yourself onto a released, LTS kernel I > think! Just a print,v6.3-rc1 also has this problem. > > Anyway, this patch doesn't apply to either riscv/for-next, riscv/fixes > or v6.3-rc1. What is the appropriate base to apply this patch? ok, i'll update it on v2. > > [ 0.936073] s2 : 0000000000000000 s3 : 0000000000000000 s4 : 000000= 0000000000 > > [ 0.936495] s5 : 0000000000000000 s6 : 0000000000000000 s7 : 000000= 0000000000 > > [ 0.936947] s8 : 0000000000000000 s9 : 0000000000000000 s10: 000000= 0000000000 > > [ 0.937487] s11: 0000000000d14980 t3 : 0000000000000000 t4 : 000000= 0000000000 > > [ 0.937954] t5 : 0000000000000000 t6 : 0000000000000000 > > [ 0.938510] status: 0000000200000020 badaddr: 00000000f0028053 cause= : 0000000000000002 > > I have no idea what the significance of this particular backtrace is, > could you elaborate on what this is demonstrating? (and drop the leading > [###] too as it doesn't exactly add anything! The current call trace does not show the instruction that caused the exception. ok, I'll remove it on v2.