Bug 209971
Summary: | [regression][bisected] procfs: sendfile of /proc/self/mountinfo fails (5.10-rc1, breaks LXC) | ||
---|---|---|---|
Product: | File System | Reporter: | joanbrugueram |
Component: | Other | Assignee: | fs_other |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | carnil, hch, jussi.kivilinna |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 5.10-rc1 | Subsystem: | |
Regression: | Yes | Bisected commit-id: |
Description
joanbrugueram
2020-10-30 21:07:32 UTC
Actually, if my understanding is correct, man sendfile(2) implies that this usage by LXC was not supposed to work? The in_fd argument must correspond to a file which supports mmap(2)-like operations (i.e., it cannot be a socket). Looks like this was independently found and splice for some /proc files was reimplemented in commit 6b2c4d52fd38e676fc9ab5d9241a056de565eb1a, but not /proc/___/mountinfo. LXC issue: https://github.com/lxc/lxc/issues/3580 They changed the code not to use sendfile: https://github.com/lxc/lxc/commit/a39fc34bd6842ad1adc6144391071d8b1078667e I keep this bugzilla open for now... probably there may be other projects affected by this so I'd like to see if this is worth solving at the kernel level. 5.10.3 is still affected. Looks like it got fixed in linux-mainline: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=14e3e989f6a5d9646b6cf60690499cc8bdc11f7d I'm building a kernel now to test, but it should work since I tested a patch that looked like this some time ago. Fixed in Linux 5.11-rc1. Fixed in Linux 5.10.4. |