mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jesper Juhl" <jesper.juhl@gmail.com>
To: "Andrew Morton" <akpm@osdl.org>
Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org, mingo@elte.hu,
	trini@kernel.crashing.org
Subject: Re: [patch 1/2] Validate itimer timeval from userspace
Date: Sat, 18 Mar 2006 22:50:30 +0100	[thread overview]
Message-ID: <9a8748490603181350i1b89d2a6k6b292f0e8ee11eb5@mail.gmail.com> (raw)
In-Reply-To: <20060318133351.41baa992.akpm@osdl.org>

On 3/18/06, Andrew Morton <akpm@osdl.org> wrote:
> "Jesper Juhl" <jesper.juhl@gmail.com> wrote:
> >
> > > It would be strange to set an alarm for 0xffffffff seconds in the future
> >  > but yeah, unless we can point at a reason why nobody could have ever been
> >  > doing that, we should turn this into permanent, documented behaviour of
> >  > Linux 2.6 and earlier, I'm afraid.
> >  >
> >
> >  How about 0xffffffff seconds into the future being the same as 136
> >  years (unless I botched the math)... That means that if any Linux
> >  application ever did that it's still waiting for the alarm and will be
> >  for at least another century...
> >  I'd say that makes it pretty certain that noone are doing or have been
> >  doing that without spotting the problem somehow - apps with such a bug
> >  are unlikely to be in production and actually working correctly.
>
> We just don't know.  People do all sorts of things.
>
> How about this?
>
>         $ cat /etc/my-expensive-app.conf
>         #
>         # Interval polling timer.  Set this to -1 to disable
>         #
>         interval_polling_timer=-1
>
> We just don't know.
>
True, someone might be doing something like that, but consider this as well;

an app promts the user to enter a value and passes it on, expecting to
get EINVAL back if the value is wrong and has code in place to handle
that (like, say, prompt the user for a different value).

That app is not buggy, but it will not work correctly because *we* are buggy.

IMO we should cater to the correctly written app and prevent it from
breaking unexpectedly rather than continue to keep the buggy one
working.

--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

  reply	other threads:[~2006-03-18 21:50 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-18 15:18 [patch 0/2] sys_setitimer and sys_alarm hotfixes Thomas Gleixner
2006-03-18 15:18 ` [patch 1/2] Validate itimer timeval from userspace Thomas Gleixner
2006-03-18 19:10   ` Ingo Molnar
2006-03-18 19:57     ` Thomas Gleixner
2006-03-18 20:07   ` Andrew Morton
2006-03-18 20:16     ` Thomas Gleixner
2006-03-18 20:31       ` Andrew Morton
2006-03-18 20:38         ` Thomas Gleixner
2006-03-18 21:09           ` Andrew Morton
2006-03-18 21:26             ` Jesper Juhl
2006-03-18 21:33               ` Andrew Morton
2006-03-18 21:50                 ` Jesper Juhl [this message]
2006-03-18 22:05             ` Thomas Gleixner
2006-03-18 22:25               ` Andrew Morton
2006-03-18 23:12                 ` tglx
2006-03-18 20:45         ` Jesper Juhl
2006-03-18 22:02           ` Ray Lee
2006-03-18 23:14           ` Eric Piel
2006-03-19  8:55             ` Kyle Moffett
2006-03-18 20:23     ` Jesper Juhl
2006-03-18 20:30       ` Thomas Gleixner
2006-03-18 21:04         ` Andrew Morton
2006-03-21 15:31           ` Pavel Machek
2006-03-18 15:18 ` [patch 2/2] alarm unsigned signed conversion fixup Thomas Gleixner
2006-03-18 20:02   ` Thomas Gleixner
2006-03-18 20:12   ` Andrew Morton
2006-03-18 20:27     ` Thomas Gleixner
2006-03-18 21:06       ` Andrew Morton

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=9a8748490603181350i1b89d2a6k6b292f0e8ee11eb5@mail.gmail.com \
    --to=jesper.juhl@gmail.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=trini@kernel.crashing.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

all inboxes | Powered by JetHome®