1. 09 11月, 2012 1 次提交
  2. 06 10月, 2012 1 次提交
    • D
      compat: move compat_siginfo_t definition to asm/compat.h · 751f409d
      Denys Vlasenko 提交于
      This is a preparatory patch for the introduction of NT_SIGINFO elf note.
      
      Make the location of compat_siginfo_t uniform across eight architectures
      which have it.  Now it can be pulled in by including asm/compat.h or
      linux/compat.h.
      
      Most of the copies are verbatim.  compat_uid[32]_t had to be replaced by
      __compat_uid[32]_t.  compat_uptr_t had to be moved up before
      compat_siginfo_t in asm/compat.h on a several architectures (tile already
      had it moved up).  compat_sigval_t had to be relocated from linux/compat.h
      to asm/compat.h.
      Signed-off-by: NDenys Vlasenko <vda.linux@googlemail.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Amerigo Wang <amwang@redhat.com>
      Cc: "Jonathan M. Foote" <jmfoote@cert.org>
      Cc: Roland McGrath <roland@hack.frob.com>
      Cc: Pedro Alves <palves@redhat.com>
      Cc: Fengguang Wu <fengguang.wu@intel.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      751f409d
  3. 28 10月, 2011 1 次提交
    • E
      compat: sync compat_stats with statfs. · 1448c721
      Eric W. Biederman 提交于
      This was found by inspection while tracking a similar
      bug in compat_statfs64, that has been fixed in mainline
      since decemeber.
      
      - This fixes a bug where not all of the f_spare fields
        were cleared on mips and s390.
      - Add the f_flags field to struct compat_statfs
      - Copy f_flags to userspace in case someone cares.
      - Use __clear_user to copy the f_spare field to userspace
        to ensure that all of the elements of f_spare are cleared.
        On some architectures f_spare is has 5 ints and on some
        architectures f_spare only has 4 ints.  Which makes
        the previous technique of clearing each int individually
        broken.
      
      I don't expect anyone actually uses the old statfs system
      call anymore but if they do let them benefit from having
      the compat and the native version working the same.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      1448c721
  4. 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
  5. 13 3月, 2010 1 次提交
    • C
      improve sys_newuname() for compat architectures · e28cbf22
      Christoph Hellwig 提交于
      On an architecture that supports 32-bit compat we need to override the
      reported machine in uname with the 32-bit value.  Instead of doing this
      separately in every architecture introduce a COMPAT_UTS_MACHINE define in
      <asm/compat.h> and apply it directly in sys_newuname().
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Hirokazu Takata <takata@linux-m32r.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: James Morris <jmorris@namei.org>
      Cc: Andreas Schwab <schwab@linux-m68k.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e28cbf22
  6. 14 5月, 2009 1 次提交
  7. 09 3月, 2009 1 次提交
  8. 11 10月, 2008 1 次提交
  9. 03 2月, 2008 1 次提交
  10. 17 7月, 2007 1 次提交
    • A
      Introduce compat_u64 and compat_s64 types · 4b777587
      Arnd Bergmann 提交于
      One common problem with 32 bit system call and ioctl emulation is the
      different alignment rules between i386 and 64 bit machines.  A number of
      drivers work around this by marking the compat structures as
      'attribute((packed))', which is not the right solution because it breaks
      all the non-x86 architectures that want to use the same compat code.
      
      Hopefully, this patch improves the situation, it introduces two new types,
      compat_u64 and compat_s64.  These are defined on all architectures to have
      the same size and alignment as the 32 bit version of u64 and s64.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Vasily Tarasov <vtaras@openvz.org>
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4b777587
  11. 14 7月, 2007 1 次提交
  12. 12 12月, 2006 1 次提交
  13. 05 12月, 2006 1 次提交
  14. 26 6月, 2006 1 次提交
    • A
      [PATCH] N32 sigset and __COMPAT_ENDIAN_SWAP__ · 838cd153
      akpm@osdl.org 提交于
      I'm testing glibc on MIPS64, little-endian, N32, O32 and N64 multilibs.
      
      Among the NPTL test failures seen are some arising from sigsuspend problems
      for N32: it blocks the wrong signals, so SIGCANCEL (SIGRTMIN) is blocked
      despite glibc's carefully excluding it from sets of signals to block.
      Specifically, testing suggests it blocks signal N^32 instead of signal N,
      so (in the example tested) blocking SIGUSR1 (17) blocks signal 49 instead.
      
      glibc's sigset_t uses an array of unsigned long, as does the kernel.
      In both cases, signal N+1 is represented as
      (1UL << (N % (8 * sizeof (unsigned long)))) in word number
      (N / (8 * sizeof (unsigned long))).
      
      Thus the N32 glibc uses an array of 32-bit words and the N64 kernel uses an
      array of 64-bit words.  For little-endian, the layout is the same, with
      signals 1-32 in the first 4 bytes, signals 33-64 in the second, etc.; for
      big-endian, userspace has that layout while in the kernel each 8 bytes have
      the two halves swapped from the userspace layout.
      
      The N32 sigsuspend syscall uses sigset_from_compat to convert the userspace
      sigset to kernel format.  If __COMPAT_ENDIAN_SWAP__ is *not* set, this uses
      logic of the form
      
        set->sig[0] = compat->sig[0] | (((long)compat->sig[1]) << 32 )
      
      to convert the userspace sigset to a kernel one.  This looks correct to me
      for both big and little endian, given that in userspace compat->sig[1] will
      represent signals 33-64, and so will the high 32 bits of set->sig[0] in the
      kernel.  If however __COMPAT_ENDIAN_SWAP__ *is* set, as it is for
      __MIPSEL__, it uses
      
        set->sig[0] = compat->sig[1] | (((long)compat->sig[0]) << 32 );
      
      which seems incorrect for both big and little endian, and would
      explain the observed symptoms.
      
      This code is the only use of __COMPAT_ENDIAN_SWAP__, so if incorrect
      then that macro serves no purpose, in which case something like the
      following patch would seem appropriate to remove it.
      Signed-off-by: NJoseph Myers <joseph@codesourcery.com>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      838cd153
  15. 28 3月, 2006 1 次提交
  16. 21 3月, 2006 1 次提交
  17. 30 10月, 2005 1 次提交
  18. 08 9月, 2005 1 次提交
    • S
      [PATCH] compat: be more consistent about [ug]id_t · 202e5979
      Stephen Rothwell 提交于
      When I first wrote the compat layer patches, I was somewhat cavalier about
      the definition of compat_uid_t and compat_gid_t (or maybe I just
      misunderstood :-)).  This patch makes the compat types much more consistent
      with the types we are being compatible with and hopefully will fix a few
      bugs along the way.
      
      	compat type		type in compat arch
      	__compat_[ug]id_t	__kernel_[ug]id_t
      	__compat_[ug]id32_t	__kernel_[ug]id32_t
      	compat_[ug]id_t		[ug]id_t
      
      The difference is that compat_uid_t is always 32 bits (for the archs we
      care about) but __compat_uid_t may be 16 bits on some.
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      202e5979
  19. 24 6月, 2005 1 次提交
  20. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4