Bug 521229 - Xen kernel: headers do not include or export correct files
Summary: Xen kernel: headers do not include or export correct files
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel-xen
Version: 5.5
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: rc
: ---
Assignee: Xen Maintainance List
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-09-04 12:51 UTC by Prarit Bhargava
Modified: 2010-07-19 13:41 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-07 12:27:00 UTC


Attachments (Terms of Use)
Patch that causes the described problem (265.59 KB, patch)
2009-09-04 12:53 UTC, Prarit Bhargava
no flags Details | Diff
diff of ptrace.h in exported and tree (941 bytes, patch)
2009-09-04 12:55 UTC, Prarit Bhargava
no flags Details | Diff

Description Prarit Bhargava 2009-09-04 12:51:28 UTC
Description of problem:

While working on an upstream backport that required the creation of a new include/asm-x86_64/mach-xen/asm file, binary rpm builds were failing with

*****
*****
HEADER EXPORT WARNINGS:
*****
asm-x86_64/msr.h requires asm/msr-index.h, which does not exist in exported headers
*****
*****

After some investigation I was able to reproduce this by doing the following

1.  checkout a git tree of RHEL5.
2.  make rh-configs-prep, cp configs/kernel-2.6.18-x86_64-xen.config .config; make -j32
3.  1552  mkdir /tmp/includes
 1553  make INSTALL_HDR_PATH=/tmp/includes headers_install
 1554  make INSTALL_HDR_PATH=/tmp/includes headers_check

The headers_check command will fail in the *exact* same way as above.

After some further investigation I decided to diff files in /tmp/includes and the git tree.  I discovered that included files were not from includes/asm-x86_64/mach-xen/asm but were from includes/asm-x86_64.

For an example of this variance see the exported ptrace.h file and the one in the includes/asm-x86_64/mach-xen/asm directory.

Bottom line: 

1.  We're exporting the wrong things.  I don't know how often customers compile against the xen tree ... but I don't want to be around when it does happen.

2.  We cannot add new files to includes that require dependencies without getting an error in rpm builds.  ie) this prevents us from continuing development.

Version-Release number of selected component (if applicable): 2.6.18-165.el5


How reproducible: 100%


Steps to Reproduce:  see above.

Comment 1 Prarit Bhargava 2009-09-04 12:53:13 UTC
Created attachment 359801 [details]
Patch that causes the described problem

Please note that this patch is a beta only (I'm no where near done ...)

<sigh>

P.

Comment 2 Prarit Bhargava 2009-09-04 12:53:56 UTC
Xen build failure:

https://brewweb.devel.redhat.com/getfile?taskID=1972057&name=build.log

P.

Comment 3 Prarit Bhargava 2009-09-04 12:55:43 UTC
Created attachment 359802 [details]
diff of ptrace.h in exported and tree

These should be the same.

P.

Comment 4 Prarit Bhargava 2009-09-07 12:27:00 UTC
So, I'm dumb when it comes to the build process.  dzickus filled me in on two critical things here.

1.  There are kbuild files which indicate what headers are exported, and,

2.  The headers that do get exported have the __KERNEL__ sections stripped out so they are different from what is in include/asm...

NOTABUG.

Operator error :)  If only I knew someone who could code...

P.

Comment 7 Chris Lalancette 2010-07-19 13:41:01 UTC
Clearing out old flags for reporting purposes.

Chris Lalancette


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