In 5.0rc1, NixOS scripts began not working, bug report on GitHub: https://github.com/NixOS/nixpkgs/issues/53672.
User dorianr666 found out that this was because of the 128 byte limit being enforced properly now.
This bug makes NixOS unusable on 5.0rc1 and later, whereas it works perfectly fine on 4.20 and older.
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 . 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.