[Crash-utility] Problem in command net -s

Karlsson, Jan Jan.Karlsson at sonyericsson.com
Fri Jan 27 11:07:14 UTC 2012


Maybe we should then build crash with the gcc option -malign-double, as that seems to enforce the same alignment rule also in x86, 32-bit. At least a quick test indicated that for me.

Jan

-----Original Message-----
From: crash-utility-bounces at redhat.com [mailto:crash-utility-bounces at redhat.com] On Behalf Of Per Fransson
Sent: fredag den 27 januari 2012 11:29
To: Discussion list for crash utility usage, maintenance and development
Cc: Modilaynen, Pavel; Fänge, Thomas
Subject: Re: [Crash-utility] Problem in command net -s

Hi,

On Fri, Jan 27, 2012 at 8:27 AM, Karlsson, Jan
<Jan.Karlsson at sonyericsson.com> wrote:
> This problem was really found by Pavel Modilaynen (Pavel.Modilaynen at sonyericsson.com) working in the same group as I do. We saw the same kind of information using struct -o that you found yourself. The only reason I can think of for the 8-byte alignment is that the struct vfs_inode itself starts with an 8-byte struct.
>
> That we might not have exactly the same alignment rules on ARM and x86 worries me. The whole idea to debug an ARM kernel using an x86 machine is based on the assumption that sizes of types, alignment rules, and so on are the same.
>
> Jan
>
>

I guess this is the result of the requirements of the ARM ABI found here:

http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042d/IHI0042D_aapcs.pdf

Table 1 in section 4.1 says that double-words should be 8 byte
aligned. Table 3 in section 7.1.1 maps double words to C long longs.
Section 4.3.1 says that aggregates (of which I believe structs are an
example) shall have the alignment of its "most-aligned component",
which is natural. struct inode contains at least one u64 that I can
see.

Regards,
Per

--
Crash-utility mailing list
Crash-utility at redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility




More information about the Crash-utility mailing list