lkml.org 
[lkml]   [2012]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: + syscalls-x86-add-__nr_kcmp-syscall-v8.patch added to -mm tree
On 04/11, Cyrill Gorcunov wrote:
>
> --- linux-2.6.git.orig/kernel/kcmp.c
> +++ linux-2.6.git/kernel/kcmp.c
> @@ -17,6 +17,17 @@
> * reasons, still the comparison results should be suitable for
> * sorting. Thus, we obfuscate kernel pointers values and compare
> * the production instead.
> + *
> + * The obfuscation is done in two steps. First -- we use xor on
> + * kernel pointer with random value, which puts pointer into
> + * a new position in reordered space. Second -- we multiply
> + * the xor production with big odd random number to permute
> + * bits even more (the oddity is important here, it allow
> + * us to have meaningful production even if multiplicants
> + * are big numbers).
> + *
> + * Note also the obfuscation itself is invisible to user-space
> + * and if needed it can be changed to any suitable scheme.
> */
> static unsigned long cookies[KCMP_TYPES][2] __read_mostly;

OK, since this is discussed again...

Can this comment can also explain why do we obfuscate the pointers
by type? I mean, I don't really understand why the one-dimensional
cookies[2] is "not enough" from security pov.

Oleg.



\
 
 \ /
  Last update: 2012-04-11 01:13    [W:0.448 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site