summaryrefslogtreecommitdiffstats
path: root/sys/cddl
Commit message (Collapse)AuthorAgeFilesLines
...
* MFC r305209: MFV r302660: 6314 buffer overflow in dsl_dataset_namemav2016-10-1223-126/+134
| | | | | | | | | | | | | | | | | illumos/illumos-gate@9adfa60d484ce2435f5af77cc99dcd4e692b6660 https://github.com/illumos/illumos-gate/commit/9adfa60d484ce2435f5af77cc99dcd4e6 92b6660 https://www.illumos.org/issues/6314 Callers of dsl_dataset_name pass a buffer of size ZFS_MAXNAMELEN, but dsl_dataset_name copies the datasets' name PLUS the snapshot name to it, resulting in a max of 2 * ZFS_MAXNAMELEN + '@'. Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Prakash Surya <prakash.surya@delphix.com> Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com> Approved by: Dan McDonald <danmcd@omniti.com> Author: Matthew Ahrens <mahrens@delphix.com>
* MFC r305207: MFV r302659: 6931 lib/libzfs: cleanup gcc warningsmav2016-10-111-2/+4
| | | | | | | | | | | | | | | illumos/illumos-gate@88f61dee20b358671b1b643e9d1dbf220a1d69be https://github.com/illumos/illumos-gate/commit/88f61dee20b358671b1b643e9d1dbf220a1d69be https://www.illumos.org/issues/6931 need cleanup: CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-function Reviewed by: Matthew Ahrens <mahrens@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Author: Igor Kozhukhov <ikozhukhov@gmail.com>
* MFC r305200: MFV r302651:mav2016-10-116-122/+197
| | | | | | | | | | | | | | | | | | | 7054 dmu_tx_hold_t should use refcount_t to track space illumos/illumos-gate@0c779ad424a92a84d1e07d47cab7f8009189202b https://github.com/illumos/illumos-gate/commit/0c779ad424a92a84d1e07d47cab7f8009 189202b https://www.illumos.org/issues/7054 upstream: ee0003de7d3e598499be7ac3fe6b61efcc47cb7f DLPX-40399 dmu_tx_hold_t should use refcount_t to track space Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Paul Dagnelie <pcd@delphix.com> Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com> Approved by: Dan McDonald <danmcd@omniti.com> Author: Matthew Ahrens <mahrens@delphix.com>
* MFC r305199: MFV r302648: 7019 zfsdev_ioctl skips secpolicy when FKIOCTL is setmav2016-10-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note that the bulk of the upstream change is not applicable to FreeBSD and the affected files are not even in the vendor area. illumos/illumos-gate@45b1747515a17db45e8971501ee84a26bdff37b2 https://github.com/illumos/illumos-gate/commit/45b1747515a17db45e8971501ee84a26bdff37b2 https://www.illumos.org/issues/7019 Currently zfsdev_ioctl, when confronted by a request with the FKIOCTL flag set, skips all processing of secpolicy functions. This means that ZFS is not doing any kind of verification of the credentials or access rights of the caller and assuming that (as it is an in-kernel client) all such checks have already been done. This turns out to be quite a dangerous assumption, especially with respect to sdev. In general I don't think it's particularly reasonable to offload this enforcement of access rights onto other kernel subsystems when ZFS has some particular local semantics in this area (delegated datasets etc) and does not provide any kind of API to allow other subsystems to avoid code duplication when doing it. ZFS should apply its normal access policy to requests from within the kernel, and callers should take care to give it the correct credentials and call it from the correct context in order to get the results they need. You can observe the currently unfortunate consequences of this bug in any non- global zone that has access to /dev/zvol or any subset of it via sdev profiles. In particular, a zone used to contain a KVM or similar which has a single zvol passed through to it using a <device match= block in its zone XML. Even though sdev makes something of an attempt to control for whether the caller should have access to nodes in /dev/zvol, it doesn't do this correctly, or really at all in the lookup call path. So, if we have a zone that's been given access to any part of /dev/zvol, it can simply look up the full path to any other zvol on the entire system, and the node will appear and be able to be used. Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: Richard Lowe <richlowe@richlowe.net> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Approved by: Dan McDonald <danmcd@omniti.com> Author: Alex Wilson <alex.wilson@joyent.com>
* MFC r305198: MFV r302647:mav2016-10-112-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | 6922 Emit ESC_ZFS_VDEV_REMOVE_AUX after removing an aux device illumos/illumos-gate@63364b0ee2604783e7a55f8425888867768eafa4 https://github.com/illumos/illumos-gate/commit/63364b0ee2604783e7a55f84258888677 68eafa4 https://www.illumos.org/issues/6922 ZFS does not do a config_sync after removing an aux (spare, log, or cache) device. AFAICT this isn't being done because it is slow and was deemed unnecessary. However, it should be such a rare operation that speed doesn't matter, and not doing it results in two problems: 1) It is theoretically possible to remove an aux device from one pool and attach it to another, then lose power. When power is restored, both pools woul d think that they own the aux device. 2) Removal of the aux device doesn't send any useful sysevents to userland. Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Approved by: Dan McDonald <danmcd@omniti.com> Author: Alan Somers <asomers@gmail.com>
* MFC r305197: MFV r302646:mav2016-10-114-3/+156
| | | | | | | | | | | | | | | | | | 6980 6902 causes zfs send to break due to 32-bit/64-bit struct mismatch illumos/illumos-gate@ea4a67f462de0a39a9adea8197bcdef849de5371 https://github.com/illumos/illumos-gate/commit/ea4a67f462de0a39a9adea8197bcdef84 9de5371 https://www.illumos.org/issues/6980 doing zfs send -i snap1 snap2 >testfile results in internal error: Invalid argument Abort (core dumped) Reviewed by: Paul Dagnelie <pcd@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Author: Matthew Ahrens <mahrens@delphix.com>
* MFC r305195: MFV r302643:mav2016-10-112-2/+2
| | | | | | 6902 speed up listing of snapshots if requesting name only and sorting by name This was our change from the beginning, so just reduce the upstream diff.
* MFC r305193: MFV r302642:mav2016-10-111-0/+21
| | | | | | | | | | | | | | | | | | | 6876 Stack corruption after importing a pool with a too-long name illumos/illumos-gate@c971037baa5d64dfecf6d87ed602fc3116ebec41 https://github.com/illumos/illumos-gate/commit/c971037baa5d64dfecf6d87ed602fc3116ebec41 https://www.illumos.org/issues/6876 Calling dsl_dataset_name on a dataset with a 256 byte buffer is asking for trouble. We should check every dataset on import, using a 1024 byte buffer and checking each time to see if the dataset's new name is longer than 256 bytes. Reviewed by: Prakash Surya <prakash.surya@delphix.com> Reviewed by: Dan Kimmel <dan.kimmel@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com> Approved by: Richard Lowe <richlowe@richlowe.net> Author: Paul Dagnelie <pcd@delphix.com>
* MFC r306292: fix vnode lock assertion for extended attributes directoryavg2016-10-071-3/+8
|
* MFC r305123: Fix kernel panic when inheriting properties without default.mav2016-09-141-0/+2
| | | | | | There are two writable hidden properties "iscsioptions" and "stmf_sbd_lu", that have no default string value. Attempt to unset them or replicate caused kernel panic. This simple bandaid seems fixes the problem nicely.
* MFC r305679: Switch random_get_pseudo_bytes() shim to arc4rand().mav2016-09-131-1/+1
| | | | | | | | Our shim for Solaris random_get_bytes() uses read_random(), that looks reasonable, since it guaranties reliably seeded random data. On the other side Solaris random_get_pseudo_bytes() does not provide this guarantie, and its original Solaris implementation is equivalent to our arc4rand(), using software crypto without stressing slower hardware RNG.
* MFstable/11 r305271:ngie2016-09-022-0/+14
| | | | | | | | | | | MFC r303576: Conditionalize code which defines sysctls per _KERNEL #ifdef guard This resolves several issues when compiling libzpool (userspace library), i.e. -Wimplicit-function-declaration and -Wmissing-declarations issues. Tested with: clang 3.8.1, gcc 4.2.1, gcc 5.3.0
* MFC r303763,303791,303869: zfs: honour and make use of vfs vnode locking ↵avg2016-08-2310-2341/+863
| | | | | | protocol PR: 209158
* MFC r302838: 6513 partially filled holes lose birth timeavg2016-08-158-53/+188
|
* MFC r302837: 6844 dnode_next_offset can detect fictional holesavg2016-08-152-5/+23
|
* MFC r302836: 6874 rollback and receive need to reset ZPL state to what's on diskavg2016-08-151-108/+103
|
* MFC r302840: 6878 Add scrub completion info to "zpool history"avg2016-08-151-5/+19
|
* MFC r302839: 6940 Cannot unlink directories when over quotaavg2016-08-151-0/+1
|
* MFC r302772: re-apply r299908: zfsctl_snapdir_lookup: clear VV_ROOT ofavg2016-07-181-0/+1
| | | | snapshot's root
* MFC r302507:markj2016-07-151-1/+1
| | | | Avoid truncating the return value of DTrace predicates.
* MFC r300134: move zfsctl_freebsd_root_lookup right next toavg2016-07-131-48/+44
| | | | zfsctl_root_lookup
* MFC r300130: zfsctl_freebsd_root_lookup: gfs_vop_lookup may return aavg2016-07-131-8/+14
| | | | doomed vnode
* MFC r299951: do not destroy 'snapdir' when it becomes inactiveavg2016-07-131-35/+5
|
* MFC r299949: try to recycle "snap" vnodes as soon as possibleavg2016-07-131-5/+15
|
* MFC r299947: fix locking in zfsctl_root_lookupavg2016-07-131-10/+20
|
* MFC r299946: gfs_lookup_dot() does not have to acquire any locksavg2016-07-132-14/+13
|
* MFC r299945: avoid deadlock between zfsctl_snapdir_lookup andavg2016-07-131-2/+11
| | | | zfsctl_snapshot_reclaim
* MFC r299940: fix a vnode reference leak caused by illumos compat traverse()avg2016-07-132-9/+8
|
* MFC r299914: zfsctl_ops_snapshot: remove methods should never be calledavg2016-07-131-96/+0
|
* MFC r301273: zfs_root: fix a potential root vnode reference leakavg2016-07-131-4/+6
|
* MFC r299908,300131,301275: zfs: set VROOT / VV_ROOT consistently and inavg2016-07-133-13/+4
| | | | a single place
* MFC r299902,299938: mount_snapshot: consolidate all error handlingavg2016-07-132-17/+22
|
* MFC r299906,301870: add zfs_vptocnp with special handling for snapshotsavg2016-07-131-0/+48
| | | | | | | under .zfs Note that the changed is adjusted for the lack of LK_VNHELD in this branch.
* MFC r300145: add vop_print methods to vnode operatios of various zfsctlavg2016-07-131-0/+72
| | | | node types
* MFC r301873: l2arc: reset b_tmp_cdata to NULL in the case of unset b_daddravg2016-07-131-0/+1
|
* MFC r302123: fix deadlock-prone code in getzfsvfs()avg2016-07-131-8/+11
|
* MFC r299900: zfsctl: fix several problems with reference countsavg2016-07-133-9/+1
| | | | PR: 207464
* MFC r298105: zfs: enable vn_io_fault supportavg2016-07-133-1/+49
|
* MFC r300133: zfsctl_common_fid: remove redundant assignmentavg2016-07-131-2/+0
|
* MFC r300132: zfsctl: tighten assertion and remove unused definitionavg2016-07-132-2/+1
|
* MFC r302265, r302382smh2016-07-132-12/+93
| | | | | | | Allow ZFS ARC min / max to be tuned at runtime Relnotes: YES Sponsored by: Multiplay
* MFC r300870,r300884:ngie2016-06-082-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | r300870: Unbreak the zfs(4) build vm/vm_pageout.h grew a dependency on the bool typedef in r300865 arc.c didn't include sys/types.h, which included the definition for the typedef Other items (ofed, drm2) might need to be chased for this commit. Pointyhat to: alc r300884: Fix up r300870 The sys/types.h fix I proposed was only tested with zfs(4), not with libzpool, which is where the build failure actually existed Remove vm/vm_pageout.h from arc.c and zfs_vnops.c because they're both unneeded In collaboration with: kib
* MFC r299657:ngie2016-06-081-0/+2
| | | | Include arpa/inet.h to get the htonl(3) definition
* MFC r300024: zfs_ioc_rename: fix a reversed conditionavg2016-05-231-1/+1
| | | | PR: 209093
* MFC r297848: l2arc: make sure that all writes honor ashift of a cache deviceavg2016-05-172-97/+157
| | | | | Note: no MFC stable/9 because it has become quite out of date with head, so the merge would be quite labourious and, thus, risky.
* MFC r298106: zfs_rezget: z_vnode can not be NULL if zp is validavg2016-05-171-6/+4
|
* MFC r298473,298787: add invpcid, fix sahf/lahf in dtrace disassembleravg2016-05-171-2/+2
|
* MFC r298472: MFV r298471: 6052 decouple lzc_create() from theavg2016-05-171-0/+4
| | | | implementation details
* MFC r298072asomers2016-05-161-3/+4
| | | | | | | | | | | | | Don't corrupt ZFS label's physpath attribute when booting while a disk is missing Prior to this change, vdev_geom_open_by_path would call vdev_geom_attach prior to verifying the device's GUIDs. vdev_geom_attach calls vdev_geom_attrchange to set the physpath in the vdev object. The result is that if the disk could not be found, then the labels for other disks in the same TLD would overwrite the missing disk's physpath with the physpath of whichever disk currently has the same devname as the missing one used to have.
* MFC r297986, r298017 to vdev_geom.casomers2016-05-121-6/+24
| | | | | | | | | | | | | | r297986 | asomers | 2016-04-14 13:20:31 -0600 (Thu, 14 Apr 2016) | 6 lines Update a debugging message in vdev_geom_open_by_guids for consistency with similar messages elsewhere in the file. r298017 | asomers | 2016-04-14 17:14:41 -0600 (Thu, 14 Apr 2016) | 8 lines Add more debugging statements in vdev_geom.c Log a debugging message whenever geom functions fail in vdev_geom_attach. Printing these messages is controlled by vfs.zfs.debug
OpenPOWER on IntegriCloud