[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120127181119.GE11086@moon>
Date: Fri, 27 Jan 2012 22:11:19 +0400
From: Cyrill Gorcunov <gorcunov@...nvz.org>
To: "H. Peter Anvin" <hpa@...or.com>
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>,
Vasiliy Kulikov <segoon@...nwall.com>,
Alexey Dobriyan <adobriyan@...il.com>, Valdis.Kletnieks@...edu
Subject: Re: [RFC c/r 2/4] [RFC] syscalls, x86: Add __NR_kcmp syscall v7
On Fri, Jan 27, 2012 at 10:05:18AM -0800, H. Peter Anvin wrote:
> + */
> > +static int kcmp_ptr(long v1, long v2, enum kcmp_type type)
> > +{
> > + long ret;
> > +
> > + ret = kptr_obfuscate(v1, type) - kptr_obfuscate(v2, type);
> > +
> > + return (ret < 0) | ((ret > 0) << 1);
> > +}
> > +
>
> I just want to point out that we could do hard cryptography, too --
> using DES or AES and compare the result since symmetric cryptography is
> an isomorphism. One would have to compare the whole result, obviously,
> not a truncated one, so using memcmp() or the similar.
>
> I'll leave it up to the security guys to worry about if that is needed,
> but since it is something that can be slotted in without changing the
> API it seems reasonably safe.
>
Yes, it's internal operations not visible to user-space. Actually I thought
to even introduce kind of sysctl later so admin would be able to refresh
cookies manually when needed or completely disable this interface as well.
But not in this patch ;)
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