mirror_zfs/module/os/linux/spl
наб 7de4c88b39 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-04-15 14:55:43 -07:00
..
Makefile.in Add zfs_file_* interface, remove vnodes 2019-11-21 09:32:57 -08:00
README.md Replace ZFS on Linux references with OpenZFS 2020-10-08 20:10:13 -07:00
spl-atomic.c Replace ZFS on Linux references with OpenZFS 2020-10-08 20:10:13 -07:00
spl-condvar.c Replace ZFS on Linux references with OpenZFS 2020-10-08 20:10:13 -07:00
spl-cred.c Replace ZFS on Linux references with OpenZFS 2020-10-08 20:10:13 -07:00
spl-err.c Replace ZFS on Linux references with OpenZFS 2020-10-08 20:10:13 -07:00
spl-generic.c cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
spl-kmem-cache.c Replace ZFS on Linux references with OpenZFS 2020-10-08 20:10:13 -07:00
spl-kmem.c kmem_alloc(KM_SLEEP) should use kvmalloc() 2021-04-06 12:44:54 -07:00
spl-kstat.c cppcheck: return value always 0 2021-01-26 16:12:18 -08:00
spl-proc.c linux/spl: base proc_dohostid() on proc_dostring() 2021-04-15 14:55:43 -07:00
spl-procfs-list.c Fix buggy procfs_list_seq_next warning 2020-09-30 13:27:51 -07:00
spl-taskq.c cppcheck: remove redundant ASSERTs 2021-01-26 16:12:10 -08:00
spl-thread.c Add SIGSTOP and SIGTSTP handling to issig 2021-04-15 13:34:35 -07:00
spl-trace.c Add tracepoints for taskq entry lifetime events 2019-11-01 13:14:54 -07:00
spl-tsd.c Replace ZFS on Linux references with OpenZFS 2020-10-08 20:10:13 -07:00
spl-vmem.c Replace ZFS on Linux references with OpenZFS 2020-10-08 20:10:13 -07:00
spl-xdr.c Replace ZFS on Linux references with OpenZFS 2020-10-08 20:10:13 -07:00
spl-zlib.c Replace ZFS on Linux references with OpenZFS 2020-10-08 20:10:13 -07:00
THIRDPARTYLICENSE.gplv2 OpenZFS restructuring - move platform specific sources 2019-09-06 11:26:26 -07:00
THIRDPARTYLICENSE.gplv2.descrip OpenZFS restructuring - move platform specific sources 2019-09-06 11:26:26 -07:00

The Solaris Porting Layer, SPL, is a Linux kernel module which provides a compatibility layer used by the OpenZFS project.

Installation

The latest version of the SPL is maintained as part of this repository. Only when building ZFS version 0.7.x or earlier must an external SPL release be used. These releases can be found at:

Release

The SPL is released under a GPLv2 license.
For more details see the NOTICE and THIRDPARTYLICENSE files; UCRL-CODE-235197