lkml.org 
[lkml]   [2024]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next v4 3/3] eventpoll: Add epoll ioctl for epoll_params
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!

\
 
 \ /
  Last update: 2024-05-27 14:43    [W:0.035 / U:2.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site