Merge 4.4.78 into android-4.4
authorGreg Kroah-Hartman <gregkh@google.com>
Fri, 21 Jul 2017 07:14:57 +0000 (09:14 +0200)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 21 Jul 2017 07:14:57 +0000 (09:14 +0200)
Changes in 4.4.78
net_sched: fix error recovery at qdisc creation
net: sched: Fix one possible panic when no destroy callback
net/phy: micrel: configure intterupts after autoneg workaround
ipv6: avoid unregistering inet6_dev for loopback
net: dp83640: Avoid NULL pointer dereference.
tcp: reset sk_rx_dst in tcp_disconnect()
net: prevent sign extension in dev_get_stats()
bpf: prevent leaking pointer via xadd on unpriviledged
net: handle NAPI_GRO_FREE_STOLEN_HEAD case also in napi_frags_finish()
ipv6: dad: don't remove dynamic addresses if link is down
net: ipv6: Compare lwstate in detecting duplicate nexthops
vrf: fix bug_on triggered by rx when destroying a vrf
rds: tcp: use sock_create_lite() to create the accept socket
brcmfmac: fix possible buffer overflow in brcmf_cfg80211_mgmt_tx()
cfg80211: Define nla_policy for NL80211_ATTR_LOCAL_MESH_POWER_MODE
cfg80211: Validate frequencies nested in NL80211_ATTR_SCAN_FREQUENCIES
cfg80211: Check if PMKID attribute is of expected size
irqchip/gic-v3: Fix out-of-bound access in gic_set_affinity
parisc: Report SIGSEGV instead of SIGBUS when running out of stack
parisc: use compat_sys_keyctl()
parisc: DMA API: return error instead of BUG_ON for dma ops on non dma devs
parisc/mm: Ensure IRQs are off in switch_mm()
tools/lib/lockdep: Reduce MAX_LOCK_DEPTH to avoid overflowing lock_chain/: Depth
kernel/extable.c: mark core_kernel_text notrace
mm/list_lru.c: fix list_lru_count_node() to be race free
fs/dcache.c: fix spin lockup issue on nlru->lock
checkpatch: silence perl 5.26.0 unescaped left brace warnings
binfmt_elf: use ELF_ET_DYN_BASE only for PIE
arm: move ELF_ET_DYN_BASE to 4MB
arm64: move ELF_ET_DYN_BASE to 4GB / 4MB
powerpc: move ELF_ET_DYN_BASE to 4GB / 4MB
s390: reduce ELF_ET_DYN_BASE
exec: Limit arg stack to at most 75% of _STK_LIM
vt: fix unchecked __put_user() in tioclinux ioctls
mnt: In umount propagation reparent in a separate pass
mnt: In propgate_umount handle visiting mounts in any order
mnt: Make propagate_umount less slow for overlapping mount propagation trees
selftests/capabilities: Fix the test_execve test
tpm: Get rid of chip->pdev
tpm: Provide strong locking for device removal
Add "shutdown" to "struct class".
tpm: Issue a TPM2_Shutdown for TPM2 devices.
mm: fix overflow check in expand_upwards()
crypto: talitos - Extend max key length for SHA384/512-HMAC and AEAD
crypto: atmel - only treat EBUSY as transient if backlog
crypto: sha1-ssse3 - Disable avx2
crypto: caam - fix signals handling
sched/topology: Fix overlapping sched_group_mask
sched/topology: Optimize build_group_mask()
PM / wakeirq: Convert to SRCU
PM / QoS: return -EINVAL for bogus strings
tracing: Use SOFTIRQ_OFFSET for softirq dectection for more accurate results
KVM: x86: disable MPX if host did not enable MPX XSAVE features
kvm: vmx: Do not disable intercepts for BNDCFGS
kvm: x86: Guest BNDCFGS requires guest MPX support
kvm: vmx: Check value written to IA32_BNDCFGS
kvm: vmx: allow host to access guest MSR_IA32_BNDCFGS
Linux 4.4.78

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
17 files changed:
1  2 
Makefile
arch/arm64/include/asm/elf.h
drivers/base/power/wakeup.c
fs/binfmt_elf.c
fs/dcache.c
fs/exec.c
fs/namespace.c
fs/pnode.c
include/net/ip6_route.h
kernel/bpf/verifier.c
kernel/sched/core.c
kernel/trace/trace.c
mm/mmap.c
net/ipv4/tcp.c
net/ipv6/addrconf.c
net/ipv6/route.c
scripts/checkpatch.pl

diff --cc Makefile
Simple merge
index 7875c886ad24226bea0617649b6e50a7944361bf,9e11dbe1cec3277f40cec27cd44fbeac166ab315..8fbc5c7faf70401875fe1dc650a9bb23916be9da
  #define ELF_EXEC_PAGESIZE     PAGE_SIZE
  
  /*
-  * This is the location that an ET_DYN program is loaded if exec'ed.  Typical
-  * use of this is to invoke "./ld.so someprog" to test out a new version of
-  * the loader.  We need to make sure that it is out of the way of the program
-  * that it will "exec", and that there is sufficient room for the brk.
+  * This is the base location for PIE (ET_DYN with INTERP) loads. On
+  * 64-bit, this is raised to 4GB to leave the entire 32-bit address
+  * space open for things that want to use the area for 32-bit pointers.
   */
- #define ELF_ET_DYN_BASE       (2 * TASK_SIZE_64 / 3)
+ #define ELF_ET_DYN_BASE               0x100000000UL
  
 +#ifndef __ASSEMBLY__
 +
 +typedef unsigned long elf_greg_t;
 +
 +#define ELF_NGREG (sizeof(struct user_pt_regs) / sizeof(elf_greg_t))
 +#define ELF_CORE_COPY_REGS(dest, regs)        \
 +      *(struct user_pt_regs *)&(dest) = (regs)->user_regs;
 +
 +typedef elf_greg_t elf_gregset_t[ELF_NGREG];
 +typedef struct user_fpsimd_state elf_fpregset_t;
 +
  /*
   * When the program starts, a1 contains a pointer to a function to be
   * registered with atexit, as per the SVR4 ABI.  A value of 0 means we have no
index 0e494108c20ccec68abb460ccf2f1853976fb6b9,e613633ffe9cf0b7d821f69a8b5381716fb9e28e..7af116e12e53d359b5a82f7e9bdf145fccc82b80
@@@ -1061,8 -1034,9 +1066,9 @@@ static int print_wakeup_source_stats(st
  static int wakeup_sources_stats_show(struct seq_file *m, void *unused)
  {
        struct wakeup_source *ws;
+       int srcuidx;
  
 -      seq_puts(m, "name\t\tactive_count\tevent_count\twakeup_count\t"
 +      seq_puts(m, "name\t\t\t\t\tactive_count\tevent_count\twakeup_count\t"
                "expire_count\tactive_since\ttotal_time\tmax_time\t"
                "last_change\tprevent_suspend_time\n");
  
diff --cc fs/binfmt_elf.c
Simple merge
diff --cc fs/dcache.c
Simple merge
diff --cc fs/exec.c
Simple merge
diff --cc fs/namespace.c
Simple merge
diff --cc fs/pnode.c
index e4e428d621e9ff55280a329a5d478e0b5cba84a2,d15c63e97ef1e6df711c9e78c1e72c77cd69709e..ddb846f878b8a015414293019fd6d7b5a7ec735b
@@@ -487,45 -544,68 +544,102 @@@ static void cleanup_umount_visitations(
  int propagate_umount(struct list_head *list)
  {
        struct mount *mnt;
+       LIST_HEAD(to_restore);
+       LIST_HEAD(to_umount);
+       LIST_HEAD(visited);
+       /* Find candidates for unmounting */
+       list_for_each_entry_reverse(mnt, list, mnt_list) {
+               struct mount *parent = mnt->mnt_parent;
+               struct mount *m;
+               /*
+                * If this mount has already been visited it is known that it's
+                * entire peer group and all of their slaves in the propagation
+                * tree for the mountpoint has already been visited and there is
+                * no need to visit them again.
+                */
+               if (!list_empty(&mnt->mnt_umounting))
+                       continue;
+               list_add_tail(&mnt->mnt_umounting, &visited);
+               for (m = propagation_next(parent, parent); m;
+                    m = propagation_next(m, parent)) {
+                       struct mount *child = __lookup_mnt(&m->mnt,
+                                                          mnt->mnt_mountpoint);
+                       if (!child)
+                               continue;
+                       if (!list_empty(&child->mnt_umounting)) {
+                               /*
+                                * If the child has already been visited it is
+                                * know that it's entire peer group and all of
+                                * their slaves in the propgation tree for the
+                                * mountpoint has already been visited and there
+                                * is no need to visit this subtree again.
+                                */
+                               m = skip_propagation_subtree(m, parent);
+                               continue;
+                       } else if (child->mnt.mnt_flags & MNT_UMOUNT) {
+                               /*
+                                * We have come accross an partially unmounted
+                                * mount in list that has not been visited yet.
+                                * Remember it has been visited and continue
+                                * about our merry way.
+                                */
+                               list_add_tail(&child->mnt_umounting, &visited);
+                               continue;
+                       }
+                       /* Check the child and parents while progress is made */
+                       while (__propagate_umount(child,
+                                                 &to_umount, &to_restore)) {
+                               /* Is the parent a umount candidate? */
+                               child = child->mnt_parent;
+                               if (list_empty(&child->mnt_umounting))
+                                       break;
+                       }
+               }
+       }
  
-       list_for_each_entry_reverse(mnt, list, mnt_list)
-               mark_umount_candidates(mnt);
+       umount_list(&to_umount, &to_restore);
+       restore_mounts(&to_restore);
+       cleanup_umount_visitations(&visited);
+       list_splice_tail(&to_umount, list);
  
-       list_for_each_entry(mnt, list, mnt_list)
-               __propagate_umount(mnt);
        return 0;
  }
 +
 +/*
 + *  Iterates over all slaves, and slaves of slaves.
 + */
 +static struct mount *next_descendent(struct mount *root, struct mount *cur)
 +{
 +      if (!IS_MNT_NEW(cur) && !list_empty(&cur->mnt_slave_list))
 +              return first_slave(cur);
 +      do {
 +              struct mount *master = cur->mnt_master;
 +
 +              if (!master || cur->mnt_slave.next != &master->mnt_slave_list) {
 +                      struct mount *next = next_slave(cur);
 +
 +                      return (next == root) ? NULL : next;
 +              }
 +              cur = master;
 +      } while (cur != root);
 +      return NULL;
 +}
 +
 +void propagate_remount(struct mount *mnt)
 +{
 +      struct mount *m = mnt;
 +      struct super_block *sb = mnt->mnt.mnt_sb;
 +
 +      if (sb->s_op->copy_mnt_data) {
 +              m = next_descendent(mnt, m);
 +              while (m) {
 +                      sb->s_op->copy_mnt_data(m->mnt.data, mnt->mnt.data);
 +                      m = next_descendent(mnt, m);
 +              }
 +      }
 +}
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc mm/mmap.c
Simple merge
diff --cc net/ipv4/tcp.c
Simple merge
Simple merge
Simple merge
Simple merge