Skip to content

Commit e91e57d

Browse files
author
Alex Shi
committed
Merge tag 'v4.4.72' into linux-linaro-lsk-v4.4
This is the 4.4.72 stable release
2 parents dfb9fdf + 30c9187 commit e91e57d

129 files changed

Lines changed: 768 additions & 360 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION = 4
22
PATCHLEVEL = 4
3-
SUBLEVEL = 71
3+
SUBLEVEL = 72
44
EXTRAVERSION =
55
NAME = Blurry Fish Butt
66

arch/arm/kvm/init.S

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,16 +110,15 @@ __do_hyp_init:
110110
@ - Write permission implies XN: disabled
111111
@ - Instruction cache: enabled
112112
@ - Data/Unified cache: enabled
113-
@ - Memory alignment checks: enabled
114113
@ - MMU: enabled (this code must be run from an identity mapping)
115114
mrc p15, 4, r0, c1, c0, 0 @ HSCR
116115
ldr r2, =HSCTLR_MASK
117116
bic r0, r0, r2
118117
mrc p15, 0, r1, c1, c0, 0 @ SCTLR
119118
ldr r2, =(HSCTLR_EE | HSCTLR_FI | HSCTLR_I | HSCTLR_C)
120119
and r1, r1, r2
121-
ARM( ldr r2, =(HSCTLR_M | HSCTLR_A) )
122-
THUMB( ldr r2, =(HSCTLR_M | HSCTLR_A | HSCTLR_TE) )
120+
ARM( ldr r2, =(HSCTLR_M) )
121+
THUMB( ldr r2, =(HSCTLR_M | HSCTLR_TE) )
123122
orr r1, r1, r2
124123
orr r0, r0, r1
125124
isb

arch/arm/kvm/mmu.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -876,6 +876,9 @@ static pmd_t *stage2_get_pmd(struct kvm *kvm, struct kvm_mmu_memory_cache *cache
876876
pmd_t *pmd;
877877

878878
pud = stage2_get_pud(kvm, cache, addr);
879+
if (!pud)
880+
return NULL;
881+
879882
if (pud_none(*pud)) {
880883
if (!cache)
881884
return NULL;
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#ifndef __ASM_ASM_UACCESS_H
2+
#define __ASM_ASM_UACCESS_H
3+
4+
/*
5+
* Remove the address tag from a virtual address, if present.
6+
*/
7+
.macro clear_address_tag, dst, addr
8+
tst \addr, #(1 << 55)
9+
bic \dst, \addr, #(0xff << 56)
10+
csel \dst, \dst, \addr, eq
11+
.endm
12+
13+
#endif

arch/arm64/include/asm/barrier.h

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,33 @@
4141

4242
#define smp_store_release(p, v) \
4343
do { \
44+
union { typeof(*p) __val; char __c[1]; } __u = \
45+
{ .__val = (__force typeof(*p)) (v) }; \
4446
compiletime_assert_atomic_type(*p); \
4547
switch (sizeof(*p)) { \
4648
case 1: \
4749
asm volatile ("stlrb %w1, %0" \
48-
: "=Q" (*p) : "r" (v) : "memory"); \
50+
: "=Q" (*p) \
51+
: "r" (*(__u8 *)__u.__c) \
52+
: "memory"); \
4953
break; \
5054
case 2: \
5155
asm volatile ("stlrh %w1, %0" \
52-
: "=Q" (*p) : "r" (v) : "memory"); \
56+
: "=Q" (*p) \
57+
: "r" (*(__u16 *)__u.__c) \
58+
: "memory"); \
5359
break; \
5460
case 4: \
5561
asm volatile ("stlr %w1, %0" \
56-
: "=Q" (*p) : "r" (v) : "memory"); \
62+
: "=Q" (*p) \
63+
: "r" (*(__u32 *)__u.__c) \
64+
: "memory"); \
5765
break; \
5866
case 8: \
5967
asm volatile ("stlr %1, %0" \
60-
: "=Q" (*p) : "r" (v) : "memory"); \
68+
: "=Q" (*p) \
69+
: "r" (*(__u64 *)__u.__c) \
70+
: "memory"); \
6171
break; \
6272
} \
6373
} while (0)

arch/arm64/include/asm/uaccess.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
/*
2222
* User space memory access functions
2323
*/
24+
#include <linux/bitops.h>
2425
#include <linux/string.h>
2526
#include <linux/thread_info.h>
2627

@@ -115,6 +116,13 @@ static inline void set_fs(mm_segment_t fs)
115116
flag; \
116117
})
117118

119+
/*
120+
* When dealing with data aborts, watchpoints, or instruction traps we may end
121+
* up with a tagged userland pointer. Clear the tag to get a sane pointer to
122+
* pass on to access_ok(), for instance.
123+
*/
124+
#define untagged_addr(addr) sign_extend64(addr, 55)
125+
118126
#define access_ok(type, addr, size) __range_ok(addr, size)
119127
#define user_addr_max get_fs
120128

arch/arm64/kernel/armv8_deprecated.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,8 @@ static void __init register_insn_emulation_sysctl(struct ctl_table *table)
302302
ALTERNATIVE("nop", SET_PSTATE_PAN(1), ARM64_HAS_PAN, \
303303
CONFIG_ARM64_PAN) \
304304
: "=&r" (res), "+r" (data), "=&r" (temp) \
305-
: "r" (addr), "i" (-EAGAIN), "i" (-EFAULT) \
305+
: "r" ((unsigned long)addr), "i" (-EAGAIN), \
306+
"i" (-EFAULT) \
306307
: "memory")
307308

308309
#define __user_swp_asm(data, addr, res, temp) \

arch/arm64/kernel/entry.S

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include <asm/irq.h>
3131
#include <asm/memory.h>
3232
#include <asm/thread_info.h>
33+
#include <asm/asm-uaccess.h>
3334
#include <asm/unistd.h>
3435

3536
/*
@@ -365,12 +366,13 @@ el1_da:
365366
/*
366367
* Data abort handling
367368
*/
368-
mrs x0, far_el1
369+
mrs x3, far_el1
369370
enable_dbg
370371
// re-enable interrupts if they were enabled in the aborted context
371372
tbnz x23, #7, 1f // PSR_I_BIT
372373
enable_irq
373374
1:
375+
clear_address_tag x0, x3
374376
mov x2, sp // struct pt_regs
375377
bl do_mem_abort
376378

@@ -532,7 +534,7 @@ el0_da:
532534
// enable interrupts before calling the main handler
533535
enable_dbg_and_irq
534536
ct_user_exit
535-
bic x0, x26, #(0xff << 56)
537+
clear_address_tag x0, x26
536538
mov x1, x25
537539
mov x2, sp
538540
bl do_mem_abort

arch/arm64/kernel/hw_breakpoint.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include <asm/traps.h>
3737
#include <asm/cputype.h>
3838
#include <asm/system_misc.h>
39+
#include <asm/uaccess.h>
3940

4041
/* Breakpoint currently in use for each BRP. */
4142
static DEFINE_PER_CPU(struct perf_event *, bp_on_reg[ARM_MAX_BRP]);
@@ -696,7 +697,7 @@ static int watchpoint_handler(unsigned long addr, unsigned int esr,
696697

697698
/* Check if the watchpoint value matches. */
698699
val = read_wb_reg(AARCH64_DBG_REG_WVR, i);
699-
if (val != (addr & ~alignment_mask))
700+
if (val != (untagged_addr(addr) & ~alignment_mask))
700701
goto unlock;
701702

702703
/* Possible match, check the byte address select to confirm. */

arch/powerpc/include/asm/topology.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,22 @@ extern void __init dump_numa_cpu_topology(void);
4444
extern int sysfs_add_device_to_node(struct device *dev, int nid);
4545
extern void sysfs_remove_device_from_node(struct device *dev, int nid);
4646

47+
static inline int early_cpu_to_node(int cpu)
48+
{
49+
int nid;
50+
51+
nid = numa_cpu_lookup_table[cpu];
52+
53+
/*
54+
* Fall back to node 0 if nid is unset (it should be, except bugs).
55+
* This allows callers to safely do NODE_DATA(early_cpu_to_node(cpu)).
56+
*/
57+
return (nid < 0) ? 0 : nid;
58+
}
4759
#else
4860

61+
static inline int early_cpu_to_node(int cpu) { return 0; }
62+
4963
static inline void dump_numa_cpu_topology(void) {}
5064

5165
static inline int sysfs_add_device_to_node(struct device *dev, int nid)

0 commit comments

Comments
 (0)