This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC v1 05/16] sysdeps/getrlimit: Use __NR_prlimit64 if avaliable
On Sun, Jun 23, 2019 at 12:48 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Sat, Jun 22, 2019 at 6:47 AM Alistair Francis
> <alistair.francis@wdc.com> wrote:
>
> > diff --git a/sysdeps/unix/sysv/linux/getrlimit.c b/sysdeps/unix/sysv/linux/getrlimit.c
> > index 10c0176619..2917029afd 100644
> > --- a/sysdeps/unix/sysv/linux/getrlimit.c
> > +++ b/sysdeps/unix/sysv/linux/getrlimit.c
> > @@ -35,7 +35,11 @@
> > int
> > __new_getrlimit (enum __rlimit_resource resource, struct rlimit *rlim)
> > {
> > +#ifdef __NR_prlimit64
> > + return INLINE_SYSCALL_CALL (prlimit64, 0, resource, rlim, NULL);
> > +#else
> > return INLINE_SYSCALL_CALL (ugetrlimit, resource, rlim);
> > +#endif
> > }
> > weak_alias (__new_getrlimit, __getrlimit)
> > hidden_weak (__getrlimit)
>
> This breaks all other 32-bit architectures, since glibc traditionally uses
> 32-bit limits even on architectures that always supported the 64-bit
> interface.
If we just mask out the high bits will that fix the problem?
Alistair
>
> Arnd