1. 23 10月, 2008 3 次提交
  2. 15 8月, 2008 1 次提交
  3. 07 6月, 2008 1 次提交
  4. 22 5月, 2008 1 次提交
  5. 13 5月, 2008 1 次提交
  6. 27 4月, 2008 1 次提交
  7. 17 4月, 2008 1 次提交
  8. 24 2月, 2008 1 次提交
  9. 06 2月, 2008 8 次提交
    • J
      uml: redo the calculation of NR_syscalls · f87ea91d
      Jeff Dike 提交于
      Redo the calculation of NR_syscalls since that disappeared from i386 and
      use a similar mechanism on x86_64.
      
      We now figure out the size of the system call table in arch code and stick
      that in syscall_table_size.  arch/um/kernel/skas/syscall.c defines
      NR_syscalls in terms of that since its the only thing that needs to know
      how many system calls there are.
      
      The old mechananism that was used on x86_64 is gone.
      
      arch/um/include/sysdep-i386/syscalls.h got some formatting since I was
      looking at it.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Cc: WANG Cong <xiyou.wangcong@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f87ea91d
    • J
      uml: style fixes in arch/um/sys-x86_64 · 95906b24
      Jeff Dike 提交于
      Style fixes in arch/um/sys-x86_64:
      	updated copyrights
      	CodingStyle fixes
      	added severities to printks which needed them
      
      A bunch of functions in sys-*/ptrace_user.c turn out to be unused, so they and
      their declarations are 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>
      95906b24
    • J
      uml: kill processes instead of panicing kernel · 3e6f2ac4
      Jeff Dike 提交于
      UML was panicing in the case of failures of libc calls which shouldn't happen.
       This is an overreaction since a failure from libc doesn't normally mean that
      kernel data structures are in an unknown state.  Instead, the current process
      should just be killed if there is no way to recover.
      
      The case that prompted this was a failure of PTRACE_SETREGS restoring the same
      state that was read by PTRACE_GETREGS.  It appears that when a process tries
      to load a bogus value into a segment register, it segfaults (as expected) and
      the value is actually loaded and is seen by PTRACE_GETREGS (not expected).
      
      This case is fixed by forcing a fatal SIGSEGV on the process so that it
      immediately dies.  fatal_sigsegv was added for this purpose.  It was declared
      as noreturn, so in order to pursuade gcc that it actually does not return, I
      added a call to os_dump_core (and declared it noreturn) so that I get a core
      file if somehow the process survives.
      
      All other calls in arch/um/os-Linux/skas/process.c got the same treatment,
      with failures causing the process to die instead of a kernel panic, with some
      exceptions.
      
      userspace_tramp exits with status 1 if anything goes wrong there.  That will
      cause start_userspace to return an error.  copy_context_skas0 and
      map_stub_pages also now return errors instead of panicing.  Callers of thes
      functions were changed to check for errors and do something appropriate.
      Usually that's to return an error to their callers.
      check_skas3_ptrace_faultinfo just exits since that's too early to do anything
      else.
      
      save_registers, restore_registers, and init_registers now return status
      instead of panicing on failure, with their callers doing something
      appropriate.
      
      There were also duplicate declarations of save_registers and restore_registers
      in os.h - these are gone.
      
      I noticed and fixed up some whitespace damage.
      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>
      3e6f2ac4
    • J
      uml: simplify SIGSEGV handling · ee3d9bd4
      Jeff Dike 提交于
      Simplify the page fault stub by not masking signals while it is running.  This
      allows it to signal that it is done by executing an instruction which will
      generate a SIGTRAP (int3 on x86) rather than running sigreturn by hand after
      queueing a blocked SIGUSR1.
      
      userspace_tramp now no longer puts anything in the SIGSEGV sa_mask, but it
      does add SA_NODEFER to sa_flags so that SIGSEGV is still enabled after the
      signal handler fails to run sigreturn.
      
      SIGWINCH is just blocked so that we don't have to deal with it and the signal
      masks used by wait_stub_done are updated to reflect the smaller number of
      signals that it has to worry about.
      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>
      ee3d9bd4
    • J
      uml: current.h cleanup · a5a678c8
      Jeff Dike 提交于
      Tidy current-related stuff.  There was a comment in current.h saying
      that current_thread was obsolete, so this patch turns all instances of
      current_thread into current_thread_info().  There's some simplifying
      of the result in arch/um/sys-i386/signal.c.
      
      current.h and thread_info also get style cleanups.
      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>
      a5a678c8
    • K
      uml: remove unused variables in the context switcher · 291248fd
      Karol Swietlicki 提交于
      This patch removes a variable which was not used in two functions.  Yet
      another code cleanup, nothing really significant.
      
      Please note that I could not test this on x86_64. I don't have the
      hardware for it.
      
      [ jdike - Bits of tidying around the affected code.  Also, it's fine on
      x86_64 ]
      Signed-off-by: NKarol Swietlicki <magotari@gmail.com>
      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>
      291248fd
    • J
      uml: borrow const.h techniques · 4bdf8bc4
      Jeff Dike 提交于
      Suggested by Geert Uytterhoeven - use const.h to get constants that are usable
      in both C and assembly.  I can't include it directly since this code can't
      include kernel headers.  const.h is also for numeric constants that can be
      typed by tacking a "UL" or similar on the end.  The constants here have to be
      typed by casting them.
      
      So, the relevant parts of const.h are copied here and modified in order to
      allow the constants to be uncasted in assembly and casted in C.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4bdf8bc4
    • J
      uml: further bugs.c tidying · 9226b838
      Jeff Dike 提交于
      bugs.c, for both i386 and x86_64, can undergo further cleaning -
      	The i386 arch_check_bugs only does one thing, so we might as
      well inline the cmov checking.
      	The i386 includes can be trimmed down a bit.
      	arch_init_thread wasn't used, so it is deleted.
      	The panics in arch_handle_signal are turned into printks
      because the process is about to get segfaulted anyway, so something is
      dying no matter what happens here.  Also, the return value was always
      the same, so it contained no information, so it can be void instead.
      The name is changed to arch_examine_signal because it doesn't handle
      anything.
      	The caller of arch_handle_signal, relay_signal, does things in
      a different order.  The kernel-mode signal check is now first, which
      puts everything else together, making things a bit clearer conceptually.
      
      [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>
      9226b838
  10. 03 2月, 2008 1 次提交
  11. 30 1月, 2008 1 次提交
  12. 29 10月, 2007 1 次提交
  13. 20 10月, 2007 2 次提交
  14. 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
  15. 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
  16. 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
  17. 11 10月, 2007 1 次提交
  18. 31 8月, 2007 1 次提交
  19. 16 5月, 2007 1 次提交
  20. 08 5月, 2007 1 次提交
    • J
      uml: more page fault path trimming · 16dd07bc
      Jeff Dike 提交于
      More trimming of the page fault path.
      
      Permissions are passed around in a single int rather than one bit per
      int.  The permission values are copied from libc so that they can be
      passed to mmap and mprotect without any further conversion.
      
      The register sets used by do_syscall_stub and copy_context_skas0 are
      initialized once, at boot time, rather than once per call.
      
      wait_stub_done checks whether it is getting the signals it expects by
      comparing the wait status to a mask containing bits for the signals of
      interest rather than comparing individually to the signal numbers.  It
      also has one check for a wait failure instead of two.  The caller is
      expected to do the initial continue of the stub.  This gets rid of an
      argument and some logic.  The fname argument is gone, as that can be
      had from a stack trace.
      
      user_signal() is collapsed into userspace() as it is basically one or
      two lines of code afterwards.
      
      The physical memory remapping stuff is gone, as it is unused.
      
      flush_tlb_page is inlined.
      Signed-off-by: NJeff Dike <jdike@linux.intel.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>
      16dd07bc