1. 14 Sep, 2016 1 commit
  2. 14 Jun, 2016 1 commit
    • Dave Hansen's avatar
      x86/signals: Add missing signal_compat code for x86 features · a4455082
      Dave Hansen authored
      The 32-bit siginfo is a different binary format than the 64-bit
      one.  So, when running 32-bit binaries on 64-bit kernels, we have
      to convert the kernel's 64-bit version to a 32-bit version that
      userspace can grok.
      We've added a few features to siginfo over the past few years and
      neglected to add them to arch/x86/kernel/signal_compat.c:
         1. The si_addr_lsb used in SIGBUS's sent for machine checks
         2. The upper/lower bounds for MPX SIGSEGV faults
         3. The protection key for pkey faults
      I caught this with some protection keys unit tests and realized
      it affected a few more features.
      This was tested only with my protection keys patch that looks
      for a proper value in si_pkey.  I didn't actually test the machine
      check or MPX code.
      Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Dave Hansen <dave@sr71.net>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: linux-edac@vger.kernel.org
      Link: http://lkml.kernel.org/r/20160608172533.F8F05637@viggo.jf.intel.com
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
  3. 19 Apr, 2016 1 commit
  4. 22 Mar, 2016 1 commit
  5. 10 Mar, 2015 1 commit
  6. 05 Oct, 2012 1 commit
    • Denys Vlasenko's avatar
      compat: move compat_siginfo_t definition to asm/compat.h · 751f409d
      Denys Vlasenko authored
      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
      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: default avatarDenys 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: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  7. 14 May, 2012 1 commit
  8. 13 Mar, 2012 1 commit
  9. 05 Mar, 2012 1 commit
  10. 20 Feb, 2012 2 commits
    • H. Peter Anvin's avatar
      x32: Handle process creation · d1a797f3
      H. Peter Anvin authored
      Allow an x32 process to be started.
      Originally-by: default avatarH. J. Lu <hjl.tools@gmail.com>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    • H. Peter Anvin's avatar
      x32: Handle the x32 system call flag · fca460f9
      H. Peter Anvin authored
      x32 shares most system calls with x86-64, but unfortunately some
      subsystem (the input subsystem is the chief offender) which require
      is_compat() when operating with a 32-bit userspace.  The input system
      actually has text files in sysfs whose meaning is dependent on
      sizeof(long) in userspace!
      We could solve this by having two completely disjoint system call
      tables; requiring that each system call be duplicated.  This patch
      takes a different approach: we add a flag to the system call number;
      this flag doesn't affect the system call dispatch but requests compat
      treatment from affected subsystems for the duration of the system call.
      The change of cmpq to cmpl is safe since it immediately follows the
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
  11. 28 Oct, 2011 1 commit
    • Eric W. Biederman's avatar
      compat: sync compat_stats with statfs. · 1448c721
      Eric W. Biederman authored
      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
      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: default avatarEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
  12. 14 Sep, 2010 1 commit
    • H. Peter Anvin's avatar
      compat: Make compat_alloc_user_space() incorporate the access_ok() · c41d68a5
      H. Peter Anvin authored
      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: default avatarBen Hawkes <hawkes@sota.gen.nz>
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      Acked-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: default avatarChris Metcalf <cmetcalf@tilera.com>
      Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Acked-by: default avatarTony 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>
  13. 12 Mar, 2010 1 commit
    • Christoph Hellwig's avatar
      improve sys_newuname() for compat architectures · e28cbf22
      Christoph Hellwig authored
      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: default avatarChristoph 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: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  14. 23 Oct, 2008 2 commits
  15. 22 Jul, 2008 1 commit
    • Vegard Nossum's avatar
      x86: consolidate header guards · 77ef50a5
      Vegard Nossum authored
      This patch is the result of an automatic script that consolidates the
      format of all the headers in include/asm-x86/.
      The format:
      1. No leading underscore. Names with leading underscores are reserved.
      2. Pathname components are separated by two underscores. So we can
         distinguish between mm_types.h and mm/types.h.
      3. Everything except letters and numbers are turned into single
      Signed-off-by: default avatarVegard Nossum <vegard.nossum@gmail.com>
  16. 17 Apr, 2008 1 commit
  17. 03 Feb, 2008 1 commit
  18. 30 Jan, 2008 1 commit
  19. 19 Oct, 2007 1 commit
  20. 11 Oct, 2007 1 commit
  21. 16 Jul, 2007 1 commit
    • Arnd Bergmann's avatar
      Introduce compat_u64 and compat_s64 types · 4b777587
      Arnd Bergmann authored
      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: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarDavid 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: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  22. 12 Jan, 2006 2 commits
  23. 07 Sep, 2005 1 commit
    • Stephen Rothwell's avatar
      [PATCH] compat: be more consistent about [ug]id_t · 202e5979
      Stephen Rothwell authored
      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: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
  24. 16 Apr, 2005 1 commit
    • Linus Torvalds's avatar
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds authored
      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!