1. 04 8月, 2016 1 次提交
    • R
      um: Setup physical memory in setup_arch() · b6323697
      Richard Weinberger 提交于
      Currently UML sets up physical memory very early,
      long before setup_arch() was called by the kernel main
      function.
      This can cause problems when code paths in UML's memory setup
      code assume that the kernel is already running.
      i.e. when kmemleak is enabled it will evaluate current()
      in free_bootmem(). That early current() is undefined and
      UML explodes.
      
      Solve the problem by setting up physical memory in setup_arch(),
      at this stage the kernel has materialized and basic infrastructure
      such as current() works.
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      b6323697
  2. 31 5月, 2015 2 次提交
  3. 14 4月, 2015 5 次提交
    • T
      um: Move uml_postsetup in the init_thread stack · 33bbc306
      Thomas Meyer 提交于
      atomic_notifier_chain_register() and uml_postsetup() do call kernel code
      that rely on the "current" kernel macro and a valid task_struct resp.
      thread_info struct. Give those functions a valid stack by moving
      uml_postsetup() in the init_thread stack. This moves enables a panic()
      call in this early code to generate a valid stacktrace, instead of
      crashing.
      E.g. when an UML kernel is started with an initrd but too few physical
      memory the panic() call get's actually processed.
      Signed-off-by: NThomas Meyer <thomas@m3y3r.de>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      33bbc306
    • T
      um: add a kmsg_dumper · 04a41849
      Thomas Meyer 提交于
      Add a kmsg_dumper, that dumps the kmsg buffer to stdout, when no console
      is available. This an enables the printing of early panic() calls
      triggered in uml_postsetup().
      When a panic() call happens so early in the UML kernel no
      earlyprintk/console is available yet, but with a kmsg_dumper in place
      the kernel message buffer will be outputted to the user, to give a
      better hint, of what the failure was.
      Signed-off-by: NThomas Meyer <thomas@m3y3r.de>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      04a41849
    • R
      um: Remove broken highmem support · a98a6d86
      Richard Weinberger 提交于
      Highmem was always buggy and experimental on UML(i386).
      In times where 64 bit computers are default we can
      remove that experimental code.
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      a98a6d86
    • R
      um: Remove broken SMP support · 28fa468f
      Richard Weinberger 提交于
      At times where UML used the TT mode to operate it had
      kind of SMP support. It never got finished nor was
      stable.
      Let's rip out that cruft and stop confusing developers
      which do tree-wide SMP cleanups.
      
      If someone wants SMP support UML it has do be done from scratch.
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      28fa468f
    • R
      um: Remove SKAS3/4 support · d0b5e15f
      Richard Weinberger 提交于
      Before we had SKAS0 UML had two modes of operation
      TT (tracing thread) and SKAS3/4 (separated kernel address space).
      TT was known to be insecure and got removed a long time ago.
      SKAS3/4 required a few (3 or 4) patches on the host side which never went
      mainline. The last host patch is 10 years old.
      
      With SKAS0 mode (separated kernel address space using 0 host patches),
      default since 2005, SKAS3/4 is obsolete and can be removed.
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      d0b5e15f
  4. 13 10月, 2014 1 次提交
  5. 17 11月, 2013 2 次提交
  6. 10 10月, 2012 1 次提交
  7. 05 5月, 2012 1 次提交
  8. 02 11月, 2011 1 次提交
  9. 07 6月, 2008 1 次提交
    • T
      uml: deal with inaccessible address space start · 40fb16a3
      Tom Spink 提交于
      This patch makes os_get_task_size locate the bottom of the address space,
      as well as the top.  This is for systems which put a lower limit on mmap
      addresses.  It works by manually scanning pages from zero onwards until a
      valid page is found.
      
      Because the bottom of the address space may not be zero, it's not
      sufficient to assume the top of the address space is the size of the
      address space.  The size is the difference between the top address and
      bottom address.
      
      [jdike@addtoit.com: changed the name to reflect that this function is
      supposed to return the top of the process address space, not its size and
      changed the return value to reflect that.  Also some minor formatting
      changes]
      Signed-off-by: NTom Spink <tspink@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>
      40fb16a3
  10. 13 5月, 2008 2 次提交
  11. 28 4月, 2008 1 次提交
  12. 09 2月, 2008 1 次提交
    • J
      uml: runtime host VMSPLIT detection · 536788fe
      Jeff Dike 提交于
      Calculate TASK_SIZE at run-time by figuring out the host's VMSPLIT - this is
      needed on i386 if UML is to run on hosts with varying VMSPLITs without
      recompilation.
      
      TASK_SIZE is now defined in terms of a variable, task_size.  This gets rid of
      an include of pgtable.h from processor.h, which can cause include loops.
      
      On i386, task_size is calculated early in boot by probing the address space in
      a binary search to figure out where the boundary between usable and non-usable
      memory is.  This tries to make sure that a page that is considered to be in
      userspace is, or can be made, read-write.  I'm concerned about a system-global
      VDSO page in kernel memory being hit and considered to be a userspace page.
      
      On x86_64, task_size is just the old value of CONFIG_TOP_ADDR.
      
      A bunch of config variable are gone now.  CONFIG_TOP_ADDR is directly replaced
      by TASK_SIZE.  NEST_LEVEL is gone since the relocation of the stubs makes it
      irrelevant.  All the HOST_VMSPLIT stuff is gone.  All references to these in
      arch/um/Makefile are also gone.
      
      I noticed and fixed a missing extern in os.h when adding os_get_task_size.
      
      Note: This has been revised to fix the 32-bit UML on 64-bit host bug that
      Miklos ran into.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Cc: Miklos Szeredi <miklos@szeredi.hu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      536788fe
  13. 06 2月, 2008 5 次提交
  14. 17 10月, 2007 5 次提交
    • 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 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. 11 5月, 2007 1 次提交
  16. 08 5月, 2007 7 次提交
  17. 13 2月, 2007 2 次提交
  18. 12 2月, 2007 1 次提交