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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 23 Dec 2009 12:24:30 -0800
From:	"Smith, GeoffX" <geoffx.smith@...el.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	Andi Kleen <andi@...stfloor.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Michael Stone <michael@...top.org>,
	Arjan van de Ven <arjan@...radead.org>
Subject: RE: [PATCH] prctl: return MCE process flags through pointer

Earlier today, Andrew Morton <akpm@...ux-foundation.org> wrote:
>>
>> >Why are task_struct.timer_slack_ns and
>> >task_struct.default_timer_slack_ns unsigned long, btw?  AFACIT we could
>> >make them unsigned ints.
>>
>> Timer slack is not a Boolean or enum, and we want the greatest range
>possible.  (Actually, I'd like to talk Arjan into using the same time
>structure as select(), but that's another discussion.) Internally hrtimer
>uses unsigned long.  I know long and unsigned long are the same on some
>architectures, but let's not introduce an unnatural restriction -- recall
>that arg2 is unsigned long.
>
>Using unsigned ints will reduce the size of the task_struct.
>
>Is there any conceivable case for a timer_slack which exceeds four
>seconds?  If so, what is it, and if so, why this:
>
>#define MAX_SLACK       (100 * NSEC_PER_MSEC)
>
>

WRT to times longer than 4.2 sec -- So far my works suggests there is a good case, but it's moot because that is all I get with unsigned long on my platform.  (Both int and long are 32-bit for me; x86)

WRT MAX_SLACK, select() always imposes a little slack (for non-real-time threads).  The name MAX_SLACK is not actually the absolute maximum, it is only the maximum that the kernel will impose by default. 

--
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