Re: silly [< >] and other excess

Russell King
2000-11-23T18:51:57Z

Albert D. Cahalan writes:
> > they are not only references to
> > kernel functions, but also kernel data and read only data within
> > the kernel text segment.
>
> 1. this is harmless
> 2. this is useful (you might get a variable's name)

Wrong. Op-codes on this machine are organised such that bits 31-28
indicate the "condition" that the instruction executes. All 16
combinations are meaningful. This means that any 32-bit value can
appear to be an instruction OR data. It takes human intellect to
decide which it is. No machine can tell you that.

> Nope. You get the unmolested oops and some symbol data.
> If there isn't any symbol for 0x424a5149, so what? It is
> no big deal to look up a few opcodes in the symbol table
> by accident.

But there could well be a symbol for 0xc0023004, but it also
corresponds to the instruction:

andgt r3, r2, r4

"Perform a logical AND operation between r2 and r4 and place the result
in r3 if the condition codes indicate the `Greater Than' condition"

In addition, the kernel may not be compiled to run at address 0xC.......
but at address 0x6....... or maybe even 0xe....... Guess what 0xE means
in the high nibble of the op-code? "Always", or "Unconditional".

> That would be trading one design flaw for another.
>
> The hard part of klogd/ksymoops is decoding the code bytes AFAIK.
> The rest is a just a cross between grep and ps -- you search and
> you do symbol lookups. I could throw it together in a few hours,
> minus the disassembly part.

As far as I am concerned, you are the people who propose to break
something, and therefore you are the people who should provide the
effort to fix what you will be breaking when the brokenness is
highlighted.
_____
|_____| ------------------------------------------------- ---+---+-
| | Russell King rmk@arm.linux.org.uk --- ---
| | | | http://www.arm.linux.org.uk/personal/aboutme.html / / |
| +-+-+ --- -+-
/ | THE developer of ARM Linux |+| /|\
/ | | | --- |
+-+-+ ------------------------------------------------- /\\\ |