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: <CAGXJAmwSCeuwy6HXpzZgp8m+5v=NPCOTgKc-8LBjUuY079+h0w@mail.gmail.com>
Date: Tue, 29 Oct 2024 21:06:06 -0700
From: John Ousterhout <ouster@...stanford.edu>
To: Andrew Lunn <andrew@...n.ch>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH net-next 01/12] net: homa: define user-visible API for Homa

On Tue, Oct 29, 2024 at 2:59 PM Andrew Lunn <andrew@...n.ch> wrote:
>
> > +     int flags;
>
> Maybe give this a fixed size, otherwise it gets interesting when you
> have a 32 bit userspace running on top of a 64 bit kernel.

Good point; will do.

> > +     uint32_t _pad[1];
>
> If you ever want to be able to use this sometime in the future, it
> would be good to document that it should be filled with zero, and test
> is it zero. And if the kernel ever passes this structure back to
> userspace it should also fill it with zero.

It does have to be filled with zero, and it is checked. I'll document that.

> > +#if !defined(__cplusplus)
> > +_Static_assert(sizeof(struct homa_recvmsg_args) >= 120,
> > +            "homa_recvmsg_args shrunk");
> > +_Static_assert(sizeof(struct homa_recvmsg_args) <= 120,
> > +            "homa_recvmsg_args grew");
>
> Did you build for 32 bit systems?

Sadly no: my development system doesn't currently have any
cross-compiling versions of gcc :-( I think the best thing is to
remove these assertions from the kernel version of Homa. They are
there to make sure that I don't accidentally change the size of the
structure; I will keep them in the GitHub repo for Homa, which should
serve that purpose.

Thanks for the quick comments.

-John-

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ