1. 13 1月, 2015 7 次提交
    • R
      MIPS: Kconfig: Fix recursive dependency. · c22eacfe
      Ralf Baechle 提交于
      [...]
        HOSTCC  scripts/kconfig/zconf.tab.o
        HOSTLD  scripts/kconfig/conf
      arch/mips/Kconfig:2681:error: recursive dependency detected!
      arch/mips/Kconfig:2681:	symbol MIPS32_N32 depends on MIPS32_COMPAT
      arch/mips/Kconfig:2658:	symbol MIPS32_COMPAT is selected by MIPS32_N32
      
      Introduced by d74473bdf7a4c1ef7ae2b75f585fe5649ac2dcea (MIPS: Compat: Fix
      build error if CONFIG_MIPS32_COMPAT but no compat ABI.)
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      c22eacfe
    • R
      MIPS: Compat: Fix build error if CONFIG_MIPS32_COMPAT but no compat ABI. · 78aaf956
      Ralf Baechle 提交于
      In that case nor __NR_seccomp_*_32 symbols will be defined in
      <asm/unistd.h> so the attempt to use it in kernel.seccomp.c will fail
      with:
      
      kernel/seccomp.c:565:2: error: '__NR_seccomp_read_32' undeclared here (not in a function)
        __NR_seccomp_read_32, __NR_seccomp_write_32, __NR_seccomp_exit_32, __NR_seccomp_sigreturn_32,
        ^
      kernel/seccomp.c:565:24: error: '__NR_seccomp_write_32' undeclared here (not in a function)
        __NR_seccomp_read_32, __NR_seccomp_write_32, __NR_seccomp_exit_32, __NR_seccomp_sigreturn_32,
                              ^
      kernel/seccomp.c:565:47: error: '__NR_seccomp_exit_32' undeclared here (not in a function)
        __NR_seccomp_read_32, __NR_seccomp_write_32, __NR_seccomp_exit_32, __NR_seccomp_sigreturn_32,
                                                     ^
      kernel/seccomp.c:565:69: error: '__NR_seccomp_sigreturn_32' undeclared here (not in a function)
        __NR_seccomp_read_32, __NR_seccomp_write_32, __NR_seccomp_exit_32, __NR_seccomp_sigreturn_32,
      
      Solved by changing the compat ABIs in kconfig to select MIPS32_COMPAT
      directly.  This also means the user no longer has to select MIPS32_COMPAT
      before being able to see the ABI options.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      78aaf956
    • B
      MIPS: JZ4740: Fixup #include's (sparse) · 942e22df
      Brian Norris 提交于
      Fixes sparse warnings:
      
        arch/mips/jz4740/irq.c:63:6: warning: symbol 'jz4740_irq_suspend' was not declared. Should it be static?
        arch/mips/jz4740/irq.c:69:6: warning: symbol 'jz4740_irq_resume' was not declared. Should it be static?
      
      Also, I've seen some elusive build errors on my automated build test
      where JZ4740_IRQ_BASE and NR_IRQS are missing, but I can't reproduce
      them manually for some reason. Anyway, mach-jz4740/irq.h should help us
      avoid relying on some implicit include.
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/8724/Acked-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      942e22df
    • R
      MIPS: Wire up execveat(2). · 389cdc5d
      Ralf Baechle 提交于
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      389cdc5d
    • R
      MIPS: Update malta_defconfig to something that works out of the box. · b8e7d196
      Ralf Baechle 提交于
      In particular the use of the antiquated PIX PATA drivers was a nuiscance
      since most userland has switched to the new /dev/sda drivers as well as
      the lack of EXT4.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      b8e7d196
    • R
    • R
      MIPS: Do not fiddle with FRE unless FRE is actually available. · b0c34f61
      Ralf Baechle 提交于
      Commit 4227a2d4 (MIPS: Support for hybrid
      FPRs) changes the kernel to execute read_c0_config5() even on processors
      that don't have a Config5 register.  According to the arch spec the
      behaviour of trying to read or write this register is UNDEFINED where this
      register doesn't exist, that is merely looking at this register is
      already cruel because that might kill a kitten.
      
      In case of Qemu older than v2.2 Qemu has elected to implement this
      UNDEFINED behaviour by taking a RI exception - which then fries the
      kernel:
      
      [...]
      Freeing YAMON memory: 956k freed
      Freeing unused kernel memory: 240K (80674000 - 806b0000)
      Reserved instruction in kernel code[#1]:
      CPU: 0 PID: 1 Comm: init Not tainted 3.18.0-rc6-00058-g4227a2d4 #26
      task: 86047588 ti: 86048000 task.ti: 86048000
      $ 0   : 00000000 77a638cc 00000000 00000000
      [...]
      
      For qemu v2.2.0 commit f31b035a9f10dc9b57f01c426110af845d453ce2
      (target-mips: correctly handle access to unimplemented CP0 register)
      changed the behaviour to returning zero on read and ignoring writes
      which more matches how typical hardware implementations actually behave.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      b0c34f61
  2. 10 1月, 2015 1 次提交
  3. 09 1月, 2015 5 次提交
  4. 08 1月, 2015 4 次提交
    • A
      arm64/efi: add missing call to early_ioremap_reset() · 0e63ea48
      Ard Biesheuvel 提交于
      The early ioremap support introduced by patch bf4b558e
      ("arm64: add early_ioremap support") failed to add a call to
      early_ioremap_reset() at an appropriate time. Without this call,
      invocations of early_ioremap etc. that are done too late will go
      unnoticed and may cause corruption.
      
      This is exactly what happened when the first user of this feature
      was added in patch f84d0275 ("arm64: add EFI runtime services").
      The early mapping of the EFI memory map is unmapped during an early
      initcall, at which time the early ioremap support is long gone.
      
      Fix by adding the missing call to early_ioremap_reset() to
      setup_arch(), and move the offending early_memunmap() to right after
      the point where the early mapping of the EFI memory map is last used.
      
      Fixes: f84d0275 ("arm64: add EFI runtime services")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NLeif Lindholm <leif.lindholm@linaro.org>
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      0e63ea48
    • G
      ARM: 8253/1: mm: use phys_addr_t type in map_lowmem() for kernel mem region · ac084688
      Grygorii Strashko 提交于
      Now local variables kernel_x_start and kernel_x_end defined using
      'unsigned long' type which is wrong because they represent physical
      memory range and will be calculated wrongly if LPAE is enabled.
      As result, all following code in map_lowmem() will not work correctly.
      
      For example, Keystone 2 boot is broken because
       kernel_x_start == 0x0000 0000
       kernel_x_end   == 0x0080 0000
      
      instead of
       kernel_x_start == 0x0000 0008 0000 0000
       kernel_x_end   == 0x0000 0008 0080 0000
      and as result whole low memory will be mapped with MT_MEMORY_RW
      permissions by code (start > kernel_x_end):
      		} else if (start >= kernel_x_end) {
      			map.pfn = __phys_to_pfn(start);
      			map.virtual = __phys_to_virt(start);
      			map.length = end - start;
      			map.type = MT_MEMORY_RW;
      
      			create_mapping(&map);
      		}
      
      Hence, fix it by using phys_addr_t type for variables kernel_x_start
      and kernel_x_end.
      Tested-by: NMurali Karicheri <m-karicheri2@ti.com>
      Signed-off-by: NGrygorii Strashko <grygorii.strashko@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      ac084688
    • M
      ARM: 8249/1: mm: dump: don't skip regions · cca547e9
      Mark Rutland 提交于
      Currently the arm page table dumping code starts dumping page tables
      from USER_PGTABLES_CEILING. This is unnecessary for skipping any entries
      related to userspace as the swapper_pg_dir does not contain such
      entries, and results in a couple of unfortuante side effects.
      
      Firstly, any kernel mappings which might exist below
      USER_PGTABLES_CEILING will not be accounted in the dump output. This
      masks any entries erroneously created below this address.
      
      Secondly, if the final page table entry walked is part of a valid
      mapping the page table dumping code will not log the region this entry
      is part of, as the final note_page call in walk_pgd will trigger an
      early return when 0 < USER_PGTABLES_CEILING. Luckily this isn't seen on
      contemporary systems as they typically don't have enough RAM to extend
      the linear mapping right to the end of the address space.
      
      Due to the way addr is constructed in the walk_* functions, it can never
      be less than USER_PGTABLES_CEILING when walking the page tables, so it
      is not necessary to avoid dereferencing invalid table addresses. The
      existing checks for st->current_prot and st->marker[1].start_address are
      sufficient to ensure we will not print and/or dereference garbage when
      trying to log information.
      
      This patch removes both problematic uses of USER_PGTABLES_CEILING from
      the arm page table dumping code, preventing both of these issues. We
      will now report any low mappings, and the final note_page call will not
      return early, ensuring all regions are logged.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Cc: Steve Capper <steve.capper@linaro.org>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      cca547e9
    • R
      ARM: wire up execveat syscall · 841ee230
      Russell King 提交于
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      841ee230
  5. 07 1月, 2015 7 次提交
  6. 06 1月, 2015 2 次提交
  7. 05 1月, 2015 3 次提交
  8. 04 1月, 2015 2 次提交
  9. 31 12月, 2014 2 次提交
  10. 30 12月, 2014 1 次提交
    • S
      Add USB_EHCI_EXYNOS to multi_v7_defconfig · 007487f1
      Steev Klimaszewski 提交于
      Currently we enable Exynos devices in the multi v7 defconfig, however, when
      testing on my ODROID-U3, I noticed that USB was not working.  Enabling this
      option causes USB to work, which enables networking support as well since the
      ODROID-U3 has networking on the USB bus.
      
      [arnd] Support for odroid-u3 was added in 3.10, so it would be nice to
      backport this fix at least that far.
      Signed-off-by: NSteev Klimaszewski <steev@gentoo.org>
      Cc: stable@vger.kernel.org # 3.10
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      007487f1
  11. 29 12月, 2014 3 次提交
    • M
      Revert "powerpc: Secondary CPUs must set cpu_callin_map after setting active and online" · 1be6f10f
      Michael Ellerman 提交于
      This reverts commit 7c5c92ed.
      
      Although this did fix the bug it was aimed at, it also broke secondary
      startup on platforms that use give/take_timebase(). Unfortunately we
      didn't detect that while it was in next.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      1be6f10f
    • H
      powerpc/kdump: Ignore failure in enabling big endian exception during crash · c1caae3d
      Hari Bathini 提交于
      In LE kernel, we currently have a hack for kexec that resets the exception
      endian before starting a new kernel as the kernel that is loaded could be a
      big endian or a little endian kernel. In kdump case, resetting exception
      endian fails when one or more cpus is disabled. But we can ignore the failure
      and still go ahead, as in most cases crashkernel will be of same endianess
      as primary kernel and reseting endianess is not even needed in those cases.
      This patch adds a new inline function to say if this is kdump path. This
      function is used at places where such a check is needed.
      Signed-off-by: NHari Bathini <hbathini@linux.vnet.ibm.com>
      [mpe: Rename to kdump_in_progress(), use bool, and edit comment]
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      c1caae3d
    • P
      powerpc: Wire up sys_execveat() syscall · 1e5d0fdb
      Pranith Kumar 提交于
      Wire up sys_execveat(). This passes the selftests for the system call.
      
      Check success of execveat(3, '../execveat', 0)... [OK]
      Check success of execveat(5, 'execveat', 0)... [OK]
      Check success of execveat(6, 'execveat', 0)... [OK]
      Check success of execveat(-100, '/home/pranith/linux/...ftests/exec/execveat', 0)... [OK]
      Check success of execveat(99, '/home/pranith/linux/...ftests/exec/execveat', 0)... [OK]
      Check success of execveat(8, '', 4096)... [OK]
      Check success of execveat(17, '', 4096)... [OK]
      Check success of execveat(9, '', 4096)... [OK]
      Check success of execveat(14, '', 4096)... [OK]
      Check success of execveat(14, '', 4096)... [OK]
      Check success of execveat(15, '', 4096)... [OK]
      Check failure of execveat(8, '', 0) with ENOENT... [OK]
      Check failure of execveat(8, '(null)', 4096) with EFAULT... [OK]
      Check success of execveat(5, 'execveat.symlink', 0)... [OK]
      Check success of execveat(6, 'execveat.symlink', 0)... [OK]
      Check success of execveat(-100, '/home/pranith/linux/...xec/execveat.symlink', 0)... [OK]
      Check success of execveat(10, '', 4096)... [OK]
      Check success of execveat(10, '', 4352)... [OK]
      Check failure of execveat(5, 'execveat.symlink', 256) with ELOOP... [OK]
      Check failure of execveat(6, 'execveat.symlink', 256) with ELOOP... [OK]
      Check failure of execveat(-100, '/home/pranith/linux/tools/testing/selftests/exec/execveat.symlink', 256) with ELOOP... [OK]
      Check success of execveat(3, '../script', 0)... [OK]
      Check success of execveat(5, 'script', 0)... [OK]
      Check success of execveat(6, 'script', 0)... [OK]
      Check success of execveat(-100, '/home/pranith/linux/...elftests/exec/script', 0)... [OK]
      Check success of execveat(13, '', 4096)... [OK]
      Check success of execveat(13, '', 4352)... [OK]
      Check failure of execveat(18, '', 4096) with ENOENT... [OK]
      Check failure of execveat(7, 'script', 0) with ENOENT... [OK]
      Check success of execveat(16, '', 4096)... [OK]
      Check success of execveat(16, '', 4096)... [OK]
      Check success of execveat(4, '../script', 0)... [OK]
      Check success of execveat(4, 'script', 0)... [OK]
      Check success of execveat(4, '../script', 0)... [OK]
      Check failure of execveat(4, 'script', 0) with ENOENT... [OK]
      Check failure of execveat(5, 'execveat', 65535) with EINVAL... [OK]
      Check failure of execveat(5, 'no-such-file', 0) with ENOENT... [OK]
      Check failure of execveat(6, 'no-such-file', 0) with ENOENT... [OK]
      Check failure of execveat(-100, 'no-such-file', 0) with ENOENT... [OK]
      Check failure of execveat(5, '', 4096) with EACCES... [OK]
      Check failure of execveat(5, 'Makefile', 0) with EACCES... [OK]
      Check failure of execveat(11, '', 4096) with EACCES... [OK]
      Check failure of execveat(12, '', 4096) with EACCES... [OK]
      Check failure of execveat(99, '', 4096) with EBADF... [OK]
      Check failure of execveat(99, 'execveat', 0) with EBADF... [OK]
      Check failure of execveat(8, 'execveat', 0) with ENOTDIR... [OK]
      Invoke copy of 'execveat' via filename of length 4093:
      Check success of execveat(19, '', 4096)... [OK]
      Check success of execveat(5, 'xxxxxxxxxxxxxxxxxxxx...yyyyyyyyyyyyyyyyyyyy', 0)... [OK]
      Invoke copy of 'script' via filename of length 4093:
      Check success of execveat(20, '', 4096)... [OK]
      /bin/sh: 0: Can't open /dev/fd/5/xxxxxxx(... a long line of x's and y's, 0)... [OK]
      Check success of execveat(5, 'xxxxxxxxxxxxxxxxxxxx...yyyyyyyyyyyyyyyyyyyy', 0)... [OK]
      
      Tested on a 32-bit powerpc system.
      Signed-off-by: NPranith Kumar <bobby.prani@gmail.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      1e5d0fdb
  12. 28 12月, 2014 2 次提交
  13. 27 12月, 2014 1 次提交