[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wisMFiBHT7dLFOtHqX=fEve3JafZjSvbd5cy=MpW4u7zQ@mail.gmail.com>
Date: Sun, 4 Jul 2021 13:52:06 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Miguel Ojeda <ojeda@...nel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
rust-for-linux@...r.kernel.org,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Geoffrey Thomas <geofft@...reload.com>,
Finn Behrens <me@...enk.de>,
Adam Bratschi-Kaye <ark.email@...il.com>,
Wedson Almeida Filho <wedsonaf@...gle.com>
Subject: Re: [PATCH 01/17] kallsyms: support big kernel symbols (2-byte lengths)
On Sun, Jul 4, 2021 at 1:28 PM <ojeda@...nel.org> wrote:
>
>
> + /* If zero, it is a "big" symbol, so a two byte length follows. */
> + if (len == 0) {
> + len = (data[0] << 8) | data[1];
> + data += 2;
> + off += len + 2;
> + }
Side note: it might be a good idea at this point to verify that "len" is >255.
Also, why is this in big-endian order?
Let's just try to kill big-endian data, it's disgusting and should
just die already.
BE is practically dead anyway, we shouldn't add new cases. Networking
has legacy reasons from the bad old days when byte order wars were
still a thing, but those days are gone.
Linus
Powered by blists - more mailing lists