1. 30 10月, 2011 11 次提交
    • M
      [S390] signal race with restarting system calls · 20b40a79
      Martin Schwidefsky 提交于
      For a ERESTARTNOHAND/ERESTARTSYS/ERESTARTNOINTR restarting system call
      do_signal will prepare the restart of the system call with a rewind of
      the PSW before calling get_signal_to_deliver (where the debugger might
      take control). For A ERESTART_RESTARTBLOCK restarting system call
      do_signal will set -EINTR as return code.
      There are two issues with this approach:
      1) strace never sees ERESTARTNOHAND, ERESTARTSYS, ERESTARTNOINTR or
         ERESTART_RESTARTBLOCK as the rewinding already took place or the
         return code has been changed to -EINTR
      2) if get_signal_to_deliver does not return with a signal to deliver
         the restart via the repeat of the svc instruction is left in place.
         This opens a race if another signal is made pending before the
         system call instruction can be reexecuted. The original system call
         will be restarted even if the second signal would have ended the
         system call with -EINTR.
      
      These two issues can be solved by dropping the early rewind of the
      system call before get_signal_to_deliver has been called and by using
      the TIF_RESTART_SVC magic to do the restart if no signal has to be
      delivered. The only situation where the system call restart via the
      repeat of the svc instruction is appropriate is when a SA_RESTART
      signal is delivered to user space.
      
      Unfortunately this breaks inferior calls by the debugger again. The
      system call number and the length of the system call instruction is
      lost over the inferior call and user space will see ERESTARTNOHAND/
      ERESTARTSYS/ERESTARTNOINTR/ERESTART_RESTARTBLOCK. To correct this a
      new ptrace interface is added to save/restore the system call number
      and system call instruction length.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      20b40a79
    • M
      [S390] lowcore cleanup · 0edc8faa
      Martin Schwidefsky 提交于
      Remove the save_area_64 field from the 0xe00 - 0xf00 area in the lowcore.
      Use a free slot in the save_area array instead.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      0edc8faa
    • M
      [S390] Add architecture code for unmapping crashkernel memory · dab7a7b1
      Michael Holzheu 提交于
      This patch implements the crash_map_pages() function for s390.
      KEXEC_CRASH_MEM_ALIGN is set to HPAGE_SIZE, in order to support
      kernel mappings that use large pages. We also use HPAGE_SIZE alignment
      for CONFIG_HUGETLB_PAGE=n in order to have the same 1 MiB alignment on
      all s390 systems.
      Signed-off-by: NMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      dab7a7b1
    • M
      [S390] Export vmcoreinfo note · d38593f9
      Michael Holzheu 提交于
      This patch defines for s390 an ABI defined pointer to the vmcoreinfo note at
      a well known address. With this patch tools are able to find this information
      in dumps created by stand-alone or hypervisor dump tools.
      Signed-off-by: NMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      d38593f9
    • M
      [S390] kdump backend code · 60a0c68d
      Michael Holzheu 提交于
      This patch provides the architecture specific part of the s390 kdump
      support.
      Signed-off-by: NMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      60a0c68d
    • M
      [S390] Force PSW restart on online CPU · 1943f53c
      Michael Holzheu 提交于
      PSW restart can be triggered on offline CPUs. If this happens, currently
      the PSW restart code fails, because functions like smp_processor_id()
      do not work on offline CPUs. This patch fixes this as follows:
      
      If PSW restart is triggered on an offline CPU, the PSW restart (sigp restart)
      is done a second time on another CPU that is online and the old CPU is
      stopped afterwards.
      Signed-off-by: NMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      1943f53c
    • J
      [S390] use ENTRY macro for sys_setns_wrapper · 017ec183
      Jan Glauber 提交于
      Use the ENTRY macro for the system call wrapper sys_setns_wrapper
      similarly to the other wrappers.
      Signed-off-by: NJan Glauber <jang@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      017ec183
    • M
      [S390] user per registers vs. ptrace single stepping · a45aff52
      Martin Schwidefsky 提交于
      git commit 5e9a2692 "[S390] ptrace cleanup" introduced a regression
      for the case when both a user PER set (e.g. a storage alteration trace) and
      PTRACE_SINGLESTEP are active. The new code will overrule the user PER set
      with a instruction-fetch PER set over the whole address space for ptrace
      single stepping. The inferior process will be stopped after each instruction
      with an instruction fetch event. Any other events that may have occurred
      concurrently are not reported (e.g. storage alteration event) because the
      control bits for them are not set. The solution is to merge the PER control
      bits of the user PER set with the PER_EVENT_IFETCH control bit for
      PTRACE_SINGLESTEP.
      
      Cc: stable@kernel.org
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      a45aff52
    • S
      [S390] topology: fix alloc_masks annotation · caa04f69
      Sebastian Ott 提交于
      Fix this warning:
      WARNING: vmlinux.o(.text+0x199b6): Section mismatch in reference from
      the function alloc_masks() to the function .init.text:__alloc_bootmem()
      Signed-off-by: NSebastian Ott <sebott@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      caa04f69
    • M
      [S390] avoid warning in show_cpuinfo · dd4a5a31
      Martin Schwidefsky 提交于
      The .start function and indirectly the .next function of the show_cpuinfo
      sequential operation uses NR_CPUS as limit instead of nr_cpu_ids.
      This can cause warnings like this:
      
      WARNING: at /usr/src/linux/include/linux/cpumask.h:107
      Process lscpu (pid: 575, task: 000000007deb4338, ksp: 000000007794f588)
      Krnl PSW : 0704000180000000 0000000000106db4 (show_cpuinfo+0x108/0x234)
                 R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:0 PM:0 EA:3
      Krnl GPRS: 0000000000000003 0000000000791988 000000000071b478 0000000000000004
                 0000000000000001 0000000000000000 000000007d139500 0000000000000400
                 0000000000000000 000000000070e24c 000000007d48d600 0000000000000005
                 000000007d48d600 00000000004dfa10 0000000000106cf8 000000007794fcc0
      Krnl Code: 0000000000106da8: 95001000           cli     0(%r1),0
                 0000000000106dac: a774ffac           brc     7,106d04
                 0000000000106db0: a7f40001           brc     15,106db2
                >0000000000106db4: 92011000           mvi     0(%r1),1
                 0000000000106db8: a7f4ffa6           brc     15,106d04
                 0000000000106dbc: c0e5000065b4       brasl   %r14,113924
                 0000000000106dc2: c09000303a45       larl    %r9,70e24c
                 0000000000106dc8: c020001eefd4       larl    %r2,4e4d70
      
      Replacing NR_CPUS with nr_cpu_ids fixes it.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      dd4a5a31
    • P
      [S390] fix mismatch in summation of I/O IRQ statistics · de400d6b
      Peter Oberparleiter 提交于
      Current IRQ statistics support does not show detail counts for I/O
      interrupts which are processed internally only. The result is a
      summation count which is way off such as this one:
      
                 CPU0       CPU1       CPU2
      I/O:       1331        710        442
      [...]
      QAI:         15         16         16   [I/O] QDIO Adapter Interrupt
      QDI:          1          0          0   [I/O] QDIO Interrupt
      DAS:        706        645        381   [I/O] DASD
      C15:         26         10          0   [I/O] 3215
      C70:          0          0          0   [I/O] 3270
      TAP:          0          0          0   [I/O] Tape
      VMR:          0          0          0   [I/O] Unit Record Devices
      LCS:          0          0          0   [I/O] LCS
      CLW:          0          0          0   [I/O] CLAW
      CTC:          0          0          0   [I/O] CTC
      APB:          0          0          0   [I/O] AP Bus
      
      Fix this by moving I/O interrupt accounting into the common I/O layer.
      Signed-off-by: NPeter Oberparleiter <peter.oberparleiter@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      de400d6b
  2. 17 10月, 2011 1 次提交
  3. 12 10月, 2011 1 次提交
  4. 20 9月, 2011 1 次提交
  5. 08 9月, 2011 1 次提交
  6. 27 8月, 2011 1 次提交
  7. 24 8月, 2011 3 次提交
  8. 03 8月, 2011 9 次提交
  9. 27 7月, 2011 1 次提交
  10. 24 7月, 2011 10 次提交
  11. 23 6月, 2011 1 次提交
    • T
      ptrace: kill trivial tracehooks · a288eecc
      Tejun Heo 提交于
      At this point, tracehooks aren't useful to mainline kernel and mostly
      just add an extra layer of obfuscation.  Although they have comments,
      without actual in-kernel users, it is difficult to tell what are their
      assumptions and they're actually trying to achieve.  To mainline
      kernel, they just aren't worth keeping around.
      
      This patch kills the following trivial tracehooks.
      
      * Ones testing whether task is ptraced.  Replace with ->ptrace test.
      
      	tracehook_expect_breakpoints()
      	tracehook_consider_ignored_signal()
      	tracehook_consider_fatal_signal()
      
      * ptrace_event() wrappers.  Call directly.
      
      	tracehook_report_exec()
      	tracehook_report_exit()
      	tracehook_report_vfork_done()
      
      * ptrace_release_task() wrapper.  Call directly.
      
      	tracehook_finish_release_task()
      
      * noop
      
      	tracehook_prepare_release_task()
      	tracehook_report_death()
      
      This doesn't introduce any behavior change.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NOleg Nesterov <oleg@redhat.com>
      a288eecc