[Bug 232207] sendfile(2) missing some documented ERRORS

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Oct 12 21:18:57 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=232207

            Bug ID: 232207
           Summary: sendfile(2) missing some documented ERRORS
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs at FreeBSD.org
          Reporter: yaneurabeya at gmail.com

- Depending on file capabilities or socket capabilities and whether or not the
kernel was compiled with capabilities, sendfile can return ENOTCAPABLE: 
- `sys_sendfile` uses copyinuio in `sendfile(..)` under the covers when reading
in the hdtr structure. copyinuio can fail with EINVAL for the reasons noted in
writev(2):

     [EINVAL]           The iovcnt argument was less than or equal to 0, or
                        greater than IOV_MAX.

     [EINVAL]           One of the iov_len values in the iov array was
                        negative.

     [EINVAL]           The sum of the iov_len values in the iov array
                        overflowed a 32-bit integer.

Furthermore, it uses `kern_writev(..)` when sending the trailers at the end of
the operation, which means it's conditionally subject to the same errors as
writev(2).

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list