1. 23 10月, 2010 2 次提交
  2. 16 9月, 2010 1 次提交
  3. 15 9月, 2010 1 次提交
    • H
      compat: Make compat_alloc_user_space() incorporate the access_ok() · c41d68a5
      H. Peter Anvin 提交于
      compat_alloc_user_space() expects the caller to independently call
      access_ok() to verify the returned area.  A missing call could
      introduce problems on some architectures.
      
      This patch incorporates the access_ok() check into
      compat_alloc_user_space() and also adds a sanity check on the length.
      The existing compat_alloc_user_space() implementations are renamed
      arch_compat_alloc_user_space() and are used as part of the
      implementation of the new global function.
      
      This patch assumes NULL will cause __get_user()/__put_user() to either
      fail or access userspace on all architectures.  This should be
      followed by checking the return value of compat_access_user_space()
      for NULL in the callers, at which time the access_ok() in the callers
      can also be removed.
      Reported-by: NBen Hawkes <hawkes@sota.gen.nz>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: NChris Metcalf <cmetcalf@tilera.com>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NTony Luck <tony.luck@intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Helge Deller <deller@gmx.de>
      Cc: James Bottomley <jejb@parisc-linux.org>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: <stable@kernel.org>
      c41d68a5
  4. 10 9月, 2010 1 次提交
    • T
      [IA64] fix siglock · f574c843
      Tony Luck 提交于
      When ia64 converted to using ticket locks, an inline implementation
      of trylock/unlock in fsys.S was missed.  This was not noticed because
      in most circumstances it simply resulted in using the slow path because
      the siglock was apparently not available (under old spinlock rules).
      
      Problems occur when the ticket spinlock has value 0x0 (when first
      initialised, or when it wraps around). At this point the fsys.S
      code acquires the lock (changing the 0x0 to 0x1. If another process
      attempts to get the lock at this point, it will change the value from
      0x1 to 0x2 (using new ticket lock rules). Then the fsys.S code will
      free the lock using old spinlock rules by writing 0x0 to it. From
      here a variety of bad things can happen.
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      f574c843
  5. 21 8月, 2010 1 次提交
  6. 19 8月, 2010 1 次提交
  7. 18 8月, 2010 1 次提交
    • D
      Make do_execve() take a const filename pointer · d7627467
      David Howells 提交于
      Make do_execve() take a const filename pointer so that kernel_execve() compiles
      correctly on ARM:
      
      arch/arm/kernel/sys_arm.c:88: warning: passing argument 1 of 'do_execve' discards qualifiers from pointer target type
      
      This also requires the argv and envp arguments to be consted twice, once for
      the pointer array and once for the strings the array points to.  This is
      because do_execve() passes a pointer to the filename (now const) to
      copy_strings_kernel().  A simpler alternative would be to cast the filename
      pointer in do_execve() when it's passed to copy_strings_kernel().
      
      do_execve() may not change any of the strings it is passed as part of the argv
      or envp lists as they are some of them in .rodata, so marking these strings as
      const should be fine.
      
      Further kernel_execve() and sys_execve() need to be changed to match.
      
      This has been test built on x86_64, frv, arm and mips.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Tested-by: NRalf Baechle <ralf@linux-mips.org>
      Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d7627467
  8. 15 8月, 2010 2 次提交
  9. 14 8月, 2010 3 次提交
  10. 13 8月, 2010 1 次提交
    • T
      [IA64] Fix rwsem: RWSEM_WAITING_BIAS must not be unsigned. · b680f097
      Tony Luck 提交于
      Some nice improvements were made to rwsem in commit:
      
       424acaae
       rwsem: wake queued readers when writer blocks on active read lock
      
      but this change overlooked that ia64 had defined RWSEM_WAITING_BIAS
      as an unsigned value, while the new code required a signed value (as
      it is in every other architecture).
      
      This fix suggested by the original patch author: Michel Lespinasse.
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      b680f097
  11. 11 8月, 2010 5 次提交
    • F
      dma-mapping: remove dma_is_consistent API · 3b9c6c11
      FUJITA Tomonori 提交于
      Architectures implement dma_is_consistent() in different ways (some
      misinterpret the definition of API in DMA-API.txt).  So it hasn't been so
      useful for drivers.  We have only one user of the API in tree.  Unlikely
      out-of-tree drivers use the API.
      
      Even if we fix dma_is_consistent() in some architectures, it doesn't look
      useful at all.  It was invented long ago for some old systems that can't
      allocate coherent memory at all.  It's better to export only APIs that are
      definitely necessary for drivers.
      
      Let's remove this API.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Reviewed-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3b9c6c11
    • F
      dma-mapping: unify dma_get_cache_alignment implementations · 4565f017
      FUJITA Tomonori 提交于
      dma_get_cache_alignment returns the minimum DMA alignment.  Architectures
      defines it as ARCH_DMA_MINALIGN (formally ARCH_KMALLOC_MINALIGN).  So we
      can unify dma_get_cache_alignment implementations.
      
      Note that some architectures implement dma_get_cache_alignment wrongly.
      dma_get_cache_alignment() should return the minimum DMA alignment.  So
      fully-coherent architectures should return 1.  This patch also fixes this
      issue.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4565f017
    • M
      ia64: perfmon: add d_dname method · 7ae6bdbd
      Miklos Szeredi 提交于
      Switch ia64/perfmon to using the d_dname() instead of relying on
      __d_path() to prepend the name of the root dentry to the path.
      
      CC: Tony Luck <tony.luck@intel.com>
      CC: Fenghua Yu <fenghua.yu@intel.com>
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      7ae6bdbd
    • H
      tty: Add EXTPROC support for LINEMODE · 26df6d13
      hyc@symas.com 提交于
      This patch is against the 2.6.34 source.
      
      Paraphrased from the 1989 BSD patch by David Borman @ cray.com:
      
           These are the changes needed for the kernel to support
           LINEMODE in the server.
      
           There is a new bit in the termios local flag word, EXTPROC.
           When this bit is set, several aspects of the terminal driver
           are disabled.  Input line editing, character echo, and mapping
           of signals are all disabled.  This allows the telnetd to turn
           off these functions when in linemode, but still keep track of
           what state the user wants the terminal to be in.
      
           New ioctl:
               TIOCSIG         Generate a signal to processes in the
                               current process group of the pty.
      
           There is a new mode for packet driver, the TIOCPKT_IOCTL bit.
           When packet mode is turned on in the pty, and the EXTPROC bit
           is set, then whenever the state of the pty is changed, the
           next read on the master side of the pty will have the TIOCPKT_IOCTL
           bit set.  This allows the process on the server side of the pty
           to know when the state of the terminal has changed; it can then
           issue the appropriate ioctl to retrieve the new state.
      
      Since the original BSD patches accompanied the source code for telnet
      I've left that reference here, but obviously the feature is useful for
      any remote terminal protocol, including ssh.
      
      The corresponding feature has existed in the BSD tty driver since 1989.
      For historical reference, a good copy of the relevant files can be found
      here:
      
      http://anonsvn.mit.edu/viewvc/krb5/trunk/src/appl/telnet/?pathrev=17741Signed-off-by: NHoward Chu <hyc@symas.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      26df6d13
    • G
      tty: remove remaining Hayes ESP ioctls · a3c8ed69
      Greg Kroah-Hartman 提交于
      As Jeff Dike pointed out, the Hayes ESP driver was removed in commit
      f53a2ade, so these ioctl definitions
      should also be removed.  This cleans up the remaining arch-specific
      locations of this ioctl value.
      
      Thanks to Arnd for pointing these out.
      
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Alan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a3c8ed69
  12. 10 8月, 2010 2 次提交
  13. 08 8月, 2010 1 次提交
  14. 03 8月, 2010 2 次提交
    • S
      kbuild: allow assignment to {A,C}FLAGS_KERNEL on the command line · 80c00ba9
      Sam Ravnborg 提交于
      It is now possible to assign options to AS and CC
      on the command line - which is only used for built-in code.
      
      {A,C}FLAGS_KERNEL was used both in the top-level Makefile
      in the arch makefiles, thus users had no way to specify
      additional options to AS, CC without overriding
      the original value.
      
      Introduce a new set of variables KBUILD_{A,C}FLAGS_KERNEL
      that is used by arch specific files and free up
      {A,C}FLAGS_KERNEL so they can be assigned on
      the command line.
      
      All arch Makefiles that used the old variables has been updated.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Hirokazu Takata <takata@linux-m32r.org>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      80c00ba9
    • S
      kbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command line · 6588169d
      Sam Ravnborg 提交于
      It is now possible to assign options to AS, CC and LD
      on the command line - which is only used when building modules.
      
      {A,C,LD}FLAGS_MODULE was all used both in the top-level Makefile
      in the arch makefiles, thus users had no way to specify
      additional options to AS, CC, LD when building modules
      without overriding the original value.
      
      Introduce a new set of variables KBUILD_{A,C,LD}FLAGS_MODULE
      that is used by arch specific files and free up
      {A,C,LD}FLAGS_MODULE so they can be assigned on
      the command line.
      
      All arch Makefiles that used the old variables has been updated.
      
      Note: Previously we had a MODFLAGS variable for both
      AS and CC. But in favour of consistency this was dropped.
      So in some cases arch Makefile has one assignmnet replaced by
      two assignmnets.
      
      Note2: MODFLAGS was not documented and is dropped
      without any notice. I do not expect much/any breakage
      from this.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Denys Vlasenko <vda.linux@googlemail.com>
      Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Chen Liqin <liqin.chen@sunplusct.com>
      Acked-by: Mike Frysinger <vapier@gentoo.org> [blackfin]
      Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> [avr32]
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      6588169d
  15. 01 8月, 2010 5 次提交
  16. 31 7月, 2010 1 次提交
  17. 28 7月, 2010 1 次提交
    • T
      [IA64] increase ia64 static per cpu area · a95f9ac2
      Tony Luck 提交于
      I've been trying to avoid this for a long time ... but per-cpu space
      has slowly been growing.  Tejun has some patches in linux-next that
      pre-reserve some space (PERCPU_DYNAMIC_EARLY_SIZE) for use before
      slab comes online ... and this pushes ia64 above the 64K current
      limit on static percpu space.
      
      I could probably squeeze it back under (we are only over by 512 bytes).
      But I don't think that I'll be able to squeeze it down enough to build
      a comfortable breathing space - and I don't want to keep nibbling off
      a dozen bytes here and there every time some generic code bumps us
      back over the limit.
      
      Next available supported page size is 256K ... so we have to quadruple
      the available space - a bigger jump than I'd like. But perhaps it will
      be enough to last a few more years before it needs to be increased again.
      Acked-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      a95f9ac2
  18. 27 7月, 2010 2 次提交
    • J
      timkeeping: Fix update_vsyscall to provide wall_to_monotonic offset · 7615856e
      John Stultz 提交于
      update_vsyscall() did not provide the wall_to_monotoinc offset,
      so arch specific implementations tend to reference wall_to_monotonic
      directly. This limits future cleanups in the timekeeping core, so
      this patch fixes the update_vsyscall interface to provide
      wall_to_monotonic, allowing wall_to_monotonic to be made static
      as planned in Documentation/feature-removal-schedule.txt
      Signed-off-by: NJohn Stultz <johnstul@us.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Anton Blanchard <anton@samba.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Tony Luck <tony.luck@intel.com>
      LKML-Reference: <1279068988-21864-7-git-send-email-johnstul@us.ibm.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      7615856e
    • J
      time: Kill off CONFIG_GENERIC_TIME · 592913ec
      John Stultz 提交于
      Now that all arches have been converted over to use generic time via
      clocksources or arch_gettimeoffset(), we can remove the GENERIC_TIME
      config option and simplify the generic code.
      Signed-off-by: NJohn Stultz <johnstul@us.ibm.com>
      LKML-Reference: <1279068988-21864-4-git-send-email-johnstul@us.ibm.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      592913ec
  19. 22 7月, 2010 1 次提交
  20. 14 7月, 2010 1 次提交
  21. 07 7月, 2010 1 次提交
  22. 01 7月, 2010 1 次提交
    • T
      [IA64] Fix spinaphore down_spin() · b70f4e85
      Tony Luck 提交于
      Typo in down_spin() meant it only read the low 32 bits of the
      "serve" value, instead of the full 64 bits. This results in the
      system hanging when the values in ticket/serve get larger than
      32-bits. A big enough system running the right test can hit this
      in a just a few hours.
      
      Broken since 883a3acf
          [IA64] Re-implement spinaphores using ticket lock concepts
      
      Reported via IRC by Bjorn Helgaas
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      b70f4e85
  23. 29 6月, 2010 1 次提交
    • T
      workqueue: increase max_active of keventd and kill current_is_keventd() · b71ab8c2
      Tejun Heo 提交于
      Define WQ_MAX_ACTIVE and create keventd with max_active set to half of
      it which means that keventd now can process upto WQ_MAX_ACTIVE / 2 - 1
      works concurrently.  Unless some combination can result in dependency
      loop longer than max_active, deadlock won't happen and thus it's
      unnecessary to check whether current_is_keventd() before trying to
      schedule a work.  Kill current_is_keventd().
      
      (Lockdep annotations are broken.  We need lock_map_acquire_read_norecurse())
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Christoph Lameter <cl@linux-foundation.org>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      b71ab8c2
  24. 22 6月, 2010 1 次提交
  25. 17 6月, 2010 1 次提交