Re: [PATCH 01/17] kallsyms: support big kernel symbols (2-byte lengths)

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
2021-07-04 20:52:33
Also in
linux-doc, linux-kbuild, lkml
Reply to
ojeda@kernel.org, 2021-07-04
On Sun, Jul 4, 2021 at 1:28 PM [off-list ref] wrote:
quoted hunk ↗ jump to hunk


+       /* 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
Thread (66 messages) 66 messages, 16 authors, last reply 2021-07-23
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help