Subject: Re: [PATCH] change compat shmget size arg to signed

From: Olaf Hering <[email-masked]>
Date: Mon, 6 Mar 2006 20:38:17 +0100

On Fri, Feb 24, Stephen Rothwell wrote:

> On Fri, 24 Feb 2006 00:27:17 +0100 Olaf Hering <[email-masked]> wrote:
> >
> >  On Fri, Feb 24, Stephen Rothwell wrote:
> > 
> > > Does the ltp test fail on a standard kernel(where SHMMAX is 0x2000000), or
> > > only on a SLES kernel (where SHMMAX is ULONG_MAX)?
> > 
> > It fails with SLES9 and SLES10. SLES9 has 0x2000000 as default.
> 
> So what was shm_ctlmax set to when the test was run.
> 
> I am trying to figure out why this test:
> 
> if (size < SHMMIN || size > shm_ctlmax)
>                 return -EINVAL;
> 
> Doesn't return -EINVAL for size == 0xffffffff if shm_ctlmax is 0x2000000?

shm_ctlmax is a sysctrl, so it can have anything. The ltp test is
invalid. shmget02 dos not fail after:
echo $(( 0x2000000 )) > /proc/sys/kernel/shmmax