1. 28 Feb, 2013 32 commits
  2. 27 Feb, 2013 8 commits
    • Linus Torvalds's avatar
      sysrq: don't depend on weak undefined arrays to have an address that compares as NULL · adf96e6f
      Linus Torvalds authored
      When taking an address of an extern array, gcc quite naturally should be
      able to say "an address of an object can never be NULL" and just
      optimize away the test entirely.
      
      However, the new alternate sysrq reset code (commit 154b7a48:
      "Input: sysrq - allow specifying alternate reset sequence") did exactly
      that, and declared platform_sysrq_reset_seq[] as a weak array, and
      expecting that testing the address of the array would show whether it
      actually got linked against something or not.
      
      And that doesn't work with all gcc versions.  Clearly it works with
      *some* versions of gcc, and maybe it's even supposed to work, but it
      really is a very fragile concept.
      
      So instead of testing the address of the weak variable, just create a
      weak instance of that array that is empty.  If some platform then has a
      real platform_sysrq_reset_seq[] that overrides our weak one, the linker
      will switch to that one, and it all works without any run-time
      conditionals at all.
      Reported-by: default avatarDave Airlie <airlied@gmail.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
      Acked-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      adf96e6f
    • Linus Torvalds's avatar
      mm: do not grow the stack vma just because of an overrun on preceding vma · 09884964
      Linus Torvalds authored
      The stack vma is designed to grow automatically (marked with VM_GROWSUP
      or VM_GROWSDOWN depending on architecture) when an access is made beyond
      the existing boundary.  However, particularly if you have not limited
      your stack at all ("ulimit -s unlimited"), this can cause the stack to
      grow even if the access was really just one past *another* segment.
      
      And that's wrong, especially since we first grow the segment, but then
      immediately later enforce the stack guard page on the last page of the
      segment.  So _despite_ first growing the stack segment as a result of
      the access, the kernel will then make the access cause a SIGSEGV anyway!
      
      So do the same logic as the guard page check does, and consider an
      access to within one page of the next segment to be a bad access, rather
      than growing the stack to abut the next segment.
      Reported-and-tested-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      09884964
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · d895cb1a
      Linus Torvalds authored
      Pull vfs pile (part one) from Al Viro:
       "Assorted stuff - cleaning namei.c up a bit, fixing ->d_name/->d_parent
        locking violations, etc.
      
        The most visible changes here are death of FS_REVAL_DOT (replaced with
        "has ->d_weak_revalidate()") and a new helper getting from struct file
        to inode.  Some bits of preparation to xattr method interface changes.
      
        Misc patches by various people sent this cycle *and* ocfs2 fixes from
        several cycles ago that should've been upstream right then.
      
        PS: the next vfs pile will be xattr stuff."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (46 commits)
        saner proc_get_inode() calling conventions
        proc: avoid extra pde_put() in proc_fill_super()
        fs: change return values from -EACCES to -EPERM
        fs/exec.c: make bprm_mm_init() static
        ocfs2/dlm: use GFP_ATOMIC inside a spin_lock
        ocfs2: fix possible use-after-free with AIO
        ocfs2: Fix oops in ocfs2_fast_symlink_readpage() code path
        get_empty_filp()/alloc_file() leave both ->f_pos and ->f_version zero
        target: writev() on single-element vector is pointless
        export kernel_write(), convert open-coded instances
        fs: encode_fh: return FILEID_INVALID if invalid fid_type
        kill f_vfsmnt
        vfs: kill FS_REVAL_DOT by adding a d_weak_revalidate dentry op
        nfsd: handle vfs_getattr errors in acl protocol
        switch vfs_getattr() to struct path
        default SET_PERSONALITY() in linux/elf.h
        ceph: prepopulate inodes only when request is aborted
        d_hash_and_lookup(): export, switch open-coded instances
        9p: switch v9fs_set_create_acl() to inode+fid, do it before d_instantiate()
        9p: split dropping the acls from v9fs_set_create_acl()
        ...
      d895cb1a
    • Linus Torvalds's avatar
      Merge tag 'xtensa-next-20130225' of git://github.com/czankel/xtensa-linux · 96263573
      Linus Torvalds authored
      Pull xtensa update from Chris Zankel:
       "Added features:
         - add support for thread local storage (TLS)
      
         - add accept4 and finit_module syscalls
      
         - support medium-priority interrupts
      
         - add support for dc232c processor variant
      
         - support file-base simulated disk for ISS simulator
      
        Bug fixes:
      
         - fix return values returned by the str[n]cmp functions
      
         - avoid mmap cache aliasing
      
         - fix handling of 'windowed registers' in ptrace"
      
      * tag 'xtensa-next-20130225' of git://github.com/czankel/xtensa-linux:
        xtensa: add accept4 syscall
        xtensa: add support for TLS
        xtensa: add missing include asm/uaccess.h to checksum.h
        xtensa: do not enable GENERIC_GPIO by default
        xtensa: complete ptrace handling of register windows
        xtensa: add support for oprofile
        xtensa: move spill_registers to traps.h
        xtensa: ISS: add host file-based simulated disk
        xtensa: fix str[n]cmp return value
        xtensa: avoid mmap cache aliasing
        xtensa: add finit_module syscall
        xtensa: pull signal definitions from signal-defs.h
        xtensa: fix ipc_parse_version selection
        xtensa: dispatch medium-priority interrupts
        xtensa: Add config files for Diamond 233L - Rev C processor variant
        xtensa: use new common dtc rule
        xtensa: rename prom_update_property to of_update_property
      96263573
    • Linus Torvalds's avatar
      Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze · 2b37e9a2
      Linus Torvalds authored
      Pull microblaze update from Michal Simek:
       "Microblaze changes.
      
        After my discussion with Arnd I have also added there asm-generic io
        patch which is Acked by him and Geert."
      
      * 'next' of git://git.monstr.eu/linux-2.6-microblaze:
        asm-generic: io: Fix ioread16/32be and iowrite16/32be
        microblaze: Do not use module.h in files which are not modules
        microblaze: Fix coding style issues
        microblaze: Add missing return from debugfs_tlb
        microblaze: Makefile clean
        microblaze: Add .gitignore entries for auto-generated files
        microblaze: Fix strncpy_from_user macro
      2b37e9a2
    • Linus Torvalds's avatar
      Merge branch 'for-upstream' of git://openrisc.net/jonas/linux · a9a07d40
      Linus Torvalds authored
      Pull OpenRISC updates from Jonas Bonn:
       "An equal number of bug fixes and trivial cleanups; no new features.
      
         - Two patches to fix errors thrown by the updated toolchain.
      
         - Three other bug fixes.
      
         - Four trivial cleanups."
      
      * 'for-upstream' of git://openrisc.net/jonas/linux:
        openrisc: add missing header inclusion
        openrisc: really pass correct arg to schedule_tail
        Add bitops include needed for ext2 filesystem
        openrisc: update DTLB-miss handler last
        openrisc: fix up vmalloc page table loading
        openrisc idle: delete pm_idle
        openrisc: remove CONFIG_SYMBOL_PREFIX
        openrisc: avoid using function parameter regs in reset vector
        openrisc: remove unused current_regs
      a9a07d40
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 2003cd90
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar.
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mm/pageattr: Prevent PSE and GLOABL leftovers to confuse pmd/pte_present and pmd_huge
        Revert "x86, mm: Make spurious_fault check explicitly check explicitly check the PRESENT bit"
        x86/mm/numa: Don't check if node is NUMA_NO_NODE
        x86, efi: Make "noefi" really disable EFI runtime serivces
        x86/apic: Fix parsing of the 'lapic' cmdline option
      2003cd90
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 24e55910
      Linus Torvalds authored
      Pull timer fixes from Ingo Molnar.
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        clocksource : Nomadik-mtu : fix missing irq initialization
        posix-timer: Don't call idr_find() with out-of-range ID
      24e55910