Merge remote-tracking branch 'lts/linux-4.4.y' into linux-linaro-lsk-v4.4
authorAlex Shi <alex.shi@linaro.org>
Wed, 5 Oct 2016 11:21:50 +0000 (13:21 +0200)
committerAlex Shi <alex.shi@linaro.org>
Wed, 5 Oct 2016 11:21:50 +0000 (13:21 +0200)
Conflicts:
resovle the conflict on pax_copy for
arch/ia64/include/asm/uaccess.h
arch/powerpc/include/asm/uaccess.h
arch/sparc/include/asm/uaccess_32.h

1  2 
arch/arm/kvm/arm.c
arch/arm64/include/asm/spinlock.h
arch/ia64/include/asm/uaccess.h
arch/parisc/include/asm/uaccess.h
arch/powerpc/include/asm/uaccess.h
arch/sparc/include/asm/uaccess_32.h
arch/x86/include/asm/uaccess.h

Simple merge
Simple merge
Simple merge
Simple merge
index 4181f1023508467772422102ab09eb8b3b9d5281,a5ffe0207c16f96f06f6eb630b5ba049495dd2d1..db71448b9bb92455cb6b93343b2604f5eb78ebdb
@@@ -323,36 -323,17 +323,21 @@@ extern unsigned long __copy_tofrom_user
  static inline unsigned long copy_from_user(void *to,
                const void __user *from, unsigned long n)
  {
-       unsigned long over;
-       if (access_ok(VERIFY_READ, from, n)) {
 -      if (likely(access_ok(VERIFY_READ, from, n)))
++      if (likely(access_ok(VERIFY_READ, from, n))) {
 +              check_object_size(to, n, false);
                return __copy_tofrom_user((__force void __user *)to, from, n);
-       if ((unsigned long)from < TASK_SIZE) {
-               over = (unsigned long)from + n - TASK_SIZE;
-               check_object_size(to, n - over, false);
-               return __copy_tofrom_user((__force void __user *)to, from,
-                               n - over) + over;
-       }
 +      }
+       memset(to, 0, n);
        return n;
  }
  
  static inline unsigned long copy_to_user(void __user *to,
                const void *from, unsigned long n)
  {
-       unsigned long over;
 -      if (access_ok(VERIFY_WRITE, to, n))
 +      if (access_ok(VERIFY_WRITE, to, n)) {
 +              check_object_size(from, n, true);
                return __copy_tofrom_user(to, (__force void __user *)from, n);
-       if ((unsigned long)to < TASK_SIZE) {
-               over = (unsigned long)to + n - TASK_SIZE;
-               check_object_size(from, n - over, true);
-               return __copy_tofrom_user(to, (__force void __user *)from,
-                               n - over) + over;
-       }
 +      }
        return n;
  }
  
index e1b6ae3ccdff3482a74ea053551e8dddb7a96dc3,dfb542c7cc714ea5b5cf19d6d3f853cb1a9c08ed..e7d6bb4cd619b362aa8fd84c71ecc3d7a18b9eb3
@@@ -328,11 -326,12 +328,13 @@@ static inline unsigned long __copy_to_u
  
  static inline unsigned long copy_from_user(void *to, const void __user *from, unsigned long n)
  {
 -      if (n && __access_ok((unsigned long) from, n))
 +      if (n && __access_ok((unsigned long) from, n)) {
 +              check_object_size(to, n, false);
                return __copy_user((__force void __user *) to, from, n);
-       } else
+       else {
+               memset(to, 0, n);
                return n;
+       }
  }
  
  static inline unsigned long __copy_from_user(void *to, const void __user *from, unsigned long n)
Simple merge