Skip to content

Commit 17d454c

Browse files
author
Alex Shi
committed
Merge tag 'v4.4.31' into linux-linaro-lsk-v4.4
This is the 4.4.31 stable release
2 parents ecad395 + beb996c commit 17d454c

67 files changed

Lines changed: 384 additions & 185 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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION = 4
22
PATCHLEVEL = 4
3-
SUBLEVEL = 30
3+
SUBLEVEL = 31
44
EXTRAVERSION =
55
NAME = Blurry Fish Butt
66

@@ -617,6 +617,7 @@ include arch/$(SRCARCH)/Makefile
617617

618618
KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,)
619619
KBUILD_CFLAGS += $(call cc-disable-warning,maybe-uninitialized,)
620+
KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,)
620621

621622
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
622623
KBUILD_CFLAGS += -Os

arch/arm/include/asm/floppy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#define fd_outb(val,port) \
1919
do { \
20-
if ((port) == FD_DOR) \
20+
if ((port) == (u32)FD_DOR) \
2121
fd_setdor((val)); \
2222
else \
2323
outb((val),(port)); \

arch/h8300/include/asm/thread_info.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ struct thread_info {
3131
int cpu; /* cpu we're on */
3232
int preempt_count; /* 0 => preemptable, <0 => BUG */
3333
mm_segment_t addr_limit;
34-
struct restart_block restart_block;
3534
};
3635

3736
/*
@@ -44,9 +43,6 @@ struct thread_info {
4443
.cpu = 0, \
4544
.preempt_count = INIT_PREEMPT_COUNT, \
4645
.addr_limit = KERNEL_DS, \
47-
.restart_block = { \
48-
.fn = do_no_restart_syscall, \
49-
}, \
5046
}
5147

5248
#define init_thread_info (init_thread_union.thread_info)

arch/h8300/kernel/signal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ restore_sigcontext(struct sigcontext *usc, int *pd0)
7979
unsigned int er0;
8080

8181
/* Always make any pending restarted system calls return -EINTR */
82-
current_thread_info()->restart_block.fn = do_no_restart_syscall;
82+
current->restart_block.fn = do_no_restart_syscall;
8383

8484
/* restore passed registers */
8585
#define COPY(r) do { err |= get_user(regs->r, &usc->sc_##r); } while (0)

arch/mips/kvm/emulate.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -752,15 +752,15 @@ enum emulation_result kvm_mips_emul_eret(struct kvm_vcpu *vcpu)
752752
struct mips_coproc *cop0 = vcpu->arch.cop0;
753753
enum emulation_result er = EMULATE_DONE;
754754

755-
if (kvm_read_c0_guest_status(cop0) & ST0_EXL) {
755+
if (kvm_read_c0_guest_status(cop0) & ST0_ERL) {
756+
kvm_clear_c0_guest_status(cop0, ST0_ERL);
757+
vcpu->arch.pc = kvm_read_c0_guest_errorepc(cop0);
758+
} else if (kvm_read_c0_guest_status(cop0) & ST0_EXL) {
756759
kvm_debug("[%#lx] ERET to %#lx\n", vcpu->arch.pc,
757760
kvm_read_c0_guest_epc(cop0));
758761
kvm_clear_c0_guest_status(cop0, ST0_EXL);
759762
vcpu->arch.pc = kvm_read_c0_guest_epc(cop0);
760763

761-
} else if (kvm_read_c0_guest_status(cop0) & ST0_ERL) {
762-
kvm_clear_c0_guest_status(cop0, ST0_ERL);
763-
vcpu->arch.pc = kvm_read_c0_guest_errorepc(cop0);
764764
} else {
765765
kvm_err("[%#lx] ERET when MIPS_SR_EXL|MIPS_SR_ERL == 0\n",
766766
vcpu->arch.pc);

arch/parisc/kernel/syscall.S

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ linux_gateway_entry:
106106
mtsp %r0,%sr4 /* get kernel space into sr4 */
107107
mtsp %r0,%sr5 /* get kernel space into sr5 */
108108
mtsp %r0,%sr6 /* get kernel space into sr6 */
109-
mfsp %sr7,%r1 /* save user sr7 */
110-
mtsp %r1,%sr3 /* and store it in sr3 */
111109

112110
#ifdef CONFIG_64BIT
113111
/* for now we can *always* set the W bit on entry to the syscall
@@ -133,6 +131,14 @@ linux_gateway_entry:
133131
depdi 0, 31, 32, %r21
134132
1:
135133
#endif
134+
135+
/* We use a rsm/ssm pair to prevent sr3 from being clobbered
136+
* by external interrupts.
137+
*/
138+
mfsp %sr7,%r1 /* save user sr7 */
139+
rsm PSW_SM_I, %r0 /* disable interrupts */
140+
mtsp %r1,%sr3 /* and store it in sr3 */
141+
136142
mfctl %cr30,%r1
137143
xor %r1,%r30,%r30 /* ye olde xor trick */
138144
xor %r1,%r30,%r1
@@ -147,6 +153,7 @@ linux_gateway_entry:
147153
*/
148154

149155
mtsp %r0,%sr7 /* get kernel space into sr7 */
156+
ssm PSW_SM_I, %r0 /* enable interrupts */
150157
STREGM %r1,FRAME_SIZE(%r30) /* save r1 (usp) here for now */
151158
mfctl %cr30,%r1 /* get task ptr in %r1 */
152159
LDREG TI_TASK(%r1),%r1

arch/powerpc/kernel/ptrace.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ static int fpr_get(struct task_struct *target, const struct user_regset *regset,
376376

377377
#else
378378
BUILD_BUG_ON(offsetof(struct thread_fp_state, fpscr) !=
379-
offsetof(struct thread_fp_state, fpr[32][0]));
379+
offsetof(struct thread_fp_state, fpr[32]));
380380

381381
return user_regset_copyout(&pos, &count, &kbuf, &ubuf,
382382
&target->thread.fp_state, 0, -1);
@@ -404,7 +404,7 @@ static int fpr_set(struct task_struct *target, const struct user_regset *regset,
404404
return 0;
405405
#else
406406
BUILD_BUG_ON(offsetof(struct thread_fp_state, fpscr) !=
407-
offsetof(struct thread_fp_state, fpr[32][0]));
407+
offsetof(struct thread_fp_state, fpr[32]));
408408

409409
return user_regset_copyin(&pos, &count, &kbuf, &ubuf,
410410
&target->thread.fp_state, 0, -1);

arch/x86/include/asm/uaccess.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ do { \
339339
#define __get_user_asm_u64(x, ptr, retval, errret) \
340340
__get_user_asm(x, ptr, retval, "q", "", "=r", errret)
341341
#define __get_user_asm_ex_u64(x, ptr) \
342-
__get_user_asm_ex(x, ptr, "q", "", "=r")
342+
__get_user_asm_ex(x, ptr, "q", "", "=&r")
343343
#endif
344344

345345
#define __get_user_size(x, ptr, size, retval, errret) \
@@ -386,13 +386,13 @@ do { \
386386
__chk_user_ptr(ptr); \
387387
switch (size) { \
388388
case 1: \
389-
__get_user_asm_ex(x, ptr, "b", "b", "=q"); \
389+
__get_user_asm_ex(x, ptr, "b", "b", "=&q"); \
390390
break; \
391391
case 2: \
392-
__get_user_asm_ex(x, ptr, "w", "w", "=r"); \
392+
__get_user_asm_ex(x, ptr, "w", "w", "=&r"); \
393393
break; \
394394
case 4: \
395-
__get_user_asm_ex(x, ptr, "l", "k", "=r"); \
395+
__get_user_asm_ex(x, ptr, "l", "k", "=&r"); \
396396
break; \
397397
case 8: \
398398
__get_user_asm_ex_u64(x, ptr); \
@@ -406,7 +406,7 @@ do { \
406406
asm volatile("1: mov"itype" %1,%"rtype"0\n" \
407407
"2:\n" \
408408
_ASM_EXTABLE_EX(1b, 2b) \
409-
: ltype(x) : "m" (__m(addr)))
409+
: ltype(x) : "m" (__m(addr)), "0" (0))
410410

411411
#define __put_user_nocheck(x, ptr, size) \
412412
({ \

arch/x86/kvm/emulate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5033,7 +5033,7 @@ int x86_decode_insn(struct x86_emulate_ctxt *ctxt, void *insn, int insn_len)
50335033
/* Decode and fetch the destination operand: register or memory. */
50345034
rc = decode_operand(ctxt, &ctxt->dst, (ctxt->d >> DstShift) & OpMask);
50355035

5036-
if (ctxt->rip_relative)
5036+
if (ctxt->rip_relative && likely(ctxt->memopp))
50375037
ctxt->memopp->addr.mem.ea = address_mask(ctxt,
50385038
ctxt->memopp->addr.mem.ea + ctxt->_eip);
50395039

arch/x86/kvm/x86.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7252,10 +7252,12 @@ void kvm_put_guest_fpu(struct kvm_vcpu *vcpu)
72527252

72537253
void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu)
72547254
{
7255+
void *wbinvd_dirty_mask = vcpu->arch.wbinvd_dirty_mask;
7256+
72557257
kvmclock_reset(vcpu);
72567258

7257-
free_cpumask_var(vcpu->arch.wbinvd_dirty_mask);
72587259
kvm_x86_ops->vcpu_free(vcpu);
7260+
free_cpumask_var(wbinvd_dirty_mask);
72597261
}
72607262

72617263
struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm,

0 commit comments

Comments
 (0)