[Bug 1942991] Re: zfs: can't read /proc/sys/kernel/spl/hostid

2021-09-28 Thread Launchpad Bug Tracker
This bug was fixed in the package zfs-linux - 2.0.2-1ubuntu5.2

---
zfs-linux (2.0.2-1ubuntu5.2) hirsute; urgency=medium

  * Fix /proc/sys/kernel/spl/hostid (LP: #1942991)
   - 4750-linux-spl-base-proc_dohostid-on-proc_dostring.patch

 -- Colin Ian King   Tue, 7 Sep 2021 19:08:23
+0100

** Changed in: zfs-linux (Ubuntu Hirsute)
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1942991

Title:
  zfs: can't read /proc/sys/kernel/spl/hostid

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1942991/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1942991] Re: zfs: can't read /proc/sys/kernel/spl/hostid

2021-09-28 Thread Colin Ian King
** Tags added: verification-done verification-done-hirsute

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1942991

Title:
  zfs: can't read /proc/sys/kernel/spl/hostid

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1942991/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1942991] Re: zfs: can't read /proc/sys/kernel/spl/hostid

2021-09-15 Thread Colin Ian King
Tested on Hirsute with version 2.0.2-1ubuntu5.2:

$ cat /proc/sys/kernel/spl/hostid
22559a3d

All working and tested fine.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1942991

Title:
  zfs: can't read /proc/sys/kernel/spl/hostid

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1942991/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1942991] Re: zfs: can't read /proc/sys/kernel/spl/hostid

2021-09-14 Thread Brian Murray
Hello Colin, or anyone else affected,

Accepted zfs-linux into hirsute-proposed. The package will build now and
be available at https://launchpad.net/ubuntu/+source/zfs-
linux/2.0.2-1ubuntu5.2 in a few hours, and then in the -proposed
repository.

Please help us by testing this new package.  See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed.  Your feedback will aid us getting this
update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, what testing has been
performed on the package and change the tag from verification-needed-
hirsute to verification-done-hirsute. If it does not fix the bug for
you, please add a comment stating that, and change the tag to
verification-failed-hirsute. In either case, without details of your
testing we will not be able to proceed.

Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification .  Thank you in
advance for helping!

N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.

** Changed in: zfs-linux (Ubuntu Hirsute)
   Status: In Progress => Fix Committed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1942991

Title:
  zfs: can't read /proc/sys/kernel/spl/hostid

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1942991/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1942991] Re: zfs: can't read /proc/sys/kernel/spl/hostid

2021-09-14 Thread Colin Ian King
The issue is that reading the interface provides a weird kernel looking
error on an invalid address and the fact that the kernel is trapping
this and shoving a kernel error message into a proc text file looks
plain bad and can concern users who read these files.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1942991

Title:
  zfs: can't read /proc/sys/kernel/spl/hostid

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1942991/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1942991] Re: zfs: can't read /proc/sys/kernel/spl/hostid

2021-09-14 Thread Brian Murray
Given what you've said in the description about this being a legacy
interface and the number of users affected being very small what is
motivating the SRU?  Given that zfs-linux binary packages are seeded and
widely installed does it make sense to force everyone to update?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1942991

Title:
  zfs: can't read /proc/sys/kernel/spl/hostid

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1942991/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1942991] Re: zfs: can't read /proc/sys/kernel/spl/hostid

2021-09-08 Thread Launchpad Bug Tracker
This bug was fixed in the package zfs-linux - 2.0.3-8ubuntu8

---
zfs-linux (2.0.3-8ubuntu8) impish; urgency=medium

  * Fix /proc/sys/kernel/spl/hostid (LP: #1942991)
   - 4750-linux-spl-base-proc_dohostid-on-proc_dostring.patch
  * Fix build issues with latest tool updates:
   - 4751-suppress-regex_t.patch
  * Move 470* patches to debian/ubuntu

 -- Colin Ian King   Tue, 7 Sep 2021 19:08:23
+0100

** Changed in: zfs-linux (Ubuntu Impish)
   Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1942991

Title:
  zfs: can't read /proc/sys/kernel/spl/hostid

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1942991/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1942991] Re: zfs: can't read /proc/sys/kernel/spl/hostid

2021-09-08 Thread Colin Ian King
** Description changed:

+ [Impact]
  
- Reading  /proc/sys/kernel/spl/hostid no longer works in 5.7+ kernels
+ Reading /proc/sys/kernel/spl/hostid no longer works in 5.7+ kernels
  upwards.
  
  The Fix:
  
  commit 7de4c88b39473f358add601e8c227ca9002b1bee
  Author: наб 
  Date:   Sun Apr 11 01:18:40 2021 +0200
+ linux/spl: base proc_dohostid() on proc_dostring()
  
- 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
  
- 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
  
- 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.
  
- 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
  
- 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 
+ Signed-off-by: Ahelenia Ziemiańska 
+ Closes #11878
+ Closes #11879
  
- Reviewed-by: Brian Behlendorf 
- Signed-off-by: Ahelenia Ziemiańska 
- 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.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1942991

Title:
  zfs: can't read /proc/sys/kernel/spl/hostid

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1942991/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1942991] Re: zfs: can't read /proc/sys/kernel/spl/hostid

2021-09-08 Thread Colin Ian King
** Description changed:

+ 
  Reading  /proc/sys/kernel/spl/hostid no longer works in 5.7+ kernels
  upwards.
  
  The Fix:
  
  commit 7de4c88b39473f358add601e8c227ca9002b1bee
  Author: наб 
  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 
- Signed-off-by: Ahelenia Ziemiańska 
- Closes #11878
- Closes #11879
+ 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 
+ Signed-off-by: Ahelenia Ziemiańska 
+ Closes #11878
+ Closes #11879

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1942991

Title:
  zfs: can't read /proc/sys/kernel/spl/hostid

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1942991/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1942991] Re: zfs: can't read /proc/sys/kernel/spl/hostid

2021-09-08 Thread Colin Ian King
** Also affects: zfs-linux (Ubuntu Impish)
   Importance: Medium
 Assignee: Colin Ian King (colin-king)
   Status: In Progress

** Also affects: zfs-linux (Ubuntu Hirsute)
   Importance: Undecided
   Status: New

** Changed in: zfs-linux (Ubuntu Hirsute)
 Assignee: (unassigned) => Colin Ian King (colin-king)

** Changed in: zfs-linux (Ubuntu Hirsute)
   Status: New => In Progress

** Changed in: zfs-linux (Ubuntu Hirsute)
   Importance: Undecided => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1942991

Title:
  zfs: can't read /proc/sys/kernel/spl/hostid

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1942991/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs