From: Andrew Morton <akpm@osdl.org>
To: tglx@linutronix.de
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu, trini@kernel.crashing.org
Subject: Re: [patch 2/2] alarm unsigned signed conversion fixup
Date: Sat, 18 Mar 2006 13:06:18 -0800 [thread overview]
Message-ID: <20060318130618.76075192.akpm@osdl.org> (raw)
In-Reply-To: <1142713634.17279.136.camel@localhost.localdomain>
Thomas Gleixner <tglx@linutronix.de> wrote:
>
> On Sat, 2006-03-18 at 12:12 -0800, Andrew Morton wrote:
> > Thomas Gleixner <tglx@linutronix.de> wrote:
> > >
> > > alarm() calls the kernel with an unsigend int timeout in seconds.
> > > The value is converted to a timeval which is used to setup the
> > > itimer. The tv_sec field of the timeval is a long, which causes
> > > the timeout to be negative on 32 bit machines if seconds > INT_MAX.
> > > Also this was silently caught before the hrtimer merge.
> > > To avoid fixups all over the place the duplicated sys_alarm code
> > > is moved to itimer.c.
> >
> > It's not clear what you mean by this. What does "silently caught" mean?
> >
> > I _think_ you mean "a negative tv_sec gets treated in a random fashion, but
> > with my preceding patch it will incorrectly get -EINVAL, so fix things to
> > accept this large tv_sec". Or something else.
> >
> > Please clarify.
> >
> > What happens if change sys_setitimer() to normalise the incoming timeval as
> > I suggested? I guess that doesn't affect this..
>
> No, because a negative value does not become positive by normalizing.
> Well except you build a normalizing function which converts negative
> values to INT_MAX.
>
I just don't know what this patch does, sorry.
I could go read it and work that out, but am lazy.
Can we start again?
prev parent reply other threads:[~2006-03-18 21:09 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
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 [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=20060318130618.76075192.akpm@osdl.org \
--to=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
Powered by JetHome