[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F199CE7.3020900@zytor.com>
Date: Fri, 20 Jan 2012 08:57:11 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Cyrill Gorcunov <gorcunov@...il.com>
CC: "Eric W. Biederman" <ebiederm@...ssion.com>,
Pavel Emelyanov <xemul@...allels.com>,
KOSAKI Motohiro <kosaki.motohiro@...il.com>, david@...g.hm,
Alexey Dobriyan <adobriyan@...il.com>,
LKML <linux-kernel@...r.kernel.org>,
Andrey Vagin <avagin@...nvz.org>, Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>,
Glauber Costa <glommer@...allels.com>,
Andi Kleen <andi@...stfloor.org>, Tejun Heo <tj@...nel.org>,
Matt Helsley <matthltc@...ibm.com>,
Pekka Enberg <penberg@...nel.org>,
Eric Dumazet <eric.dumazet@...il.com>,
Vasiliy Kulikov <segoon@...nwall.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Valdis.Kletnieks@...edu
Subject: Re: [RFC] syscalls, x86: Add __NR_kcmp syscall
On 01/20/2012 08:29 AM, Cyrill Gorcunov wrote:
>
> We've had kind of emergency pool before which were used in such cases.
> These legitime cases can happen not that frequently, so I guess -- can
> we use it again?
>
> if (cookies[i][j])
> continue;
> else
> cookies[i][j] = some-value;
>
> One wont know which exactly values we were using.
>
I would not worry about get_random_bytes() returning nothing... if so, a
lot of other places in the kernel would be broken.
>> The other thing is that for the multiplicative cookie you should OR in
>> the value (~(~0UL>> 1) | 1) in order to make sure that the value is (a)
>> large and (b) odd.
>>
>
> I see, i'll update (at first, I occasionally translated odd as 'even' which
> made me really scratching the head, until I realized it's 'odd'! :)
>
> Cyrill
--
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