<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"MS ゴシック";
        panose-1:2 11 6 9 7 2 5 8 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:"MS Pゴシック";
        panose-1:2 11 6 0 7 2 5 8 2 4;}
@font-face
        {font-family:"\@MS ゴシック";
        panose-1:2 11 6 9 7 2 5 8 2 4;}
@font-face
        {font-family:"\@MS Pゴシック";
        panose-1:2 11 6 0 7 2 5 8 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0mm;
        font-size:12.0pt;
        font-family:"MS Pゴシック";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.19
        {mso-style-type:personal-compose;
        font-family:"Arial",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Arial",sans-serif;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:99.25pt 30.0mm 30.0mm 30.0mm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026">
<v:textbox inset="5.85pt,.7pt,5.85pt,.7pt" />
</o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="JA" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Arial",sans-serif">Hi Lianbo,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Arial",sans-serif">>I would recommend packing them into two patches as below:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Arial",sans-serif">>BTW: If there is a better way, you could rearrange them when merging. Thanks.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Arial",sans-serif">>And with the warning fix, otherwise:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Arial",sans-serif">Thank you for your review. I will send a new patch with these fixes.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Arial",sans-serif">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Arial",sans-serif">Shogo Matsumoto<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0mm 0mm 0mm 4.0pt">
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">Thank you for the patch, <span style="color:black">Shogo.</span><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">On Thu, Feb 10, 2022 at 4:25 PM <<a href="mailto:crash-utility-request@redhat.com">crash-utility-request@redhat.com</a>> wrote:<o:p></o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0mm 0mm 0mm 6.0pt;margin-left:4.8pt;margin-right:0mm">
<p class="MsoNormal"><span lang="EN-US">Date: Thu, 10 Feb 2022 06:38:32 +0000<br>
From: HAGIO KAZUHITO(?????)     <<a href="mailto:k-hagio-ab@nec.com" target="_blank">k-hagio-ab@nec.com</a>><br>
To: "<a href="mailto:shogo.matsumoto@fujitsu.com" target="_blank">shogo.matsumoto@fujitsu.com</a>" <<a href="mailto:shogo.matsumoto@fujitsu.com" target="_blank">shogo.matsumoto@fujitsu.com</a>><br>
Cc: "Discussion list for crash utility usage,   maintenance and<br>
        development" <<a href="mailto:crash-utility@redhat.com" target="_blank">crash-utility@redhat.com</a>><br>
Subject: Re: [Crash-utility] [PATCH v3 0/7] log: output logs of printk<br>
        safe buffers<br>
Message-ID:<br>
        <<a href="mailto:TYYPR01MB6777FE775F5CD6438FC2E448DD2F9@TYYPR01MB6777.jpnprd01.prod.outlook.com" target="_blank">TYYPR01MB6777FE775F5CD6438FC2E448DD2F9@TYYPR01MB6777.jpnprd01.prod.outlook.com</a>><br>
<br>
Content-Type: text/plain; charset="iso-2022-jp"<br>
<br>
<br>
-----Original Message-----<br>
> This patch set introduces -s option for log builtin command to display<br>
> printk safe buffers (safe_print_seq/nmi_print_seq) as follows:<br>
> <br>
> ===<br>
> crash> log -s<br>
> PRINTK_SAFE_SEQ_BUF: nmi_print_seq<br>
> CPU: 0  ADDR: ffff969d7bc19ce0 LEN: 150  MESSAGE_LOST: 0<br>
>   Uhhuh. NMI received for unknown reason 20 on CPU 0.<br>
>   Do you have a strange power saving mode enabled?<br>
>   Dazed and confused, but trying to continue<br>
>   ...<br>
> ===<br>
> <br>
> The printk safe buffers are also displayed at the bottom of<br>
> 'log' output so as not to overlook them.<br>
> <br>
> ===<br>
> crash> log<br>
> ...<br>
> [nmi_print_seq] Uhhuh. NMI received for unknown reason 20 on CPU 0.<br>
> [nmi_print_seq] Do you have a strange power saving mode enabled?<br>
> [nmi_print_seq] Dazed and confused, but trying to continue<br>
> ===<br>
> <br>
> -m and -t options are also supported.<br>
> <br>
> Note that the safe buffer (struct printk_safe_seq_buf) was introduced<br>
> in kernel-4.11 (Merge commit 7d91de74436a69c2b78a7a72f1e7f97f8b4396fa)<br>
> and removed in kernel-5.15 (93d102f094be9beab28e5afb656c188b16a3793b).<br>
> <br>
> Changes since v2:<br>
> - Add support new options -s, -t, -m (Kazu)<br>
> - Add help text (Kazu)<br>
<br>
Thank you for the update.<br>
<br>
Maybe I will join the patches into two or three and the following warning <br>
is emitted, so I will adjust a little when merging, but otherwise the<o:p></o:p></span></p>
</blockquote>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">I would recommend packing them into two patches as below:<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span lang="EN-US">[PATCH v3 1/7] log: introduce -s option<br>
[PATCH v3 2/7] log: adjust indent and line breaks for log -s<br>
[PATCH v3 3/7] log: append printk safe buffer output to 'log'<br>
[PATCH v3 6/7] symbols: add support 'help -o' for printk safe buffers<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US">[PATCH v3 7/7] log: add help text for printk safe buffers<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">Another one:<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span lang="EN-US">[PATCH v3 4/7] log: add support -t option for output of printk safe buffers<br>
[PATCH v3 5/7] log: add support -m for output of printk safe buffers<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">BTW: If there is a better way, you could rearrange them when merging. Thanks.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">And with the warning fix, otherwise:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">Acked-by: Lianbo Jiang <<a href="mailto:lijiang@redhat.com">lijiang@redhat.com</a>><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0mm 0mm 0mm 6.0pt;margin-left:4.8pt;margin-right:0mm">
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-US">patchset and the output of the commands look nice to me!<br>
<br>
Acked-by: Kazuhito Hagio <<a href="mailto:k-hagio-ab@nec.com" target="_blank">k-hagio-ab@nec.com</a>><br>
<br>
<br>
$ make clean ; make warn<br>
...<br>
cc -c -g -DX86_64 -DLZO -DSNAPPY -DGDB_10_2  kernel.c -Wall -O2 -Wstrict-prototypes -Wmissing-prototypes -fstack-protector -Wformat-security
<br>
kernel.c: In function ?__dump_printk_safe_seq_buf?:<br>
kernel.c:11623:7: warning: format not a string literal and no format arguments [-Wformat-security]<br>
       fprintf(fp, space(PRINTK_SAFE_SEQ_BUF_INDENT));<br>
       ^~~~~~~<br>
<br>
Will add "%s".<br>
<br>
Thanks,<br>
Kazu<br>
<br>
> <br>
> [v1]: <a href="https://listman.redhat.com/archives/crash-utility/2021-December/msg00031.html" target="_blank">
https://listman.redhat.com/archives/crash-utility/2021-December/msg00031.html</a><br>
> [v2]: <a href="https://listman.redhat.com/archives/crash-utility/2022-January/msg00004.html" target="_blank">
https://listman.redhat.com/archives/crash-utility/2022-January/msg00004.html</a><br>
> <br>
> Test program is attached in the above v2 patch e-mail.<br>
> <br>
> Shogo Matsumoto (7):<br>
>   log: introduce -s option<br>
>   log: adjust indent and line breaks for log -s<br>
>   log: append printk safe buffer output to 'log'<br>
>   log: add support -t option for output of printk safe buffers<br>
>   log: add support -m for output of printk safe buffers<br>
>   symbols: add support 'help -o' for printk safe buffers<br>
>   log: add help text for printk safe buffers<br>
> <br>
>  defs.h    |   5 ++<br>
>  help.c    |  25 ++++++++-<br>
>  kernel.c  | 159 +++++++++++++++++++++++++++++++++++++++++++++++++++++-<br>
>  symbols.c |   5 ++<br>
>  4 files changed, 192 insertions(+), 2 deletions(-)<br>
> <br>
> --<br>
> 2.29.2<br>
> <br>
> <br>
> --<br>
> Crash-utility mailing list<br>
> <a href="mailto:Crash-utility@redhat.com" target="_blank">Crash-utility@redhat.com</a><br>
> <a href="https://listman.redhat.com/mailman/listinfo/crash-utility" target="_blank">
https://listman.redhat.com/mailman/listinfo/crash-utility</a><br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Thu, 10 Feb 2022 08:21:52 +0000<br>
From: HAGIO KAZUHITO(?????)     <<a href="mailto:k-hagio-ab@nec.com" target="_blank">k-hagio-ab@nec.com</a>><br>
To: "Discussion list for crash utility usage,   maintenance and<br>
        development"    <<a href="mailto:crash-utility@redhat.com" target="_blank">crash-utility@redhat.com</a>><br>
Cc: "<a href="mailto:zwang@amperecomputing.com" target="_blank">zwang@amperecomputing.com</a>" <<a href="mailto:zwang@amperecomputing.com" target="_blank">zwang@amperecomputing.com</a>>,<br>
        "<a href="mailto:patches@amperecomputing.com" target="_blank">patches@amperecomputing.com</a>" <<a href="mailto:patches@amperecomputing.com" target="_blank">patches@amperecomputing.com</a>>,<br>
        "<a href="mailto:lijiang@redhat.com" target="_blank">lijiang@redhat.com</a>" <<a href="mailto:lijiang@redhat.com" target="_blank">lijiang@redhat.com</a>>,<br>
        "<a href="mailto:darren@os.amperecomputing.com" target="_blank">darren@os.amperecomputing.com</a>" <<a href="mailto:darren@os.amperecomputing.com" target="_blank">darren@os.amperecomputing.com</a>><br>
Subject: Re: [Crash-utility] [PATCH] arm64: Use CONFIG_ARM64_VA_BITS<br>
        to      initialize VA_BITS_ACTUAL<br>
Message-ID:<br>
        <<a href="mailto:TYYPR01MB6777479D629CD1F2A18A7A6DDD2F9@TYYPR01MB6777.jpnprd01.prod.outlook.com" target="_blank">TYYPR01MB6777479D629CD1F2A18A7A6DDD2F9@TYYPR01MB6777.jpnprd01.prod.outlook.com</a>><br>
<br>
Content-Type: text/plain; charset="iso-2022-jp"<br>
<br>
Hi Huang,<br>
<br>
thanks for the patch.<br>
<br>
-----Original Message-----<br>
> For DISKDUMP case, we can get VA_BITS_ACTUAL from CONFIG_ARM64_VA_BITS.<br>
<br>
I could not understand this, there is a case where CONFIG_ARM64_VA_BITS<br>
is different from VA_BITS_ACTUAL and why is this only for DISKDUMP case?<br>
<br>
If the patch intends to guess the value of VA_BITS_ACTUAL to be the same as<br>
CONFIG_ARM64_VA_BITS when no NUMBER(TCR_EL1_T1SZ), I think that DISKDUMP<br>
check is not needed and it would be better to write such a commit log and<br>
a comment e.g. "/* guess */" on the else if block.<br>
<br>
Thanks,<br>
Kazu<br>
<br>
> Without this patch, we may have to use "--machdep vabits_actual=48" to<br>
> set the VA_BITS_ACTUAL.<br>
> <br>
> Signed-off-by: Huang Shijie <<a href="mailto:shijie@os.amperecomputing.com" target="_blank">shijie@os.amperecomputing.com</a>><br>
> ---<br>
>  arm64.c | 6 ++++++<br>
>  1 file changed, 6 insertions(+)<br>
> <br>
> diff --git a/arm64.c b/arm64.c<br>
> index 4f2c2b5..2b3ec02 100644<br>
> --- a/arm64.c<br>
> +++ b/arm64.c<br>
> @@ -4170,6 +4170,12 @@ arm64_calc_VA_BITS(void)<br>
>                       } else if (machdep->machspec->VA_BITS_ACTUAL) {<br>
>                               machdep->machspec->VA_BITS = machdep->machspec->VA_BITS_ACTUAL;<br>
>                               machdep->machspec->VA_START = _VA_START(machdep->machspec->VA_BITS_ACTUAL);<br>
> +                     } else if (pc->flags & DISKDUMP) {<br>
> +                             if (machdep->machspec->CONFIG_ARM64_VA_BITS) {<br>
> +                                     machdep->machspec->VA_BITS_ACTUAL =<br>
> machdep->machspec->CONFIG_ARM64_VA_BITS;<br>
> +                                     machdep->machspec->VA_BITS =<br>
> machdep->machspec->CONFIG_ARM64_VA_BITS;<br>
> +                                     machdep->machspec->VA_START =<br>
> _VA_START(machdep->machspec->VA_BITS_ACTUAL);<br>
> +                             }<br>
>                       } else<br>
>                               error(FATAL, "cannot determine VA_BITS_ACTUAL\n");<br>
>               }<br>
> --<br>
> 2.30.2<br>
> <br>
> <br>
> --<br>
> Crash-utility mailing list<br>
> <a href="mailto:Crash-utility@redhat.com" target="_blank">Crash-utility@redhat.com</a><br>
> <a href="https://listman.redhat.com/mailman/listinfo/crash-utility" target="_blank">
https://listman.redhat.com/mailman/listinfo/crash-utility</a><br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
--<br>
Crash-utility mailing list<br>
<a href="mailto:Crash-utility@redhat.com" target="_blank">Crash-utility@redhat.com</a><br>
<a href="https://listman.redhat.com/mailman/listinfo/crash-utility" target="_blank">https://listman.redhat.com/mailman/listinfo/crash-utility</a><br>
<br>
End of Crash-utility Digest, Vol 197, Issue 7<br>
*********************************************<o:p></o:p></span></p>
</blockquote>
</div>
</div>
</div>
</div>
</body>
</html>