All of lore.kernel.org
 help / color / mirror / Atom feed
From: Koba Ko <koba.ko@canonical.com>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: linux-edac@vger.kernel.org, kernel-janitors@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	Borislav Petkov <bp@alien8.de>, James Morse <james.morse@arm.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Robert Richter <rric@kernel.org>, Tony Luck <tony.luck@intel.com>
Subject: Re: [PATCH v2] EDAC/i10nm: shift exponent is negative
Date: Tue, 4 Jul 2023 16:05:41 +0800	[thread overview]
Message-ID: <CAJB-X+Wu-Zd6pCrK54aR9iaeS7PW2VmwB+Y+Qeci7Ut0YcdsRg@mail.gmail.com> (raw)
In-Reply-To: <9c27530e-21f9-15ce-5116-5af5b0c25f53@web.de>

On Tue, Jul 4, 2023 at 3:16 PM Markus Elfring <Markus.Elfring@web.de> wrote:
>
> > As per suggestions, i modified V3.
> > could you please take a look
> >
> > Subject: [PATCH][V3] EDAC/i10nm: shift exponent is negative
>
> Would you like to put the text “[PATCH v4] EDAC/i10nm: Fix an inappropriate shift exponent”
> into a subsequent patch?

I didn't send V3 so the suggestions could be put in V3.

>
> I would find further wording variants nicer.
>
>
> > Because failed to read from DIMM, get the negative value for shift
> > operation.
>
> A surprising value was determined after a read failure from a DIMM.
>
>
> …
> > UBSAN complains this error
>
> Software analyses pointed a data processing issue out.
>
>
> > `UBSAN: shift-out-of-bounds in drivers/edac/skx_common.c:369:16
> >  shift exponent -66 is negative`
> >
> > when get rows, cols and ranks, the returned error value doesn't be
> > handled.
>
> A special value combination could not be handled so far.
>
>
> > check the return value is EINVAL, if yes, directly return 0 and
> > show error message explicitly.
>
> Check if an invalid value was detected by a call of the function “skx_get_dimm_attr”.
>
> * Print a corresponding error message in this case.
>
> * Return zero then directly from the function “skx_get_dimm_info”.
>
>
> …
> @@ -351,6 +351,8 @@ int skx_get_dimm_info(u32 mtr, u32 mcmtr, u32 amap, struct dimm_info *dimm,
>         ranks = numrank(mtr);
>         rows = numrow(mtr);
>         cols = imc->hbm_mc ? 6 : numcol(mtr);
> +       if (ranks == -EINVAL || rows == -EINVAL || cols == -EINVAL)
> +               return 0;
> …
>
>
> Can it be nicer to perform a check for such an error code directly
> after each variable assignment?
> (May this condition check be split?)
>
>
> > Fixes: 4ec656bdf43a13) EDAC, skx_edac: Add EDAC driver for Skylake
>
> Please properly apply parentheses and double quotes for this tag.
>
> See also:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.4#n145
>
>
> > V2 -> V3: simplify the summary and add 'Fixes:'
> > V1 -> V2: make error-print explicitly
>
> How do you think about to use more succinct version identifiers
> for such descriptions?
>
> V4:
> …
>
> V3:
> …
>
>
> Regards,
> Markus

  parent reply	other threads:[~2023-07-04  8:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-03 16:25 [PATCH][V2] EDAC/i10nm: shift exponent is negative Koba Ko
     [not found] ` <4ec2b7d2-11a5-6ab6-087a-175ed31faca4@web.de>
2023-07-03 21:51   ` [PATCH v2] " Luck, Tony
2023-07-04  1:50     ` Koba Ko
2023-07-04  3:14       ` Luck, Tony
2023-07-05  4:08       ` Luck, Tony
2023-07-05  8:45         ` Koba Ko
2023-07-05 15:22           ` Luck, Tony
2023-07-06 14:11             ` Zhuo, Qiuxu
2023-07-06 17:40               ` Koba Ko
2023-07-07  3:34                 ` Zhuo, Qiuxu
2023-07-09 15:42                   ` Koba Ko
2023-07-10  1:18                     ` Zhuo, Qiuxu
2023-07-10  6:25                     ` Dan Carpenter
2023-07-10  8:08                       ` Zhuo, Qiuxu
2023-07-04  2:20     ` Koba Ko
2023-07-04  4:59       ` Koba Ko
     [not found]         ` <9c27530e-21f9-15ce-5116-5af5b0c25f53@web.de>
2023-07-04  8:05           ` Koba Ko [this message]
2023-07-04  8:17           ` Koba Ko
     [not found]             ` <706f49e8-d536-651a-2f19-394518633b53@web.de>
2023-07-04  8:59               ` [v2/v3] " Koba Ko
2023-07-04 12:02 ` [PATCH][V2] " Dan Carpenter
2023-07-04 12:32   ` Koba Ko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJB-X+Wu-Zd6pCrK54aR9iaeS7PW2VmwB+Y+Qeci7Ut0YcdsRg@mail.gmail.com \
    --to=koba.ko@canonical.com \
    --cc=Markus.Elfring@web.de \
    --cc=bp@alien8.de \
    --cc=james.morse@arm.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=rric@kernel.org \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.