diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2016-09-26 15:47:03 -0400 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2016-09-26 15:47:03 -0400 |
| commit | 1e1b37273cf719545da50b76f214f983a710aaf4 (patch) | |
| tree | 033f6062325ef7aaeefe8559bb409ab7d2be3c76 /arch/parisc | |
| parent | c183a603e8d8a5a189729b77d0c623a3d5950e5f (diff) | |
| parent | c291b015158577be533dd5a959dfc09bab119eed (diff) | |
Merge branch 'x86/urgent' into x86/apic
Bring in the upstream modifications so we can fixup the silent merge
conflict which is introduced by this merge.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/parisc')
| -rw-r--r-- | arch/parisc/Kconfig | 1 | ||||
| -rw-r--r-- | arch/parisc/configs/c8000_defconfig | 1 | ||||
| -rw-r--r-- | arch/parisc/configs/generic-64bit_defconfig | 1 | ||||
| -rw-r--r-- | arch/parisc/include/asm/uaccess.h | 22 | ||||
| -rw-r--r-- | arch/parisc/include/uapi/asm/errno.h | 4 | ||||
| -rw-r--r-- | arch/parisc/kernel/processor.c | 8 | ||||
| -rw-r--r-- | arch/parisc/kernel/time.c | 12 |
7 files changed, 14 insertions, 35 deletions
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index cd8778103165..af12c2db9bb8 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | config PARISC | 1 | config PARISC |
| 2 | def_bool y | 2 | def_bool y |
| 3 | select ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS | ||
| 4 | select ARCH_MIGHT_HAVE_PC_PARPORT | 3 | select ARCH_MIGHT_HAVE_PC_PARPORT |
| 5 | select HAVE_IDE | 4 | select HAVE_IDE |
| 6 | select HAVE_OPROFILE | 5 | select HAVE_OPROFILE |
diff --git a/arch/parisc/configs/c8000_defconfig b/arch/parisc/configs/c8000_defconfig index 1a8f6f95689e..f6a4c016304b 100644 --- a/arch/parisc/configs/c8000_defconfig +++ b/arch/parisc/configs/c8000_defconfig | |||
| @@ -245,7 +245,6 @@ CONFIG_DEBUG_RT_MUTEXES=y | |||
| 245 | CONFIG_PROVE_RCU_DELAY=y | 245 | CONFIG_PROVE_RCU_DELAY=y |
| 246 | CONFIG_DEBUG_BLOCK_EXT_DEVT=y | 246 | CONFIG_DEBUG_BLOCK_EXT_DEVT=y |
| 247 | CONFIG_LATENCYTOP=y | 247 | CONFIG_LATENCYTOP=y |
| 248 | CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y | ||
| 249 | CONFIG_KEYS=y | 248 | CONFIG_KEYS=y |
| 250 | # CONFIG_CRYPTO_HW is not set | 249 | # CONFIG_CRYPTO_HW is not set |
| 251 | CONFIG_FONTS=y | 250 | CONFIG_FONTS=y |
diff --git a/arch/parisc/configs/generic-64bit_defconfig b/arch/parisc/configs/generic-64bit_defconfig index 7e0792658952..c564e6e1fa23 100644 --- a/arch/parisc/configs/generic-64bit_defconfig +++ b/arch/parisc/configs/generic-64bit_defconfig | |||
| @@ -291,7 +291,6 @@ CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y | |||
| 291 | CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y | 291 | CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y |
| 292 | # CONFIG_SCHED_DEBUG is not set | 292 | # CONFIG_SCHED_DEBUG is not set |
| 293 | CONFIG_TIMER_STATS=y | 293 | CONFIG_TIMER_STATS=y |
| 294 | CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y | ||
| 295 | CONFIG_CRYPTO_MANAGER=y | 294 | CONFIG_CRYPTO_MANAGER=y |
| 296 | CONFIG_CRYPTO_ECB=m | 295 | CONFIG_CRYPTO_ECB=m |
| 297 | CONFIG_CRYPTO_PCBC=m | 296 | CONFIG_CRYPTO_PCBC=m |
diff --git a/arch/parisc/include/asm/uaccess.h b/arch/parisc/include/asm/uaccess.h index 0f59fd9ca205..e9150487e20d 100644 --- a/arch/parisc/include/asm/uaccess.h +++ b/arch/parisc/include/asm/uaccess.h | |||
| @@ -208,13 +208,13 @@ unsigned long copy_in_user(void __user *dst, const void __user *src, unsigned lo | |||
| 208 | #define __copy_to_user_inatomic __copy_to_user | 208 | #define __copy_to_user_inatomic __copy_to_user |
| 209 | #define __copy_from_user_inatomic __copy_from_user | 209 | #define __copy_from_user_inatomic __copy_from_user |
| 210 | 210 | ||
| 211 | extern void copy_from_user_overflow(void) | 211 | extern void __compiletime_error("usercopy buffer size is too small") |
| 212 | #ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS | 212 | __bad_copy_user(void); |
| 213 | __compiletime_error("copy_from_user() buffer size is not provably correct") | 213 | |
| 214 | #else | 214 | static inline void copy_user_overflow(int size, unsigned long count) |
| 215 | __compiletime_warning("copy_from_user() buffer size is not provably correct") | 215 | { |
| 216 | #endif | 216 | WARN(1, "Buffer overflow detected (%d < %lu)!\n", size, count); |
| 217 | ; | 217 | } |
| 218 | 218 | ||
| 219 | static inline unsigned long __must_check copy_from_user(void *to, | 219 | static inline unsigned long __must_check copy_from_user(void *to, |
| 220 | const void __user *from, | 220 | const void __user *from, |
| @@ -223,10 +223,12 @@ static inline unsigned long __must_check copy_from_user(void *to, | |||
| 223 | int sz = __compiletime_object_size(to); | 223 | int sz = __compiletime_object_size(to); |
| 224 | int ret = -EFAULT; | 224 | int ret = -EFAULT; |
| 225 | 225 | ||
| 226 | if (likely(sz == -1 || !__builtin_constant_p(n) || sz >= n)) | 226 | if (likely(sz == -1 || sz >= n)) |
| 227 | ret = __copy_from_user(to, from, n); | 227 | ret = __copy_from_user(to, from, n); |
| 228 | else | 228 | else if (!__builtin_constant_p(n)) |
| 229 | copy_from_user_overflow(); | 229 | copy_user_overflow(sz, n); |
| 230 | else | ||
| 231 | __bad_copy_user(); | ||
| 230 | 232 | ||
| 231 | return ret; | 233 | return ret; |
| 232 | } | 234 | } |
diff --git a/arch/parisc/include/uapi/asm/errno.h b/arch/parisc/include/uapi/asm/errno.h index c0ae62520d15..274d5bc6ecce 100644 --- a/arch/parisc/include/uapi/asm/errno.h +++ b/arch/parisc/include/uapi/asm/errno.h | |||
| @@ -97,10 +97,10 @@ | |||
| 97 | #define ENOTCONN 235 /* Transport endpoint is not connected */ | 97 | #define ENOTCONN 235 /* Transport endpoint is not connected */ |
| 98 | #define ESHUTDOWN 236 /* Cannot send after transport endpoint shutdown */ | 98 | #define ESHUTDOWN 236 /* Cannot send after transport endpoint shutdown */ |
| 99 | #define ETOOMANYREFS 237 /* Too many references: cannot splice */ | 99 | #define ETOOMANYREFS 237 /* Too many references: cannot splice */ |
| 100 | #define EREFUSED ECONNREFUSED /* for HP's NFS apparently */ | ||
| 101 | #define ETIMEDOUT 238 /* Connection timed out */ | 100 | #define ETIMEDOUT 238 /* Connection timed out */ |
| 102 | #define ECONNREFUSED 239 /* Connection refused */ | 101 | #define ECONNREFUSED 239 /* Connection refused */ |
| 103 | #define EREMOTERELEASE 240 /* Remote peer released connection */ | 102 | #define EREFUSED ECONNREFUSED /* for HP's NFS apparently */ |
| 103 | #define EREMOTERELEASE 240 /* Remote peer released connection */ | ||
| 104 | #define EHOSTDOWN 241 /* Host is down */ | 104 | #define EHOSTDOWN 241 /* Host is down */ |
| 105 | #define EHOSTUNREACH 242 /* No route to host */ | 105 | #define EHOSTUNREACH 242 /* No route to host */ |
| 106 | 106 | ||
diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c index 5adc339eb7c8..0c2a94a0f751 100644 --- a/arch/parisc/kernel/processor.c +++ b/arch/parisc/kernel/processor.c | |||
| @@ -51,8 +51,6 @@ EXPORT_SYMBOL(_parisc_requires_coherency); | |||
| 51 | 51 | ||
| 52 | DEFINE_PER_CPU(struct cpuinfo_parisc, cpu_data); | 52 | DEFINE_PER_CPU(struct cpuinfo_parisc, cpu_data); |
| 53 | 53 | ||
| 54 | extern int update_cr16_clocksource(void); /* from time.c */ | ||
| 55 | |||
| 56 | /* | 54 | /* |
| 57 | ** PARISC CPU driver - claim "device" and initialize CPU data structures. | 55 | ** PARISC CPU driver - claim "device" and initialize CPU data structures. |
| 58 | ** | 56 | ** |
| @@ -228,12 +226,6 @@ static int processor_probe(struct parisc_device *dev) | |||
| 228 | } | 226 | } |
| 229 | #endif | 227 | #endif |
| 230 | 228 | ||
| 231 | /* If we've registered more than one cpu, | ||
| 232 | * we'll use the jiffies clocksource since cr16 | ||
| 233 | * is not synchronized between CPUs. | ||
| 234 | */ | ||
| 235 | update_cr16_clocksource(); | ||
| 236 | |||
| 237 | return 0; | 229 | return 0; |
| 238 | } | 230 | } |
| 239 | 231 | ||
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c index 505cf1ac5af2..4b0b963d52a7 100644 --- a/arch/parisc/kernel/time.c +++ b/arch/parisc/kernel/time.c | |||
| @@ -221,18 +221,6 @@ static struct clocksource clocksource_cr16 = { | |||
| 221 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 221 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
| 222 | }; | 222 | }; |
| 223 | 223 | ||
| 224 | int update_cr16_clocksource(void) | ||
| 225 | { | ||
| 226 | /* since the cr16 cycle counters are not synchronized across CPUs, | ||
| 227 | we'll check if we should switch to a safe clocksource: */ | ||
| 228 | if (clocksource_cr16.rating != 0 && num_online_cpus() > 1) { | ||
| 229 | clocksource_change_rating(&clocksource_cr16, 0); | ||
| 230 | return 1; | ||
| 231 | } | ||
| 232 | |||
| 233 | return 0; | ||
| 234 | } | ||
| 235 | |||
| 236 | void __init start_cpu_itimer(void) | 224 | void __init start_cpu_itimer(void) |
| 237 | { | 225 | { |
| 238 | unsigned int cpu = smp_processor_id(); | 226 | unsigned int cpu = smp_processor_id(); |
