mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@infradead.org>
To: William Lee Irwin III <wli@holomorphy.com>
Cc: Andrew Morton <akpm@osdl.org>,
	matthias@corelatus.se, linux-kernel@vger.kernel.org
Subject: Re: patch to fix set_itimer() behaviour in boundary cases
Date: Sat, 15 Jan 2005 10:58:45 +0100	[thread overview]
Message-ID: <1105783125.6300.32.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <20050115093657.GI3474@holomorphy.com>

On Sat, 2005-01-15 at 01:36 -0800, William Lee Irwin III wrote:
> Matthias Lang <matthias@corelatus.se> wrote:
> >> The linux implementation of setitimer() doesn't behave quite as
> >>  expected. I found several problems:
> >>    1. POSIX says that negative times should cause setitimer() to 
> >>       return -1 and set errno to EINVAL. In linux, the call succeeds.
> >>    2. POSIX says that time values with usec >= 1000000 should
> >>       cause the same behaviour. In linux, the call succeeds.
> >>    3. If large time values are given, linux quietly truncates them
> >>       to the maximum time representable in jiffies. On 2.4.4 on PPC,
> >>       that's about 248 days. On 2.6.10 on x86, that's about 24 days.
> >>       POSIX doesn't really say what to do in this case, but looking at
> >>       established practice, i.e. "what BSD does", since the call comes 
> >>       from BSD, *BSD returns -1 if the time is out of range.
> 
> On Sat, Jan 15, 2005 at 01:30:13AM -0800, Andrew Morton wrote:
> > These are things we probably cannot change now.  All three are arguably
> > sensible behaviour and do satisfy the principle of least surprise.  So
> > there may be apps out there which will break if we "fix" these things.
> > If the kernel version was 2.7.0 then well maybe...
> 
> We can easily do a "rolling upgrade" by adding new versions of the
> system calls, giving glibc and apps grace periods to adjust to them,
> and nuking the old versions in a few years.

but for 1: do we care? it is being more tolerant than allowed by a
standard. Those who care can easily add the test in the userspace
wrapper

for 2: we again are more tolerant and dtrt; again. And again userspace
wrapper can impose an additional restriction if it wants

3 is more nasty and needs thinking; we could consider a fix inside the
kernel that actually does wait long enough


I don't see a valid reason to restrict/reject input that is accepted now
and dealt with reasonably because some standard says so (if you design a
new api, following the standard is nice of course). I don't see "doesn't
reject a condition that can reasonable be dealt with" as a good reason
to go double ABI at all.



  reply	other threads:[~2005-01-15  9:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-15  8:45 Matthias Lang
2005-01-15  9:30 ` Andrew Morton
2005-01-15  9:36   ` William Lee Irwin III
2005-01-15  9:58     ` Arjan van de Ven [this message]
2005-01-15 10:07       ` William Lee Irwin III
2005-01-15 19:55       ` Chris Wedgwood
2005-01-15 20:20         ` Arjan van de Ven
2005-01-15 23:25           ` Matthias Lang
2005-01-15 23:39             ` Randy.Dunlap
2005-01-16  0:58   ` Alan Cox
2005-01-16 12:11     ` Arjan van de Ven
2005-01-19 23:51       ` George Anzinger
2005-01-20  8:07         ` Arjan van de Ven
2005-01-20 23:12           ` George Anzinger
2005-01-21  7:49             ` Arjan van de Ven
2005-01-21  8:22               ` George Anzinger

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=1105783125.6300.32.camel@laptopd505.fenrus.org \
    --to=arjan@infradead.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthias@corelatus.se \
    --cc=wli@holomorphy.com \
    /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

all inboxes | Powered by JetHome®