Messages in this thread | | | From | Linus Torvalds <> | Date | Fri, 18 May 2018 20:20:26 -0700 | Subject | Re: [PATCH] procfs: fix mmap() for /proc/vmcore |
| |
On Fri, May 18, 2018 at 8:15 PM Vasily Gorbik <gor@linux.ibm.com> wrote:
> Commit be83bbf80682 ("mmap: introduce sane default mmap limits") > introduced "pgoff" limits checks for mmap, considering fs max file size > as upper limit, which made it impossible to mmap /proc/vmcore file > contents above 2Gb (/proc/vmcore appears to be the only procfs file > supporting mmap).
> Reuse MAX_LFS_FILESIZE as procfs s_maxbytes value.
Ugh. /proc is where a lot of problems *have* been.
Admittedly not as much as random drivers, but still. If proc doesn't set s_maxbytes, then we should not raise it here magically, there might be various /proc files that get offset accounting wrong.
I'd *much* rather just set FMODE_UNSIGNED_OFFSET for /proc/vmcore _only_, rather than open up all proc files to issues with 4G+ offsets.
Linus
| |