Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2539747rdb; Tue, 12 Sep 2023 05:20:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE/XnjlDlvLuIs2nZVwSAT1UyxwJ9Xwe+GGXoMxVS/znN38I8tqcB6tAsw0lY2N7IxFs2Ag X-Received: by 2002:a05:6a00:3082:b0:68f:b72f:9aca with SMTP id bh2-20020a056a00308200b0068fb72f9acamr4911814pfb.27.1694521229699; Tue, 12 Sep 2023 05:20:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694521229; cv=none; d=google.com; s=arc-20160816; b=IGGK++MPv1VXlgCyqzAavoymHhFYTctDwPeuIEauoOjkloFUTvahvbD4C5QCgLrnDe avd58YotKsdB3J1YBREXAYtxzESMHNq+qxSl+3CfKSyEet/hqAHGuMaN5qGQen1ir7VF LawedkP1zGDch1U2s6EtlGcKzdie7r06TOxQzB8B1t9FCJ6ag5IIbGKP82EPuXfmZcZ4 HAB+WAmlkPmvWjJUdLtc4oR8vkLWrd2Cxn4xHn6x0ugu5f3/CrXpUXMtMShrB23PhZnF 1AWs1WZhdrNt4RHAzP/jBMIa8A/1q1le1SVU3G9s0dQK8hAuBX8oOEaF+ezNCXld6FBu qlTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:to:from :dkim-signature; bh=YfLekqafCzCD3kBVMjuJUSE9xr5hH+bRRmelf6KYXEQ=; fh=yjbh9gUaNgNgYvZSPOPRcjJp8tgoSwljfnB6dXm5sIs=; b=vD6K0+PBoSK28W7SwpC3Xf9yYVdmWAi3glNg70OtjLzOdqXQHxxBcaMMDIpGBonbQY RwpgJPRIeFeyeCJO7nZ2y3G4f0VaFQAt+uiQSZaz1Tn7zHaCgvcxls4+JlRAAkxDKUs4 tHfkG2V6GyLdyIkeP7SY1BgSnCIbijosbhgpBNP6DfJDWgeZZV3lFmwkFH7L8fL3XUQ0 de3mgnxJVflszwlJqY9ie4tC78BH1KP9DA90Jk1u40H6B4/VQk43CGK9oEGwr2q7/TG/ T+8kKOTjFh0yThpYNXtpAfnC0QNj5AYDNeOhzCz972i2YAikiTe6ThN720fwi/kuCdCM Pkgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Tw4X9uOi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id w6-20020a056a0014c600b0068fbace5bfcsi4291694pfu.149.2023.09.12.05.20.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 05:20:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Tw4X9uOi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 6630081F35B1; Tue, 12 Sep 2023 05:13:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234845AbjILMNz (ORCPT + 99 others); Tue, 12 Sep 2023 08:13:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234998AbjILMNs (ORCPT ); Tue, 12 Sep 2023 08:13:48 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27B0310D2 for ; Tue, 12 Sep 2023 05:13:44 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 28082C433C8; Tue, 12 Sep 2023 12:13:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694520823; bh=7jAMJX8m5mBzicQzcKiFy5A5RvULyRKUPRv33QhrqT8=; h=From:To:Subject:In-Reply-To:References:Date:From; b=Tw4X9uOip7ayv+vbb7p/Qq+GkFp0FY3Mq+fPr+FTvm27n0fUZO5Zv/ve6W1BKuqfA UqcvRyM4Y5dwoJYw9zoQFIFwKVWEtddvvhPFGP2B8h8p4lgxeaZaQp26iue1edlo9I 7dqNkv1TXu2h5ojnXNBfAohOQwgMsqDwUdivWxVFE2goZ84s5kMNsU1geHGxavAXFz oBut8WStE8EVCwu8LqOMRMFviXTJObUaW14d0yivHdw97aiLa7bmaVv8gy/G8s0Wy1 GKA8GFT2EC2gDzyBPRRzWUbWoR31eMnR6QeYxphNRNSt3EjHdfMJKebFqD5OXDmAip RqDSmC2IqWi0A== From: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= To: Yunhui Cui , paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, guoren@kernel.org, bjorn@rivosinc.com, conor.dooley@microchip.com, jszhang@kernel.org, andy.chiu@sifive.com, cuiyunhui@bytedance.com, dave.hansen@linux.intel.com, elver@google.com, glider@google.com, cyphar@cyphar.com, kirill.shutemov@linux.intel.com, keescook@chromium.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6] riscv: add userland instruction dump to RISC-V splats In-Reply-To: <20230912021349.28302-1-cuiyunhui@bytedance.com> References: <20230912021349.28302-1-cuiyunhui@bytedance.com> Date: Tue, 12 Sep 2023 14:13:40 +0200 Message-ID: <87jzsvd1xn.fsf@all.your.base.are.belong.to.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 12 Sep 2023 05:13:59 -0700 (PDT) X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, 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 pete.vger.email Yunhui Cui writes: > Add userland instruction dump and rename dump_kernel_instr() > to dump_instr(). > > An example: > [ 0.822439] Freeing unused kernel image (initmem) memory: 6916K > [ 0.823817] Run /init as init process > [ 0.839411] init[1]: unhandled signal 4 code 0x1 at 0x000000000005be18= in bb[10000+5fb000] > [ 0.840751] CPU: 0 PID: 1 Comm: init Not tainted 5.14.0-rc4-00049-gbd6= 44290aa72-dirty #187 > [ 0.841373] Hardware name: , BIOS > [ 0.841743] epc : 000000000005be18 ra : 0000000000079e74 sp : 0000003f= ffcafda0 > [ 0.842271] gp : ffffffff816e9dc8 tp : 0000000000000000 t0 : 00000000= 00000000 > [ 0.842947] t1 : 0000003fffc9fdf0 t2 : 0000000000000000 s0 : 00000000= 00000000 > [ 0.843434] s1 : 0000000000000000 a0 : 0000003fffca0190 a1 : 0000003f= ffcafe18 > [ 0.843891] a2 : 0000000000000000 a3 : 0000000000000000 a4 : 00000000= 00000000 > [ 0.844357] a5 : 0000000000000000 a6 : 0000000000000000 a7 : 00000000= 00000000 > [ 0.844803] s2 : 0000000000000000 s3 : 0000000000000000 s4 : 00000000= 00000000 > [ 0.845253] s5 : 0000000000000000 s6 : 0000000000000000 s7 : 00000000= 00000000 > [ 0.845722] s8 : 0000000000000000 s9 : 0000000000000000 s10: 00000000= 00000000 > [ 0.846180] s11: 0000000000d144e0 t3 : 0000000000000000 t4 : 00000000= 00000000 > [ 0.846616] t5 : 0000000000000000 t6 : 0000000000000000 > [ 0.847204] status: 0000000200000020 badaddr: 00000000f0028053 cause: = 0000000000000002 > [ 0.848219] Code: f06f ff5f 3823 fa11 0113 fb01 2e23 0201 0293 0000 (8= 053) f002 > [ 0.851016] Kernel panic - not syncing: Attempted to kill init! exitco= de=3D0x00000004 > > Signed-off-by: Yunhui Cui Reviewed-by: Bj=C3=B6rn T=C3=B6pel