Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp244672rwl; Wed, 29 Mar 2023 00:48:25 -0700 (PDT) X-Google-Smtp-Source: AKy350aao0J0JByyAmxWf3OpEOveyFpkBuKyWPXdBNGzHSmEuOdSlvFePIJVpHuhL02oN+XLMWLz X-Received: by 2002:a05:6402:430f:b0:500:58cb:3afd with SMTP id m15-20020a056402430f00b0050058cb3afdmr1212805edc.3.1680076104746; Wed, 29 Mar 2023 00:48:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680076104; cv=none; d=google.com; s=arc-20160816; b=nKe5puld54eNCU5ZK9R45QLP6B4kUhUerPYxzn5zcNx50MYnVzWp/bB8d1k/1RV38+ 5VloowFX/nzDmGwLyEiGb68X8DSNR1DbQL4tCan3vUWWI9xzRjrrh2q3LUoKWcEQ7UhS 4oYn0SBm7tfMKhyWhFXCAyl4NaVCuNunIbxzAmpEX1tUlZrOErmTdRqZCZacg7d8IjqN xSUq1EDzhap+jPRSHv/45gK9EqKJGv88AIHMpNpyYnqPGKIkRd3oDIjwImx6vgqvtdzh AWnzw1qRSAuYpA2yfH9ZMxEAP39Vg0H3yLXnUtaDOSsn4HDkC/WoZU9zX8dVSakhiH9q 7gVQ== 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=Tb//YDVUmszU3HNKDs7zRNHGdvp2WswWGNo1xYLl49k=; b=oiDNNQLs7xWMW5cMf/RprL/A5/Ctu3YKRceZSBoV3cfTt2Voe5xkFiHubku7pWKGYj 6FKtYqS65by4vw2b6KvkNnHMNoFEKDD5mD7UAqZK8imtgNZZX7n3TyDAXrzbDLghb5Ss xq4b3RSU+i1JSbqeCVC2I30PmU5UcGq0WxV1GlSuCvflYzIMY8A/Hr7RphWz+wyd+hJ2 BOkl6iwhs+1e5lusjR5s0ZQB3sgheNiLJPbHwlJ+IBvlH4FzUvfA4qirOPOb2eUKzR0P gY6Upea7FHsYQXgYyvGPnlL6Al3ZCv2yWdfmT9GJamoWZzKo6y6NB0KoxEkvnNfUalRH H3/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=btxz4X7m; 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 b1-20020aa7c6c1000000b005024c85f879si4842536eds.481.2023.03.29.00.48.00; Wed, 29 Mar 2023 00:48:24 -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=btxz4X7m; 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 S230201AbjC2HiM (ORCPT + 99 others); Wed, 29 Mar 2023 03:38:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230081AbjC2Hhq (ORCPT ); Wed, 29 Mar 2023 03:37:46 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 563874ED3 for ; Wed, 29 Mar 2023 00:35:39 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id o32so8294329wms.1 for ; Wed, 29 Mar 2023 00:35:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1680075338; 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=Tb//YDVUmszU3HNKDs7zRNHGdvp2WswWGNo1xYLl49k=; b=btxz4X7mi144ytdCdyjcDvmeXuljdwVW3fU5zn5YfnfuTrHFrI+p6APnH4mRMnN7SC 8gctq+qrbaNiJ0PhVwg+SGjTLLeZ1tZDUUAso30YkbYvhEJO8GDJdQdf/Y3Z0fO947vX 6UXc9gLGoAeiF556Aiom0/yK5s+mW6aL1mfOqzrhart9Qbk+Ku/0lQUBviTA7uDz6P5C nkgd0KYXSGFDea2fvcqaL9yReEXgZ5xLBzawZeejqbD0FRITVhrUcRFym+V5CSjteEtU Ycom5LOgeyf1toe6pAEVEgbI0JvJOUgvwkjZFzBkIhMcA7JqYHaAIl2bg/OtG2hsf/Fu fRPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680075338; 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=Tb//YDVUmszU3HNKDs7zRNHGdvp2WswWGNo1xYLl49k=; b=vd8HJBTJCQ5TdKhNpRAxUhY3qntRLbGd9muvQ45VHP+uZNX/5rb/ncwdoRQu+6L/2i Z5FxVtX9MSa1lS4wLmMZwRKhL0q8dARvnn8ol4qNDzwpRg7UdCkY9GebX+g78cC3gkiD qQB4NIPGRe2C3kZa2YVGfb1w75WpFn6veCm+7RakI+aGR92YZyd3LPPvnOWYTju7yB0+ D5oFWao0S6kJK+6T+ZdH8qDzYoPZCKA5aLLRWMys2FAmO0FEQyAx+jk5za2YOjSLk8fe 56bdQ3X4C9ZvUrDrsQPaPz46x/qRQIQjsFH6HB00EwVq8L52Lf2w8PPi/5b7i9Jf1/Z7 6ABw== X-Gm-Message-State: AAQBX9e2adslIBnWY9OUs1rFSEkRG1cOfZyJan3ysL0fwG+6Y/OAEM+m 5CCxpzHUjfwpbRG58AUd5gkS239zLjfUhTfs4quIdw== X-Received: by 2002:a7b:cb8c:0:b0:3ef:6dfc:916d with SMTP id m12-20020a7bcb8c000000b003ef6dfc916dmr2410999wmi.7.1680075337829; Wed, 29 Mar 2023 00:35:37 -0700 (PDT) MIME-Version: 1.0 References: <20230327115642.1610-1-cuiyunhui@bytedance.com> <747a3382-17e7-4167-a1bb-30a9482be4d1@spud> In-Reply-To: <747a3382-17e7-4167-a1bb-30a9482be4d1@spud> From: =?UTF-8?B?6L+Q6L6J5bSU?= Date: Wed, 29 Mar 2023 15:35:26 +0800 Message-ID: Subject: Re: [External] Re: [PATCH] riscv/fault: Dump user opcode bytes on fatal faults To: Conor Dooley Cc: Conor Dooley , 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 2:25=E2=80=AFPM Conor Dooley wrote: > > Right, I'm trying to figure out of this is another bug in the kernel - > if you don't have "fd" in riscv,isa in your devicetree then, even if > CONFIG_FPU is set, none of the FPU code is meant to run, right? yeah, CONFIG_FPU is set. In the problem I encountered, the init to be executed in user mode contained floating-point instructions, which caused an exception. > What would be nice to have is what the new show_opcodes() function will > look like ;) After printing the contents of __show_regs(), this line will continue to be printed: Opcode: 53 80 02 f0 It is not just the problem I encountered. When the process exits unexpected, we all want to know what the instruction that caused the process exception is. Thanks, Yunhui