Re: [patch] pagecache-2.3.9-H3, bmap & ext2fs cleanup patch

Albert D. Cahalan (acahalan@cs.uml.edu)
Sat, 26 Jun 1999 23:15:50 -0400 (EDT)


Linus Torvalds writes:
> On Sat, 26 Jun 1999, Albert D. Cahalan wrote:

>>> I much prefer code that cannot be buggy, to code that has to
>>> have asserts for bugs.
>
> Albert, do you have problems parsing the above sentence?

Come on, you have to be more clueful... you must be joking.

>> Ingo's way:
>> Random bit patterns tend to be illegal. Debug code can check
>> for illegal values.
>
> "Ingo: we have random bit patterns. We mark them illegal and have extra
> code to check them"

Yes, you can catch some bugs with debug code.

>> Your way:
>> Random bit patterns are perfectly valid, but still bad!
>> Bugs will be more difficult to catch.
>
> "Me: we can't have random bitpatterns".

Exactly how? This is totally wrong. You can't _detect_ random
bit patterns ever, because they have meaning. I'd say you are
telling me that kernel code is always perfect.

Following your logic, all of userspace VM should be mapped.
If users can't segfault (no bug detected because all addresses
are mapped), then there are no bugs. The code is perfect if
you don't get a segfault, right?

Ingo's way:
You have flags A, B, C, and D. Most bit patterns are illegal.
When B and C are both set, you _know_ there is a bug.

Your way:
You have flags X and Y. No bit patterns are illegal. If a bug
sets both flags by accident... well, nobody can tell that
something has gone seriously wrong. I'm sure that _bad_ things
happen when you treat a normal data block like a hole.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/