1. 10 7月, 2015 2 次提交
  2. 09 7月, 2015 9 次提交
  3. 08 7月, 2015 1 次提交
    • R
      MIPS: O32: Do not handle require 32 bytes from the stack to be readable. · 7928eb03
      Ralf Baechle 提交于
      Commit 46e12c07 (MIPS: O32 / 32-bit:
      Always copy 4 stack arguments.) change the O32 syscall handler to always
      load four arguments from the userspace stack even for syscalls that
      require fewer or no arguments to be copied.  This removes a large table
      from kernel space and need to maintain it.  It appeared that it was ok
      the implementation chosen requires 16 bytes of readable stack space
      above the user stack pointer.
      
      Turned out a few threading implementations munmap the user stack before
      the thread exits resulting in errors due to the unreadable stack.
      
      We now treat any failed load as a if the loaded value was zero and let
      the actual syscall deal with the situation.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      7928eb03
  4. 22 6月, 2015 10 次提交
  5. 06 6月, 2015 1 次提交
  6. 05 6月, 2015 1 次提交
  7. 03 6月, 2015 1 次提交
  8. 30 5月, 2015 1 次提交
  9. 26 5月, 2015 1 次提交
    • J
      MIPS: irq: Use DECLARE_BITMAP · 884e7e5e
      Joe Perches 提交于
      Use the generic mechanism to declare a bitmap instead of unsigned long.
      
      This could fix an overwrite defect of whatever follows irq_map.
      
      Not all "#define NR_IRQS <value>" are a multiple of BITS_PER_LONG so
      using DECLARE_BITMAP allocates the proper number of longs required
      for the possible bits.
      
      For instance:
      
      arch/mips/include/asm/mach-ath79/irq.h:#define NR_IRQS                  51
      arch/mips/include/asm/mach-db1x00/irq.h:#define NR_IRQS 152
      arch/mips/include/asm/mach-lantiq/falcon/irq.h:#define NR_IRQS 328
      Signed-off-by: NJoe Perches <joe@perches.com>
      Cc: linux-mips <linux-mips@linux-mips.org>
      Cc: LKML <linux-kernel@vger.kernel.org>
      Cc: Gabor Juhos <juhosg@openwrt.org>
      Cc: Manuel Lauss <manuel.lauss@googlemail.com>
      Cc: John Crispin <blogic@openwrt.org>
      Patchwork: https://patchwork.linux-mips.org/patch/10091/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      884e7e5e
  10. 19 5月, 2015 1 次提交
  11. 16 5月, 2015 1 次提交
  12. 13 5月, 2015 3 次提交
    • P
      MIPS: traps: remove extra Tainted: line from __show_regs() output · 2d2ec2f7
      Petri Gynther 提交于
      __show_regs() calls show_regs_print_info(), which already outputs
      the Tainted: information. So, no need to output it twice.
      Signed-off-by: NPetri Gynther <pgynther@google.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/9997/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      2d2ec2f7
    • M
      MIPS: Fix a preemption issue with thread's FPU defaults · 03dce595
      Maciej W. Rozycki 提交于
      Fix "BUG: using smp_processor_id() in preemptible" reported in accesses
      to thread's FPU defaults: the value to initialise FSCR to at program
      startup, the FCSR r/w mask and the contents of FIR in full FPU
      emulation, removing a regression introduced with 9b26616c [MIPS: Respect
      the ISA level in FCSR handling] and f6843626 [MIPS: math-emu: Set FIR
      feature flags for full emulation].
      
      Use `boot_cpu_data' to obtain the data from, following the approach that
      `cpu_has_*' macros take and avoiding the call to `smp_processor_id' made
      in the reference to `current_cpu_data'.  The contents of FSCR have to be
      consistent across processors in an SMP system, the settings there must
      not change as a thread is migrated across processors.  And the contents
      of FIR are guaranteed to be consistent in FPU emulation, by definition.
      Signed-off-by: NMaciej W. Rozycki <macro@linux-mips.org>
      Tested-by: NEzequiel Garcia <ezequiel.garcia@imgtec.com>
      Tested-by: NPaul Martin <paul.martin@codethink.co.uk>
      Cc: Markos Chandras <Markos.Chandras@imgtec.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/10030/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      03dce595
    • P
      MIPS: fix FP mode selection in lieu of .MIPS.abiflags data · 620b1550
      Paul Burton 提交于
      Commit 46490b57 ("MIPS: kernel: elf: Improve the overall ABI and FPU
      mode checks") reworked the ELF FP ABI mode selection logic, but when
      CONFIG_MIPS_O32_FP64_SUPPORT is enabled it breaks the use of binaries
      which have no PT_MIPS_ABIFLAGS program header & associated
      .MIPS.abiflags section.
      
      A default mode is selected based upon whether the ELF contains MIPS32 or
      MIPS64 code, but that selection is made in arch_elf_pt_proc.
      arch_elf_pt_proc only executes when a PT_MIPS_ABIFLAGS program header is
      found. If one is not found then arch_elf_pt_proc is never called, and no
      default overall_fp_mode value is selected. When arch_check_elf is
      called, both abi0 & abi1 are MIPS_ABI_FP_UNKNOWN which leads to both
      prog_req & interp_req being set to none_req. none_req matches none of
      the conditions for mode selection at the end of arch_check_elf, so
      overall_fp_mode is left untouched. Finally once mips_set_personality_fp
      is called the BUG() in the default case is then hit & the kernel likely
      panics.
      
      Fix this by moving the selection of a default overall mode to the start
      of arch_check_elf, which runs once per ELF executed regardless of
      whether it has a PT_MIPS_ABIFLAGS program header.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Matthew Fortune <matthew.fortune@imgtec.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Cc: stable@vger.kernel.org # v4.0+
      Patchwork: http://patchwork.linux-mips.org/patch/9978/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      620b1550
  13. 12 5月, 2015 1 次提交
    • R
      MIPS: SMP: Fix build error. · cafb45b2
      Ralf Baechle 提交于
        CC      arch/mips/kernel/smp.o
      arch/mips/kernel/smp.c: In function ‘start_secondary’:
      arch/mips/kernel/smp.c:149:2: error: passing argument 2 of ‘cpumask_set_cpu’ discards ‘volatile’ qualifier from pointer target type [-Werror]
        cpumask_set_cpu(cpu, &cpu_callin_map);
        ^
      In file included from ./arch/mips/include/asm/processor.h:14:0,
                       from ./arch/mips/include/asm/thread_info.h:15,
                       from include/linux/thread_info.h:54,
                       from include/asm-generic/preempt.h:4,
                       from arch/mips/include/generated/asm/preempt.h:1,
                       from include/linux/preempt.h:18,
                       from include/linux/interrupt.h:8,
                       from arch/mips/kernel/smp.c:24:
      include/linux/cpumask.h:272:91: note: expected ‘struct cpumask *’ but argument is of type ‘volatile struct cpumask_t *’
       static inline void cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp)
                                                                                                 ^
      arch/mips/kernel/smp.c: In function ‘smp_prepare_boot_cpu’:
      arch/mips/kernel/smp.c:211:2: error: passing argument 2 of ‘cpumask_set_cpu’ discards ‘volatile’ qualifier from pointer target type [-Werror]
        cpumask_set_cpu(0, &cpu_callin_map);
        ^
      In file included from ./arch/mips/include/asm/processor.h:14:0,
                       from ./arch/mips/include/asm/thread_info.h:15,
                       from include/linux/thread_info.h:54,
                       from include/asm-generic/preempt.h:4,
                       from arch/mips/include/generated/asm/preempt.h:1,
                       from include/linux/preempt.h:18,
                       from include/linux/interrupt.h:8,
                       from arch/mips/kernel/smp.c:24:
      include/linux/cpumask.h:272:91: note: expected ‘struct cpumask *’ but argument is of type ‘volatile struct cpumask_t *’
       static inline void cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp)
                                                                                                 ^
      arch/mips/kernel/smp.c: In function ‘__cpu_up’:
      arch/mips/kernel/smp.c:221:10: error: passing argument 2 of ‘cpumask_test_cpu’ discards ‘volatile’ qualifier from pointer target type [-Werror]
        while (!cpumask_test_cpu(cpu, &cpu_callin_map))
                ^
      In file included from ./arch/mips/include/asm/processor.h:14:0,
                       from ./arch/mips/include/asm/thread_info.h:15,
                       from include/linux/thread_info.h:54,
                       from include/asm-generic/preempt.h:4,
                       from arch/mips/include/generated/asm/preempt.h:1,
                       from include/linux/preempt.h:18,
                       from include/linux/interrupt.h:8,
                       from arch/mips/kernel/smp.c:24:
      include/linux/cpumask.h:294:90: note: expected ‘const struct cpumask *’ but argument is of type ‘volatile struct cpumask_t *’
       static inline int cpumask_test_cpu(int cpu, const struct cpumask *cpumask)
                                                                                                ^
      cc1: all warnings being treated as errors
      make[2]: *** [arch/mips/kernel/smp.o] Error 1
      make[1]: *** [arch/mips/kernel] Error 2
      make: *** [arch/mips] Error 2
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      cafb45b2
  14. 13 4月, 2015 1 次提交
  15. 10 4月, 2015 5 次提交
  16. 08 4月, 2015 1 次提交