|
|
Subscribe / Log in / New account

Perfection is the enemy of the good?

Perfection is the enemy of the good?

Posted Jun 2, 2024 19:33 UTC (Sun) by Wol (subscriber, #4433)
In reply to: Perfection is the enemy of the good? by pm215
Parent article: One more pidfdfs surprise

> which lets you forget to

And a spec / design document should have provided a simple reminder ...

Cheers,
Wol


to post comments

Perfection is the enemy of the good?

Posted Jun 2, 2024 21:28 UTC (Sun) by pm215 (subscriber, #98099) [Link] (2 responses)

But there was a spec -- it's posix, which says anything you stat should have a filetype and defines what they are. Having a spec that says "this field must be valid" manifestly didn't avoid the bug.

Perfection is the enemy of the good?

Posted Jun 2, 2024 23:00 UTC (Sun) by intelfx (subscriber, #130118) [Link]

> But there was a spec -- it's posix, which says anything you stat should have a filetype and defines what they are. Having a spec that says "this field must be valid" manifestly didn't avoid the bug.

I think it's in large part because the spec (POSIX) is so out of touch with the reality (what Linux actually implements) that POSIX compliance is a distant second thought at best (and is entirely ignored and left to the userspace, i.e. libc, at worst).

In either case, POSIX does not really seem to inform either development or validation of Linux syscalls. It is not a design document for Linux.

Perfection is the enemy of the good?

Posted Jun 3, 2024 10:26 UTC (Mon) by rweikusat2 (subscriber, #117920) [Link]

SUS demands that st_mode shall have a meaningful value for defined file types which are block devices, character devices, FIFOs, regular files, symlinks and sockets. It doesn't define numerical values for such meaningful file type information, only macros.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds