1. 06 3月, 2018 1 次提交
    • C
      s390/entry.S: fix spurious zeroing of r0 · d3f46896
      Christian Borntraeger 提交于
      when a system call is interrupted we might call the critical section
      cleanup handler that re-does some of the operations. When we are between
      .Lsysc_vtime and .Lsysc_do_svc we might also redo the saving of the
      problem state registers r0-r7:
      
      .Lcleanup_system_call:
      [...]
      0:      # update accounting time stamp
              mvc     __LC_LAST_UPDATE_TIMER(8),__LC_SYNC_ENTER_TIMER
              # set up saved register r11
              lg      %r15,__LC_KERNEL_STACK
              la      %r9,STACK_FRAME_OVERHEAD(%r15)
              stg     %r9,24(%r11)            # r11 pt_regs pointer
              # fill pt_regs
              mvc     __PT_R8(64,%r9),__LC_SAVE_AREA_SYNC
      --->    stmg    %r0,%r7,__PT_R0(%r9)
      
      The problem is now, that we might have already zeroed out r0.
      The fix is to move the zeroing of r0 after sysc_do_svc.
      Reported-by: NFarhan Ali <alifm@linux.vnet.ibm.com>
      Fixes: 7041d281 ("s390: scrub registers on kernel entry and KVM exit")
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      d3f46896
  2. 02 3月, 2018 1 次提交
    • G
      s390: Fix runtime warning about negative pgtables_bytes · 61e18270
      Guenter Roeck 提交于
      When running s390 images with 'compat' processes, the following
      BUG is seen repeatedly.
      
      BUG: non-zero pgtables_bytes on freeing mm: -16384
      
      Bisect points to commit b4e98d9a ("mm: account pud page tables").
      Analysis shows that init_new_context() is called with
      mm->context.asce_limit set to _REGION3_SIZE. In this situation,
      pgtables_bytes remains set to 0 and is not increased. The message is
      displayed when the affected process dies and mm_dec_nr_puds() is called.
      
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Fixes: b4e98d9a ("mm: account pud page tables")
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      61e18270
  3. 22 2月, 2018 2 次提交
  4. 21 2月, 2018 4 次提交
  5. 19 2月, 2018 1 次提交
  6. 14 2月, 2018 6 次提交
  7. 08 2月, 2018 1 次提交
  8. 07 2月, 2018 1 次提交
    • M
      s390: introduce execute-trampolines for branches · f19fbd5e
      Martin Schwidefsky 提交于
      Add CONFIG_EXPOLINE to enable the use of the new -mindirect-branch= and
      -mfunction_return= compiler options to create a kernel fortified against
      the specte v2 attack.
      
      With CONFIG_EXPOLINE=y all indirect branches will be issued with an
      execute type instruction. For z10 or newer the EXRL instruction will
      be used, for older machines the EX instruction. The typical indirect
      call
      
      	basr	%r14,%r1
      
      is replaced with a PC relative call to a new thunk
      
      	brasl	%r14,__s390x_indirect_jump_r1
      
      The thunk contains the EXRL/EX instruction to the indirect branch
      
      __s390x_indirect_jump_r1:
      	exrl	0,0f
      	j	.
      0:	br	%r1
      
      The detour via the execute type instruction has a performance impact.
      To get rid of the detour the new kernel parameter "nospectre_v2" and
      "spectre_v2=[on,off,auto]" can be used. If the parameter is specified
      the kernel and module code will be patched at runtime.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      f19fbd5e
  9. 05 2月, 2018 6 次提交
  10. 02 2月, 2018 5 次提交
  11. 01 2月, 2018 2 次提交
  12. 27 1月, 2018 1 次提交
  13. 26 1月, 2018 9 次提交