From: Alviro Iskandar Setiawan <[email protected]>
To: Greg Kroah-Hartman <[email protected]>
Cc: Ammar Faizi <[email protected]>,
Pavel Begunkov <[email protected]>,
Jens Axboe <[email protected]>,
Dan Carpenter <[email protected]>,
kernel test robot <[email protected]>,
"Chen Rong A." <[email protected]>,
[email protected],
io-uring Mailing list <[email protected]>,
"GNU/Weeb Mailing List" <[email protected]>
Subject: Re: FAILED: patch "[PATCH] io_uring: Clean up a false-positive warning from GCC 9.3.0" failed to apply to 5.10-stable tree
Date: Sun, 22 Jan 2023 22:43:24 +0700 [thread overview]
Message-ID: <CAOG64qO=iZZO-PJjmeYO5wKHAxn3ATDyj6g=FA_tx3WNAMBvug@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
On Sun, Jan 22, 2023 at 9:44 PM <[email protected]> wrote:
> The patch below does not apply to the 5.10-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <[email protected]>.
That uninitialized reading is living in 5.10.y branch now
https://github.com/gregkh/linux/blob/v5.10.162/io_uring/io_uring.c#L4989-L5017
If this:
ret = import_single_range(RE AD, buf, sr->len, &iov, &msg.msg_iter);
fails, this one (flags & MSG_WAITALL) may read an uninitialized
variable because @flags is uninitialized.
Fortunately, if import_single_range() fails, (ret < min_ret) is always
true, so this:
ret < min_ret || ((flags & MSG_WAITALL)
will always short circuit. But no one tells the compiler if @ret is
always less than @min_ret in that case. So it can't prove that @flags
is never actually read. That still falls to undefined behavior anyway,
the compiler may emit "ud2" or similar trap for that or behave
randomly. IDK...
next parent reply other threads:[~2023-01-22 15:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <[email protected]>
2023-01-22 15:43 ` Alviro Iskandar Setiawan [this message]
2023-01-22 17:47 ` FAILED: patch "[PATCH] io_uring: Clean up a false-positive warning from GCC 9.3.0" failed to apply to 5.10-stable tree Jens Axboe
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='CAOG64qO=iZZO-PJjmeYO5wKHAxn3ATDyj6g=FA_tx3WNAMBvug@mail.gmail.com' \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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