Re: Documentation of kernel messages (Summary)

From: Satyam Sharma
Date: Mon Jul 09 2007 - 18:59:35 EST


On 7/9/07, Oliver Neukum <oliver@xxxxxxxxxx> wrote:
Am Montag, 9. Juli 2007 schrieb Kunai, Takashi:
> (b)printk hashes and (c)Format strings. (a) seems difficult to get
> supports from kernel developers and (c) lacks uniqueness of each
> message. Though (b) also lacks uniqueness, adding component id and/or

We have generators for hash functions that guarantee unique results
for a set of inputs.

Right, perfect hash generators require the input set to be known
*a priori*.

They are even GPLed. As you are operating against
a known target, that should work.

But, I'm not sure they'd be operating against a known target -- I don't
really know what exactly would be hashed, but if it's kernel printk()
messages (the format string, obviously), then please remember that
new messages would get added all the time, and unless we're also
willing to change the hash function every time a printk() gets added
to the kernel (whew!) it's going to be a problem -- especially because
we don't really want to generate new hash functions for every kernel
version / or for every kernel build, because we'd obviously like the
same error message to hash to the same value across versions.

If we really care about uniqueness, the only solution I see is to use
a strong/cryptographic hash function (say SHA-1, which would never
change in the future) that generates the hashes for all the printk()
messages that are getting compiled-in at build-time ... but it would be
slow, of course.

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