1. 21 11月, 2013 11 次提交
  2. 20 11月, 2013 9 次提交
  3. 19 11月, 2013 2 次提交
  4. 18 11月, 2013 1 次提交
  5. 17 11月, 2013 17 次提交
    • G
      um: Remove unused declarations from <as-layout.h> · 33a7d429
      Geert Uytterhoeven 提交于
      _end is used, but it's already provided by <asm/sections.h>, so use that.
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: user-mode-linux-devel@lists.sourceforge.net
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      33a7d429
    • M
      um: remove used STDIO_CONSOLE Kconfig param · a851aebc
      Michael Opdenacker 提交于
      This removes the STDIO_CONSOLE Kconfig parameter which
      is defined but no longer used anywhere in the makefiles and source code.
      Signed-off-by: NMichael Opdenacker <michael.opdenacker@free-electrons.com>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      a851aebc
    • R
      um/vdso: add .gitignore for a couple of targets · b13a9bfc
      Ramkumar Ramachandra 提交于
      Cc: Richard Weinberger <richard@nod.at>
      Signed-off-by: NRamkumar Ramachandra <artagnon@gmail.com>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      b13a9bfc
    • R
      arch/um: make it work with defconfig and x86_64 · e40f04d0
      Ramkumar Ramachandra 提交于
      arch/um/defconfig only lists one default configuration, and that applies
      only to the i386 architecture.  Replace it with two minimal
      configuration files generated using `make savedefconfig`:
      
        i386_defconfig and x86_64_defconfig
      
      The build scripts now require two updates:
      
      1. um's Kconfig (arch/x86/um/Kconfig) should specify an ARCH_DEFCONFIG
         section explicitly pointing to these scripts if the required
         variables are set.  Take care to remove the DEFCONFIG_LIST section
         defined in the included file arch/um/Kconfig.common.
      
      2. um's Makefile (arch/um/Makefile) should set KBUILD_DEFCONFIG properly
         for the top-level Makefile to pick up.  Copy the logic in
         arch/x86/Makefile to properly pick the defconfig file depending on
         the actual architecture; except we're working with $SUBARCH here,
         instead of $ARCH.
      
      Now, you can do:
      
        $ ARCH=um make defconfig
        $ ARCH=um make
      
      and successfully build User-Mode Linux on an x86_64 box in default
      configuration.
      
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Jeff Dike <jdike@addtoit.com>
      Signed-off-by: NRamkumar Ramachandra <artagnon@gmail.com>
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      e40f04d0
    • R
      e96d1c36
    • R
      um: Get rid of thread_struct->saved_task · a1850e9c
      Richard Weinberger 提交于
      As we have a sane show_stack() now, we can drop
      the ->saved_task hack.
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      a1850e9c
    • R
      um: Make stack trace reliable against kernel mode faults · f72c22e4
      Richard Weinberger 提交于
      As UML uses an alternative signal stack we cannot use
      the current stack pointer for stack dumping if UML itself
      dies by SIGSEGV. To bypass this issue we save regs taken
      from mcontext in our segv handler into thread_struct and
      use these regs to obtain the stack pointer in show_stack().
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      f72c22e4
    • R
      um: Rewrite show_stack() · 9d1ee8ce
      Richard Weinberger 提交于
      Currently on UML stack traces are not very reliable and both
      x86 and x86_64 have their on implementations.
      This patch unifies both and adds support to outline unreliable
      functions calls.
      Signed-off-by: NRichard Weinberger <richard@nod.at>
      9d1ee8ce
    • J
      alpha: Prevent a NULL ptr dereference in csum_partial_copy. · 5cfe8f1b
      Jay Estabrook 提交于
      Introduced by 3ddc5b46 ("kernel-wide: fix missing validations
      on __get/__put/__copy_to/__copy_from_user()").
      
      Also fix some other places which could be problematic in a similar way,
      although they hadn't been proved so, as far as I can tell.
      
      Cc: Michael Cree <mcree@orcon.net.nz>
      Signed-off-by: NMatt Turner <mattst88@gmail.com>
      5cfe8f1b
    • W
      alpha: perf: fix out-of-bounds array access triggered from raw event · 6e22f8f2
      Will Deacon 提交于
      Vince's perf fuzzer uncovered the following issue on Alpha:
      
      Unable to handle kernel paging request at virtual address fffffbfe4e46a0e8
      CPU 0 perf_fuzzer(1278): Oops 0
      pc = [<fffffc000031fbc0>]  ra = [<fffffc000031ff54>]  ps = 0007    Not tainted
      pc is at alpha_perf_event_set_period+0x60/0xf0
      ra is at alpha_pmu_enable+0x1a4/0x1c0
      v0 = 0000000000000000  t0 = 00000000000fffff  t1 = fffffc007b3f5800
      t2 = fffffbff275faa94  t3 = ffffffffc9b9bd89  t4 = fffffbfe4e46a098
      t5 = 0000000000000020  t6 = fffffbfe4e46a0b8  t7 = fffffc007f4c8000
      s0 = 0000000000000000  s1 = fffffc0001b0c018  s2 = fffffc0001b0c020
      s3 = fffffc007b3f5800  s4 = 0000000000000001  s5 = ffffffffc9b9bd85
      s6 = 0000000000000001
      a0 = 0000000000000006  a1 = fffffc007b3f5908  a2 = fffffbfe4e46a098
      a3 = 00000005000108c0  a4 = 0000000000000000  a5 = 0000000000000000
      t8 = 0000000000000001  t9 = 0000000000000001  t10= 0000000027829f6f
      t11= 0000000000000020  pv = fffffc000031fb60  at = fffffc0000950900
      gp = fffffc0000940900  sp = fffffc007f4cbca8
      Disabling lock debugging due to kernel taint
      Trace:
      [<fffffc000031ff54>] alpha_pmu_enable+0x1a4/0x1c0
      [<fffffc000039f4e8>] perf_pmu_enable+0x48/0x60
      [<fffffc00003a0d6c>] __perf_install_in_context+0x15c/0x230
      [<fffffc000039d1f0>] remote_function+0x80/0xa0
      [<fffffc00003a0c10>] __perf_install_in_context+0x0/0x230
      [<fffffc000037b7e4>] smp_call_function_single+0x1b4/0x1d0
      [<fffffc000039bb70>] task_function_call+0x60/0x80
      [<fffffc00003a0c10>] __perf_install_in_context+0x0/0x230
      [<fffffc000039bb44>] task_function_call+0x34/0x80
      [<fffffc000039d3fc>] perf_install_in_context+0x9c/0x150
      [<fffffc00003a0c10>] __perf_install_in_context+0x0/0x230
      [<fffffc00003a5100>] SYSC_perf_event_open+0x360/0xac0
      [<fffffc00003110c4>] entSys+0xa4/0xc0
      
      This is due to the raw event encoding being used as an index directly
      into the ev67_mapping array, rather than being validated against the
      ev67_pmc_event_type enumeration instead. Unlike other architectures,
      which allow raw events to propagate into the hardware counters with
      little interference, the limited number of events on Alpha and the
      strict event <-> counter relationships mean that raw events actually
      correspond to the Linux-specific Alpha events, rather than anything
      defined by the architecture.
      
      This patch adds a new callback to alpha_pmu_t for validating the raw
      event encoding with the Linux event types for the PMU, preventing the
      out-of-bounds array access.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NMichael Cree <mcree@orcon.net.nz>
      Acked-by: NMatt Turner <mattst88@gmail.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      6e22f8f2
    • R
      alpha: Use qemu+cserve provided high-res clock and alarm. · 4914d7b4
      Richard Henderson 提交于
      QEMU provides a high-resolution timer and alarm; use this for
      a clock source and clock event source when available.
      Signed-off-by: NRichard Henderson <rth@twiddle.net>
      4914d7b4
    • R
      alpha: Switch to GENERIC_CLOCKEVENTS · a1659d6d
      Richard Henderson 提交于
      This allows us to get rid of some hacky code for SMP.  Get rid of
      some cycle counter hackery that's now handled by generic code via
      clocksource + clock_event_device objects.
      Signed-off-by: NRichard Henderson <rth@twiddle.net>
      a1659d6d
    • R
      alpha: Enable the rpcc clocksource for single processor · db2d3260
      Richard Henderson 提交于
      Don't depend on SMP, just check the number of processors online.
      This allows a single distribution kernel to use the clocksource
      when run on a single processor machine.  Do depend on whether or
      not we're using WTINT.
      Signed-off-by: NRichard Henderson <rth@twiddle.net>
      db2d3260
    • R
      alpha: Reorganize rtc handling · 85d0b3a5
      Richard Henderson 提交于
      Discontinue use of GENERIC_CMOS_UPDATE; rely on the RTC subsystem.
      
      The marvel platform requires that the rtc only be touched from the
      boot cpu.  This had been partially implemented with hooks for
      get/set_rtc_time, but read/update_persistent_clock were not handled.
      Move the hooks from the machine_vec to a special rtc_class_ops struct.
      
      We had read_persistent_clock managing the epoch against which the
      rtc hw is based, but this didn't apply to get_rtc_time or set_rtc_time.
      This resulted in incorrect values when hwclock(8) gets involved.
      
      Allow the epoch to be set from the kernel command-line, overriding
      the autodetection, which is doomed to fail in 2020.  Further, by
      implementing the rtc ioctl function, we can expose this epoch to
      userland.
      
      Elide the alarm functions that RTC_DRV_CMOS implements.  This was
      highly questionable on Alpha, since the interrupt is used by the
      system timer.
      Signed-off-by: NRichard Henderson <rth@twiddle.net>
      85d0b3a5
    • R
      alpha: Primitive support for CPU power down. · 7f3bbb82
      Richard Henderson 提交于
      Use WTINT to wait for the next interrupt.  Squash the WTINT call
      if the PALcode doesn't support it (e.g. MILO).  No attempt is yet
      made to skip clock ticks during normal scheduling in order to stay
      in power down mode longer.
      Signed-off-by: NRichard Henderson <rth@twiddle.net>
      7f3bbb82
    • R
      alpha: Allow HZ to be configured · fddd87d6
      Richard Henderson 提交于
      With the 1024Hz default, we spend 50% of QEMU emulation
      processing timer interrupts.
      Signed-off-by: NRichard Henderson <rth@twiddle.net>
      fddd87d6
    • R
      alpha: Notice if we're being run under QEMU · 994dcf70
      Richard Henderson 提交于
      When building a generic kernel, do a run-time check on the serial
      number, like we do for MILO.  When building a custom kernel, make
      this a configure-time check.
      Signed-off-by: NRichard Henderson <rth@twiddle.net>
      994dcf70