[Bug 276937] read(2) is documented as returning EINVAL on reads above INT_MAX

2024-02-18 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276937

Mark Linimon  changed:

   What|Removed |Added

 Status|In Progress |Closed
   Assignee|b...@freebsd.org|k...@freebsd.org
 Resolution|--- |FIXED

--- Comment #4 from Mark Linimon  ---
^Triage: committed and MFCed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug 276937] read(2) is documented as returning EINVAL on reads above INT_MAX

2024-02-13 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276937

--- Comment #3 from commit-h...@freebsd.org ---
A commit in branch stable/13 references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=42667ceb9d0026f7d1e5f95297b942af576cd929

commit 42667ceb9d0026f7d1e5f95297b942af576cd929
Author: Konstantin Belousov 
AuthorDate: 2024-02-10 09:40:07 +
Commit: Konstantin Belousov 
CommitDate: 2024-02-14 03:54:00 +

read.2: Describe debug.iosize_max_clamp

PR: 276937

(cherry picked from commit 3e9515846f8cbff0ecccaab65d9f70890d04429e)

 lib/libc/sys/read.2 | 19 ++-
 1 file changed, 14 insertions(+), 5 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug 276937] read(2) is documented as returning EINVAL on reads above INT_MAX

2024-02-13 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276937

--- Comment #2 from commit-h...@freebsd.org ---
A commit in branch stable/14 references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=16b1438c7371d31daa95595957330d97bc343405

commit 16b1438c7371d31daa95595957330d97bc343405
Author: Konstantin Belousov 
AuthorDate: 2024-02-10 09:40:07 +
Commit: Konstantin Belousov 
CommitDate: 2024-02-14 03:41:54 +

read.2: Describe debug.iosize_max_clamp

PR: 276937

(cherry picked from commit 3e9515846f8cbff0ecccaab65d9f70890d04429e)

 lib/libc/sys/read.2 | 19 ++-
 1 file changed, 14 insertions(+), 5 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug 276937] read(2) is documented as returning EINVAL on reads above INT_MAX

2024-02-10 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276937

Konstantin Belousov  changed:

   What|Removed |Added

 Status|New |In Progress
 CC||k...@freebsd.org

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug 276937] read(2) is documented as returning EINVAL on reads above INT_MAX

2024-02-10 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276937

--- Comment #1 from commit-h...@freebsd.org ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=3e9515846f8cbff0ecccaab65d9f70890d04429e

commit 3e9515846f8cbff0ecccaab65d9f70890d04429e
Author: Konstantin Belousov 
AuthorDate: 2024-02-10 09:40:07 +
Commit: Konstantin Belousov 
CommitDate: 2024-02-10 09:43:29 +

read.2: Describe debug.iosize_max_clamp

same as it is done for write.2.

PR: 276937
Reported by:bugs.freebsd@masklinn.net
Sponsored by:   The FreeBSD Foundation
MFC after:  1 week

 lib/libsys/read.2 | 17 ++---
 1 file changed, 14 insertions(+), 3 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug 276937] read(2) is documented as returning EINVAL on reads above INT_MAX

2024-02-10 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276937

Bug ID: 276937
   Summary: read(2) is documented as returning EINVAL on reads
above INT_MAX
   Product: Documentation
   Version: Latest
  Hardware: Any
OS: Any
Status: New
  Severity: Affects Only Me
  Priority: ---
 Component: Manual Pages
  Assignee: b...@freebsd.org
  Reporter: bugs.freebsd@masklinn.net
CC: d...@freebsd.org

The man page for read(2) says:

> [EINVAL] The value nbytes is greater than INT_MAX.

the man page for write(2) says:

> [EINVAL] The value nbytes is greater than SSIZE_MAX (or greater than INT_MAX, 
> if the sysctl debug.iosize_max_clamp is non-zero).

Experimentally, it looks like the behaviour of read(2) is identical to that of
write(2) (though I have not cared to try setting the sysctl).

I assume when IO limitations were relaxed and the sysctl was added, man read(2)
was missed and never updated.

-- 
You are receiving this mail because:
You are on the CC list for the bug.