All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Daney <ddaney.cavm@gmail.com>
To: Rich Felker <dalias@aerifal.cx>,
	"Pinski, Andrew" <Andrew.Pinski@caviumnetworks.com>
Cc: Andreas Barth <aba@ayous.org>,
	"Joseph S. Myers" <joseph@codesourcery.com>,
	David Miller <davem@davemloft.net>,
	aurelien@aurel32.net, linux-mips@linux-mips.org,
	libc-alpha@sourceware.org
Subject: Re: prlimit64: inconsistencies between kernel and userland
Date: Tue, 05 Nov 2013 10:43:28 -0800	[thread overview]
Message-ID: <52793C50.9030300@gmail.com> (raw)
In-Reply-To: <20131105183732.GB24286@brightrain.aerifal.cx>

On 11/05/2013 10:37 AM, Rich Felker wrote:
> On Tue, Nov 05, 2013 at 09:58:59AM +0100, Andreas Barth wrote:
>> * Rich Felker (dalias@aerifal.cx) [131105 02:22]:
>>> On Tue, Nov 05, 2013 at 01:04:45AM +0000, Joseph S. Myers wrote:
>>>> On Mon, 4 Nov 2013, David Miller wrote:
>>>>
>>>>> From: Aurelien Jarno <aurelien@aurel32.net>
>>>>> Date: Mon, 4 Nov 2013 22:37:56 +0100
>>>>>
>>>>>> Any news about this issue? It really starts to causes a lot of issues in
>>>>>> Debian. I have added a Cc: to libc people so that we can also hear their
>>>>>> opinion.
>>>>>
>>>>> I had the same exact problem on sparc several years ago, I simply fixed
>>>>> the glibc header value, it's the only way to fix this.
>>>>>
>>>>> Yes, that means you then have to recompile applications and libraries
>>>>> that reference this value.
>>>>
>>>> Surely you can create new symbol versions for getrlimit64 and setrlimit64,
>>>> with the old versions just using the 32-bit syscalls (or otherwise
>>>> translating between conventions, but using the 32-bit syscalls is the
>>>> simplest approach)?  I see no need to break compatibility with existing
>>>> binaries.
>>>>
>>>> As I noted in
>>>> <https://sourceware.org/ml/libc-ports/2006-05/msg00020.html>, at that time
>>>> the value of RLIM64_INFINITY for o32/n32 was purely a glibc convention the
>>>> kernel didn't see at all.  It's only with the use of newer syscalls that
>>>> this glibc convention is any sort of problem.
>>>
>>> Why not just make them convert any value >= 0x7fffffffffffffff to
>>> infinity before making the syscall? There's certainly no meaningful
>>> use for finite values in that range...
>>
>> Or just replace 0x7fffffffffffffff by kernels infinity - and still
>> fixing glibc, because the same value as the kernel should be the right
>> answer long term.
>
> Oh, I agree that change should be made too. I just suggested an
> additional fix that could be made to avoid the need for recompiling
> and replacing old binaries.
>

Why can't the default version of the functions in question be fixed so 
that they do the right thing?  That way you wouldn't have to rebuild old 
binaries.

Do we really need new function versions at all?


And FWIW:  I think Pinski might be looking at fixing this.

David Daney

  reply	other threads:[~2013-11-05 18:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-28 13:38 prlimit64: inconsistencies between kernel and userland Aurelien Jarno
2013-11-04 21:37 ` Aurelien Jarno
2013-11-05  0:45   ` David Miller
2013-11-05  1:04     ` Joseph S. Myers
2013-11-05  1:04       ` Joseph S. Myers
2013-11-05  1:22       ` Rich Felker
2013-11-05  8:58         ` Andreas Barth
2013-11-05 18:37           ` Rich Felker
2013-11-05 18:43             ` David Daney [this message]
2013-11-05 22:36               ` Joseph S. Myers
2013-11-05 22:36                 ` Joseph S. Myers
2013-11-05 22:39                 ` Rich Felker
2013-11-05 23:25                   ` Joseph S. Myers
2013-11-05 23:25                     ` Joseph S. Myers
2013-11-05 23:52                   ` Andreas Schwab
2013-11-05 23:52                     ` Andreas Schwab
2013-11-05 23:55                     ` Rich Felker
2013-11-06  0:23                       ` Russ Allbery
2013-11-06  0:23                         ` Russ Allbery
2013-11-05 15:13         ` Joseph S. Myers
2013-11-05 15:13           ` Joseph S. Myers

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=52793C50.9030300@gmail.com \
    --to=ddaney.cavm@gmail.com \
    --cc=Andrew.Pinski@caviumnetworks.com \
    --cc=aba@ayous.org \
    --cc=aurelien@aurel32.net \
    --cc=dalias@aerifal.cx \
    --cc=davem@davemloft.net \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-mips@linux-mips.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.