All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Carlos O'Donell" <carlos-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: "Michael Kerrisk (man-pages)"
	<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] man2/syscalls.2: Add prlimit64.
Date: Wed, 18 Jun 2014 10:40:18 -0400	[thread overview]
Message-ID: <53A1A4D2.60903@redhat.com> (raw)
In-Reply-To: <53A08684.7050804-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

On 06/17/2014 02:18 PM, Michael Kerrisk (man-pages) wrote:
> On 06/17/2014 04:41 PM, Carlos O'Donell wrote:
>> While trying to reconcile the new features in glibc with the
>> documented entries in the linux kernel man pages I noticed that
>> glibc exports prlimit64 for use by 32-bit applications (as does
>> the linux kernel), but that prlimit64 was not defined in the
>> syscalls list or in the prlimit-related page.
>>
>> This is not the complete fix for this, but I don't have the time
>> to explain why and when prlimit64 should be used (or how it should
>> be used safely). Therefore I'm just patching the syscalls.2 list
>> to show that prlimit64 exists and was added in 2.6.36 (verified
>> with git by checking out the tags before and after).
>>
>> Unless you've purposely excluded prlimit64 to avoid telling users
>> about it because it's complicated, please apply.
>>
>> Patch against master.
> 
> Thanks, Carlos. Applied. When you one day explain it, probably
> I will also get a bit of an educations :-).

It's the `struct rlimit64`-equivalent syscall for the kernel.

Given that prlimit and prlimit64 were added at the same
time glibc's prlimit function always calls prlimit64 and
converts where possible the struct rlimit64 to a struct
rlimit handling overflows and nasty error cases. So prlimit
is not a wrapper, but prlimit64 *is* just a syscall wrapper.
Thus the complexity and probably verbose notes we'll need to
add for direct usage of prlimit64.

Cheers,
Carlos.

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2014-06-18 14:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-17 14:41 [PATCH] man2/syscalls.2: Add prlimit64 Carlos O'Donell
     [not found] ` <53A053B3.1000704-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-06-17 18:18   ` Michael Kerrisk (man-pages)
     [not found]     ` <53A08684.7050804-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-06-18 14:40       ` Carlos O'Donell [this message]

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=53A1A4D2.60903@redhat.com \
    --to=carlos-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.