Date: Thu, 04 Jan 2024 08:23:39 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 276106] hexdump(1) is not able to skip on files residing on pseudo-filesystems Message-ID: <bug-276106-227-Jfcf9TclYw@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-276106-227@https.bugs.freebsd.org/bugzilla/> References: <bug-276106-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D276106 --- Comment #5 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3De23954bd42fe4331b67ba8f6446bcccf7= 51096f1 commit e23954bd42fe4331b67ba8f6446bcccf751096f1 Author: Ricardo Branco <rbranco@suse.de> AuthorDate: 2024-01-03 20:17:58 +0000 Commit: Xin LI <delphij@FreeBSD.org> CommitDate: 2024-01-04 08:16:50 +0000 hexdump: Do not trust st_size if it equals zero. Fix for hexdump -s not being able to skip files residing in pseudo-filesystems that advertise a zero size value. Historically, many pseudofs-based filesystems (e.g., procfs) report a va_size of 0 for numerous files classified as regular files. Typically, the contents of these files are generated on demand from kernel data as sbuf(9) strings at the time they are read. Accurately reporting the size of these files is challenging, as it often involves generating their contents. These pseudofs implementations frequently report the size as 0. This is a historical behavior and also aligns with Linux behavior. To maintain compatibility, we have chosen to preserve the existing behavior and address it in the userland application, rather than modifying it in the kernel (by updating the correct value for va_size). PR: bin/276106 MFC after: 1 week usr.bin/hexdump/display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-276106-227-Jfcf9TclYw>