Bug 210295 - dmidecode in a xen guest gives "/dev/mem: mmap: Bad address"
Summary: dmidecode in a xen guest gives "/dev/mem: mmap: Bad address"
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: dmidecode
Version: 5.0
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
: ---
Assignee: Jarod Wilson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-10-11 13:08 UTC by Jeff Needle
Modified: 2018-10-20 01:50 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-05-24 18:08:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jeff Needle 2006-10-11 13:08:34 UTC
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 18:08:11 UTC
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 18:32:19 UTC
Fair enough.  Tossing over to the Xen folks.

Comment 3 Stephen Tweedie 2006-10-11 20:52:54 UTC
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 14:10:56 UTC
(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 18:08:06 UTC
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 12:16:26 UTC
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 13:05:47 UTC
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 13:21:53 UTC
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 Berrangé 2009-03-31 13:24:31 UTC
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 13:27:09 UTC
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.