Hacker News new | ask | show | jobs
by kragen 4873 days ago
StoneKnifeForth is a toy, and the executables it generates were probably actually invalid in some way I don't understand because I haven't read the ELF spec. Preventing the kernel from barfing on them would have an insignificant real benefit, I think, and possibly a significant cost. If we were talking about PulseAudio or something, I would agree, but no.

The obvious first step to reporting the bug (after looking at diffs, which I did try) would be to instrument the ELF loading code with printk calls to explain why it's failing to exec a supposedly ELF executable, so that I could report what it was about the executable it was that made the kernel barf. And then I could fix the executable. I just haven't gotten around to recompiling my kernel with a modified ELF loader.

1 comments

Being "invalid" doesn't nullify the backwards-compatibility rule - if the kernel accepts a certain kind of invalid ELF file, and people have come to rely on it doing so, then that has become a de facto part of the ABI. "But userspace is buggy!" is not considered a valid excuse.

What does nullify the backwards-compatibility rule is no-one noticing or caring that it has changed.