Summary: | pseudofs truncates pfs_read output to MAXPHYS | ||
---|---|---|---|
Product: | Base System | Reporter: | Dmitry Chagin <dchagin> |
Component: | kern | Assignee: | Dmitry Chagin <dchagin> |
Status: | Closed FIXED | ||
Severity: | Affects Many People | CC: | cem, trasz |
Priority: | --- | ||
Version: | CURRENT | ||
Hardware: | Any | ||
OS: | Any |
Description
Dmitry Chagin
2019-05-13 16:52:25 UTC
grab it, not to forget It doesn't seem like pfs_read's locking needs a fixed sized buffer, but perhaps something internal to pn_fill() writes to the sbuf under non-sleepable lock. The uiomove() below in pfs_read() checks for len <= IOSIZE_MAX rather than MAXPHYS, but that could be invoked on smaller chunks in a loop? hi, I created this PR not to forget about the problem and I have not investigated it yet, but seems that you are right. the best solution apparently use some constant which will be > MAXPHYS, may be IOMAX_SIZE or multiple MAXPHYS A commit references this bug: Author: trasz Date: Fri Oct 16 09:58:11 UTC 2020 New revision: 366748 URL: https://svnweb.freebsd.org/changeset/base/366748 Log: Bump pseudofs size limit from 128kB to 1MB. The old limit could result in process' memory maps being truncated. PR: 237883 Submitted by: dchagin MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D20575 Changes: head/sys/fs/pseudofs/pseudofs_vnops.c A commit in branch stable/12 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=72e1884f593f9b86c9ea4e74d02449f6678770dd commit 72e1884f593f9b86c9ea4e74d02449f6678770dd Author: Edward Tomasz Napierala <trasz@FreeBSD.org> AuthorDate: 2020-10-16 09:58:10 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2021-05-01 00:38:30 +0000 Bump pseudofs size limit from 128kB to 1MB. PR: 237883 (cherry picked from commit ce764cbd1c725c54966315949fe93eb3994c1b5e) sys/fs/pseudofs/pseudofs_vnops.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) fixed by trasz, cem, kib. thanks :) |