Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5d0e5283 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Linus Torvalds
Browse files

Add generic sys_old_select()



Add a generic implementation of the old select() syscall, which expects
its argument in a memory block and switch all architectures over to use
it.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Reviewed-by: default avatarH. Peter Anvin <hpa@zytor.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: James Morris <jmorris@namei.org>
Acked-by: default avatarAndreas Schwab <schwab@linux-m68k.org>
Acked-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Acked-by: default avatarGreg Ungerer <gerg@uclinux.org>
Acked-by: default avatarDavid Howells <dhowells@redhat.com>
Cc: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 724ee626
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -443,6 +443,7 @@
#define __ARCH_WANT_SYS_SIGPROCMASK
#define __ARCH_WANT_SYS_SIGPROCMASK
#define __ARCH_WANT_SYS_RT_SIGACTION
#define __ARCH_WANT_SYS_RT_SIGACTION
#define __ARCH_WANT_SYS_RT_SIGSUSPEND
#define __ARCH_WANT_SYS_RT_SIGSUSPEND
#define __ARCH_WANT_SYS_OLD_SELECT


#if !defined(CONFIG_AEABI) || defined(CONFIG_OABI_COMPAT)
#if !defined(CONFIG_AEABI) || defined(CONFIG_OABI_COMPAT)
#define __ARCH_WANT_SYS_TIME
#define __ARCH_WANT_SYS_TIME
+1 −1
Original line number Original line Diff line number Diff line
@@ -91,7 +91,7 @@
		CALL(sys_settimeofday)
		CALL(sys_settimeofday)
/* 80 */	CALL(sys_getgroups16)
/* 80 */	CALL(sys_getgroups16)
		CALL(sys_setgroups16)
		CALL(sys_setgroups16)
		CALL(OBSOLETE(old_select))	/* used by libc4 */
		CALL(OBSOLETE(sys_old_select))	/* used by libc4 */
		CALL(sys_symlink)
		CALL(sys_symlink)
		CALL(sys_ni_syscall)		/* was sys_lstat */
		CALL(sys_ni_syscall)		/* was sys_lstat */
/* 85 */	CALL(sys_readlink)
/* 85 */	CALL(sys_readlink)
+0 −21
Original line number Original line Diff line number Diff line
@@ -54,27 +54,6 @@ asmlinkage int old_mmap(struct mmap_arg_struct __user *arg)
	return error;
	return error;
}
}


/*
 * Perform the select(nd, in, out, ex, tv) and mmap() system
 * calls.
 */

struct sel_arg_struct {
	unsigned long n;
	fd_set __user *inp, *outp, *exp;
	struct timeval __user *tvp;
};

asmlinkage int old_select(struct sel_arg_struct __user *arg)
{
	struct sel_arg_struct a;

	if (copy_from_user(&a, arg, sizeof(a)))
		return -EFAULT;
	/* sys_select() does the appropriate kernel locking */
	return sys_select(a.n, a.inp, a.outp, a.exp, a.tvp);
}

#if !defined(CONFIG_AEABI) || defined(CONFIG_OABI_COMPAT)
#if !defined(CONFIG_AEABI) || defined(CONFIG_OABI_COMPAT)
/*
/*
 * sys_ipc() is the de-multiplexer for the SysV IPC calls..
 * sys_ipc() is the de-multiplexer for the SysV IPC calls..
+1 −0
Original line number Original line Diff line number Diff line
@@ -348,6 +348,7 @@
#define __ARCH_WANT_SYS_LLSEEK
#define __ARCH_WANT_SYS_LLSEEK
#define __ARCH_WANT_SYS_NICE
#define __ARCH_WANT_SYS_NICE
#define __ARCH_WANT_SYS_OLD_GETRLIMIT
#define __ARCH_WANT_SYS_OLD_GETRLIMIT
#define __ARCH_WANT_SYS_OLD_SELECT
#define __ARCH_WANT_SYS_OLDUMOUNT
#define __ARCH_WANT_SYS_OLDUMOUNT
#define __ARCH_WANT_SYS_SIGPENDING
#define __ARCH_WANT_SYS_SIGPENDING
#define __ARCH_WANT_SYS_SIGPROCMASK
#define __ARCH_WANT_SYS_SIGPROCMASK
+0 −16
Original line number Original line Diff line number Diff line
@@ -60,22 +60,6 @@ asmlinkage int old_mmap(struct mmap_arg_struct *arg)
	return error;
	return error;
}
}


struct sel_arg_struct {
	unsigned long n;
	fd_set *inp, *outp, *exp;
	struct timeval *tvp;
};

asmlinkage int old_select(struct sel_arg_struct *arg)
{
	struct sel_arg_struct a;

	if (copy_from_user(&a, arg, sizeof(a)))
		return -EFAULT;
	/* sys_select() does the appropriate kernel locking */
	return sys_select(a.n, a.inp, a.outp, a.exp, a.tvp);
}

/*
/*
 * sys_ipc() is the de-multiplexer for the SysV IPC calls..
 * sys_ipc() is the de-multiplexer for the SysV IPC calls..
 *
 *
Loading