1. 29 11月, 2011 1 次提交
  2. 01 11月, 2011 1 次提交
  3. 31 10月, 2011 1 次提交
  4. 13 10月, 2011 1 次提交
  5. 17 8月, 2011 1 次提交
    • D
      pstore: change mutex locking to spin_locks · abd4d558
      Don Zickus 提交于
      pstore was using mutex locking to protect read/write access to the
      backend plug-ins.  This causes problems when pstore is executed in
      an NMI context through panic() -> kmsg_dump().
      
      This patch changes the mutex to a spin_lock_irqsave then also checks to
      see if we are in an NMI context.  If we are in an NMI and can't get the
      lock, just print a message stating that and blow by the locking.
      
      All this is probably a hack around the bigger locking problem but it
      solves my current situation of trying to sleep in an NMI context.
      
      Tested by loading the lkdtm module and executing a HARDLOCKUP which
      will cause the machine to panic inside the nmi handler.
      Signed-off-by: NDon Zickus <dzickus@redhat.com>
      Acked-by: NMatthew Garrett <mjg@redhat.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      abd4d558
  6. 09 8月, 2011 1 次提交
  7. 03 8月, 2011 1 次提交
  8. 26 7月, 2011 1 次提交
  9. 23 7月, 2011 5 次提交
  10. 02 7月, 2011 1 次提交
  11. 30 6月, 2011 1 次提交
  12. 09 6月, 2011 1 次提交
  13. 08 6月, 2011 1 次提交
  14. 10 5月, 2011 1 次提交
  15. 07 5月, 2011 1 次提交
    • R
      efivars: prevent oops on unload when efi is not enabled · aabb6e15
      Randy Dunlap 提交于
      efivars_exit() should check for efi_enabled and not undo
      allocations when efi is not enabled.  Otherwise there is an Oops
      during module unload:
      
      calling  efivars_init+0x0/0x1000 [efivars] @ 2810
      EFI Variables Facility v0.08 2004-May-17
      initcall efivars_init+0x0/0x1000 [efivars] returned 0 after 5120 usecs
      Oops: 0000 [#1] SMP DEBUG_PAGEALLOC
      last sysfs file: /sys/module/firmware_class/initstate
      CPU 1
      Modules linked in: efivars(-) af_packet tun nfsd lockd nfs_acl auth_rpcgss sunrpc ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 iptable_filter ip_tables ip6t_REJECT xt_tcpudp nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables x_tables ipv6 cpufreq_ondemand acpi_cpufreq freq_table mperf binfmt_misc dm_mirror dm_region_hash dm_log dm_multipath scsi_dh dm_mod snd_hda_codec_analog snd_hda_intel snd_hda_codec snd_hwdep mousedev snd_seq joydev snd_seq_device mac_hid evdev snd_pcm usbkbd usbmouse usbhid snd_timer hid tg3 snd sr_mod pcspkr rtc_cmos soundcore cdrom iTCO_wdt processor sg dcdbas i2c_i801 rtc_core iTCO_vendor_support intel_agp snd_page_alloc thermal_sys rtc_lib intel_gtt 8250_pnp button hwmon unix ide_pci_generic ide_core ata_generic pata_acpi ata_piix sd_mod crc_t10dif ext3 jbd mbcache uhci_hcd ohci_hcd ssb mmc_core pcmcia pcmcia_core firmware_class ehci_hcd usbcore [last unloaded: dell_rbu]
      
      Pid: 2812, comm: rmmod Not tainted 2.6.39-rc6 #1 Dell Inc.                 OptiPlex 745                 /0TY565
      RIP: 0010:[<ffffffffa06a17f6>]  [<ffffffffa06a17f6>] unregister_efivars+0x28/0x12c [efivars]
      RSP: 0018:ffff88005eedde98  EFLAGS: 00010283
      RAX: ffffffffa06a23fc RBX: ffffffffa06a44c0 RCX: ffff88007c227a50
      RDX: 0000000000000000 RSI: 00000055ac13db78 RDI: ffffffffa06a44c0
      RBP: ffff88005eeddec8 R08: 0000000000000000 R09: ffff88005eeddd78
      R10: ffffffffa06a4220 R11: ffff88005eeddd78 R12: fffffffffffff7d0
      R13: 00007fff5a3aaec0 R14: 0000000000000000 R15: ffffffffa06a4508
      FS:  00007fa8dcc4a6f0(0000) GS:ffff88007c200000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      CR2: 0000000000000000 CR3: 000000005d148000 CR4: 00000000000006e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process rmmod (pid: 2812, threadinfo ffff88005eedc000, task ffff88006754b000)
      Stack:
       ffff88005eeddec8 ffffffffa06a4220 0000000000000000 00007fff5a3aaec0
       0000000000000000 0000000000000001 ffff88005eedded8 ffffffffa06a2418
       ffff88005eeddf78 ffffffff810d3598 ffffffffa06a4220 0000000000000880
      Call Trace:
       [<ffffffffa06a2418>] efivars_exit+0x1c/0xc04 [efivars]
       [<ffffffff810d3598>] sys_delete_module+0x2d6/0x368
       [<ffffffff812d1db9>] ? lockdep_sys_exit_thunk+0x35/0x67
       [<ffffffff810fcba1>] ? audit_syscall_entry+0x172/0x1a5
       [<ffffffff81575082>] system_call_fastpath+0x16/0x1b
      Code: 5c c9 c3 55 48 89 e5 41 57 41 56 41 55 41 54 53 48 83 ec 08 0f 1f 44 00 00 4c 8b 67 48 48 89 fb 4c 8d 7f 48 49 81 ec 30 08 00 00 <4d> 8b ac 24 30 08 00 00 49 81 ed 30 08 00 00 eb 59 48 89 df 48
      RIP  [<ffffffffa06a17f6>] unregister_efivars+0x28/0x12c [efivars]
       RSP <ffff88005eedde98>
      CR2: 0000000000000000
       ---[ end trace aa99b99090f70baa ]---
      
      Matt apparently removed such a check in 2004 (with no reason given):
       *  17 May 2004 - Matt Domsch <Matt_Domsch@dell.com>
       *   remove check for efi_enabled in exit
      but there have been several changes since then.
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NMike Waychison <mikew@google.com>
      Tested-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Matt Domsch <Matt_Domsch@dell.com>
      Cc: <matthew.e.tolentino@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      aabb6e15
  16. 30 4月, 2011 3 次提交
  17. 28 4月, 2011 1 次提交
    • G
      x86, setup: Fix EDD3.0 data verification. · 0c612270
      Gleb Natapov 提交于
      Check for nonzero path in edd_has_edd30() has no sense. First, it looks
      at the wrong memory. Device path starts at offset 30 of the info->params
      structure which is at offset 8 from the beginning of info structure,
      but code looks at info + 4 instead. This was correct when code was
      introduced, but around v2.6.4 three more fields were added to edd_info
      structure (commit 66b61a5c in history.git). Second, even if it will check
      correct memory it will always succeed since at offset 30 (params->key)
      there will be non-zero values otherwise previous check would fail.
      
      The patch replaces this bogus check with one that verifies checksum.
      Signed-off-by: NGleb Natapov <gleb@redhat.com>
      Link: http://lkml.kernel.org/r/20110426082132.GG2265@redhat.comSigned-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      0c612270
  18. 26 4月, 2011 1 次提交
  19. 20 4月, 2011 2 次提交
  20. 15 4月, 2011 1 次提交
  21. 23 3月, 2011 1 次提交
  22. 14 3月, 2011 6 次提交
  23. 02 3月, 2011 1 次提交
  24. 26 2月, 2011 4 次提交
    • M
      firmware: Fix unaligned memory accesses in dmi-sysfs · 66245ad0
      Mike Waychison 提交于
      DMI entries are arranged in memory back to back with no alignment
      guarantees. This means that the struct dmi_header passed to callbacks
      from dmi_walk() itself isn't byte aligned.  This causes problems on
      architectures that expect aligned data, such as IA64.
      
      The dmi-sysfs patchset introduced structure member accesses through this
      passed in dmi_header.  Fix this by memcpy()ing the structures to
      temporary locations on stack when inspecting/copying them.
      Signed-off-by: NMike Waychison <mikew@google.com>
      Tested-by: NTony Luck <tony.luck@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      66245ad0
    • M
      firmware: Expose DMI type 15 System Event Log · a3857a5c
      Mike Waychison 提交于
      The System Event Log described by DMI entry type 15 may be backed by
      either memory or may be indirectly accessed via an IO index/data
      register pair.
      
      In order to get read access to this log, expose it in the
      "system_event_log" sub-directory of type 15 DMI entries, ie:
      /sys/firmware/dmi/entries/15-0/system_event_log/raw_event_log.
      
      This commit handles both IO accessed and memory access system event
      logs.  OEM specific access and GPNV support is explicitly not handled
      and we error out in the logs when we do not recognize the access method.
      Signed-off-by: NMike Waychison <mikew@google.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a3857a5c
    • M
      firmware: Break out system_event_log in dmi-sysfs · 925a1da7
      Mike Waychison 提交于
      The optional type 15 entry of the DMI table describes a non-volatile
      storage-backed system event log.
      
      In preparation for the next commit which exposes the raw bits of the
      event log to userland, create a new sub-directory within the dmi entry
      called "system_event_log" and expose attribute files that describe the
      event log itself.
      
      Currently, only a single child object is permitted within a
      dmi_sysfs_entry.  We simply point at this child from the dmi_sysfs_entry
      if it exists.
      Signed-off-by: NMike Waychison <mikew@google.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      925a1da7
    • M
      firmware: Basic dmi-sysfs support · 948af1f0
      Mike Waychison 提交于
      Introduce a new module "dmi-sysfs" that exports the broken out entries
      of the DMI table through sysfs.
      
      Entries are enumerated via dmi_walk() on module load, and are populated
      as kobjects rooted at /sys/firmware/dmi/entries.
      
      Entries are named "<type>-<instance>", where:
         <type>	: is the type of the entry, and
         <instance>	: is the ordinal count within the DMI table of that
      		  entry type.  This instance is used in lieu the DMI
      		  entry's handle as no assurances are made by the kernel
      		  that handles are unique.
      
      All entries export the following attributes:
         length	: The length of the formatted portion of the entry
         handle	: The handle given to this entry by the firmware
         raw		: The raw bytes of the entire entry, including the
      		  formatted portion, the unformatted (strings) portion,
      		  and the two terminating nul characters.
         type		: The DMI entry type
         instance	: The ordinal instance of this entry given its type.
         position	: The position ordinal of the entry within the table in
      		  its entirety.
      
      Entries in dmi-sysfs are kobject backed members called "struct
      dmi_sysfs_entry" and belong to dmi_kset.  They are threaded through
      entry_list (protected by entry_list_lock) so that we can find them at
      cleanup time.
      Signed-off-by: NMike Waychison <mikew@google.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      948af1f0
  25. 15 2月, 2011 1 次提交
    • N
      x86, dmi, debug: Log board name (when present) in dmesg/oops output · 84e383b3
      Naga Chumbalkar 提交于
      The "Type 2" SMBIOS record that contains Board Name is not
      strictly required and may be absent in the SMBIOS on some
      platforms.
      
      ( Please note that Type 2 is not listed in Table 3 in Sec 6.2
        ("Required Structures and Data") of the SMBIOS v2.7
        Specification. )
      
      Use the Manufacturer Name (aka System Vendor) name.
      Print Board Name only when it is present.
      
      Before the fix:
        (i) dmesg output: DMI: /ProLiant DL380 G6, BIOS P62 01/29/2011
       (ii) oops output:  Pid: 2170, comm: bash Not tainted 2.6.38-rc4+ #3 /ProLiant DL380 G6
      
      After the fix:
        (i) dmesg output: DMI: HP ProLiant DL380 G6, BIOS P62 01/29/2011
       (ii) oops output:  Pid: 2278, comm: bash Not tainted 2.6.38-rc4+ #4 HP ProLiant DL380 G6
      Signed-off-by: NNaga Chumbalkar <nagananda.chumbalkar@hp.com>
      Reviewed-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Cc: <stable@kernel.org> # .3x - good for debugging, please apply as far back as it applies cleanly
      LKML-Reference: <20110214224423.2182.13929.sendpatchset@nchumbalkar.americas.hpqcorp.net>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      84e383b3