From: Tejun Heo <tj@kernel.org>
To: Breno Leitao <leitao@debian.org>
Cc: Josef Bacik <josef@toxicpanda.com>, Jens Axboe <axboe@kernel.dk>,
leit@meta.com,
"open list:CONTROL GROUP - BLOCK IO CONTROLLER (BLKIO)"
<cgroups@vger.kernel.org>,
"open list:CONTROL GROUP - BLOCK IO CONTROLLER (BLKIO)"
<linux-block@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] blk-iocost: Fix shift-out-of-bounds in iocg_kick_delay()
Date: Wed, 10 Apr 2024 09:53:52 -1000 [thread overview]
Message-ID: <ZhbuUKXQwBwye1_r@slm.duckdns.org> (raw)
In-Reply-To: <20240410193642.1303741-1-leitao@debian.org>
Hello, Breno.
On Wed, Apr 10, 2024 at 12:36:41PM -0700, Breno Leitao wrote:
> When running iocg_kick_delay(), iocg->delay_at could be way behind "now",
> which causes a huge tdelta difference.
>
> The tdelta value is used to shift some bits around, raising the
> following UBSAN splat:
>
> UBSAN: shift-out-of-bounds in block/blk-iocost.c:1366:23
>
> Debugging this, these are some values I got in my machine with 6.9-rc3.
>
> now = 3626064295
> iocg->delay_at = 3275794093
>
> Fix this by validating that the shift if valid, otherwise bail out,
> similarly to commit 2a427b49d029 ("blk-iocost: Fix an UBSAN
> shift-out-of-bounds warning")
Rik alreaady sent a fix:
http://lkml.kernel.org/r/20240404123253.0f58010f@imladris.surriel.com
which got commited as beaa51b36012fad5a4d3c18b88a617aea7a9b96d.
Thanks.
--
tejun
next prev parent reply other threads:[~2024-04-10 19:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-10 19:36 Breno Leitao
2024-04-10 19:53 ` Tejun Heo [this message]
2024-04-11 13:33 ` Breno Leitao
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=ZhbuUKXQwBwye1_r@slm.duckdns.org \
--to=tj@kernel.org \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=josef@toxicpanda.com \
--cc=leit@meta.com \
--cc=leitao@debian.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.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®