From: Stephen Rothwell Date: Fri, 12 Oct 2012 04:09:13 +0000 (+1100) Subject: Merge remote-tracking branch 'signal/for-next' X-Git-Tag: next-20121012~3 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=09b2d223b3e792729ae16351d221d5282520447c;p=karo-tx-linux.git Merge remote-tracking branch 'signal/for-next' Conflicts: arch/arm/include/asm/thread_info.h arch/c6x/Kconfig arch/c6x/kernel/process.c arch/frv/kernel/process.c arch/m68k/Kconfig arch/m68k/kernel/process.c arch/mn10300/Kconfig arch/mn10300/kernel/process.c arch/powerpc/Kconfig arch/powerpc/kernel/process.c arch/powerpc/kernel/sys_ppc32.c --- 09b2d223b3e792729ae16351d221d5282520447c diff --cc arch/arm/include/asm/thread_info.h index f71cdab18b87,b2d6b412172d..8477b4c1d39f --- a/arch/arm/include/asm/thread_info.h +++ b/arch/arm/include/asm/thread_info.h @@@ -150,8 -148,6 +150,7 @@@ extern int vfp_restore_user_hwstate(str #define TIF_NOTIFY_RESUME 2 /* callback before returning to user */ #define TIF_SYSCALL_TRACE 8 #define TIF_SYSCALL_AUDIT 9 +#define TIF_SYSCALL_TRACEPOINT 10 - #define TIF_POLLING_NRFLAG 16 #define TIF_USING_IWMMXT 17 #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ #define TIF_RESTORE_SIGMASK 20 @@@ -163,8 -159,6 +162,7 @@@ #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) +#define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT) - #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) #define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT) #define _TIF_SECCOMP (1 << TIF_SECCOMP) diff --cc arch/c6x/Kconfig index f6a3648f5ec3,45268b50c0c8..20ef56e467b3 --- a/arch/c6x/Kconfig +++ b/arch/c6x/Kconfig @@@ -17,7 -17,7 +17,8 @@@ config C6 select OF select OF_EARLY_FLATTREE select GENERIC_CLOCKEVENTS + select MODULES_USE_ELF_RELA + select GENERIC_KERNEL_THREAD config MMU def_bool n diff --cc arch/c6x/include/uapi/asm/unistd.h index ed2259043eec,000000000000..4ff747d12dad mode 100644,000000..100644 --- a/arch/c6x/include/uapi/asm/unistd.h +++ b/arch/c6x/include/uapi/asm/unistd.h @@@ -1,22 -1,0 +1,25 @@@ +/* + * Copyright (C) 2011 Texas Instruments Incorporated + * + * Based on arch/tile version. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, version 2. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or + * NON INFRINGEMENT. See the GNU General Public License for + * more details. + */ + ++#define __ARCH_WANT_KERNEL_EXECVE ++#define __ARCH_WANT_SYS_EXECVE ++ +/* Use the standard ABI for syscalls. */ +#include + +/* C6X-specific syscalls. */ +#define __NR_cache_sync (__NR_arch_specific_syscall + 0) +__SYSCALL(__NR_cache_sync, sys_cache_sync) diff --cc arch/m68k/Kconfig index 6710084e072a,ccda007ba40f..dfdb315f5609 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig @@@ -15,9 -13,7 +15,10 @@@ config M68 select FPU if MMU select ARCH_WANT_IPC_PARSE_VERSION select ARCH_USES_GETTIMEOFFSET if MMU && !COLDFIRE + select HAVE_MOD_ARCH_SPECIFIC + select MODULES_USE_ELF_REL + select MODULES_USE_ELF_RELA + select GENERIC_KERNEL_THREAD config RWSEM_GENERIC_SPINLOCK bool diff --cc arch/mn10300/Kconfig index aa03f2e13385,ddbdc33471a8..549b9e50182e --- a/arch/mn10300/Kconfig +++ b/arch/mn10300/Kconfig @@@ -8,7 -8,7 +8,8 @@@ config MN1030 select HAVE_ARCH_KGDB select HAVE_NMI_WATCHDOG if MN10300_WD_TIMER select GENERIC_CLOCKEVENTS + select MODULES_USE_ELF_RELA + select GENERIC_KERNEL_THREAD config AM33_2 def_bool n diff --cc arch/powerpc/Kconfig index 0116f6ed23e0,6e5a0979c085..359f5765deac --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@@ -141,8 -139,7 +141,9 @@@ config PP select GENERIC_CLOCKEVENTS select GENERIC_STRNCPY_FROM_USER select GENERIC_STRNLEN_USER + select HAVE_MOD_ARCH_SPECIFIC + select MODULES_USE_ELF_RELA + select GENERIC_KERNEL_THREAD config EARLY_PRINTK bool diff --cc arch/powerpc/include/asm/unistd.h index d974bca0c33d,26a6825909b6..921dce6d8445 --- a/arch/powerpc/include/asm/unistd.h +++ b/arch/powerpc/include/asm/unistd.h @@@ -53,8 -419,9 +53,10 @@@ #define __ARCH_WANT_COMPAT_SYS_TIME #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND #define __ARCH_WANT_SYS_NEWFSTATAT +#define __ARCH_WANT_COMPAT_SYS_SENDFILE #endif + #define __ARCH_WANT_SYS_EXECVE + #define __ARCH_WANT_KERNEL_EXECVE /* * "Conditional" syscalls diff --cc arch/powerpc/kernel/sys_ppc32.c index a3de472b7246,a1ae73a0f352..9c2ed90ece8f --- a/arch/powerpc/kernel/sys_ppc32.c +++ b/arch/powerpc/kernel/sys_ppc32.c @@@ -143,42 -143,50 +143,19 @@@ long compat_sys_ipc(u32 call, u32 first * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) * and the register representation of a signed int (msr in 64-bit mode) is performed. */ -asmlinkage long compat_sys_sendfile(u32 out_fd, u32 in_fd, compat_off_t __user * offset, u32 count) +asmlinkage long compat_sys_sendfile_wrapper(u32 out_fd, u32 in_fd, + compat_off_t __user *offset, u32 count) { - mm_segment_t old_fs = get_fs(); - int ret; - off_t of; - off_t __user *up; - - if (offset && get_user(of, offset)) - return -EFAULT; - - /* The __user pointer cast is valid because of the set_fs() */ - set_fs(KERNEL_DS); - up = offset ? (off_t __user *) &of : NULL; - ret = sys_sendfile((int)out_fd, (int)in_fd, up, count); - set_fs(old_fs); - - if (offset && put_user(of, offset)) - return -EFAULT; - - return ret; + return compat_sys_sendfile((int)out_fd, (int)in_fd, offset, count); } -asmlinkage int compat_sys_sendfile64(int out_fd, int in_fd, compat_loff_t __user *offset, s32 count) +asmlinkage long compat_sys_sendfile64_wrapper(u32 out_fd, u32 in_fd, + compat_loff_t __user *offset, u32 count) { - mm_segment_t old_fs = get_fs(); - int ret; - loff_t lof; - loff_t __user *up; - - if (offset && get_user(lof, offset)) - return -EFAULT; - - /* The __user pointer cast is valid because of the set_fs() */ - set_fs(KERNEL_DS); - up = offset ? (loff_t __user *) &lof : NULL; - ret = sys_sendfile64(out_fd, in_fd, up, count); - set_fs(old_fs); - - if (offset && put_user(lof, offset)) - return -EFAULT; - - return ret; + return sys_sendfile((int)out_fd, (int)in_fd, + (off_t __user *)offset, count); } - long compat_sys_execve(unsigned long a0, unsigned long a1, unsigned long a2, - unsigned long a3, unsigned long a4, unsigned long a5, - struct pt_regs *regs) - { - int error; - struct filename *filename; - - filename = getname((char __user *) a0); - error = PTR_ERR(filename); - if (IS_ERR(filename)) - goto out; - flush_fp_to_thread(current); - flush_altivec_to_thread(current); - - error = compat_do_execve(filename->name, compat_ptr(a1), - compat_ptr(a2), regs); - - putname(filename); - - out: - return error; - } - /* Note: it is necessary to treat option as an unsigned int, * with the corresponding cast to a signed int to insure that the * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)