1. 16 5月, 2012 22 次提交
  2. 11 4月, 2012 7 次提交
    • M
      [S390] Fix compile error in swab.h · affbb420
      Martin Schwidefsky 提交于
      The inline assembly in__arch_swab16p causes compile errors of the form:
      
      *error*: *invalid* '*asm*': operand number missing after %-*letter*
      
      The assembly uses the %O<n>/%R<n> notation but the first operand misses
      the operand number, it needs to be "%O1" instead of "%O".
      Reported-by: NGil Peleg <gilpeleg@servframe.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      affbb420
    • M
      [S390] Fix stfle() lowcore protection problem · 37e37c20
      Michael Holzheu 提交于
      The stfle() function writes into lowcore memory when stfl_fac_list
      is initialized with "S390_lowcore.stfl_fac_list = 0". For older
      compilers this triggers a lowcore exception. With newer compilers
      and "-OXX" compile option the bug does not show up because
      the "S390_lowcore.stfl_fac_list" initialization is removed by the
      compiler. The reason for thatis the incorrect "=m"
      (S390_lowcore.stfl_fac_list) constraint in the stfl inline assembly.
      
      The following shows the disassembly of the stfle() optimized code
      that is inlined in the lgr_info_get() function:
      
      000000000011325c <lgr_info_get>:
        11325c:       eb 9f f0 60 00 24       stmg    %r9,%r15,96(%r15)
        113262:       c0 d0 00 29 0e 47       larl    %r13,634ef0 <servi..>
        113268:       a7 f1 3f c0             tml     %r15,16320
        11326c:       b9 04 00 ef             lgr     %r14,%r15
        113270:       a7 84 00 01             je      113272 <lgr_info_g..>
        113274:       a7 fb ff c0             aghi    %r15,-64
        113278:       b9 04 00 c2             lgr     %r12,%r2
        11327c:       a7 29 00 01             lghi    %r2,1
        113280:       e3 e0 f0 98 00 24       stg     %r14,152(%r15)
        113286:       d7 97 c0 00 c0 00       xc      0(152,%r12),0(%r12)
        11328c:       c0 e5 00 28 db 4c       brasl   %r14,62e924 <add_e..>
        113292:       b2 b1 00 00             stfl    0
      
      To fix the problem we now clear the S390_lowcore.stfl_fac_list at
      startup in "head.S" for all machine types before lowcore protection
      is enabled.
      
      In addition to that the "=m" constraint is replaced by "+m".
      Signed-off-by: NMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      37e37c20
    • H
      [S390] cpum_cf: get rid of compile warnings · af0ee94e
      Heiko Carstens 提交于
      Fix these:
      
      arch/s390/kernel/perf_cpum_cf.c:180:3: warning: format '%lx'
         expects argument of type 'long unsigned int',
         but argument 2 has type 'int' [-Wformat]
      arch/s390/kernel/perf_cpum_cf.c: In function 'cpumf_pmu_disable':
      arch/s390/kernel/perf_cpum_cf.c:205:3: warning: format '%lx'
         expects argument of type 'long unsigned int',
         but argument 2 has type 'int' [-Wformat]
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      af0ee94e
    • H
      [S390] irq: simple coding style change · 7968ca81
      Heiko Carstens 提交于
      Use braces for if/else/list_for_each_entry bodies if the body consists
      of more than a single line. Otherwise I get confused and check if there
      is something broken whenever I see these code snippets.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      7968ca81
    • M
      [S390] update default configuration · ac2ac6e8
      Michael Holzheu 提交于
      Add TASKSTATS options, enable CRASH_DUMP, and regenerate defconfig
      file with "make savedefconfig".
      Signed-off-by: NMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      ac2ac6e8
    • M
      [S390] fix tlb flushing for page table pages · cd94154c
      Martin Schwidefsky 提交于
      Git commit 36409f63 "use generic RCU
      page-table freeing code" introduced a tlb flushing bug. Partially revert
      the above git commit and go back to s390 specific page table flush code.
      
      For s390 the TLB can contain three types of entries, "normal" TLB
      page-table entries, TLB combined region-and-segment-table (CRST) entries
      and real-space entries. Linux does not use real-space entries which
      leaves normal TLB entries and CRST entries. The CRST entries are
      intermediate steps in the page-table translation called translation paths.
      For example a 4K page access in a three-level page table setup will
      create two CRST TLB entries and one page-table TLB entry. The advantage
      of that approach is that a page access next to the previous one can reuse
      the CRST entries and needs just a single read from memory to create the
      page-table TLB entry. The disadvantage is that the TLB flushing rules are
      more complicated, before any page-table may be freed the TLB needs to be
      flushed.
      
      In short: the generic RCU page-table freeing code is incorrect for the
      CRST entries, in particular the check for mm_users < 2 is troublesome.
      
      This is applicable to 3.0+ kernels.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      cd94154c
    • M
      [S390] kernel: Use local_irq_save() for memcpy_real() · b785e0d0
      Michael Holzheu 提交于
      Currently in the memcpy_real() function interrupts are disabled with
      __arch_local_irq_stnsm(). In order to notify lockdep that interrupts
      are disabled, with this patch local_irq_save() is used instead. The
      function __arch_local_irq_stnsm() is still used for switching to
      real mode.
      Reviewed-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMichael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      b785e0d0
  3. 30 3月, 2012 1 次提交
  4. 29 3月, 2012 2 次提交
  5. 24 3月, 2012 1 次提交
    • J
      coredump: remove VM_ALWAYSDUMP flag · 909af768
      Jason Baron 提交于
      The motivation for this patchset was that I was looking at a way for a
      qemu-kvm process, to exclude the guest memory from its core dump, which
      can be quite large.  There are already a number of filter flags in
      /proc/<pid>/coredump_filter, however, these allow one to specify 'types'
      of kernel memory, not specific address ranges (which is needed in this
      case).
      
      Since there are no more vma flags available, the first patch eliminates
      the need for the 'VM_ALWAYSDUMP' flag.  The flag is used internally by
      the kernel to mark vdso and vsyscall pages.  However, it is simple
      enough to check if a vma covers a vdso or vsyscall page without the need
      for this flag.
      
      The second patch then replaces the 'VM_ALWAYSDUMP' flag with a new
      'VM_NODUMP' flag, which can be set by userspace using new madvise flags:
      'MADV_DONTDUMP', and unset via 'MADV_DODUMP'.  The core dump filters
      continue to work the same as before unless 'MADV_DONTDUMP' is set on the
      region.
      
      The qemu code which implements this features is at:
      
        http://people.redhat.com/~jbaron/qemu-dump/qemu-dump.patch
      
      In my testing the qemu core dump shrunk from 383MB -> 13MB with this
      patch.
      
      I also believe that the 'MADV_DONTDUMP' flag might be useful for
      security sensitive apps, which might want to select which areas are
      dumped.
      
      This patch:
      
      The VM_ALWAYSDUMP flag is currently used by the coredump code to
      indicate that a vma is part of a vsyscall or vdso section.  However, we
      can determine if a vma is in one these sections by checking it against
      the gate_vma and checking for a non-NULL return value from
      arch_vma_name().  Thus, freeing a valuable vma bit.
      Signed-off-by: NJason Baron <jbaron@redhat.com>
      Acked-by: NRoland McGrath <roland@hack.frob.com>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: Avi Kivity <avi@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      909af768
  6. 23 3月, 2012 4 次提交
  7. 21 3月, 2012 1 次提交
  8. 16 3月, 2012 1 次提交
    • C
      [PATCH v3] ipc: provide generic compat versions of IPC syscalls · 48b25c43
      Chris Metcalf 提交于
      When using the "compat" APIs, architectures will generally want to
      be able to make direct syscalls to msgsnd(), shmctl(), etc., and
      in the kernel we would want them to be handled directly by
      compat_sys_xxx() functions, as is true for other compat syscalls.
      
      However, for historical reasons, several of the existing compat IPC
      syscalls do not do this.  semctl() expects a pointer to the fourth
      argument, instead of the fourth argument itself.  msgsnd(), msgrcv()
      and shmat() expect arguments in different order.
      
      This change adds an ARCH_WANT_OLD_COMPAT_IPC config option that can be
      set to preserve this behavior for ports that use it (x86, sparc, powerpc,
      s390, and mips).  No actual semantics are changed for those architectures,
      and there is only a minimal amount of code refactoring in ipc/compat.c.
      
      Newer architectures like tile (and perhaps future architectures such
      as arm64 and unicore64) should not select this option, and thus can
      avoid having any IPC-specific code at all in their architecture-specific
      compat layer.  In the same vein, if this option is not selected, IPC_64
      mode is assumed, since that's what the <asm-generic> headers expect.
      
      The workaround code in "tile" for msgsnd() and msgrcv() is removed
      with this change; it also fixes the bug that shmat() and semctl() were
      not being properly handled.
      Reviewed-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      48b25c43
  9. 13 3月, 2012 1 次提交