Actions
Bug #6388
closedFailure of userland copy should return EFAULT
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
zfs - Zettabyte File System
Start date:
2015-10-24
Due date:
% Done:
100%
Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:
Description
Many key internal functions pass system return codes that are safe to
return to userland. In the case of ddi_copyin(9F), an error passes -1
and the documentation states very clearly that drivers should pass
EFAULT to userland when this happens.
http://illumos.org/man/9F/ddi_copyin
This does not happen in the ZFS source code. I believe it should be
changed to pass EFAULT. I caught this when writing man pages for the
libzfs_core API.
https://github.com/zfsonlinux/zfs/commit/0de7c552b69f2bb3e16f023007f049cb3c8e9afd
https://github.com/openzfs/openzfs/pull/13
Updated by Electric Monk over 6 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit c71c00bbe8a9cdc7e3f4048b751f48e80441d506
commit c71c00bbe8a9cdc7e3f4048b751f48e80441d506 Author: Richard Yao <ryao@gentoo.org> Date: 2015-11-01T05:38:05.000Z 6388 Failure of userland copy should return EFAULT Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Dan Kimmel <dan.kimmel@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com>
Actions