From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: Alexander Ivanov <alexander.ivanov@virtuozzo.com>, den@openvz.org
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1] dm-ploop: fix u32 overflow of the delta BAT byte size
Date: Thu, 29 Oct 2026 11:35:03 +0100 [thread overview]
Message-ID: <1a99e1d8-cf91-41a6-ae38-01478bfc025f@virtuozzo.com> (raw)
In-Reply-To: <20261009142316.801288-1-alexander.ivanov@virtuozzo.com>
Applied with two small changes on commit, no need to resend.
1. Added
Fixes: 6ddad5a4d226 ("dm-ploop: Add ploop target driver")
2. Changed the message of the new check in ploop_resize(). After the
patch the function prints the same text from two different checks:
} else if (SEC_TO_CLU(ploop, new_sectors) >= U32_MAX - 2) {
DMWARN("resize: too large size is requested");
return -EINVAL;
...
nr_bat_entries = SEC_TO_CLU(ploop, new_sectors);
nr_bat_clusters = ploop_nr_bat_clusters(ploop, nr_bat_entries);
if ((u64)nr_bat_clusters + nr_bat_entries > PLOOP_MAX_HB_NR) {
DMWARN("resize: too large size is requested");
return -EINVAL;
}
Both checks are needed: the first one runs on sector_t and guards the
u32 truncation of nr_bat_entries, the second one bounds hb_nr. But with
the same text the log does not tell which one fired, and the first check
looks redundant next to the second one. So the new check now says what
does not fit, matching "Too large BAT" in ploop_setup_metadata():
DMWARN("resize: too large BAT");
--
Best regards,
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-10-29 10:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-09 14:23 Alexander Ivanov
2026-10-09 14:28 ` no-reply
2026-10-25 21:55 ` Andrey Zhadchenko
2026-10-29 10:35 ` Konstantin Khorenko [this message]
2026-10-29 10:40 ` Konstantin Khorenko
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=1a99e1d8-cf91-41a6-ae38-01478bfc025f@virtuozzo.com \
--to=khorenko@virtuozzo.com \
--cc=alexander.ivanov@virtuozzo.com \
--cc=den@openvz.org \
--cc=devel@openvz.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 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.