public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Matt Turner <mattst88@gmail.com>
To: "Carlos O'Donell" <carlos@redhat.com>
Cc: libc-alpha@sourceware.org, Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [PATCH] alpha: correct handling of negative *rlimit() args besides -1
Date: Sun, 9 Oct 2022 22:18:43 -0400	[thread overview]
Message-ID: <CAEdQ38FDb6A5BpuD6it7jNTN2NYDiezEWEwnEfVVRX=rpe8u+Q@mail.gmail.com> (raw)
In-Reply-To: <1e7ae13a-e5dd-2e0e-60ff-637284d3f8a9@redhat.com>

On Sun, Oct 9, 2022 at 8:51 PM Carlos O'Donell <carlos@redhat.com> wrote:
>
> On 10/7/22 22:45, Matt Turner via Libc-alpha wrote:
> > The generic version of RLIM_INFINITY in Linux is equal to (rlim_t)-1,
> > which is equal to ULLONG_MAX.  On alpha however it is instead defined as
> > 0x7ffffffffffffffful.  This was special-cased in 0d0bc78 [BZ #22648] but
> > it specifically used an equality check.
> >
> > There is a cpython test case test_prlimit_refcount which calls
> > setrlimit() with { -2, -2 } as arguments rather than the usual -1, it
> > therefore fails the equality test and is treated as a large arbitrary
> > positive value past the maximum of RLIM_INFINITY and fails with EPERM.
> > This patch changes the behavior of the *rlimit() calls to treat all
> > integers between 0x7ffffffffffffffful and (rlim_t)-1 as (rlim_t)-1,
> > i.e., RLIM_INFINITY.
> > ---
> >  sysdeps/unix/sysv/linux/alpha/getrlimit64.c | 4 ++--
> >  sysdeps/unix/sysv/linux/alpha/setrlimit64.c | 4 ++--
>
> Is MIPS affected by the same problem?

Looks to me like it is, but I don't have a mips system running to
confirm. If this patch is accepted, I'll send a follow-up for mips.

  reply	other threads:[~2022-10-10  2:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-08  2:45 Matt Turner
2022-10-10  0:51 ` Carlos O'Donell
2022-10-10  2:18   ` Matt Turner [this message]
2022-10-10 18:44 ` Aurelien Jarno
2023-02-14 19:38   ` matoro
2023-10-09  2:01     ` matoro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEdQ38FDb6A5BpuD6it7jNTN2NYDiezEWEwnEfVVRX=rpe8u+Q@mail.gmail.com' \
    --to=mattst88@gmail.com \
    --cc=aurelien@aurel32.net \
    --cc=carlos@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).