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: <Zbm3AXgcwL9D6TNM@dread.disaster.area>
Date: Wed, 31 Jan 2024 13:57:05 +1100
From: Dave Chinner <david@...morbit.com>
To: Joe Damato <jdamato@...tly.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
	chuck.lever@...cle.com, jlayton@...nel.org,
	linux-api@...r.kernel.org, brauner@...nel.org, edumazet@...gle.com,
	davem@...emloft.net, alexander.duyck@...il.com,
	sridhar.samudrala@...el.com, kuba@...nel.org,
	willemdebruijn.kernel@...il.com, weiwan@...gle.com,
	David.Laight@...lab.com, arnd@...db.de,
	Jonathan Corbet <corbet@....net>,
	Alexander Viro <viro@...iv.linux.org.uk>, Jan Kara <jack@...e.cz>,
	Michael Ellerman <mpe@...erman.id.au>,
	Nathan Lynch <nathanl@...ux.ibm.com>,
	Thomas Zimmermann <tzimmermann@...e.de>,
	Maik Broemme <mbroemme@...mpq.org>,
	Steve French <stfrench@...rosoft.com>,
	Julien Panis <jpanis@...libre.com>,
	Jiri Slaby <jirislaby@...nel.org>, Thomas Huth <thuth@...hat.com>,
	Andrew Waterman <waterman@...s.berkeley.edu>,
	Albert Ou <aou@...s.berkeley.edu>,
	Palmer Dabbelt <palmer@...belt.com>,
	"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
	"open list:FILESYSTEMS (VFS and infrastructure)" <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH net-next v4 3/3] eventpoll: Add epoll ioctl for
 epoll_params

On Tue, Jan 30, 2024 at 06:27:57PM -0800, Joe Damato wrote:
> On Tue, Jan 30, 2024 at 06:08:36PM -0800, Greg Kroah-Hartman wrote:
> > On Wed, Jan 31, 2024 at 01:47:33AM +0000, Joe Damato wrote:
> > > +struct epoll_params {
> > > +	__aligned_u64 busy_poll_usecs;
> > > +	__u16 busy_poll_budget;
> > > +
> > > +	/* pad the struct to a multiple of 64bits for alignment on all arches */
> > > +	__u8 __pad[6];
> > 
> > You HAVE to check this padding to be sure it is all 0, otherwise it can
> > never be used in the future for anything.
> 
> Is there some preferred mechanism for this in the kernel that I should be
> using or is this as simple as adding a for loop to check each u8 == 0 ?

memchr_inv()

-Dave.
-- 
Dave Chinner
david@...morbit.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ