[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120124140011.60b6488c.akpm@linux-foundation.org>
Date: Tue, 24 Jan 2012 14:00:11 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: Cyrill Gorcunov <gorcunov@...il.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
KOSAKI Motohiro <kosaki.motohiro@...il.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
linux-kernel@...r.kernel.org,
Pavel Emelyanov <xemul@...allels.com>,
Serge Hallyn <serge.hallyn@...onical.com>,
Kees Cook <keescook@...omium.org>, Tejun Heo <tj@...nel.org>,
Andrew Vagin <avagin@...nvz.org>,
Alexey Dobriyan <adobriyan@...il.com>,
Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>,
Glauber Costa <glommer@...allels.com>,
Andi Kleen <andi@...stfloor.org>,
Matt Helsley <matthltc@...ibm.com>,
Pekka Enberg <penberg@...nel.org>,
Eric Dumazet <eric.dumazet@...il.com>,
Vasiliy Kulikov <segoon@...nwall.com>, Valdis.Kletnieks@...edu
Subject: Re: [patch 2/4] [RFC] syscalls, x86: Add __NR_kcmp syscall v4
On Tue, 24 Jan 2012 13:46:31 -0800
"H. Peter Anvin" <hpa@...or.com> wrote:
> On 01/24/2012 01:45 PM, Andrew Morton wrote:
> > On Tue, 24 Jan 2012 13:22:22 -0800
> > Andrew Morton <akpm@...ux-foundation.org> wrote:
> >
> >> static int kcmp_task_pointers(void *task1, void *task2, size_t field_offset,
> >> enum you_forgot_to_name_the_enum type)
> >> {
> >> void **field1 = t1 + field_offset; /* points to a pointer in the task_struct */
> >> void **field2 = t1 + field_offset;
> >
> > On reflection, this was being too cute. It would be better to make the
> > function type-safer and just put up with the local typecasts:
> >
> > static int kcmp_task_pointers(struct task_struct *task1,
> > struct task_struct *task2, size_t field_offset,
> > enum you_forgot_to_name_the_enum type)
> > {
> > void **field1 = (void *)t1 + field_offset;
> > void **field2 = (void *)t2 + field_offset;
> >
>
> Arithmetic on void pointers?
>
All the world is gcc!
--
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