Project

General

Profile

Bug #6388

Failure of userland copy should return EFAULT

Added by Richard Yao about 4 years ago. Updated about 4 years ago.

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

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

History

#1

Updated by Electric Monk about 4 years ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

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>

Also available in: Atom PDF