Commit Graph

15 Commits

Author SHA1 Message Date
John Baldwin
bb430bc740 Fully handle size_t lengths in AIO requests.
First, update the return types of aio_return() and aio_waitcomplete() to
ssize_t.

POSIX requires aio_return() to return a ssize_t so that it can represent
all return values from read() and write().  aio_waitcomplete() should use
ssize_t for the same reason.

aio_return() has used ssize_t in <aio.h> since r31620 but the manpage and
system call entry were not updated.  aio_waitcomplete() has always
returned int.

Note that this does not require new system call stubs as this is
effectively only an API change in how the compiler interprets the return
value.

Second, allow aio_nbytes values up to IOSIZE_MAX instead of just INT_MAX.

aio_read/write should now honor the same length limits as normal read/write.

Third, use longs instead of ints in the aio_return() and aio_waitcomplete()
system call functions so that the 64-bit size_t in the in-kernel aiocb
isn't truncated to 32-bits before being copied out to userland or
being returned.

Finally, a simple test has been added to verify the bounds checking on the
maximum read size from a file.
2016-03-21 21:37:33 +00:00
Baptiste Daroussin
8fbf3d50e3 use .Mt to mark up email addresses consistently (part4)
PR:		191174
Submitted by:	Franco Fichtner  <franco at lastsummer.de>
2014-06-23 08:25:03 +00:00
Ruslan Ermilov
2faeeff4c9 mdoc(7) police: Tidy up the syscall language.
Stop calling system calls "function calls".

Use "The .Fn system call" a-la "The .Nm utility".

When referring to a non-BSD implementation in
the HISTORY section, call syscall a function,
to be safe.
2002-12-18 09:22:32 +00:00
Sheldon Hearn
a7af55af93 * Modernize aio(4), providing instructions for static and dynamic kernel
linking.

* Fix disorder in the SEE ALSO sections of aio_*(2).

* Remove unnecessary cross-references from the SEE ALSO sections of
  aio_*(2); config(8), kldload(8) and kldunload(8) are cross-referenced
  from aio(4).

* Remove the KERNEL OPTIONS sections from aio_*(2), now that these
  pages cross-reference aio(4), which contains suitable kernel linking
  reference material.
2002-10-24 12:57:05 +00:00
Dag-Erling Smørgrav
47ae1efd8d Add cross-references to the aio(4) manual page.
Submitted by:	Craig Rodrigues <rodrigc@attbi.com>
2002-10-24 12:22:57 +00:00
Alfred Perlstein
9ed01b5d3b Explain to users that they may want to kldload aio.
Move Xref sections.

Submitted by: Craig Rodrigues <rodrigc@attbi.com>
2002-10-22 16:12:27 +00:00
Ruslan Ermilov
32eef9aeb1 mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
Ruslan Ermilov
d0353b836e mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:38:02 +00:00
Ruslan Ermilov
b5c508fba3 Use Fx macro wherever possible. 2000-11-14 11:20:58 +00:00
Sheldon Hearn
8a4272bf51 Mark up errno as a variable (Va), not as a defined value (Dv).
Do not terminate the cross-reference list in the SEE ALSO section with
a period.
2000-06-23 15:02:29 +00:00
Sheldon Hearn
a6a2ba1c18 Apply the accepted line breaking rules. 2000-06-23 15:01:18 +00:00
Chris Costello
bb33e42207 Replace .Va, .Ar and .Nm with .Fa or .Va where necessary, examples:
``.Ar errno'' -> ``.Va errno''
  ``.Nm ops'' -> ``.Fa ops''
  ``.Va fd'' -> ``.Fa fd''
2000-06-23 05:05:44 +00:00
Alexey Zelkin
25bb73e063 Introduce ".Lb" macro to libc manpages.
More libraries manpages updates following.
2000-04-21 09:42:15 +00:00
Bruce Evans
e92393ba2b Fixed wrong arg type in synopsis. 2000-03-23 15:28:30 +00:00
Jason Evans
070dac0827 Add a man page for aio_waitcomplete(). Update the aio_cancel() man page to
reflect the fact that aio_cancel() works now.

Submitted by:	Christopher Sedore <cmsedore@maxwell.syr.edu>
2000-03-21 10:25:22 +00:00