Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus

Pull MIPS fixes from Ralf Baechle:
"Another round of fixes for 4.5:

- Fix the use of an undocumented syntactial variant of the .type
pseudo op which is not supported by the LLVM assembler.
- Fix invalid initialization on S-cache-less systems.
- Fix possible information leak from the kernel stack for SIGFPE.
- Fix handling of copy_{from,to}_user() return value in KVM
- Fix the last instance of irq_to_gpio() which now was causing build
errors"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
MIPS: traps: Fix SIGFPE information leak from `do_ov' and `do_trap_or_bp'
MIPS: kvm: Fix ioctl error handling.
MIPS: scache: Fix scache init with invalid line size.
MIPS: Avoid variant of .type unsupported by LLVM Assembler
MIPS: jz4740: Fix surviving instance of irq_to_gpio()

+18 -14
+1 -1
arch/mips/jz4740/gpio.c
··· 270 270 } 271 271 EXPORT_SYMBOL(jz_gpio_port_get_value); 272 272 273 - #define IRQ_TO_BIT(irq) BIT(irq_to_gpio(irq) & 0x1f) 273 + #define IRQ_TO_BIT(irq) BIT((irq - JZ4740_IRQ_GPIO(0)) & 0x1f) 274 274 275 275 static void jz_gpio_check_trigger_both(struct jz_gpio_chip *chip, unsigned int irq) 276 276 {
+1 -1
arch/mips/kernel/r2300_fpu.S
··· 125 125 END(_restore_fp_context) 126 126 .set reorder 127 127 128 - .type fault@function 128 + .type fault, @function 129 129 .ent fault 130 130 fault: li v0, -EFAULT 131 131 jr ra
+1 -1
arch/mips/kernel/r4k_fpu.S
··· 358 358 359 359 .set reorder 360 360 361 - .type fault@function 361 + .type fault, @function 362 362 .ent fault 363 363 fault: li v0, -EFAULT # failure 364 364 jr ra
+6 -7
arch/mips/kernel/traps.c
··· 690 690 asmlinkage void do_ov(struct pt_regs *regs) 691 691 { 692 692 enum ctx_state prev_state; 693 - siginfo_t info; 693 + siginfo_t info = { 694 + .si_signo = SIGFPE, 695 + .si_code = FPE_INTOVF, 696 + .si_addr = (void __user *)regs->cp0_epc, 697 + }; 694 698 695 699 prev_state = exception_enter(); 696 700 die_if_kernel("Integer overflow", regs); 697 701 698 - info.si_code = FPE_INTOVF; 699 - info.si_signo = SIGFPE; 700 - info.si_errno = 0; 701 - info.si_addr = (void __user *) regs->cp0_epc; 702 702 force_sig_info(SIGFPE, &info, current); 703 703 exception_exit(prev_state); 704 704 } ··· 874 874 void do_trap_or_bp(struct pt_regs *regs, unsigned int code, 875 875 const char *str) 876 876 { 877 - siginfo_t info; 877 + siginfo_t info = { 0 }; 878 878 char b[40]; 879 879 880 880 #ifdef CONFIG_KGDB_LOW_LEVEL_TRAP ··· 903 903 else 904 904 info.si_code = FPE_INTOVF; 905 905 info.si_signo = SIGFPE; 906 - info.si_errno = 0; 907 906 info.si_addr = (void __user *) regs->cp0_epc; 908 907 force_sig_info(SIGFPE, &info, current); 909 908 break;
+9 -4
arch/mips/mm/sc-mips.c
··· 164 164 165 165 sets = cfg & CM_GCR_L2_CONFIG_SET_SIZE_MSK; 166 166 sets >>= CM_GCR_L2_CONFIG_SET_SIZE_SHF; 167 - c->scache.sets = 64 << sets; 167 + if (sets) 168 + c->scache.sets = 64 << sets; 168 169 169 170 line_sz = cfg & CM_GCR_L2_CONFIG_LINE_SIZE_MSK; 170 171 line_sz >>= CM_GCR_L2_CONFIG_LINE_SIZE_SHF; 171 - c->scache.linesz = 2 << line_sz; 172 + if (line_sz) 173 + c->scache.linesz = 2 << line_sz; 172 174 173 175 assoc = cfg & CM_GCR_L2_CONFIG_ASSOC_MSK; 174 176 assoc >>= CM_GCR_L2_CONFIG_ASSOC_SHF; ··· 178 176 c->scache.waysize = c->scache.sets * c->scache.linesz; 179 177 c->scache.waybit = __ffs(c->scache.waysize); 180 178 181 - c->scache.flags &= ~MIPS_CACHE_NOT_PRESENT; 179 + if (c->scache.linesz) { 180 + c->scache.flags &= ~MIPS_CACHE_NOT_PRESENT; 181 + return 1; 182 + } 182 183 183 - return 1; 184 + return 0; 184 185 } 185 186 186 187 static inline int __init mips_sc_probe(void)