Live data from Hacker News

How I Found a 20-Year-Old Linux Kernel Bug

robert.ocallahan.org

41–45 of 45 posts

Re: How I Found a 20-Year-Old Linux Kernel Bug

#41
post #4

Linux ~4.7 or so fixed a bug in fadvise, specifically FADV_DONTNEED, that incorrectly rounded page boundaries to the effect of making some calls less effective. Found and fixed by a developer who wondered why his page cache was filling up, even though the backup software he used made use of DONTNEED :) The bug was in from day 1.

The thing I wonder about in instances like this is how many people ran into the problem and thought, "Huh, there must be some quirky rationale here, and it's just an idiosyncrasy I'll have to deal with", or, "Huh, that's definitely wrong... oh well".

Years back, I spent some time doing QA for an operating system, and I noticed that there was a strong tendency in people to deny the possibility that the operating system had a bug when they noticed something wrong and instead put all their energy into fixing test automation, finding workarounds, etc. And a lot of these were people whose sole purpose at work was finding and reporting bugs in the OS.

Re: How I Found a 20-Year-Old Linux Kernel Bug

#42
post #6
post #2

It's always nice to see fixes of problems found with improved testing. It would be nice to see something like Haskells QuickCheck rigorously applied on the majority of the kernel functions/interfaces.

Is there a Haskell type of Linux syscalls? If it is the case, we can automatically derive Haskell code to generate an arbitrary list of syscalls. (disclamer: I'm one of the QuickFuzz [0] developers and I'm very interested in testing for this kind of bugs) [0]: http://quickfuzz.org/

Sorry for a bit of off-topic but can you point me at a good tutorial on what must be done exactly so I can use your software to test mine?

Re: How I Found a 20-Year-Old Linux Kernel Bug

#44

Terrifying to think that tiny, subtle bugs like this could exist in pacemakers and planes. Especially if something like this only happens once every decade or so: > I guess once in a while it would fail if your allocator happens to land one at the end of a page.

My understanding is that pacemakers and planes (and similarly high-reliability systems) tend to statically assign everything and avoid allocators altogether, for precisely this reason. It's much easier to prove that you don't have memory problems if you simply assign every byte of RAM to a specific task and then make sure it's always used for that task and only that task.

Re: How I Found a 20-Year-Old Linux Kernel Bug

#45
post #6

Earlier quoted context omitted.

Is there a Haskell type of Linux syscalls? If it is the case, we can automatically derive Haskell code to generate an arbitrary list of syscalls. (disclamer: I'm one of the QuickFuzz [0] developers and I'm very interested in testing for this kind of bugs) [0]: http://quickfuzz.org/

Sorry for a bit of off-topic but can you point me at a good tutorial on what must be done exactly so I can use your software to test mine?

If you already know Haskell, you can take a look to our article explaining how it works:

https://labdcc.fceia.unr.edu.ar/~amista/article.pdf

Feel free to contact us by email in case you need.

Post reply on HN