Skip to content
  1. May 09, 2013
  2. May 07, 2013
  3. Apr 29, 2013
  4. Apr 28, 2013
  5. Apr 27, 2013
  6. Apr 26, 2013
    • Linus Torvalds's avatar
      Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · d7d7271f
      Linus Torvalds authored
      Pull media fixes from Mauro Carvalho Chehab:
       "Two driver fixes.
      
        One avoids reading any file at a system with a cx25821 board
        (fortunately, this is not a common device).  The other one prevents
        reading after a buffer with ISDB-T devices based on mb86a20s."
      
      * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
        [media] cx25821: do not expose broken video output streams
        [media] mb86a20s: Fix estimate_rate setting
      d7d7271f
    • Linus Torvalds's avatar
      Merge branch 'fixes-3.9-late' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · 96edcf31
      Linus Torvalds authored
      Pull late parisc fixes from Helge Deller:
       "I know it's *very* late in the 3.9 release cycle, but since there
        aren't that many people testing the parisc linux kernel, a few (for
        our port) critical issues just showed up a few days back for the first
        time.
      
        What's in it?
         - add missing __ucmpdi2 symbol, which is required for btrfs on 32bit
           kernel.
         - change kunmap() macro to static inline function.  This fixes a
           debian/gcc-4.4 build error.
         - add locking when doing PTE updates.  This fixes random userspace
           crashes.
         - disable (optional) -mlong-calls compiler option for modules, else
           modules can't be loaded at runtime.
         - a smart patch by Will Deacon which fixes 64bit put_user() warnings
           on 32bit kernel."
      
      * 'fixes-3.9-late' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: use spin_lock_irqsave/spin_unlock_irqrestore for PTE updates
        parisc: disable -mlong-calls compiler option for kernel modules
        parisc: uaccess: fix compiler warnings caused by __put_user casting
        parisc: Change kunmap macro to static inline function
        parisc: Provide __ucmpdi2 to resolve undefined references in 32 bit builds.
      96edcf31
    • Matt Fleming's avatar
      efivars: only check for duplicates on the registered list · f464246d
      Matt Fleming authored
      
      
      variable_is_present() accesses '__efivars' directly, but when called via
      gsmi_init() Michel reports observing the following crash,
      
        BUG: unable to handle kernel NULL pointer dereference at (null)
        IP: variable_is_present+0x55/0x170
        Call Trace:
          register_efivars+0x106/0x370
          gsmi_init+0x2ad/0x3da
          do_one_initcall+0x3f/0x170
      
      The reason for the crash is that '__efivars' hasn't been initialised nor
      has it been registered with register_efivars() by the time the google
      EFI SMI driver runs.  The gsmi code uses its own struct efivars, and
      therefore, a different variable list.  Fix the above crash by passing
      the registered struct efivars to variable_is_present(), so that we
      traverse the correct list.
      
      Reported-by: default avatarMichel Lespinasse <walken@google.com>
      Tested-by: default avatarMichel Lespinasse <walken@google.com>
      Cc: Mike Waychison <mikew@google.com>
      Cc: Matthew Garrett <matthew.garrett@nebula.com>
      Cc: Seiji Aguchi <seiji.aguchi@hds.com>
      Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f464246d
    • Jiri Slaby's avatar
      TTY: fix atime/mtime regression · 37b7f3c7
      Jiri Slaby authored
      In commit b0de59b5
      
       ("TTY: do not update atime/mtime on read/write")
      we removed timestamps from tty inodes to fix a security issue and waited
      if something breaks.  Well, 'w', the utility to find out logged users
      and their inactivity time broke.  It shows that users are inactive since
      the time they logged in.
      
      To revert to the old behaviour while still preventing attackers to
      guess the password length, we update the timestamps in one-minute
      intervals by this patch.
      
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      37b7f3c7
    • Zhao Hongjiang's avatar
      aio: fix possible invalid memory access when DEBUG is enabled · 91d80a84
      Zhao Hongjiang authored
      
      
      dprintk() shouldn't access @ring after it's unmapped.
      
      Signed-off-by: default avatarZhao Hongjiang <zhaohongjiang@huawei.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      91d80a84
    • H. Peter Anvin's avatar
      Merge tag 'efi-urgent' into x86/urgent · 697dfd88
      H. Peter Anvin authored
      
      
       * The EFI variable anti-bricking algorithm merged in -rc8 broke booting
         on some Apple machines because they implement EFI spec 1.10, which
         doesn't provide a QueryVariableInfo() runtime function and the logic
         used to check for the existence of that function was insufficient.
         Fix from Josh Boyer.
      
       * The anti-bricking algorithm also introduced a compiler warning on
         32-bit. Fix from Borislav Petkov.
      
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      697dfd88
    • John David Anglin's avatar
      parisc: use spin_lock_irqsave/spin_unlock_irqrestore for PTE updates · bda079d3
      John David Anglin authored
      
      
      User applications running on SMP kernels have long suffered from instability
      and random segmentation faults.  This patch improves the situation although
      there is more work to be done.
      
      One of the problems is the various routines in pgtable.h that update page table
      entries use different locking mechanisms, or no lock at all (set_pte_at).  This
      change modifies the routines to all use the same lock pa_dbit_lock.  This lock
      is used for dirty bit updates in the interruption code. The patch also purges
      the TLB entries associated with the PTE to ensure that inconsistent values are
      not used after the page table entry is updated.  The UP and SMP code are now
      identical.
      
      The change also includes a minor update to the purge_tlb_entries function in
      cache.c to improve its efficiency.
      
      Signed-off-by: default avatarJohn David Anglin <dave.anglin@bell.net>
      Cc: Helge Deller <deller@gmx.de>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      bda079d3
    • Helge Deller's avatar
      parisc: disable -mlong-calls compiler option for kernel modules · cf71130d
      Helge Deller authored
      CONFIG_MLONGCALLS was introduced in commit
      ec758f98
      
       to overcome linker issues when linking
      huge linux kernels, e.g. with many modules linked in.
      
      But in the kernel module loader there is no support yet for the new relocation
      types, which is why modules built with -mlong-calls can't be loaded.
      Furthermore, for modules long calls are not really necessary, since we already
      use stub sections which resolve long distance calls.
      
      So, let's just disable this compiler option when compiling kernel modules.
      
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      cf71130d
    • Will Deacon's avatar
      parisc: uaccess: fix compiler warnings caused by __put_user casting · 0f28b628
      Will Deacon authored
      
      
      When targetting 32-bit processors, __put_user emits a pair of stw
      instructions for the 8-byte case. If the type of __val is a pointer, the
      marshalling code casts it to the wider integer type of u64, resulting
      in the following compiler warnings:
      
        kernel/signal.c: In function 'copy_siginfo_to_user':
        kernel/signal.c:2752:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
        kernel/signal.c:2752:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
        [...]
      
      This patch fixes the warnings by removing the marshalling code and using
      the correct output modifiers in the __put_{user,kernel}_asm64 macros
      so that GCC will allocate the right registers without the need to
      extract the two words explicitly.
      
      Cc: Helge Deller <deller@gmx.de>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      0f28b628
    • John David Anglin's avatar
      parisc: Change kunmap macro to static inline function · 87be2f88
      John David Anglin authored
      
      
      Change kunmap macro to static inline function to fix build error
      compiling drivers/base/dma-buf.c.
      
      Without the change, the following error can occur:
      
         CC      drivers/base/dma-buf.o
      drivers/base/dma-buf.c: In function 'dma_buf_kunmap':
      drivers/base/dma-buf.c:427:46:
      error: macro "kunmap" passed 3 arguments, but takes just 1
      
      I believe parisc is the only arch to implement kunmap using a macro.
      
      Signed-off-by: default avatarJohn David Anglin <dave.anglin@bell.net>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Helge Deller <deller@gmx.de>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      87be2f88
    • John David Anglin's avatar
      parisc: Provide __ucmpdi2 to resolve undefined references in 32 bit builds. · ca0ad83d
      John David Anglin authored
      
      
      The Debian experimental linux source package (3.8.5-1) build fails
      with the following errors:
      ...
      MODPOST 2016 modules
      ERROR: "__ucmpdi2" [fs/btrfs/btrfs.ko] undefined!
      ERROR: "__ucmpdi2" [drivers/md/dm-verity.ko] undefined!
      
      The attached patch resolves this problem.  It is based on the s390
      implementation of ucmpdi2.c.
      
      Signed-off-by: default avatarJohn David Anglin <dave.anglin@bell.net>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      ca0ad83d
  7. Apr 25, 2013
  8. Apr 24, 2013
    • Josh Boyer's avatar
      efi: Check EFI revision in setup_efi_vars · f697036b
      Josh Boyer authored
      
      
      We need to check the runtime sys_table for the EFI version the firmware
      specifies instead of just checking for a NULL QueryVariableInfo.  Older
      implementations of EFI don't have QueryVariableInfo but the runtime is
      a smaller structure, so the pointer to it may be pointing off into garbage.
      
      This is apparently the case with several Apple firmwares that support EFI
      1.10, and the current check causes them to no longer boot.  Fix based on
      a suggestion from Matthew Garrett.
      
      Signed-off-by: default avatarJosh Boyer <jwboyer@redhat.com>
      Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
      f697036b
    • Borislav Petkov's avatar
      x86, efi: Fix a build warning · 51f8fbba
      Borislav Petkov authored
      Fix this:
      
      arch/x86/boot/compressed/eboot.c: In function ‘setup_efi_vars’:
      arch/x86/boot/compressed/eboot.c:269:2: warning: passing argument 1 of ‘efi_call_phys’ makes pointer from integer without a cast [enabled by default]
      In file included from arch/x86/boot/compressed/eboot.c:12:0:
      /w/kernel/linux/arch/x86/include/asm/efi.h:8:33: note: expected ‘void *’ but argument is of type ‘long unsigned int’
      
      after cc5a080c
      
       ("efi: Pass boot services variable info to runtime
      code").
      
      Reported-by: default avatarPaul Bolle <pebolle@tiscali.nl>
      Cc: Matthew Garrett <matthew.garrett@nebula.com>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
      51f8fbba
  9. Apr 23, 2013
  10. Apr 22, 2013
  11. Apr 21, 2013
    • Paul E. McKenney's avatar
      events: Protect access via task_subsys_state_check() · c79aa0d9
      Paul E. McKenney authored
      
      
      The following RCU splat indicates lack of RCU protection:
      
      [  953.267649] ===============================
      [  953.267652] [ INFO: suspicious RCU usage. ]
      [  953.267657] 3.9.0-0.rc6.git2.4.fc19.ppc64p7 #1 Not tainted
      [  953.267661] -------------------------------
      [  953.267664] include/linux/cgroup.h:534 suspicious rcu_dereference_check() usage!
      [  953.267669]
      [  953.267669] other info that might help us debug this:
      [  953.267669]
      [  953.267675]
      [  953.267675] rcu_scheduler_active = 1, debug_locks = 0
      [  953.267680] 1 lock held by glxgears/1289:
      [  953.267683]  #0:  (&sig->cred_guard_mutex){+.+.+.}, at: [<c00000000027f884>] .prepare_bprm_creds+0x34/0xa0
      [  953.267700]
      [  953.267700] stack backtrace:
      [  953.267704] Call Trace:
      [  953.267709] [c0000001f0d1b6e0] [c000000000016e30] .show_stack+0x130/0x200 (unreliable)
      [  953.267717] [c0000001f0d1b7b0] [c0000000001267f8] .lockdep_rcu_suspicious+0x138/0x180
      [  953.267724] [c0000001f0d1b840] [c0000000001d43a4] .perf_event_comm+0x4c4/0x690
      [  953.267731] [c0000001f0d1b950] [c00000000027f6e4] .set_task_comm+0x84/0x1f0
      [  953.267737] [c0000001f0d1b9f0] [c000000000280414] .setup_new_exec+0x94/0x220
      [  953.267744] [c0000001f0d1ba70] [c0000000002f665c] .load_elf_binary+0x58c/0x19b0
      ...
      
      This commit therefore adds the required RCU read-side critical
      section to perf_event_comm().
      
      Reported-by: default avatarAdam Jackson <ajax@redhat.com>
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: a.p.zijlstra@chello.nl
      Cc: paulus@samba.org
      Cc: acme@ghostprotocols.net
      Link: http://lkml.kernel.org/r/20130419190124.GA8638@linux.vnet.ibm.com
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Tested-by: default avatarGustavo Luiz Duarte <gusld@br.ibm.com>
      c79aa0d9
    • Linus Torvalds's avatar
      Merge branch 'x86-kdump-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 830ac852
      Linus Torvalds authored
      Pull kdump fixes from Peter Anvin:
       "The kexec/kdump people have found several problems with the support
        for loading over 4 GiB that was introduced in this merge cycle.  This
        is partly due to a number of design problems inherent in the way the
        various pieces of kdump fit together (it is pretty horrifically manual
        in many places.)
      
        After a *lot* of iterations this is the patchset that was agreed upon,
        but of course it is now very late in the cycle.  However, because it
        changes both the syntax and semantics of the crashkernel option, it
        would be desirable to avoid a stable release with the broken
        interfaces."
      
      I'm not happy with the timing, since originally the plan was to release
      the final 3.9 tomorrow.  But apparently I'm doing an -rc8 instead...
      
      * 'x86-kdump-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        kexec: use Crash kernel for Crash kernel low
        x86, kdump: Change crashkernel_high/low= to crashkernel=,high/low
        x86, kdump: Retore crashkernel= to allocate under 896M
        x86, kdump: Set crashkernel_low automatically
      830ac852
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · db93f8b4
      Linus Torvalds authored
      Pull x86 fixes from Peter Anvin:
       "Three groups of fixes:
      
         1. Make sure we don't execute the early microcode patching if family
            < 6, since it would touch MSRs which don't exist on those
            families, causing crashes.
      
         2. The Xen partial emulation of HyperV can be dealt with more
            gracefully than just disabling the driver.
      
         3. More EFI variable space magic.  In particular, variables hidden
            from runtime code need to be taken into account too."
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86, microcode: Verify the family before dispatching microcode patching
        x86, hyperv: Handle Xen emulation of Hyper-V more gracefully
        x86,efi: Implement efi_no_storage_paranoia parameter
        efi: Export efi_query_variable_store() for efivars.ko
        x86/Kconfig: Make EFI select UCS2_STRING
        efi: Distinguish between "remaining space" and actually used space
        efi: Pass boot services variable info to runtime code
        Move utf16 functions to kernel core and rename
        x86,efi: Check max_size only if it is non-zero.
        x86, efivars: firmware bug workarounds should be in platform code
      db93f8b4