nvme-fabrics: bound reconnect_delay, kato and fast_io_fail_tmo
Status from this message: Thanks, applied to nvme-7.4.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest3 patches 5 repliesApplied
- v12 patches 2 repliesSuperseded
Changes in v2 from the cover letter
- Add patch 3/3 bounding fast_io_fail_tmo, which is the same "seconds * HZ" overflow class and was unbounded in both the parser and the sysfs store (spotted by Laurence Oberman).
- 2/3: reword the changelog to drop the inaccurate "1000 >= HZ" claim; the bound is safe because kato is unsigned, so "kato * HZ" cannot wrap even where HZ > 1000 (noted by Laurence Oberman). No code change.
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | nvme-fabrics: bound reconnect_delay to avoid overflowdrivers/ drivers/ | +2 | 1 reply | |
| 2/3 | nvme-fabrics: bound keep_alive_tmo to avoid overflowdrivers/ | +1 | 1 reply | |
| 3/3 | nvme-fabrics: bound fast_io_fail_tmo to avoid overflowdrivers/ drivers/ | +7 | 1 reply |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Laurence Oberman | Christoph Hellwig |
|---|---|---|
| Series | R-b | |
| 1/3 | R-b | R-b |
| 2/3 | R-b | R-b |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/3] nvme-fabrics: bound reconnect_delay, kato and fast_io_fail_tmo
reconnect_delay, keep_alive_tmo (kato) and fast_io_fail_tmo are accepted in seconds but later multiplied by HZ (and, for kato, by 1000) in 32-bit arithmetic, so large values overflow and yield bogus timers. Bound all three at parse/store time so the conversions can't wrap.
The target already does this for kato via NVMET_MAX_KATO, and the host recently fixed the same class for admin_timeout/io_timeout (4a5aeebf1a00) and partly for reconnect_delay (f92fe8dea19c).
Changes since v1:
- Add patch 3/3 bounding fast_io_fail_tmo, which is the same "seconds * HZ" overflow class and was unbounded in both the parser and the sysfs store (spotted by Laurence Oberman).
- 2/3: reword the changelog to drop the inaccurate "1000 >= HZ" claim; the bound is safe because kato is unsigned, so "kato * HZ" cannot wrap even where HZ > 1000 (noted by Laurence Oberman). No code change.
Martin George (3):
nvme-fabrics: bound reconnect_delay to avoid overflow
nvme-fabrics: bound keep_alive_tmo to avoid overflow
nvme-fabrics: bound fast_io_fail_tmo to avoid overflow
drivers/nvme/host/fabrics.c | 10 +++++++--- drivers/nvme/host/sysfs.c | 4 +++- 2 files changed, 10 insertions(+), 4 deletions(-)
Signature · 1 line
2.53.0