Re: [PATCH 01/17] kallsyms: support big kernel symbols (2-byte lengths)
From: Gary Guo
Date: Sun Jul 04 2021 - 19:23:30 EST
On Sun, 4 Jul 2021 23:42:03 +0100
Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
> On Sun, Jul 04, 2021 at 11:20:07PM +0100, Gary Guo wrote:
> > This is big endian.
>
> Fundamentally, it doesn't matter whether it's encoded as top-7 +
> bottom-8 or bottom-7 + top-8. It could just as well be:
>
> if (len >= 128) {
> len -= 128;
> len += *data * 256;
Do you mean `*data * 128`?
> data++;
> }
>
> It doesn't matter whether it's compatible with some other encoding.
> This encoding has one producer and one consumer. As long as they
> agree, it's fine.
I am aware that this is only for internal tooling so it doesn't
really matter. I mentioned that it's big endian to do top-7 +
bottom-8 because Linus suggests that big-endian shouldn't be
used.