From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Kunbo Zhang <absoler@smail.nju.edu.cn>,
tiwai@suse.de, wsa+renesas@sang-engineering.com,
linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
security@kernel.org
Subject: Re: [PATCH] input: i8042 - fix a double-fetch vulnerability introduced by GCC
Date: Fri, 4 Nov 2022 11:23:17 -0700 [thread overview]
Message-ID: <Y2VYlc8RxOsKxbmm@google.com> (raw)
In-Reply-To: <Y2TtXAW1LhOwlE64@kroah.com>
Hi Greg,
On Fri, Nov 04, 2022 at 11:45:48AM +0100, Greg KH wrote:
> On Fri, Nov 04, 2022 at 03:23:47PM +0800, Kunbo Zhang wrote:
> > As in the source code, the global variable is tested (at line 408) before three assignments of irq_bit, disable_bit and port_name.
> > However, as shown in the following disassembly of i8042_port_close(),
> > the variable (0x0(%rip)) is fetched and tested three times for each
> > assignment of irq_bit, disable_bit and port_name.
>
> There should not be any problem with this as that value does not ever
> change except in rare cases (shutdown or init).
We use this chunk only to establish identity of the port, we do not
expect instances to change while driver operates, so I do not think
there is any concern with re-fetching/re-checking the port while it is
being closed.
Thanks.
--
Dmitry
prev parent reply other threads:[~2022-11-04 18:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-04 7:23 [PATCH] input: i8042 - fix a double-fetch vulnerability introduced by GCC Kunbo Zhang
2022-11-04 8:04 ` Bagas Sanjaya
2022-11-04 10:45 ` Greg KH
2022-11-04 18:23 ` Dmitry Torokhov [this message]
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=Y2VYlc8RxOsKxbmm@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=absoler@smail.nju.edu.cn \
--cc=gregkh@linuxfoundation.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=security@kernel.org \
--cc=tiwai@suse.de \
--cc=wsa+renesas@sang-engineering.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.