Re: + syscalls-x86-add-__nr_kcmp-syscall-v8.patch added to -mm tree

H. Peter Anvin
2012-04-11T00:08:57Z

On 04/10/2012 04:58 PM, Valdis.Kletnieks@vt.edu wrote:
>
> I'm not able to convince myself that "less than" and "greater than"
> mean anything - do we have a good proof that for all v1 and v2, the
> obfuscated pointers have the same ordering as the original
> pointers?
>

No, of course they don't.

That's the point.

The whole point is that kcmp() exports an ordered set, but the
ordering is explicitly and intentionally different than the actual
ordering in memory. It is still valid for sorting, in particular.

> Hmm... consider the simplified example v1 = 5 and v2= 16., and
> cookies[0] is also 16. Then obfus(v1) == 21, and obfus(v2) == 0,
> and the ordering is different. So I'm thinking 0 and 3 are the
> only sane return values?
>
> Or do I need more caffeine?

You need more caffeine. You're thinking about the problem wrong.

-hpa