From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F0D712BF04; Wed, 31 Jan 2024 16:16:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706717815; cv=none; b=DtlDLfrOpFKrgioGhjBUy4lPhId86mTNvTPgFy8Gnxm56g36zsTHfKIcfvqYmU20WLzuGyi/dUPDMYOcLNcGKsX2DLV6NUjGmGGE+hGCb3YOeQNMGpDKgwH0UFLLme1MZ3H7k9MyQrj4BkNGUUMGif3A9E5u0VCTos8y4Yup2lU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706717815; c=relaxed/simple; bh=UWlq1EvrM0m1ICwPMbYYxNGA47wTvXH22WzmLVpjSio=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DYO+zqimSqrEDPrvrtPfhVH6616/+e8MtYUvpuvT3pjuhPLP58GKGfoEiXToJGa6vWvx7VEAqFzK8aOUWnFWNfumkLnaQLPhTkk8TaJZpu7ZM4SP5XvkvQ5Cc4OZqwMY/T3LUVfRnC/DHObq2kbDJXfUA6HUibIcN09F7ili5Xg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=CgORUqrJ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="CgORUqrJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE299C43394; Wed, 31 Jan 2024 16:16:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1706717814; bh=UWlq1EvrM0m1ICwPMbYYxNGA47wTvXH22WzmLVpjSio=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CgORUqrJmMRy+gVz2WCDjKWTEcugunpPRz1KOkLESVexKQmfsQnJYdqUuBz3sUPZ5 uarGdPXOwzHzLluU5h8xUdzXA/6nuIWUeZPHlK37WXT8q8/lDhrNKur26A4mv8mYh4 u8PERyhH9A4LdAC+CI34Ay5qoQNbZssp3TOu4CAk= Date: Wed, 31 Jan 2024 08:16:54 -0800 From: Greg Kroah-Hartman To: Jiri Slaby Cc: Joe Damato , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, chuck.lever@oracle.com, jlayton@kernel.org, linux-api@vger.kernel.org, brauner@kernel.org, edumazet@google.com, davem@davemloft.net, alexander.duyck@gmail.com, sridhar.samudrala@intel.com, kuba@kernel.org, willemdebruijn.kernel@gmail.com, weiwan@google.com, David.Laight@aculab.com, arnd@arndb.de, Jonathan Corbet , Alexander Viro , Jan Kara , Michael Ellerman , Nathan Lynch , Thomas Zimmermann , Maik Broemme , Steve French , Julien Panis , Thomas Huth , Andrew Waterman , Albert Ou , Palmer Dabbelt , "open list:DOCUMENTATION" , "open list:FILESYSTEMS (VFS and infrastructure)" Subject: Re: [PATCH net-next v4 3/3] eventpoll: Add epoll ioctl for epoll_params Message-ID: <2024013145-payment-enjoyment-6274@gregkh> References: <20240131014738.469858-1-jdamato@fastly.com> <20240131014738.469858-4-jdamato@fastly.com> <2024013001-prison-strum-899d@gregkh> <20240131022756.GA4837@fastly.com> Precedence: bulk X-Mailing-List: linux-api@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Jan 31, 2024 at 07:03:54AM +0100, Jiri Slaby wrote: > On 31. 01. 24, 3:27, 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 ? > > You are likely looking for memchr_inv(). Ah, never noticed that, thanks!