1. 17 1月, 2020 1 次提交
  2. 29 10月, 2019 1 次提交
  3. 07 8月, 2019 1 次提交
  4. 26 7月, 2019 2 次提交
  5. 25 6月, 2019 1 次提交
    • H
      parisc: Fix compiler warnings in float emulation code · 3333e040
      Helge Deller 提交于
      [ Upstream commit 6b98d9134e14f5ef4bcf64b27eedf484ed19a1ec ]
      
      Avoid such compiler warnings:
      arch/parisc/math-emu/cnv_float.h:71:27: warning: ‘<<’ in boolean context, did you mean ‘<’ ? [-Wint-in-bool-context]
           ((Dintp1(dint_valueA) << 33 - SGL_EXP_LENGTH) || Dintp2(dint_valueB))
      arch/parisc/math-emu/fcnvxf.c:257:6: note: in expansion of macro ‘Dint_isinexact_to_sgl’
        if (Dint_isinexact_to_sgl(srcp1,srcp2)) {
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      3333e040
  6. 26 5月, 2019 3 次提交
  7. 17 4月, 2019 3 次提交
  8. 27 2月, 2019 1 次提交
    • D
      parisc: Fix ptrace syscall number modification · ebe390b4
      Dmitry V. Levin 提交于
      commit b7dc5a071ddf69c0350396b203cba32fe5bab510 upstream.
      
      Commit 910cd32e ("parisc: Fix and enable seccomp filter support")
      introduced a regression in ptrace-based syscall tampering: when tracer
      changes syscall number to -1, the kernel fails to initialize %r28 with
      -ENOSYS and subsequently fails to return the error code of the failed
      syscall to userspace.
      
      This erroneous behaviour could be observed with a simple strace syscall
      fault injection command which is expected to print something like this:
      
      $ strace -a0 -ewrite -einject=write:error=enospc echo hello
      write(1, "hello\n", 6) = -1 ENOSPC (No space left on device) (INJECTED)
      write(2, "echo: ", 6) = -1 ENOSPC (No space left on device) (INJECTED)
      write(2, "write error", 11) = -1 ENOSPC (No space left on device) (INJECTED)
      write(2, "\n", 1) = -1 ENOSPC (No space left on device) (INJECTED)
      +++ exited with 1 +++
      
      After commit 910cd32e it loops printing
      something like this instead:
      
      write(1, "hello\n", 6../strace: Failed to tamper with process 12345: unexpectedly got no error (return value 0, error 0)
      ) = 0 (INJECTED)
      
      This bug was found by strace test suite.
      
      Fixes: 910cd32e ("parisc: Fix and enable seccomp filter support")
      Cc: stable@vger.kernel.org # v4.5+
      Signed-off-by: NDmitry V. Levin <ldv@altlinux.org>
      Tested-by: NHelge Deller <deller@gmx.de>
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ebe390b4
  9. 29 12月, 2018 1 次提交
  10. 13 12月, 2018 1 次提交
    • H
      parisc: Enable -ffunction-sections for modules on 32-bit kernel · 6c9ac388
      Helge Deller 提交于
      commit 1e8249b8 upstream.
      
      Frank Schreiner reported, that since kernel 4.18 he faces sysfs-warnings
      when loading modules on a 32-bit kernel. Here is one such example:
      
       sysfs: cannot create duplicate filename '/module/nfs/sections/.text'
       CPU: 0 PID: 98 Comm: modprobe Not tainted 4.18.0-2-parisc #1 Debian 4.18.10-2
       Backtrace:
        [<1017ce2c>] show_stack+0x3c/0x50
        [<107a7210>] dump_stack+0x28/0x38
        [<103f900c>] sysfs_warn_dup+0x88/0xac
        [<103f8b1c>] sysfs_add_file_mode_ns+0x164/0x1d0
        [<103f9e70>] internal_create_group+0x11c/0x304
        [<103fa0a0>] sysfs_create_group+0x48/0x60
        [<1022abe8>] load_module.constprop.35+0x1f9c/0x23b8
        [<1022b278>] sys_finit_module+0xd0/0x11c
        [<101831dc>] syscall_exit+0x0/0x14
      
      This warning gets triggered by the fact, that due to commit 24b6c225
      ("parisc: Build kernel without -ffunction-sections") we now get multiple .text
      sections in the kernel modules for which sysfs_create_group() can't create
      multiple virtual files.
      
      This patch works around the problem by re-enabling the -ffunction-sections
      compiler option for modules, while keeping it disabled for the non-module
      kernel code.
      Reported-by: NFrank Scheiner <frank.scheiner@web.de>
      Fixes: 24b6c225 ("parisc: Build kernel without -ffunction-sections")
      Cc: <stable@vger.kernel.org> # v4.18+
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6c9ac388
  11. 06 12月, 2018 1 次提交
  12. 14 11月, 2018 3 次提交
    • H
      parisc: Fix exported address of os_hpmc handler · e41a6afd
      Helge Deller 提交于
      commit 99a3ae51d557d8e38a7aece65678a31f9db215ee upstream.
      
      In the C-code we need to put the physical address of the hpmc handler in
      the interrupt vector table (IVA) in order to get HPMCs working.  Since
      on parisc64 function pointers are indirect (in fact they are function
      descriptors) we instead export the address as variable and not as
      function.
      
      This reverts a small part of commit f39cce65 ("parisc: Add
      cfi_startproc and cfi_endproc to assembly code").
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Cc: <stable@vger.kernel.org>    [4.9+]
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e41a6afd
    • H
      parisc: Fix map_pages() to not overwrite existing pte entries · 72f6b9c0
      Helge Deller 提交于
      commit 3c229b3f2dd8133f61bb81d3cb018be92f4bba39 upstream.
      
      Fix a long-existing small nasty bug in the map_pages() implementation which
      leads to overwriting already written pte entries with zero, *if* map_pages() is
      called a second time with an end address which isn't aligned on a pmd boundry.
      This happens for example if we want to remap only the text segment read/write
      in order to run alternative patching on the code. Exiting the loop when we
      reach the end address fixes this.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      72f6b9c0
    • J
      parisc: Fix address in HPMC IVA · dcfc4972
      John David Anglin 提交于
      commit 1138b6718ff74d2a934459643e3754423d23b5e2 upstream.
      
      Helge noticed that the address of the os_hpmc handler was not being
      correctly calculated in the hpmc macro.  As a result, PDCE_CHECK would
      fail to call os_hpmc:
      
      <Cpu2> e800009802e00000  0000000000000000  CC_ERR_CHECK_HPMC
      <Cpu2> 37000f7302e00000  8040004000000000  CC_ERR_CPU_CHECK_SUMMARY
      <Cpu2> f600105e02e00000  fffffff0f0c00000  CC_MC_HPMC_MONARCH_SELECTED
      <Cpu2> 140003b202e00000  000000000000000b  CC_ERR_HPMC_STATE_ENTRY
      <Cpu2> 5600100b02e00000  00000000000001a0  CC_MC_OS_HPMC_LEN_ERR
      <Cpu2> 5600106402e00000  fffffff0f0438e70  CC_MC_BR_TO_OS_HPMC_FAILED
      <Cpu2> e800009802e00000  0000000000000000  CC_ERR_CHECK_HPMC
      <Cpu2> 37000f7302e00000  8040004000000000  CC_ERR_CPU_CHECK_SUMMARY
      <Cpu2> 4000109f02e00000  0000000000000000  CC_MC_HPMC_INITIATED
      <Cpu2> 4000101902e00000  0000000000000000  CC_MC_MULTIPLE_HPMCS
      <Cpu2> 030010d502e00000  0000000000000000  CC_CPU_STOP
      
      The address problem can be seen by dumping the fault vector:
      
      0000000040159000 <fault_vector_20>:
          40159000:   63 6f 77 73     stb r15,-2447(dp)
          40159004:   20 63 61 6e     ldil L%b747000,r3
          40159008:   20 66 6c 79     ldil L%-1c3b3000,r3
              ...
          40159020:   08 00 02 40     nop
          40159024:   20 6e 60 02     ldil L%15d000,r3
          40159028:   34 63 00 00     ldo 0(r3),r3
          4015902c:   e8 60 c0 02     bv,n r0(r3)
          40159030:   08 00 02 40     nop
          40159034:   00 00 00 00     break 0,0
          40159038:   c0 00 70 00     bb,*< r0,sar,40159840 <fault_vector_20+0x840>
          4015903c:   00 00 00 00     break 0,0
      
      Location 40159038 should contain the physical address of os_hpmc:
      
      000000004015d000 <os_hpmc>:
          4015d000:   08 1a 02 43     copy r26,r3
          4015d004:   01 c0 08 a4     mfctl iva,r4
          4015d008:   48 85 00 68     ldw 34(r4),r5
      
      This patch moves the address setup into initialize_ivt to resolve the
      above problem.  I tested the change by dumping the HPMC entry after setup:
      
      0000000040209020:  8000240
      0000000040209024: 206a2004
      0000000040209028: 34630ac0
      000000004020902c: e860c002
      0000000040209030:  8000240
      0000000040209034: 1bdddce6
      0000000040209038:   15d000
      000000004020903c:      1a0
      Signed-off-by: NJohn David Anglin <dave.anglin@bell.net>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      dcfc4972
  13. 16 10月, 2018 1 次提交
  14. 21 8月, 2018 2 次提交
  15. 18 8月, 2018 1 次提交
    • S
      mm: convert return type of handle_mm_fault() caller to vm_fault_t · 50a7ca3c
      Souptick Joarder 提交于
      Use new return type vm_fault_t for fault handler.  For now, this is just
      documenting that the function returns a VM_FAULT value rather than an
      errno.  Once all instances are converted, vm_fault_t will become a
      distinct type.
      
      Ref-> commit 1c8f4220 ("mm: change return type to vm_fault_t")
      
      In this patch all the caller of handle_mm_fault() are changed to return
      vm_fault_t type.
      
      Link: http://lkml.kernel.org/r/20180617084810.GA6730@jordon-HP-15-Notebook-PCSigned-off-by: NSouptick Joarder <jrdr.linux@gmail.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Richard Kuo <rkuo@codeaurora.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: Ley Foon Tan <lftan@altera.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: James E.J. Bottomley <jejb@parisc-linux.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Palmer Dabbelt <palmer@sifive.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Guan Xuetao <gxt@pku.edu.cn>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      50a7ca3c
  16. 17 8月, 2018 4 次提交
  17. 13 8月, 2018 9 次提交
  18. 11 8月, 2018 1 次提交
  19. 09 8月, 2018 2 次提交
  20. 02 8月, 2018 1 次提交