Bug 202497
Summary: | binfmt_script no longer works with strings over 128 bytes long, breaks NixOS | ||
---|---|---|---|
Product: | File System | Reporter: | las |
Component: | Other | Assignee: | fs_other |
Status: | NEW --- | ||
Severity: | blocking | CC: | aszlig, graham, las, pmenzel+bugzilla.kernel.org, samuel+kernel.org, viro |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 5.0 | Subsystem: | |
Regression: | Yes | Bisected commit-id: |
Description
las
2019-02-02 17:56:13 UTC
I've bisected this and the commit that introduces the regression is 8099b047ecc431518b9bb6bdbba3549bbecdc343 (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8099b047ecc431518b9bb6bdbba3549bbecdc343). Given that for example Perl implements its own parsing of the shebang (https://perl5.git.perl.org/perl.git/blob/04db542212fdad3a62f13afe741c99028f4bf799:/toke.c#l5524) to get around the length and single argument limitation, I'd say this not only affects NixOS. When digging around the Perl source code I found that it is expecting this behavior (silently truncating the shebang line) even on other Unices. The patch which has broken this userspace behavior was applied to 4.19.21. Thank you for reporting this issue. See the LKML discussion [1]. It looks like this subsystem does not use the bug tracker, and the mailing list is preferred. Linux 5.0-rc7 and the stable releases should be fixed now, and this issue can be closed. [1]: https://lkml.org/lkml/2019/2/15/708 |