RE: [PATCH linux] net/ipv4: ping_group_range: allow GID from 2147483648 to 4294967294

From: David Laight
Date: Fri Jun 02 2023 - 06:52:07 EST


From: Kuniyuki Iwashima
> Sent: 01 June 2023 00:00
....
> > > --- a/include/net/ping.h
> > > +++ b/include/net/ping.h
> > > @@ -20,7 +20,7 @@
> > > * gid_t is either uint or ushort. We want to pass it to
> > > * proc_dointvec_minmax(), so it must not be larger than MAX_INT
> > > */
> > > -#define GID_T_MAX (((gid_t)~0U) >> 1)
> > > +#define GID_T_MAX ((gid_t)~0U)

Doesn't that comment need updating?

I do wonder how much code breaks for gid > MAXINT.
How much testing does it actually get??

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)