lkml.org 
[lkml]   [2012]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC c/r 2/4] [RFC] syscalls, x86: Add __NR_kcmp syscall v7
From
Date
No, cookies[1] is always odd.

Vasiliy Kulikov <segoon@openwall.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.


\
 
 \ /
  Last update: 2012-01-27 21:03    [W:0.122 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site