[parisc-linux] misaligned data
John David Anglin
dave@hiauly1.hia.nrc.ca
Fri, 27 Dec 2002 21:49:18 -0500 (EST)
> ldd 52(%r3),%r19 # line 2347 is misaligned.
> std %r25,52(%r3) # also misaligned
>
> Based on the math, looks like %r25 has the "seconds" field and %r19
> the microseconds.
>
> Oh, only one definition and usage of tv_add().
> The offending field is "&cookie->c.expiration".
> cookie is type "sctp_signed_cookie_t". (include/net/sctp/structs.h)
>
> /* The format of our cookie that we send to our peer. */
> typedef struct sctp_signed_cookie {
> __u8 signature[SCTP_SECRET_SIZE];
> sctp_cookie_t c;
> } sctp_signed_cookie_t;
>
> struct sctp_cookie mostly uses __u32 except for "struct timeval expiration".
> "struct timeval" is declared in include/linux/time.h.
> Not sure if it's safe to just pad "struct sctp_cookie" or if something
> else needs to be done.
I'd wonder more about the packed attribute on sctp_init_chunk_t and
sctp_inithdr_t. What version of gcc?
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)