Activity log for bug #1942991

Date Who What changed Old value New value Message
2021-09-08 06:53:53 Colin Ian King bug added bug
2021-09-08 06:53:58 Colin Ian King zfs-linux (Ubuntu): importance Undecided Medium
2021-09-08 06:54:01 Colin Ian King zfs-linux (Ubuntu): status New In Progress
2021-09-08 06:54:03 Colin Ian King zfs-linux (Ubuntu): assignee Colin Ian King (colin-king)
2021-09-08 09:24:17 Colin Ian King nominated for series Ubuntu Impish
2021-09-08 09:24:17 Colin Ian King bug task added zfs-linux (Ubuntu Impish)
2021-09-08 09:24:17 Colin Ian King nominated for series Ubuntu Hirsute
2021-09-08 09:24:17 Colin Ian King bug task added zfs-linux (Ubuntu Hirsute)
2021-09-08 09:24:28 Colin Ian King zfs-linux (Ubuntu Hirsute): assignee Colin Ian King (colin-king)
2021-09-08 09:24:32 Colin Ian King zfs-linux (Ubuntu Hirsute): status New In Progress
2021-09-08 09:24:34 Colin Ian King zfs-linux (Ubuntu Hirsute): importance Undecided Medium
2021-09-08 10:09:42 Colin Ian King description Reading /proc/sys/kernel/spl/hostid no longer works in 5.7+ kernels upwards. The Fix: commit 7de4c88b39473f358add601e8c227ca9002b1bee Author: наб <nabijaczleweli@nabijaczleweli.xyz> Date: Sun Apr 11 01:18:40 2021 +0200 linux/spl: base proc_dohostid() on proc_dostring() This fixes /proc/sys/kernel/spl/hostid on kernels with mainline commit 32927393dc1ccd60fb2bdc05b9e8e88753761469 ("sysctl: pass kernel pointers to ->proc_handler") ‒ 5.7-rc1 and up The access_ok() check in copy_to_user() in proc_copyout_string() would always fail, so all userspace reads and writes would fail with EINVAL proc_dostring() strips only the final new-line, but simple_strtoul() doesn't actually need a back-trimmed string ‒ writing "012345678 \n" is still allowed, as is "012345678zupsko", &c. This alters what happens when an invalid value is written ‒ previously it'd get set to what-ever simple_strtoul() returned (probably 0, thereby resetting it to default), now it does nothing Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #11878 Closes #11879 Reading /proc/sys/kernel/spl/hostid no longer works in 5.7+ kernels upwards. The Fix: commit 7de4c88b39473f358add601e8c227ca9002b1bee Author: наб <nabijaczleweli@nabijaczleweli.xyz> Date: Sun Apr 11 01:18:40 2021 +0200     linux/spl: base proc_dohostid() on proc_dostring()     This fixes /proc/sys/kernel/spl/hostid on kernels with mainline commit     32927393dc1ccd60fb2bdc05b9e8e88753761469 ("sysctl: pass kernel pointers     to ->proc_handler") ‒ 5.7-rc1 and up     The access_ok() check in copy_to_user() in proc_copyout_string() would     always fail, so all userspace reads and writes would fail with EINVAL     proc_dostring() strips only the final new-line,     but simple_strtoul() doesn't actually need a back-trimmed string ‒     writing "012345678 \n" is still allowed, as is "012345678zupsko", &c.     This alters what happens when an invalid value is written ‒     previously it'd get set to what-ever simple_strtoul() returned     (probably 0, thereby resetting it to default), now it does nothing     Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>     Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>     Closes #11878     Closes #11879
2021-09-08 10:17:22 Colin Ian King description Reading /proc/sys/kernel/spl/hostid no longer works in 5.7+ kernels upwards. The Fix: commit 7de4c88b39473f358add601e8c227ca9002b1bee Author: наб <nabijaczleweli@nabijaczleweli.xyz> Date: Sun Apr 11 01:18:40 2021 +0200     linux/spl: base proc_dohostid() on proc_dostring()     This fixes /proc/sys/kernel/spl/hostid on kernels with mainline commit     32927393dc1ccd60fb2bdc05b9e8e88753761469 ("sysctl: pass kernel pointers     to ->proc_handler") ‒ 5.7-rc1 and up     The access_ok() check in copy_to_user() in proc_copyout_string() would     always fail, so all userspace reads and writes would fail with EINVAL     proc_dostring() strips only the final new-line,     but simple_strtoul() doesn't actually need a back-trimmed string ‒     writing "012345678 \n" is still allowed, as is "012345678zupsko", &c.     This alters what happens when an invalid value is written ‒     previously it'd get set to what-ever simple_strtoul() returned     (probably 0, thereby resetting it to default), now it does nothing     Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>     Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>     Closes #11878     Closes #11879 [Impact] Reading /proc/sys/kernel/spl/hostid no longer works in 5.7+ kernels upwards. The Fix: commit 7de4c88b39473f358add601e8c227ca9002b1bee Author: наб <nabijaczleweli@nabijaczleweli.xyz> Date: Sun Apr 11 01:18:40 2021 +0200 linux/spl: base proc_dohostid() on proc_dostring() This fixes /proc/sys/kernel/spl/hostid on kernels with mainline commit 32927393dc1ccd60fb2bdc05b9e8e88753761469 ("sysctl: pass kernel pointers to ->proc_handler") ‒ 5.7-rc1 and up The access_ok() check in copy_to_user() in proc_copyout_string() would always fail, so all userspace reads and writes would fail with EINVAL proc_dostring() strips only the final new-line, but simple_strtoul() doesn't actually need a back-trimmed string ‒ writing "012345678 \n" is still allowed, as is "012345678zupsko", &c. This alters what happens when an invalid value is written ‒ previously it'd get set to what-ever simple_strtoul() returned (probably 0, thereby resetting it to default), now it does nothing Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #11878 Closes #11879 This applies cleanly for Impish and Hirsute 2.x ZFS so backporting is straight forward. [Test Plan] cat /proc/sys/kernel/spl/hostid fails without the fix. With the fix it returns a hex string of the hostid value. [Where problems could occur] This affects just a few /proc spl interfaces so the change is a low-impact fix. Not many folk even use these and nobody has reported this as a bug so the number of affected users is expected to be very small. I suspect nobody is reading the hostid from /proc as this information is available elsewhere and it's rather an old legacy interface. The affected change is from upstream ZFS 2.x hence the patch applies cleanly. This fix has been in upstream ZFS for several months with no reported regressions. The change does not affect any core ZFS functionality. Regression tested against the Ubuntu ZFS regression test suite and passed.
2021-09-08 14:07:25 Colin Ian King bug added subscriber Ubuntu Stable Release Updates Team
2021-09-08 14:12:28 Launchpad Janitor zfs-linux (Ubuntu Impish): status In Progress Fix Released
2021-09-14 18:10:40 Brian Murray zfs-linux (Ubuntu Hirsute): status In Progress Fix Committed
2021-09-14 18:10:43 Brian Murray bug added subscriber SRU Verification
2021-09-14 18:12:19 Brian Murray removed subscriber Brian Murray
2021-09-28 11:24:52 Colin Ian King tags verification-done verification-done-hirsute
2021-09-28 19:08:10 Launchpad Janitor zfs-linux (Ubuntu Hirsute): status Fix Committed Fix Released
2021-09-28 19:08:18 Brian Murray removed subscriber Ubuntu Stable Release Updates Team