1. 20 10月, 2007 2 次提交
  2. 17 10月, 2007 11 次提交
    • J
      uml: fix stub address calculations · 54ae36f2
      Jeff Dike 提交于
      The calculation of CONFIG_STUB_CODE and CONFIG_STUB_DATA didn't take into
      account anything but 3G/1G and 2G/2G, leaving the other vmsplits out in the
      cold.
      
      I'd rather not duplicate the four known host vmsplit cases for each of these
      symbols.  I'd also like to calculate them based on the highest userspace
      address.
      
      The Kconfig language seems not to allow calculation of hex constants, so I
      moved this to as-layout.h.  CONFIG_STUB_CODE, CONFIG_STUB_DATA, and
      CONFIG_STUB_START are now gone.  In their place are STUB_CODE, STUB_DATA, and
      STUB_START in as-layout.h.
      
      i386 and x86_64 seem to differ as to whether an unadorned constant is an int
      or a long, so I cast them to unsigned long so they can be printed
      consistently.  However, they are also used in stub.S, where C types don't work
      so well.  So, there are ASM_ versions of these constants for use in stub.S.  I
      also ifdef-ed the non-asm-friendly portion of as-layout.h.
      
      With this in place, most of the rest of this patch is changing CONFIG_STUB_*
      to STUB_*, except in stub.S, where they are changed to ASM_STUB_*.
      
      defconfig has the old symbols deleted.
      
      I also print these addresses out in case there is any problem mapping them on
      the host.
      
      The two stub.S files had some trailing whitespace, so that is cleaned up here.
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      54ae36f2
    • J
      uml: style fixes in FP code · f0c4cad9
      Jeff Dike 提交于
      Tidy the code affected by the floating point fixes.
      
      A bunch of unused stuff is gone, including two sigcontext.c files,
      which turned out to be entirely unneeded.
      
      There are the usual fixes -
      	whitespace and style cleanups
      	copyright updates
      	emacs formatting comments gone
      	include cleanups
      	adding severities to printks
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f0c4cad9
    • J
      uml: ptrace floating point fixes · e8012b58
      Jeff Dike 提交于
      Handle floating point state better in ptrace.  The code now correctly
      distinguishes between PTRACE_[GS]ETFPREGS and PTRACE_[GS]ETFPXREGS.  The FPX
      requests get handed off to arch-specific code because that's not generic.
      
      get_fpregs, set_fpregs, set_fpregs, and set_fpxregs needed real
      implementations.
      
      Something here exposed a missing include in asm/page.h, which needed
      linux/types.h in order to get gfp_t, so that's fixed here.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e8012b58
    • J
      uml: floating point signal delivery fixes · a5f6096c
      Jeff Dike 提交于
      Handle floating point state in across signals correctly.  UML/i386 needs to
      know whether the host does PTRACE_[GS]ETFPXREGS, so an arch_init_registers
      hook is added, which on x86_64 does nothing.
      
      UML doesn't save and restore floating point registers on kernel entry and
      exit, so they need to be copied between the host process and the sigcontext.
      save_fpx_registers and restore_fpx_registers are added for this purpose.
      save_fp_registers and restore_fp_registers already exist.
      
      There was a bunch of floating point state conversion code in
      arch/um/sys-i386/ptrace.c which isn't needed there, but is needed in signal.c,
      so it is moved over.
      
      The i386 code now distinguishes between fp and fpx state and handles them
      correctly.  The x86_64 code just needs to copy state as-is between the host
      process and the stack.  There are also some fixes there to pass the correct
      address of the floating point state around.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a5f6096c
    • J
      uml: don't use glibc asm/user.h · 189872f9
      Jeff Dike 提交于
      Stop including asm/user.h from libc - it seems to be disappearing from
      distros.  It's replaced with sys/user.h which defines user_fpregs_struct and
      user_fpxregs_struct instead of user_i387_struct and struct user_fxsr_struct on
      i386.
      
      As a bonus, on x86_64, I get to dump some stupid typedefs which were needed in
      order to get asm/user.h to compile.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      189872f9
    • J
      uml: rename pt_regs general-purpose register file · 18baddda
      Jeff Dike 提交于
      Before the removal of tt mode, access to a register on the skas-mode side of a
      pt_regs struct looked like pt_regs.regs.skas.regs.regs[FOO].  This was bad
      enough, but it became pt_regs.regs.regs.regs[FOO] with the removal of the
      union from the middle.  To get rid of the run of three "regs", the last field
      is renamed to "gp".
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      18baddda
    • J
      uml: fold mmu_context_skas into mm_context · 6c738ffa
      Jeff Dike 提交于
      This patch folds mmu_context_skas into struct mm_context, changing all users
      of these structures as needed.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6c738ffa
    • J
      uml: style fixes pass 3 · ba180fd4
      Jeff Dike 提交于
      Formatting changes in the files which have been changed in the course
      of folding foo_skas functions into their callers.  These include:
      	copyright updates
      	header file trimming
      	style fixes
      	adding severity to printks
      
      These changes should be entirely non-functional.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ba180fd4
    • J
      uml: remove code made redundant by CHOOSE_MODE removal · 77bf4400
      Jeff Dike 提交于
      This patch makes a number of simplifications enabled by the removal of
      CHOOSE_MODE.  There were lots of functions that looked like
      
      	int foo(args){
      		foo_skas(args);
      	}
      
      The bodies of foo_skas are now folded into foo, and their declarations (and
      sometimes entire header files) are deleted.
      
      In addition, the union uml_pt_regs, which was a union between the tt and skas
      register formats, is now a struct, with the tt-mode arm of the union being
      removed.
      
      It turns out that usr2_handler was unused, so it is gone.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      77bf4400
    • J
      uml: throw out CHOOSE_MODE · 6aa802ce
      Jeff Dike 提交于
      The next stage after removing code which depends on CONFIG_MODE_TT is removing
      the CHOOSE_MODE abstraction, which provided both compile-time and run-time
      branching to either tt-mode or skas-mode code.
      
      This patch removes choose-mode.h and all inclusions of it, and replaces all
      CHOOSE_MODE invocations with the skas branch.  This leaves a number of trivial
      functions which will be dealt with in a later patch.
      
      There are some changes in the uaccess and tls support which go somewhat beyond
      this and eliminate some of the now-redundant functions.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6aa802ce
    • J
      uml: throw out CONFIG_MODE_TT · 42fda663
      Jeff Dike 提交于
      This patchset throws out tt mode, which has been non-functional for a while.
      
      This is done in phases, interspersed with code cleanups on the affected files.
      
      The removal is done as follows:
      	remove all code, config options, and files which depend on
      CONFIG_MODE_TT
      	get rid of the CHOOSE_MODE macro, which decided whether to
      call tt-mode or skas-mode code, and replace invocations with their
      skas portions
      	replace all now-trivial procedures with their skas equivalents
      
      There are now a bunch of now-redundant pieces of data structures, including
      mode-specific pieces of the thread structure, pt_regs, and mm_context.  These
      are all replaced with their skas-specific contents.
      
      As part of the ongoing style compliance project, I made a style pass over all
      files that were changed.  There are three such patches, one for each phase,
      covering the files affected by that phase but no later ones.
      
      I noticed that we weren't freeing the LDT state associated with a process when
      it exited, so that's fixed in one of the later patches.
      
      The last patch is a tidying patch which I've had for a while, but which caused
      inexplicable crashes under tt mode.  Since that is no longer a problem, this
      can now go in.
      
      This patch:
      
      Start getting rid of tt mode support.
      
      This patch throws out CONFIG_MODE_TT and all config options, code, and files
      which depend on it.
      
      CONFIG_MODE_SKAS is gone and everything that depends on it is included
      unconditionally.
      
      The few changed lines are in re-written Kconfig help, lines which needed
      something skas-related removed from them, and a few more which weren't
      strictly deletions.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      42fda663
  3. 15 10月, 2007 1 次提交
    • S
      kbuild: enable 'make CFLAGS=...' to add additional options to CC · a0f97e06
      Sam Ravnborg 提交于
      The variable CFLAGS is a wellknown variable and the usage by
      kbuild may result in unexpected behaviour.
      On top of that several people over time has asked for a way to
      pass in additional flags to gcc.
      
      This patch replace use of CFLAGS with KBUILD_CFLAGS all over the
      tree and enabling one to use:
      make CFLAGS=...
      to specify additional gcc commandline options.
      
      One usecase is when trying to find gcc bugs but other
      use cases has been requested too.
      
      Patch was tested on following architectures:
      alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k
      
      Test was simple to do a defconfig build, apply the patch and check
      that nothing got rebuild.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      a0f97e06
  4. 14 10月, 2007 1 次提交
    • A
      minimal build fixes for uml (fallout from x86 merge) · 2b8232ce
      Al Viro 提交于
       a) include/asm-um/arch can't just point to include/asm-$(SUBARCH) now
       b) arch/{i386,x86_64}/crypto are merged now
       c) subarch-obj needed changes
       d) cpufeature_64.h should pull "cpufeature_32.h", not <asm/cpufeature_32.h>
          since it can be included from asm-um/cpufeature.h
       e) in case of uml-i386 we need CONFIG_X86_32 for make and gcc, but not
          for Kconfig
       f) sysctl.c shouldn't do vdso_enabled for uml-i386 (actually, that one
          should be registered from corresponding arch/*/kernel/*, with ifdef
          going away; that's a separate patch, though).
      
      With that and with Stephen's patch ("[PATCH net-2.6] uml: hard_header fix")
      we have uml allmodconfig building both on i386 and amd64.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2b8232ce
  5. 11 10月, 2007 1 次提交
  6. 31 8月, 2007 1 次提交
  7. 16 5月, 2007 1 次提交
  8. 08 5月, 2007 7 次提交
  9. 03 4月, 2007 1 次提交
  10. 08 3月, 2007 1 次提交
  11. 12 2月, 2007 2 次提交
    • J
      [PATCH] uml: x86_64 ptrace fixes · 6e6d74cf
      Jeff Dike 提交于
      This patch fixes some missing ptrace bits on x86_64.  PTRACE_ARCH_PRCTL is
      hooked up and implemented.  This required generalizing arch_prctl_skas
      slightly to take a task_struct to modify.  Previously, it always operated on
      current.
      
      Reading and writing the debug registers is also enabled by un-ifdefing the
      code that implements that.  It turns out that x86_64 is identical to i386, so
      the same code can be used.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6e6d74cf
    • J
      [PATCH] uml: x86_64 thread fixes · f355559c
      Jeff Dike 提交于
      x86_64 needs some TLS fixes.  What was missing was remembering the child
      thread id during clone and stuffing it into the child during each context
      switch.
      
      The %fs value is stored separately in the thread structure since the host
      controls what effect it has on the actual register file.  The host also needs
      to store it in its own thread struct, so we need the value kept outside the
      register file.
      
      arch_prctl_skas was fixed to call PTRACE_ARCH_PRCTL appropriately.  There is
      some saving and restoring of registers in the ARCH_SET_* cases so that the
      correct set of registers are changed on the host and restored to the process
      when it runs again.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f355559c
  12. 31 1月, 2007 1 次提交
  13. 09 12月, 2006 1 次提交
  14. 31 10月, 2006 1 次提交
  15. 16 10月, 2006 1 次提交
  16. 12 10月, 2006 1 次提交
  17. 02 10月, 2006 3 次提交
    • A
      [PATCH] Remove the use of _syscallX macros in UML · 5f4c6bc1
      Arnd Bergmann 提交于
      User mode linux uses _syscallX() to call into the host kernel.  The
      recommended way to do this is to use the syscall() function from libc.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Ian Molton <spyro@f2s.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Hirokazu Takata <takata.hirokazu@renesas.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
      Cc: Richard Curnow <rc@rc0.org.uk>
      Cc: William Lee Irwin III <wli@holomorphy.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5f4c6bc1
    • S
      [PATCH] namespaces: utsname: use init_utsname when appropriate · 96b644bd
      Serge E. Hallyn 提交于
      In some places, particularly drivers and __init code, the init utsns is the
      appropriate one to use.  This patch replaces those with a the init_utsname
      helper.
      
      Changes: Removed several uses of init_utsname().  Hope I picked all the
      	right ones in net/ipv4/ipconfig.c.  These are now changed to
      	utsname() (the per-process namespace utsname) in the previous
      	patch (2/7)
      
      [akpm@osdl.org: CIFS fix]
      Signed-off-by: NSerge E. Hallyn <serue@us.ibm.com>
      Cc: Kirill Korotaev <dev@openvz.org>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Herbert Poetzl <herbert@13thfloor.at>
      Cc: Andrey Savochkin <saw@sw.ru>
      Cc: Serge Hallyn <serue@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      96b644bd
    • S
      [PATCH] namespaces: utsname: switch to using uts namespaces · e9ff3990
      Serge E. Hallyn 提交于
      Replace references to system_utsname to the per-process uts namespace
      where appropriate.  This includes things like uname.
      
      Changes: Per Eric Biederman's comments, use the per-process uts namespace
      	for ELF_PLATFORM, sunrpc, and parts of net/ipv4/ipconfig.c
      
      [jdike@addtoit.com: UML fix]
      [clg@fr.ibm.com: cleanup]
      [akpm@osdl.org: build fix]
      Signed-off-by: NSerge E. Hallyn <serue@us.ibm.com>
      Cc: Kirill Korotaev <dev@openvz.org>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Herbert Poetzl <herbert@13thfloor.at>
      Cc: Andrey Savochkin <saw@sw.ru>
      Signed-off-by: NCedric Le Goater <clg@fr.ibm.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e9ff3990
  18. 26 9月, 2006 1 次提交
    • J
      [PATCH] uml: Use klibc setjmp/longjmp · 13c06be3
      Jeff Dike 提交于
      This patch adds an implementation of setjmp and longjmp to UML, allowing
      access to the inside of a jmpbuf without needing the access macros formerly
      provided by libc.
      
      The implementation is stolen from klibc.  I copy the relevant files into
      arch/um.  I have another patch which avoids the copying, but requires klibc be
      in the tree.
      
      setjmp and longjmp users required some tweaking.  Includes of <setjmp.h> were
      removed and includes of the UML longjmp.h were added where necessary.  There
      are also replacements of siglongjmp with UML_LONGJMP which I somehow missed
      earlier.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      13c06be3
  19. 01 7月, 2006 2 次提交