Skip to content

Commit 267aa95

Browse files
author
Alex Shi
committed
Merge tag 'v4.4.75' into linux-linaro-lsk-v4.4
This is the 4.4.75 stable release
2 parents d87abdc + 6ee496d commit 267aa95

81 files changed

Lines changed: 509 additions & 321 deletions

Some content is hidden

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

Documentation/kernel-parameters.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3584,6 +3584,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
35843584
spia_pedr=
35853585
spia_peddr=
35863586

3587+
stack_guard_gap= [MM]
3588+
override the default stack gap protection. The value
3589+
is in page units and it defines how many pages prior
3590+
to (for stacks growing down) resp. after (for stacks
3591+
growing up) the main stack are reserved for no other
3592+
mapping. Default value is 256 pages.
3593+
35873594
stacktrace [FTRACE]
35883595
Enabled the stack tracer on boot up.
35893596

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 = 73
3+
SUBLEVEL = 75
44
EXTRAVERSION =
55
NAME = Blurry Fish Butt
66

arch/arc/mm/mmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
6464

6565
vma = find_vma(mm, addr);
6666
if (TASK_SIZE - len >= addr &&
67-
(!vma || addr + len <= vma->vm_start))
67+
(!vma || addr + len <= vm_start_gap(vma)))
6868
return addr;
6969
}
7070

arch/arm/mm/mmap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
8989

9090
vma = find_vma(mm, addr);
9191
if (TASK_SIZE - len >= addr &&
92-
(!vma || addr + len <= vma->vm_start))
92+
(!vma || addr + len <= vm_start_gap(vma)))
9393
return addr;
9494
}
9595

@@ -140,7 +140,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
140140
addr = PAGE_ALIGN(addr);
141141
vma = find_vma(mm, addr);
142142
if (TASK_SIZE - len >= addr &&
143-
(!vma || addr + len <= vma->vm_start))
143+
(!vma || addr + len <= vm_start_gap(vma)))
144144
return addr;
145145
}
146146

arch/frv/mm/elf-fdpic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
7474
addr = PAGE_ALIGN(addr);
7575
vma = find_vma(current->mm, addr);
7676
if (TASK_SIZE - len >= addr &&
77-
(!vma || addr + len <= vma->vm_start))
77+
(!vma || addr + len <= vm_start_gap(vma)))
7878
goto success;
7979
}
8080

arch/mips/kernel/branch.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,8 +816,10 @@ int __compute_return_epc_for_insn(struct pt_regs *regs,
816816
break;
817817
}
818818
/* Compact branch: BNEZC || JIALC */
819-
if (insn.i_format.rs)
819+
if (!insn.i_format.rs) {
820+
/* JIALC: set $31/ra */
820821
regs->regs[31] = epc + 4;
822+
}
821823
regs->cp0_epc += 8;
822824
break;
823825
#endif

arch/mips/mm/mmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ static unsigned long arch_get_unmapped_area_common(struct file *filp,
9292

9393
vma = find_vma(mm, addr);
9494
if (TASK_SIZE - len >= addr &&
95-
(!vma || addr + len <= vma->vm_start))
95+
(!vma || addr + len <= vm_start_gap(vma)))
9696
return addr;
9797
}
9898

arch/parisc/kernel/sys_parisc.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
8888
unsigned long len, unsigned long pgoff, unsigned long flags)
8989
{
9090
struct mm_struct *mm = current->mm;
91-
struct vm_area_struct *vma;
91+
struct vm_area_struct *vma, *prev;
9292
unsigned long task_size = TASK_SIZE;
9393
int do_color_align, last_mmap;
9494
struct vm_unmapped_area_info info;
@@ -115,9 +115,10 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
115115
else
116116
addr = PAGE_ALIGN(addr);
117117

118-
vma = find_vma(mm, addr);
118+
vma = find_vma_prev(mm, addr, &prev);
119119
if (task_size - len >= addr &&
120-
(!vma || addr + len <= vma->vm_start))
120+
(!vma || addr + len <= vm_start_gap(vma)) &&
121+
(!prev || addr >= vm_end_gap(prev)))
121122
goto found_addr;
122123
}
123124

@@ -141,7 +142,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
141142
const unsigned long len, const unsigned long pgoff,
142143
const unsigned long flags)
143144
{
144-
struct vm_area_struct *vma;
145+
struct vm_area_struct *vma, *prev;
145146
struct mm_struct *mm = current->mm;
146147
unsigned long addr = addr0;
147148
int do_color_align, last_mmap;
@@ -175,9 +176,11 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
175176
addr = COLOR_ALIGN(addr, last_mmap, pgoff);
176177
else
177178
addr = PAGE_ALIGN(addr);
178-
vma = find_vma(mm, addr);
179+
180+
vma = find_vma_prev(mm, addr, &prev);
179181
if (TASK_SIZE - len >= addr &&
180-
(!vma || addr + len <= vma->vm_start))
182+
(!vma || addr + len <= vm_start_gap(vma)) &&
183+
(!prev || addr >= vm_end_gap(prev)))
181184
goto found_addr;
182185
}
183186

arch/powerpc/kernel/kprobes.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,15 @@ int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
514514
#endif
515515
#endif
516516

517+
/*
518+
* jprobes use jprobe_return() which skips the normal return
519+
* path of the function, and this messes up the accounting of the
520+
* function graph tracer.
521+
*
522+
* Pause function graph tracing while performing the jprobe function.
523+
*/
524+
pause_graph_tracing();
525+
517526
return 1;
518527
}
519528

@@ -536,6 +545,8 @@ int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs)
536545
* saved regs...
537546
*/
538547
memcpy(regs, &kcb->jprobe_saved_regs, sizeof(struct pt_regs));
548+
/* It's OK to start function graph tracing again */
549+
unpause_graph_tracing();
539550
preempt_enable_no_resched();
540551
return 1;
541552
}

arch/powerpc/kvm/book3s_hv.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2693,6 +2693,27 @@ static int kvmppc_vcpu_run_hv(struct kvm_run *run, struct kvm_vcpu *vcpu)
26932693
return -EINVAL;
26942694
}
26952695

2696+
/*
2697+
* Don't allow entry with a suspended transaction, because
2698+
* the guest entry/exit code will lose it.
2699+
* If the guest has TM enabled, save away their TM-related SPRs
2700+
* (they will get restored by the TM unavailable interrupt).
2701+
*/
2702+
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
2703+
if (cpu_has_feature(CPU_FTR_TM) && current->thread.regs &&
2704+
(current->thread.regs->msr & MSR_TM)) {
2705+
if (MSR_TM_ACTIVE(current->thread.regs->msr)) {
2706+
run->exit_reason = KVM_EXIT_FAIL_ENTRY;
2707+
run->fail_entry.hardware_entry_failure_reason = 0;
2708+
return -EINVAL;
2709+
}
2710+
current->thread.tm_tfhar = mfspr(SPRN_TFHAR);
2711+
current->thread.tm_tfiar = mfspr(SPRN_TFIAR);
2712+
current->thread.tm_texasr = mfspr(SPRN_TEXASR);
2713+
current->thread.regs->msr &= ~MSR_TM;
2714+
}
2715+
#endif
2716+
26962717
kvmppc_core_prepare_to_enter(vcpu);
26972718

26982719
/* No need to go into the guest when all we'll do is come back out */

0 commit comments

Comments
 (0)