mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yazen Ghannam <yazen.ghannam@amd.com>
To: Borislav Petkov <bp@alien8.de>
Cc: yazen.ghannam@amd.com, x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/amd_nb: Check for invalid SMN reads
Date: Wed, 10 May 2023 09:56:14 -0400	[thread overview]
Message-ID: <af23151e-e781-f220-c9de-36d16fb14f45@amd.com> (raw)
In-Reply-To: <20230510113553.GAZFuBmZbhAFkbqm1a@fat_crate.local>

On 5/10/23 7:35 AM, Borislav Petkov wrote:
> On Wed, Apr 05, 2023 at 03:10:09PM -0400, Yazen Ghannam wrote:
>> What do you think?
> 
> Yes, please put that as a comment over __amd_smn_rw() as to why callers
> should check the retval *and* make both the read and the write
> __must_check and get rid of
> 
>         if (err)
>                 pr_warn("Error %s SMN address 0x%x.\n",
>                         (write ? "writing to" : "reading from"), address);
> 
> which won't be seen in all cases. The __must_check will force the
> callers to do the proper checking which is the only sane thing to do
> with such a variety of bit behaviors.
>

Understood, will do.

Thanks,
Yazen

  reply	other threads:[~2023-05-10 13:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-03 16:42 Yazen Ghannam
2023-04-03 19:32 ` Borislav Petkov
2023-04-03 19:40   ` Yazen Ghannam
2023-04-03 20:36     ` Borislav Petkov
2023-04-03 21:36       ` Yazen Ghannam
2023-04-05 18:06         ` Borislav Petkov
2023-04-05 18:32           ` Yazen Ghannam
2023-04-05 19:10             ` Yazen Ghannam
2023-05-08 22:01               ` Yazen Ghannam
2023-05-10 11:35               ` Borislav Petkov
2023-05-10 13:56                 ` Yazen Ghannam [this message]
2024-06-05 19:40 ` [tip: x86/urgent] " tip-bot2 for Yazen Ghannam

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=af23151e-e781-f220-c9de-36d16fb14f45@amd.com \
    --to=yazen.ghannam@amd.com \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®