lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdVJusoGEe-+eLnA5zKJ79Z4uRYVePTFsa6WVfKDqwmySw@mail.gmail.com>
Date:   Fri, 15 Oct 2021 08:27:27 +0200
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Eugene Syromiatnikov <esyr@...hat.com>
Cc:     Jeremy Kerr <jk@...econstruct.com.au>,
        netdev <netdev@...r.kernel.org>,
        Matt Johnston <matt@...econstruct.com.au>,
        Andrew Jeffery <andrew@...id.au>,
        Jakub Kicinski <kuba@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        linux-m68k <linux-m68k@...ts.linux-m68k.org>
Subject: Re: [PATCH net-next v4 04/15] mctp: Add sockaddr_mctp to uapi

On Fri, Oct 15, 2021 at 12:32 AM Eugene Syromiatnikov <esyr@...hat.com> wrote:
> On Thu, Jul 29, 2021 at 10:20:42AM +0800, Jeremy Kerr wrote:
> > This change introduces the user-visible MCTP header, containing the
> > protocol-specific addressing definitions.
>
> [...]
>
> > --- a/include/uapi/linux/mctp.h
> > +++ b/include/uapi/linux/mctp.h
> > @@ -9,7 +9,28 @@
> >  #ifndef __UAPI_MCTP_H
> >  #define __UAPI_MCTP_H
> >
> > +#include <linux/types.h>
> > +
> > +typedef __u8                 mctp_eid_t;
> > +
> > +struct mctp_addr {
> > +     mctp_eid_t              s_addr;
> > +};
> > +
> >  struct sockaddr_mctp {
> > +     unsigned short int      smctp_family;
>
> This gap makes the size of struct sockaddr_mctp 2 bytes less at least
> on m68k, are you fine with that?
>
> > +     int                     smctp_network;
> > +     struct mctp_addr        smctp_addr;
> > +     __u8                    smctp_type;
> > +     __u8                    smctp_tag;

And it may be wise to add 1 byte of explicit padding here?
Or is there a good reason not to do so?

> >  };

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ