lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTilaOOlzS2cJXCJF8Qn_cqjr7ywUv9RUTSsK9pf3@mail.gmail.com>
Date:	Mon, 28 Jun 2010 08:15:26 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Ulrich Drepper <drepper@...hat.com>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Darren Hart <dvhltc@...ibm.com>, Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Andreas Schwab <schwab@...hat.com>,
	Danny Feng <dfeng@...hat.com>,
	Jakub Jelinek <jakub@...hat.com>, linux-kernel@...r.kernel.org,
	Oleg Nesterov <oleg@...hat.com>
Subject: Re: Q: sys_futex() && timespec_valid()

On Fri, Jun 25, 2010 at 1:04 PM, Ulrich Drepper <drepper@...hat.com> wrote:
>
> The tv_sec in timespec is of type time_t and for absolute time values the same
> semantics as for naked time_t values applies.  The absolute time is
>
>  epoch + tv_sec + tv_nsec / 1000000000
>
> If tv_sec is negative these are values before epoch.

That's a totally bogus argument.

Ulrich - you're wrong. Go away.

According to that same argument, negative tv_nsec values (or values
above a billion) would also be ok, since that expression would also
give some random value for time. So clearly, the fact that the
expression gives some random value does _not_ in any way mean that we
should accept that random value. Your "argument" isn't an argument at
all, it's just worthless random noise.

The fact is, a negative tv_sec could indeed mean "before the epoch",
but it could equally well (and way more likely) mean "totally buggy
application" or "overflow of a very large positive value".

In the end, it's quite simple: the kernel doesn't accept invalid
timevals. And negative tv_secs are invalid. It's that simple. If
somebody gives the kernel a timeout from before the epoch, that
somebody is being a total idiot. We know it's not a valid absolute
timeout, since there's no way somebody is "waiting" for something that
happened in the sixties.

Yeah, yeah, maybe you're waiting for flower power and free sex. Good
for you. But if you are, don't ask the Linux kernel to wait with you.
Ok?

                           Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ