[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201001062052.11641.arnd@arndb.de>
Date: Wed, 6 Jan 2010 20:52:11 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Christoph Hellwig <hch@....de>
Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
linux-arch@...r.kernel.org, linux@....linux.org.uk,
starvik@...s.com, jesper.nilsson@...s.com, dhowells@...hat.com,
ysato@...rs.sourceforge.jp, takata@...ux-m32r.org,
geert@...ux-m68k.org, zippel@...ux-m68k.org, gerg@...inux.org,
ralf@...ux-mips.org, benh@...nel.crashing.org,
schwidefsky@...ibm.com, heiko.carstens@...ibm.com,
lethal@...ux-sh.org, davem@...emloft.net, jdike@...toit.com,
tglx@...utronix.de, mingo@...hat.com, hpa@...or.com,
viro@...iv.linux.org.uk
Subject: Re: [PATCH 3/3] generic sys_ipc wrapper
On Wednesday 06 January 2010 18:21:52 Christoph Hellwig wrote:
>
> Add a generic implementation of the ipc demultiplexer syscall. Except for
> s390 and sparc64 all implementations of the sys_ipc are nearly identical.
Very nice patch, too bad we didn't already do that ages ago ;)
> + switch (version) {
> + default: {
> + ulong raddr;
> + ret = do_shmat(first, (char __user *)ptr,
> + second, &raddr);
> + if (ret)
> + return ret;
> + return put_user(raddr, (ulong __user *) third);
> + }
> +
> +#if defined(__i386__) || defined(__frv__) || defined(__mips__) ||\
> + defined(__mn10300__)
> + case 1:
> + /* iBCS2 emulator entry point */
> + if (!segment_eq(get_fs(), get_ds()))
> + return -EINVAL;
> + /*
> + * The "(ulong *) third" is valid _only_ because of
> + * the kernel segment thing.
> + */
> + return do_shmat(first, (char __user *) ptr, second,
> + (unsigned long *)third);
> +#endif
> +#if defined(__arm__) || defined(__sparc__)
> + case 1:
> + /* Of course, we don't support iBCS2! */
> + return -EINVAL;
> +#endif
> + }
This would not build on any of the architecture mentioned, because of
incorrect placement of curly braces, but as Al mentioned it should just
go away entirely.
> Index: linux-2.6/arch/powerpc/include/asm/syscalls.h
> ===================================================================
> --- linux-2.6.orig/arch/powerpc/include/asm/syscalls.h 2010-01-04 15:44:58.578028035 +0100
> +++ linux-2.6/arch/powerpc/include/asm/syscalls.h 2010-01-04 15:45:57.408253467 +0100
> @@ -35,8 +35,6 @@ asmlinkage long sys_pipe2(int __user *fi
> asmlinkage long sys_rt_sigaction(int sig,
> const struct sigaction __user *act,
> struct sigaction __user *oact, size_t sigsetsize);
> -asmlinkage int sys_ipc(uint call, int first, unsigned long second,
> - long third, void __user *ptr, long fifth);
> asmlinkage long ppc64_personality(unsigned long personality);
> asmlinkage int ppc_rtas(struct rtas_args __user *uargs);
> asmlinkage time_t sys64_time(time_t __user * tloc);
I did not see you add the prototype back into include/linux/syscalls.h,
which is required for building some architectures, including ppc64 with
SPU support.
Arnd
--
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