freebsd-skq/sys
Ryan Moeller 69534635ff MFOpenZFS: ZVOLs should not be allowed to have children
zfs create, receive and rename can bypass this hierarchy rule. Update
both userland and kernel module to prevent this issue and use pyzfs
unit tests to exercise the ioctls directly.

Note: this commit slightly changes zfs_ioc_create() ABI. This allow to
differentiate a generic error (EINVAL) from the specific case where we
tried to create a dataset below a ZVOL (ZFS_ERR_WRONG_PARENT).

Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Reviewed-by: Matt Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tom Caputi <tcaputi@datto.com>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>

Approved by:	mav (mentor)
MFC after:	2 weeks
Sponsored by:	iXsystems, Inc.
openzfs/zfs@d8d418ff0c
2020-03-25 15:56:18 +00:00
..
amd64 [PowerPC][Book-E] Fix missing load base in elf_cpu_parse_dynamic(). 2020-03-18 02:58:18 +00:00
arm arm: Fix atomic long APIs to correct 'u_long' signedness 2020-03-23 23:00:13 +00:00
arm64 Remove the secondary_stacks array in arm64 and riscv kernels. 2020-03-24 18:43:23 +00:00
bsm vfs: add realpathat syscall 2020-02-20 16:58:19 +00:00
cam sys/cam: remove doubled ;s 2020-03-20 16:15:45 +00:00
cddl MFOpenZFS: ZVOLs should not be allowed to have children 2020-03-25 15:56:18 +00:00
compat Implement a workaround for kms-drm modules 2020-03-20 15:07:25 +00:00
conf Fix newvers.sh on macOS 10.15 2020-03-23 17:51:44 +00:00
contrib Fix misleading indentation warning in OCTEON1 kernel 2020-03-17 11:59:45 +00:00
crypto Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
ddb Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
dev ichwd: Add Atom C3000 watchdog ID. 2020-03-24 21:28:48 +00:00
dts arm: zynq: An SPI driver for Zynq platforms 2020-02-28 10:57:23 +00:00
fs Mark procfs-based process debugging as deprecated for FreeBSD 13. 2020-03-17 18:44:03 +00:00
gdb Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
geom Use the newer EINTEGRITY error when authentication fails. 2020-03-23 21:26:32 +00:00
gnu dts: Update our copy for arm, arm64 and riscv dts to Linux 5.5 2020-02-28 15:42:51 +00:00
i386 retire cx,ctau drivers 2020-03-20 16:50:19 +00:00
isa sc(4) md bits: stop setting sc->kbd entirely 2019-12-30 02:07:55 +00:00
kern kern_copy_file_range(): check the file type. 2020-03-24 17:16:52 +00:00
kgssapi
libkern Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
mips Use a GCC-compatile compiler flag in files.xlp 2020-03-22 22:18:06 +00:00
modules Introduce LINUXKPI_GENSRCS. 2020-03-20 21:06:58 +00:00
net Fix PNP matching for iflib NIC drivers 2020-03-24 19:20:10 +00:00
net80211 Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (7 of many) 2020-02-21 16:32:17 +00:00
netgraph Fix spelling of "dropped". 2020-03-04 22:32:40 +00:00
netinet Revert https://svnweb.freebsd.org/changeset/base/357829 2020-03-25 15:29:01 +00:00
netinet6 Fix synchronization in the IPV6_2292PKTOPTIONS set handler. 2020-03-19 21:38:52 +00:00
netipsec Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
netpfil Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
netsmb Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
nfs Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
nfsclient
nfsserver
nlm Remove stale FreeBSD_version checks. 2020-03-01 23:01:37 +00:00
ofed Fix for double unlock in ipoib. 2020-03-16 12:33:57 +00:00
opencrypto Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
powerpc [PowerPC] fix panic reading /dev/kmem on !DMAP machines 2020-03-20 11:51:08 +00:00
riscv Remove the secondary_stacks array in arm64 and riscv kernels. 2020-03-24 18:43:23 +00:00
rpc Remove obsolete old-freebsd version compat shim. 2020-03-01 23:01:51 +00:00
security In r358471, we interrupted the case block that would eventually lead 2020-03-03 01:46:35 +00:00
sys Bump for kyua import. 2020-03-23 19:28:24 +00:00
teken
tests Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
tools vfs: stop null checking routines in vop wrappers 2020-01-26 00:41:38 +00:00
ufs When mounting a UFS filesystem, return EINTEGRITY rather than EIO 2020-03-11 21:00:40 +00:00
vm Check for busy or wired in vm_page_relookup(). Some callers will only keep 2020-03-11 22:25:45 +00:00
x86 Do not spuriously re-enable disabled io_apic pin on EOI for some configurations. 2020-03-18 21:34:52 +00:00
xdr typo: s/impelmentation/implementation/. 2020-02-07 15:14:29 +00:00
xen Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (16 of many) 2020-02-25 19:04:39 +00:00
Makefile Remove sparc64 kernel support 2020-02-03 17:35:11 +00:00