3 ms·
Yeah, you understand the code - we all do. But it doesn't tell you anything about the context the code runs in. And its context doesn't tell you about its conte
by crististm 13y ago
Yeah, you understand the code - we all do. But it doesn't tell you anything about the context the code runs in. And its context doesn't tell you about its context either.
Sparse code is not necessarily self-explaining.
- adestefan 13y agoThe function names do. Honestly, this is very, very simple code. Most of the code in a kernel is nothing more than book keeping or glue connecting things. This is glue.
- adestefan 13y agoTo expand this is also a really dumb mistake. It's the equivalent of passing user input directly into a SQL query.
- asveikau 13y agoThere are cues here that are consistent with conventions in the Linux kernel. For example the sys prefix on the function name tells you everything you need to know about "the context the code runs in" - it's a syscall. "compat" gives you a hint that it's a wrapper for another ABI.
- crististm 13y ago"compat" gives you a hint that it's a wrapper for another ABI Why is this obvious? I can extrapolate on sys, but what cues are in 'compat' that I don't see?