Skip to content

fixes for setting values via sysfs interface

Coly Li linux-block 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11bcache: fix input integer overflow of congested thresholddrivers/md/bcache/sysfs.c+6 -40 replies
2/11bcache: fix input overflow to sequential_cutoffdrivers/md/bcache/sysfs.c+3 -10 replies
3/11bcache: add sysfs_strtoul_bool() for setting bit-field variablesdrivers/md/bcache/sysfs.h+10 -00 replies
4/11bcache: use sysfs_strtoul_bool() to set bit-field variablesdrivers/md/bcache/sysfs.c+8 -80 replies
5/11bcache: fix input overflow to writeback_delaydrivers/md/bcache/sysfs.c+1 -10 replies
6/11bcache: fix potential div-zero error of writeback_rate_i_term_inversedrivers/md/bcache/sysfs.c+3 -10 replies
7/11bcache: fix potential div-zero error of writeback_rate_p_term_inversedrivers/md/bcache/sysfs.c+3 -10 replies
8/11bcache: fix input overflow to writeback_rate_minimumdrivers/md/bcache/sysfs.c+3 -10 replies
9/11bcache: fix input overflow to journal_delay_msdrivers/md/bcache/sysfs.c+3 -10 replies
10/11bcache: fix input overflow to cache set io_error_limitdrivers/md/bcache/sysfs.c+1 -20 replies
11/11bcache: fix input overflow to cache set sysfs file io_error_halflifedrivers/md/bcache/sysfs.c+8 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/11] fixes for setting values via sysfs interface

When setting bcache parameters via sysfs interface, current code has potential overflow and results unexpected value got set. Once such condition happens, it is very hard to find out in product environment.

This patch set is an effort to fix such overflow, to avoid further unpected problems.

Coly Li
---
Coly Li (11):
bcache: fix input integer overflow of congested threshold
bcache: fix input overflow to sequential_cutoff
bcache: add sysfs_strtoul_bool() for setting bit-field variables
bcache: use sysfs_strtoul_bool() to set bit-field variables
bcache: fix input overflow to writeback_delay
bcache: fix potential div-zero error of writeback_rate_i_term_inverse
bcache: fix potential div-zero error of writeback_rate_p_term_inverse
bcache: fix input overflow to writeback_rate_minimum
bcache: fix input overflow to journal_delay_ms
bcache: fix input overflow to cache set io_error_limit
bcache: fix input overflow to cache set sysfs file io_error_halflife

 drivers/md/bcache/sysfs.c | 61 ++++++++++++++++++++++++++++++-----------------
 drivers/md/bcache/sysfs.h | 10 ++++++++
 2 files changed, 49 insertions(+), 22 deletions(-)
Signature · 1 line
2.16.4