Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp185815rwi; Wed, 19 Oct 2022 19:41:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6HDKpEE0L5g2eU7We8wj2vw9+ELgx7O43WfdDFLjlqRI+ad5bQHl7PXbM5MspAfB6ge2sZ X-Received: by 2002:a17:902:9a49:b0:17a:6662:9334 with SMTP id x9-20020a1709029a4900b0017a66629334mr11328105plv.63.1666233677589; Wed, 19 Oct 2022 19:41:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666233677; cv=none; d=google.com; s=arc-20160816; b=MMre+ka1WPgm+4p4YEV3gtMpnsbxR+IhPwJitXMDHB+UKS0p/1zpV0QDzZ2RIj3yJB i//BckOuYgYTiV4B0LIjf3pTt1PlL0d7wa+iNSDc4+Nldl66/B03uL0GU9xgCh2LQI+s I+mu1ESjcb1Vxe/6ECddVTxczfnniF/pYaIxX13peNr9Owb2cqX+NOohBuTubfkrZcCx RI1FnTVBUXzRLUR0kqKztAqf3afU5sMXSiYWF/gd69bLHUh7PM45LKqwjAQeC2j1OnD2 pPsHina83Hb2S0fJkaG8TPCL+ZQc34ggLmmHBkoRtrq8yt4jIGg4Kp+oIRKu/qJI4pFT RQ+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=tlhJpcYqzpW+XvYddHGFqXZzCN9vW0VKQa9LCHCuiG4=; b=oLP44kJvRY0LLG7V1qC3FuMGten6L/y4+q/Y6jXgTAdhJWZNMuN8aToYq3l7N1M+pd eYWC4t1M127HSBVCNgIMKe6K6AjmOhNKYsGdTlIEOLWYsGHmMNDXnLVSaFQlTCRhm94O OMr29VnfZQYUS3s6AdHS8LaDCpe4qThAwLLyuCTLQ8E5LLrJim1LAu12TwDK83BBljtg 1QXtDCwB78jZuovN8/rSs+d1G1hPudGZnBHniiKlwVajo4BxjS3EdnVrUh6JBjCgjmrF cVY1fUimriZN8Qy/IZPKXV4ku0fwDuESDAiObtFdrKvkp7KzXSLDKd7knrk7h3LBpmwk GkJQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ip7-20020a17090b314700b00200b6023910si2319339pjb.2.2022.10.19.19.41.05; Wed, 19 Oct 2022 19:41:17 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231528AbiJTBwt (ORCPT + 99 others); Wed, 19 Oct 2022 21:52:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230397AbiJTBwq (ORCPT ); Wed, 19 Oct 2022 21:52:46 -0400 Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1947E16EA39; Wed, 19 Oct 2022 18:52:43 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R941e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046051;MF=xianting.tian@linux.alibaba.com;NM=1;PH=DS;RN=24;SR=0;TI=SMTPD_---0VScdp8u_1666230756; Received: from 30.221.97.125(mailfrom:xianting.tian@linux.alibaba.com fp:SMTPD_---0VScdp8u_1666230756) by smtp.aliyun-inc.com; Thu, 20 Oct 2022 09:52:38 +0800 Message-ID: <5fa1f75a-1641-771e-3670-2d8978c99d2a@linux.alibaba.com> Date: Thu, 20 Oct 2022 09:52:36 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH V3 1/2] RISC-V: Add arch_crash_save_vmcoreinfo support To: =?UTF-8?B?SEFHSU8gS0FaVUhJVE8o6JCp5bC+IOS4gOS7gSk=?= , Baoquan He , lijiang Cc: "paul.walmsley@sifive.com" , "palmer@dabbelt.com" , "aou@eecs.berkeley.edu" , "anup@brainfault.org" , "heiko@sntech.de" , "guoren@kernel.org" , "mick@ics.forth.gr" , "alexandre.ghiti@canonical.com" , "vgoyal@redhat.com" , "dyoung@redhat.com" , "corbet@lwn.net" , "Conor.Dooley@microchip.com" , "bagasdotme@gmail.com" , "kexec@lists.infradead.org" , "linux-doc@vger.kernel.org" , "linux-riscv@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "crash-utility@redhat.com" , "heinrich.schuchardt@canonical.com" , "hschauhan@nulltrace.org" , "yixun.lan@gmail.com" References: <20221018081755.6214-1-xianting.tian@linux.alibaba.com> <20221018081755.6214-2-xianting.tian@linux.alibaba.com> <049ec19e-60c3-2854-5f5e-9850231108b4@linux.alibaba.com> <0f0a77a9-c824-8aa4-77de-a75c2139d791@nec.com> <811bdf09-be38-ce2a-a1d3-ada9f7c85b97@linux.alibaba.com> <52023285-172a-97cc-bad4-4ab4e709885c@nec.com> From: Xianting Tian In-Reply-To: <52023285-172a-97cc-bad4-4ab4e709885c@nec.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham 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 在 2022/10/20 上午9:35, HAGIO KAZUHITO(萩尾 一仁) 写道: > On 2022/10/19 12:17, Xianting Tian wrote: > >>>>>>>> +    if (IS_ENABLED(CONFIG_64BIT)) { >>>>>>>> +#ifdef CONFIG_KASAN >>>>>>>> +        vmcoreinfo_append_str("NUMBER(KASAN_SHADOW_START)=0x%lx\n", KASAN_SHADOW_START); >>>>>>>> +        vmcoreinfo_append_str("NUMBER(KASAN_SHADOW_END)=0x%lx\n", KASAN_SHADOW_END); >>>>>>>> +#endif >>>>>>>> +        vmcoreinfo_append_str("NUMBER(KERNEL_LINK_ADDR)=0x%lx\n", KERNEL_LINK_ADDR); >>>>>>>> +        vmcoreinfo_append_str("NUMBER(ADDRESS_SPACE_END)=0x%lx\n", ADDRESS_SPACE_END); >>>>>>> Seems this is the firsr ARCH where kasan and kernel link/bpf space are >>>>>>> added to dump and analyze. Just curious, have you got code change to >>>>>>> make use of them to do dumping and analyze? >>>>>> KASAN_SHADOW_START is not used, KERNEL_LINK_ADDR is used in the crash patch set: >>>>>> https://patchwork.kernel.org/project/linux-riscv/cover/20220813031753.3097720-1-xianting.tian@linux.alibaba.com/ >>>>> Oh, I would say please no. Sometime we got tons of objection when adding an >>>>> necessary one, we definitely should not add one for possible future >>>>> use. >>>>> >>>>> For this kind of newly added one, we need get ack from >>>>> makedumpfile/crash utility maintainer so that we know they are necessary >>>>> to have. At least they don't oppose. >>>> Hi Kazu, Li Jiang >>>> >>>> Could you help comment whether we need KASAN_SHADOW_START and KERNEL_LINK_ADDR area export for vmcore from crash point of view? >>>> >>>> In my crash patch set, I don't use KASAN_SHADOW_START, >>>> And only get the value of KERNEL_LINK_ADDR, not realy use it. >>>> https://patchwork.kernel.org/project/linux-riscv/cover/20220813031753.3097720-1-xianting.tian@linux.alibaba.com/ >>> In your crash patch set, KERNEL_LINK_ADDR is used in VTOP() and looks >>> necessary to me. >>> >>> The others (KASAN_SHADOW_START, KASAN_SHADOW_END and ADDRESS_SPACE_END) >>> are not currently used.  It may be better to add them when they are >>> really used. >> I am very sorry, I missed it , KERNEL_LINK_ADDR is used indeed. >> >> KASAN_SHADOW_START is not used, so I don't need to send crash patch set> again. only need to remove KASAN_SHADOW_END in kernel patch set. > I see that your v4 kernel patch set does not have ADDRESS_SPACE_END, > so it seems there would be need to change this part and related ones > at crash side. > > if ((string = pc->read_vmcoreinfo("NUMBER(ADDRESS_SPACE_END)"))) { > ms->address_space_end = htol(string, QUIET, NULL); > free(string); > } else > goto error; > ... > error: > error(FATAL, "cannot get vm layout\n"); thanks, I just send V4 of crash patch set, the issue is also fixed in V4. > > Thanks, > Kazu