[Bug libc/22753] New: preadv2/pwritev2 fallback code should handle offset=-1
njs at pobox dot com
sourceware-bugzilla@sourceware.org
Sat Jan 27 03:20:00 GMT 2018
https://sourceware.org/bugzilla/show_bug.cgi?id=22753
Bug ID: 22753
Summary: preadv2/pwritev2 fallback code should handle offset=-1
Product: glibc
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: njs at pobox dot com
CC: drepper.fsp at gmail dot com
Target Milestone: ---
Linux recently added preadv2/pwritev2 syscalls, in order to add a 'flags'
argument to preadv/pwritev. Currently glibc wraps this, or if they aren't
available, then it provides a fallback that checks that flags==0 and then calls
preadv/pwritev instead.
However, this is missing one bit of preadv2/pwritev2 semantics: as documented
in the man page, if you pass offset=-1, then they emulate readv/writev. (I
guess the kernel devs didn't want to add separate readv2/writev2 syscalls, so
they made preadv2/pwritev2 support both behaviors.)
The fallback in glibc should probably check for offset=-1, and in that case
fall back to readv/writev.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list