[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a58d4866-7ec3-48b2-8961-f1cdafe9bc4d@email.android.com>
Date: Fri, 27 Jan 2012 11:59:18 -0800
From: "hpanvin@...il.com" <hpa@...or.com>
To: Vasiliy Kulikov <segoon@...nwall.com>,
Cyrill Gorcunov <gorcunov@...nvz.org>
CC: LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Pavel Emelyanov <xemul@...nvz.org>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Pavel Emelyanov <xemul@...allels.com>,
Andrey Vagin <avagin@...nvz.org>,
KOSAKI Motohiro <kosaki.motohiro@...il.com>,
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>,
Alexey Dobriyan <adobriyan@...il.com>, Valdis.Kletnieks@...edu
Subject: Re: [RFC c/r 2/4] [RFC] syscalls, x86: Add __NR_kcmp syscall v7
No, cookies[1] is always odd.
Vasiliy Kulikov <segoon@...nwall.com> wrote:
>Hi Cyrill,
>
>On Fri, Jan 27, 2012 at 21:53 +0400, Cyrill Gorcunov wrote:
>> +/*
>> + * We don't expose real in-memory order of objects for security
>> + * reasons, still the comparision results should be suitable for
>> + * sorting. Thus, we obfuscate kernel pointers values (using random
>> + * cookies obtaned at early boot stage) and compare the production
>> + * instead.
>> + */
>> +static unsigned long cookies[KCMP_TYPES][2] __read_mostly;
>> +
>> +static long kptr_obfuscate(long v, int type)
>> +{
>> + return (v ^ cookies[type][0]) * cookies[type][1];
>
>AFACS, cookies is fully random value, is it possible that
>
>((v1 ^ cookies[type][0]) * cookies[type][1] == (v2 ^ cookies[type][0])
>* cookies[type][1]) &&
>(v1 != v2)
>
>for too round cookies[type][1]?
>
>Thanks,
>
>--
>Vasiliy Kulikov
>http://www.openwall.com - bringing security into open computing
>environments
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
--
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