1. 07 Nov, 2013 10 commits
    • Helge Deller's avatar
      parisc: sticon - unbreak on 64bit kernel · 0219132f
      Helge Deller authored
      STI text console (sticon) was broken on 64bit machines with more than
      4GB RAM and this lead in some cases to a kernel crash.
      
      Since sticon uses the 32bit STI API it needs to keep pointers to memory
      below 4GB. But on a 64bit kernel some memory regions (e.g. the kernel
      stack) might be above 4GB which then may crash the kernel in the STI
      functions.
      
      Additionally sticon didn't selected the built-in framebuffer fonts by
      default. This is now fixed.
      
      On a side-note: Theoretically we could enhance the sticon driver to
      use the 64bit STI API. But - beside the fact that some machines don't
      provide a 64bit STI ROM - this would just add complexity.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Cc: stable@vger.kernel.org # 3.8+
      0219132f
    • Helge Deller's avatar
      parisc: signal fixup - SIGBUS vs. SIGSEGV · 1f2048fd
      Helge Deller authored
      Clean up code to send correct signal on invalid memory accesses:
      Send SIGBUS instead of SIGSEGV for memory accesses outside of mmap'ed
      areas
      
      This fixes the mmap13 testcase from the Linux Test Project.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      1f2048fd
    • Helge Deller's avatar
      parisc: implement full version of access_ok() · 63379c13
      Helge Deller authored
      Up to now PA-RISC could live with a trivial version of access_ok().
      Our fault handlers can correctly handle fault cases.
      
      But testcases showed that we need a better access check else we won't
      always return correct errno failure codes to userspace.
      
      Problem showed up during 32bit userspace tests in which writev() used a
      32bit memory area and length which would then wrap around on 64bit
      kernel.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      63379c13
    • Helge Deller's avatar
      parisc: correctly display number of active CPUs · 3a7452b4
      Helge Deller authored
      In case we fail to power up other CPUs in a SMP system, the kernel
      currently shows a wrong number of online CPUs. This change makes the
      output more verbose on how many of the CPUs are online. Example:
      
      CPU(s): 1 out of 2 PA8800 (Mako) at 900.000000 MHz online.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      3a7452b4
    • Helge Deller's avatar
      parisc: do not count IPI calls twice · 6f0c4aa6
      Helge Deller authored
      The number of IPI calls is already visible as per-cpu IPI irq counters
      in/proc/cpuinfo, so let's drop this additional counting.
      
      This partly reverts:
      cd85d551 parisc: more irq statistics in /proc/interrupts
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      6f0c4aa6
    • Helge Deller's avatar
      parisc: make udelay() SMP-safe · f6d12eef
      Helge Deller authored
      Each CPU has it's own Control Register 16 (CR16) which is used as time source
      for the udelay() function. But since the CR16 registers across different CPUs
      are not synced, we need to recalculate the loop count if we get switched away
      to ensure that we really delay as much time as requested.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      f6d12eef
    • Michael Opdenacker's avatar
      parisc: remove duplicate define · e4be260d
      Michael Opdenacker authored
      This patch removes a duplicate define from
      arch/parisc/math-emu/float.h
      Signed-off-by: default avatarMichael Opdenacker <michael.opdenacker@free-electrons.com>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      e4be260d
    • Helge Deller's avatar
      parisc: make "make install" not depend on vmlinux · b0756b5a
      Helge Deller authored
      Install targets (install, zinstall, uinstall) on parisc have a
      dependency to vmlinux. This may cause parts of the kernel to be rebuilt
      during installation. We must avoid this since this may run as root.
      Install targets "ABSOLUTELY MUST NOT MODIFY THE SOURCE TREE." as Linus
      emphasized this in:
      
      http://lkml.org/lkml/2013/7/10/600
      
      So on parisc and maybe other archs we need the same as for x86:
      
      1648e4f8 x86, kbuild: make "make install" not depend on vmlinux
      
      This parisc patch was inspired by:
      
      19514fc6 arm, kbuild: make "make install" not depend on vmlinux
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      b0756b5a
    • Helge Deller's avatar
      parisc: add kernel audit feature · 527973c8
      Helge Deller authored
      Implement missing functions for parisc to provide kernel audit feature.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      527973c8
    • Helge Deller's avatar
      parisc: provide macro to create exception table entries · 61dbbaeb
      Helge Deller authored
      Provide a macro ASM_EXCEPTIONTABLE_ENTRY() to create exception table
      entries and convert all open-coded places to use that macro.
      
      This patch is a first step toward creating a exception table which only
      holds 32bit pointers even on a 64bit kernel. That way in my own kernel
      I was able to reduce the in-kernel exception table from 44kB to 22kB.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      61dbbaeb
  2. 03 Nov, 2013 3 commits
  3. 02 Nov, 2013 2 commits
  4. 01 Nov, 2013 20 commits
  5. 31 Oct, 2013 5 commits
    • Linus Torvalds's avatar
      Merge branch 'akpm' (fixes from Andrew Morton) · 4f794ee8
      Linus Torvalds authored
      Merge four more fixes from Andrew Morton.
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        lib/scatterlist.c: don't flush_kernel_dcache_page on slab page
        mm: memcg: fix test for child groups
        mm: memcg: lockdep annotation for memcg OOM lock
        mm: memcg: use proper memcg in limit bypass
      4f794ee8
    • Ming Lei's avatar
      lib/scatterlist.c: don't flush_kernel_dcache_page on slab page · 3d77b50c
      Ming Lei authored
      Commit b1adaf65 ("[SCSI] block: add sg buffer copy helper
      functions") introduces two sg buffer copy helpers, and calls
      flush_kernel_dcache_page() on pages in SG list after these pages are
      written to.
      
      Unfortunately, the commit may introduce a potential bug:
      
       - Before sending some SCSI commands, kmalloc() buffer may be passed to
         block layper, so flush_kernel_dcache_page() can see a slab page
         finally
      
       - According to cachetlb.txt, flush_kernel_dcache_page() is only called
         on "a user page", which surely can't be a slab page.
      
       - ARCH's implementation of flush_kernel_dcache_page() may use page
         mapping information to do optimization so page_mapping() will see the
         slab page, then VM_BUG_ON() is triggered.
      
      Aaro Koskinen reported the bug on ARM/kirkwood when DEBUG_VM is enabled,
      and this patch fixes the bug by adding test of '!PageSlab(miter->page)'
      before calling flush_kernel_dcache_page().
      Signed-off-by: default avatarMing Lei <ming.lei@canonical.com>
      Reported-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
      Tested-by: default avatarSimon Baatz <gmbnomis@gmail.com>
      Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: <stable@vger.kernel.org>	[3.2+]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3d77b50c
    • Johannes Weiner's avatar
      mm: memcg: fix test for child groups · 696ac172
      Johannes Weiner authored
      When memcg code needs to know whether any given memcg has children, it
      uses the cgroup child iteration primitives and returns true/false
      depending on whether the iteration loop is executed at least once or
      not.
      
      Because a cgroup's list of children is RCU protected, these primitives
      require the RCU read-lock to be held, which is not the case for all
      memcg callers.  This results in the following splat when e.g.  enabling
      hierarchy mode:
      
        WARNING: CPU: 3 PID: 1 at kernel/cgroup.c:3043 css_next_child+0xa3/0x160()
        CPU: 3 PID: 1 Comm: systemd Not tainted 3.12.0-rc5-00117-g83f11a9c-dirty #18
        Hardware name: LENOVO 3680B56/3680B56, BIOS 6QET69WW (1.39 ) 04/26/2012
        Call Trace:
          dump_stack+0x54/0x74
          warn_slowpath_common+0x78/0xa0
          warn_slowpath_null+0x1a/0x20
          css_next_child+0xa3/0x160
          mem_cgroup_hierarchy_write+0x5b/0xa0
          cgroup_file_write+0x108/0x2a0
          vfs_write+0xbd/0x1e0
          SyS_write+0x4c/0xa0
          system_call_fastpath+0x16/0x1b
      
      In the memcg case, we only care about children when we are attempting to
      modify inheritable attributes interactively.  Racing with deletion could
      mean a spurious -EBUSY, no problem.  Racing with addition is handled
      just fine as well through the memcg_create_mutex: if the child group is
      not on the list after the mutex is acquired, it won't be initialized
      from the parent's attributes until after the unlock.
      Signed-off-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Acked-by: default avatarMichal Hocko <mhocko@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      696ac172
    • Johannes Weiner's avatar
      mm: memcg: lockdep annotation for memcg OOM lock · 0056f4e6
      Johannes Weiner authored
      The memcg OOM lock is a mutex-type lock that is open-coded due to
      memcg's special needs.  Add annotations for lockdep coverage.
      Signed-off-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Cc: Michal Hocko <mhocko@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0056f4e6
    • Johannes Weiner's avatar
      mm: memcg: use proper memcg in limit bypass · 3168ecbe
      Johannes Weiner authored
      Commit 84235de3 ("fs: buffer: move allocation failure loop into the
      allocator") allowed __GFP_NOFAIL allocations to bypass the limit if they
      fail to reclaim enough memory for the charge.  But because the main test
      case was on a 3.2-based system, the patch missed the fact that on newer
      kernels the charge function needs to return root_mem_cgroup when
      bypassing the limit, and not NULL.  This will corrupt whatever memory is
      at NULL + percpu pointer offset.  Fix this quickly before problems are
      reported.
      Signed-off-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Acked-by: default avatarMichal Hocko <mhocko@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3168ecbe