Bug 210295 - dmidecode in a xen guest gives "/dev/mem: mmap: Bad address"
dmidecode in a xen guest gives "/dev/mem: mmap: Bad address"
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: dmidecode (Show other bugs)
5.0
All Linux
medium Severity low
: ---
: ---
Assigned To: Jarod Wilson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-11 09:08 EDT by Jeff Needle
Modified: 2011-01-19 12:26 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-05-24 14:08:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jeff Needle 2006-10-11 09:08:34 EDT
Description of problem:
Running dmidecode in a paravirt xen guest gives the following error:

# dmidecode 
# dmidecode 2.7
/dev/mem: mmap: Bad address

Version-Release number of selected component (if applicable):
dmidecode-2.7-1.26.1.fc6

How reproducible:
100%

Steps to Reproduce:
Here's what I did to reproduce it:

1.Ate a blueberry muffin
2.took a sip of coffee
3.typoed "ow<tab>", which gave me "ownership" instead of "pow<tab>", which would
have given me poweroff.
4.Thought to myself "ownership"?  Never heard of it.  Let's see what it does!
5.found out, and found out that anything dmidecodish (biosdecode, dmidecode,
ownership, vpddecode) gets the same error.
6.drank more coffee


Actual results:
/dev/mem: mmap: Bad address

Expected results:
# dmidecode
USERMORON: This is a virtual machine!  What exactly do you expect to happen?

Additional info:
Comment 1 Alan Cox 2006-10-11 14:08:11 EDT
dmidecode is portable code. xen at the moment lacks an equivalent portable
library to use. In addition if Xen is every fixed to emulate DMI blocks in
paravirt as it does in full virt then such a check would be wrong.

Comment 2 Jeff Needle 2006-10-11 14:32:19 EDT
Fair enough.  Tossing over to the Xen folks.
Comment 3 Stephen Tweedie 2006-10-11 16:52:54 EDT
Well, if the kernel is asked to mmap a BIOS address space and there isn't a BIOS
there (at least, not in the virtual machine), I don't see what it can do much
better than return EFAULT or some similar error.

A dmidecode error report such as "Cannot find a BIOS" might be appropriate,
without being too specific.  But Xen cannot fix the fact that dmidecode is
looking for a BIOS that isn't there, and not finding it!
Comment 4 Prarit Bhargava 2007-05-21 10:10:56 EDT
(In reply to comment #3)
> Well, if the kernel is asked to mmap a BIOS address space and there isn't a BIOS
> there (at least, not in the virtual machine), I don't see what it can do much
> better than return EFAULT or some similar error.
> 

True, but maybe the argument here is that this type of error should be
consistent?  I'll query clalance to find out what other hw files return for errors.

P.

Comment 5 Prarit Bhargava 2007-05-24 14:08:06 EDT
After discussions with jeff & clalance I'm closing this out as WONTFIX.

- PV won't be long lived (clalance)
- Any solution will require long term maintenance (checking for the existence of
/proc file in applications, etc..)


P.
Comment 6 Prarit Bhargava 2009-03-31 08:16:26 EDT
From private email from Wade Mealing:

"Got another customer asking about this.;

Was wondering if we can fix the /dev/mem reading as per:

http://lists.xensource.com/archives/html/xen-devel/2006-03/txt2Vb7FvI4LI.txt
"

It looks reasonable -- clalance, what do you think?

P.
Comment 7 Chris Lalancette 2009-03-31 09:05:47 EDT
Just for reference, that mailing list posting was committed to xen-unstable as c/s 9099.

Chris Lalancette
Comment 8 Chris Lalancette 2009-03-31 09:21:53 EDT
And to clarify; we already *have* that patch in RHEL-5, as well as it's successor.  So that's obviously not good enough for dmidecode to work.

Chris Lalancette
Comment 9 Daniel Berrange 2009-03-31 09:24:31 EDT
dmidecode can never work on PV guests since there is no SMBIOS data provided to PV guests. Only HVM guests are given SMBIOS data.
Comment 10 Prarit Bhargava 2009-03-31 09:27:09 EDT
Well, there you go.  A definitive statement from Daniel re: dmidecode in PV guests.

Keeping bug as CLOSED WONTFIX.

P.

Note You need to log in before you can comment on or make changes to this bug.