~ubuntu-branches/ubuntu/wily/lshw/wily

« back to all changes in this revision

Viewing changes to debian/patches/aarch64-disable-smbios-check.patch

  • Committer: Package Import Robot
  • Author(s): dann frazier
  • Date: 2014-03-10 10:04:28 UTC
  • Revision ID: package-import@ubuntu.com-20140310100428-rh5o7unw11cvuapc
Tags: 02.16-2ubuntu1
Disable /dev/mem access for SMBIOS on aarch64 systems (LP: #1284406)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Avoid trolling /dev/mem for SMBIOS on aarch64
 
2
 When lshw runs as superuser, it can crash aarch64 systems (kernel
 
3
 oops) by accessing /dev/mem to look for the SMBIOS region. Since
 
4
 SMBIOS is unlikely to exist in an aarch64 platform, simply disable
 
5
 the DMI method.
 
6
Author: dann frazier <dann.frazier@canonical.com>
 
7
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/lshw/+bug/1284406
 
8
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=740034
 
9
Forwarded: http://ezix.org/project/ticket/642
 
10
Last-Update: 2014-03-07
 
11
 
 
12
Index: lshw-02.16/src/core/dmi.cc
 
13
===================================================================
 
14
--- lshw-02.16.orig/src/core/dmi.cc     2014-02-24 18:38:37.382039999 -0700
 
15
+++ lshw-02.16/src/core/dmi.cc  2014-02-24 18:39:51.062039999 -0700
 
16
@@ -1751,7 +1751,7 @@
 
17
   u16 dmimaj = 0, dmimin = 0;
 
18
   currentcpu = 0;
 
19
 
 
20
-#if defined(__arm__) || defined (__hppa__)
 
21
+#if defined (__aarch64__) || defined(__arm__) || defined (__hppa__)
 
22
   return false;                // SMBIOS not supported on ARM and PA-RISC machines
 
23
 #endif
 
24