NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: kern/54150: COMPAT_50 vs NET_RT_IFLIST

The following reply was made to PR kern/54150; it has been noted by GNATS.

From: matthew green <>
Subject: re: kern/54150: COMPAT_50 vs NET_RT_IFLIST
Date: Mon, 06 May 2019 06:35:42 +1000

 >  This looks to be an alignment problem - the sockaddr's containing
 >  the messages in the NEWADDR messages are aligned to a bigger boundary (8)
 >  than they should be for the NetBSD 5 format (4).
 this might be the original thing i posted about:
 #if !defined(_KERNEL) || !defined(COMPAT_RTSOCK)
 #define __align64       __aligned(sizeof(uint64_t))
 struct if_msghdr {
         u_short ifm_msglen __align64;
         struct  if_data ifm_data __align64;
 this means that compat code aaccessing the *real* one has the
 wrong alignment applied to the these members.
 i'm pretty sure all the "__align64" in sys/net/*.h are wrong.

Home | Main Index | Thread Index | Old Index