1. 05 10月, 2008 1 次提交
  2. 04 10月, 2008 2 次提交
  3. 26 9月, 2008 2 次提交
    • J
      kgdb, x86_64: fix PS CS SS registers in gdb serial · 703a1edc
      Jason Wessel 提交于
      On x86_64 the gdb serial register structure defines the PS (also known
      as eflags), CS and SS registers as 4 bytes entities.
      
      This patch splits the x86_64 regnames enum into a 32 and 64 version to
      account for the 32 bit entities in the gdb serial packets.
      
      Also the program counter is properly filled in for the sleeping
      threads.
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      703a1edc
    • J
      kgdb, x86, arm, mips, powerpc: ignore user space single stepping · d7161a65
      Jason Wessel 提交于
      On the x86 arch, user space single step exceptions should be ignored
      if they occur in the kernel space, such as ptrace stepping through a
      system call.
      
      First check if it is kgdb that is executing a single step, then ensure
      it is not an accidental traversal into the user space, while in kgdb,
      any other time the TIF_SINGLESTEP is set, kgdb should ignore the
      exception.
      
      On x86, arm, mips and powerpc, the kgdb_contthread usage was
      inconsistent with the way single stepping is implemented in the kgdb
      core.  The arch specific stub should always set the
      kgdb_cpu_doing_single_step correctly if it is single stepping.  This
      allows kgdb to correctly process an instruction steps if ptrace
      happens to be requesting an instruction step over a system call.
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      d7161a65
  4. 24 9月, 2008 2 次提交
  5. 23 9月, 2008 4 次提交
  6. 22 9月, 2008 1 次提交
    • A
      x86, oprofile: BUG scheduling while atomic · b61e06f2
      Andrea Righi 提交于
      nmi_shutdown() calls unregister_die_notifier() from an atomic context
      after setting preempt_disable() via get_cpu_var():
      
      [ 1049.404154] BUG: scheduling while atomic: oprofiled/7796/0x00000002
      [ 1049.404171] INFO: lockdep is turned off.
      [ 1049.404176] Modules linked in: oprofile af_packet rfcomm l2cap kvm_intel kvm i915 drm acpi_cpufreq cpufreq_userspace cpufreq_conservative cpufreq_ondemand cpufreq_powersave freq_table container sbs sbshc dm_mod arc4 ecb cryptomgr aead snd_hda_intel crypto_blkcipher snd_pcm_oss crypto_algapi snd_pcm iwlagn iwlcore snd_timer iTCO_wdt led_class btusb iTCO_vendor_support snd psmouse bluetooth mac80211 soundcore cfg80211 snd_page_alloc intel_agp video output button battery ac dcdbas evdev ext3 jbd mbcache sg sd_mod piix ata_piix libata scsi_mod dock tg3 libphy ehci_hcd uhci_hcd usbcore thermal processor fan fuse
      [ 1049.404362] Pid: 7796, comm: oprofiled Not tainted 2.6.27-rc5-mm1 #30
      [ 1049.404368] Call Trace:
      [ 1049.404384]  [<ffffffff804769fd>] thread_return+0x4a0/0x7d3
      [ 1049.404396]  [<ffffffff8026ad92>] generic_exec_single+0x52/0xe0
      [ 1049.404405]  [<ffffffff8026ae1a>] generic_exec_single+0xda/0xe0
      [ 1049.404414]  [<ffffffff8026aee3>] smp_call_function_single+0x73/0x150
      [ 1049.404423]  [<ffffffff804770c5>] schedule_timeout+0x95/0xd0
      [ 1049.404430]  [<ffffffff80476083>] wait_for_common+0x43/0x180
      [ 1049.404438]  [<ffffffff80476154>] wait_for_common+0x114/0x180
      [ 1049.404448]  [<ffffffff80236980>] default_wake_function+0x0/0x10
      [ 1049.404457]  [<ffffffff8024f810>] synchronize_rcu+0x30/0x40
      [ 1049.404463]  [<ffffffff8024f890>] wakeme_after_rcu+0x0/0x10
      [ 1049.404472]  [<ffffffff80479ca0>] _spin_unlock_irqrestore+0x40/0x80
      [ 1049.404482]  [<ffffffff80256def>] atomic_notifier_chain_unregister+0x3f/0x60
      [ 1049.404501]  [<ffffffffa03d8801>] nmi_shutdown+0x51/0x90 [oprofile]
      [ 1049.404517]  [<ffffffffa03d6134>] oprofile_shutdown+0x34/0x70 [oprofile]
      [ 1049.404532]  [<ffffffffa03d721e>] event_buffer_release+0xe/0x40 [oprofile]
      [ 1049.404543]  [<ffffffff802bdcdd>] __fput+0xcd/0x240
      [ 1049.404551]  [<ffffffff802baa74>] filp_close+0x54/0x90
      [ 1049.404560]  [<ffffffff8023e1d1>] put_files_struct+0xb1/0xd0
      [ 1049.404568]  [<ffffffff8023f82f>] do_exit+0x18f/0x930
      [ 1049.404576]  [<ffffffff8020be03>] restore_args+0x0/0x30
      [ 1049.404584]  [<ffffffff80240006>] do_group_exit+0x36/0xa0
      [ 1049.404592]  [<ffffffff8020b7cb>] system_call_fastpath+0x16/0x1b
      
      This can be easily triggered with 'opcontrol --shutdown'.
      
      Simply move get_cpu_var() above unregister_die_notifier().
      Signed-off-by: NAndrea Righi <righi.andrea@gmail.com>
      Acked-by: NRobert Richter <robert.richter@amd.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b61e06f2
  7. 18 9月, 2008 2 次提交
  8. 17 9月, 2008 1 次提交
  9. 15 9月, 2008 1 次提交
  10. 14 9月, 2008 1 次提交
  11. 12 9月, 2008 1 次提交
    • J
      x86: fix possible x86_64 and EFI regression · 0ad5bce7
      Jeremy Fitzhardinge 提交于
      Russ Anderson reported a boot crash with EFI and latest mainline:
      
       BIOS-e820: 00000000fffa0000 - 00000000fffac000 (reserved)
      Pid: 0, comm: swapper Not tainted 2.6.27-rc5-00100-gec0c15af-dirty #5
      
      Call Trace:
       [<ffffffff80849195>] early_idt_handler+0x55/0x69
       [<ffffffff80313e52>] __memcpy+0x12/0xa4
       [<ffffffff80859015>] efi_init+0xce/0x932
       [<ffffffff80869c83>] setup_early_serial8250_console+0x2d/0x36a
       [<ffffffff80238688>] __insert_resource+0x18/0xc8
       [<ffffffff8084f6de>] setup_arch+0x3a7/0x632
       [<ffffffff808499ed>] start_kernel+0x91/0x367
       [<ffffffff80849393>] x86_64_start_kernel+0xe3/0xe7
       [<ffffffff808492b0>] x86_64_start_kernel+0x0/0xe7
      
       RIP 0x10
      
      Such a crash is possible if the CPU in this system is a 64-bit
      processor which doesn't support NX (ie, old Intel P4 -based64-bit
      processors).
      
      Certainly, if we support such processors, then we should start with
      _PAGE_NX initially clear in __supported_pte_flags, and then set it once
      we've established that the processor does indeed support NX.  That will
      prevent early_ioremap - or anything else - from trying to set it.
      
      The simple fix is to simply call check_efer() earlier.
      Reported-by: NRuss Anderson <rja@sgi.com>
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0ad5bce7
  12. 11 9月, 2008 3 次提交
  13. 10 9月, 2008 2 次提交
    • J
      arch/x86/kernel/kdebugfs.c: introduce missing kfree · f461a1d8
      Julia Lawall 提交于
      Error handling code following a kmalloc should free the allocated data.
      Note that at the point of the change, node has not yet been stored in d, so
      it is not affected by the existing cleanup code.
      
      The semantic match that finds the problem is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @r exists@
      local idexpression x;
      statement S;
      expression E;
      identifier f,l;
      position p1,p2;
      expression *ptr != NULL;
      @@
      
      (
      if ((x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...)) == NULL) S
      |
      x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
      ...
      if (x == NULL) S
      )
      <... when != x
           when != if (...) { <+...x...+> }
      x->f = E
      ...>
      (
       return \(0\|<+...x...+>\|ptr\);
      |
       return@p2 ...;
      )
      
      @script:python@
      p1 << r.p1;
      p2 << r.p2;
      @@
      
      print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f461a1d8
    • P
      x86: fix memmap=exactmap boot argument · d6be118a
      Prarit Bhargava 提交于
      When using kdump modifying the e820 map is yielding strange results.
      
      For example starting with
      
       BIOS-provided physical RAM map:
       BIOS-e820: 0000000000000100 - 0000000000093400 (usable)
       BIOS-e820: 0000000000093400 - 00000000000a0000 (reserved)
       BIOS-e820: 0000000000100000 - 000000003fee0000 (usable)
       BIOS-e820: 000000003fee0000 - 000000003fef3000 (ACPI data)
       BIOS-e820: 000000003fef3000 - 000000003ff80000 (ACPI NVS)
       BIOS-e820: 000000003ff80000 - 0000000040000000 (reserved)
       BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
       BIOS-e820: 00000000fec00000 - 00000000fec10000 (reserved)
       BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
       BIOS-e820: 00000000ff000000 - 0000000100000000 (reserved)
      
      and booting with args
      
      memmap=exactmap memmap=640K@0K memmap=5228K@16384K memmap=125188K@22252K memmap=76K#1047424K memmap=564K#1047500K
      
      resulted in:
      
       user-defined physical RAM map:
       user: 0000000000000000 - 0000000000093400 (usable)
       user: 0000000000093400 - 00000000000a0000 (reserved)
       user: 0000000000100000 - 000000003fee0000 (usable)
       user: 000000003fee0000 - 000000003fef3000 (ACPI data)
       user: 000000003fef3000 - 000000003ff80000 (ACPI NVS)
       user: 000000003ff80000 - 0000000040000000 (reserved)
       user: 00000000e0000000 - 00000000f0000000 (reserved)
       user: 00000000fec00000 - 00000000fec10000 (reserved)
       user: 00000000fee00000 - 00000000fee01000 (reserved)
       user: 00000000ff000000 - 0000000100000000 (reserved)
      
      But should have resulted in:
      
       user-defined physical RAM map:
       user: 0000000000000000 - 00000000000a0000 (usable)
       user: 0000000001000000 - 000000000151b000 (usable)
       user: 00000000015bb000 - 0000000008ffc000 (usable)
       user: 000000003fee0000 - 000000003ff80000 (ACPI data)
      
      This is happening because of an improper usage of strcmp() in the
      e820 parsing code.  The strcmp() always returns !0 and never resets the
      value for e820.nr_map and returns an incorrect user-defined map.
      
      This patch fixes the problem.
      Signed-off-by: NPrarit Bhargava <prarit@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d6be118a
  14. 09 9月, 2008 1 次提交
    • L
      x86: disable static NOPLs on 32 bits · 14469a8d
      Linus Torvalds 提交于
      On 32-bit, at least the generic nops are fairly reasonable, but the
      default nops for 64-bit really look pretty sad, and the P6 nops really do
      look better.
      
      So I would suggest perhaps moving the static P6 nop selection into the
      CONFIG_X86_64 thing.
      
      The alternative is to just get rid of that static nop selection, and just
      have two cases: 32-bit and 64-bit, and just pick obviously safe cases for
      them.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      14469a8d
  15. 07 9月, 2008 3 次提交
  16. 06 9月, 2008 9 次提交
  17. 05 9月, 2008 1 次提交
  18. 04 9月, 2008 3 次提交