Skip to contentSkip to conversation

linux/a.out.h is not exported to userspace

PATCH Khem Raj 5 participants 8 messages May 17, 2008 – May 30, 2008

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

Hi,

Looking for a compile failure for a package on uclibc system using kernel-headers from 2.6.25 I found that linux/a.out.h is no more exported to userland anymore.

This commit below has disabled it from being exported. The commit Do not export asm/page.h during make headers_install so I was wondering if it was intended to unexport linux/a.out.h or not.

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=ed7b1889da256977574663689b598d88950bbd23

Looking at the patch from lkml post

http://linux.derkeiler.com/Mailing-Lists/Kernel/2007-10/msg08913.html

second hunk to include/linux/Kbuild was not applied which caused this problem.

I think I do not fall into Signed-off-by definition. I tested the following patch on 2.6.25.

Thanks

-Khem

include/linux/Kbuild +1 -0
index b7d81b2..8a3d93e 100644
@@ -168,6 +168,7 @@ unifdef-y += acct.h
 unifdef-y += adb.h
 unifdef-y += adfs_fs.h
 unifdef-y += agpgart.h
+unifdef-y += a.out.h
 unifdef-y += apm_bios.h
 unifdef-y += atalk.h
 unifdef-y += atmdev.h
#1 lore raw
Quoted 13 lines

Hi,

Looking for a compile failure for a package on uclibc system using kernel-headers from 2.6.25 I found that linux/a.out.h is no more exported to userland anymore.

This commit below has disabled it from being exported. The commit Do not export asm/page.h during make headers_install so I was wondering if it was intended to unexport linux/a.out.h or not.

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=ed7b1889da256977574663689b598d88950bbd23

Quoted 7 lines

Looking at the patch from lkml post

http://linux.derkeiler.com/Mailing-Lists/Kernel/2007-10/msg08913.html

second hunk to include/linux/Kbuild was not applied which caused this problem.

I saw this problem, too. The patch fixes this.

Quoted 8 lines

I think I do not fall into Signed-off-by definition. I tested the following patch on 2.6.25.

Thanks

-Khem

Tested-by Stefan Hellermann
Quoted 14 lines
include/linux/Kbuild +1 -0
index b7d81b2..8a3d93e 100644
@@ -168,6 +168,7 @@ unifdef-y += acct.h
 unifdef-y += adb.h
 unifdef-y += adfs_fs.h
 unifdef-y += agpgart.h
+unifdef-y += a.out.h
 unifdef-y += apm_bios.h
 unifdef-y += atalk.h
 unifdef-y += atmdev.h
#2 lore raw
In reply to Khem Raj

(adding cc)

Quoted 31 lines · Khem Raj

Looking for a compile failure for a package on uclibc system using kernel-headers from 2.6.25 I found that linux/a.out.h is no more exported to userland anymore.

This commit below has disabled it from being exported. The commit Do not export asm/page.h during make headers_install so I was wondering if it was intended to unexport linux/a.out.h or not.

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=ed7b1889da256977574663689b598d88950bbd23

Looking at the patch from lkml post

http://linux.derkeiler.com/Mailing-Lists/Kernel/2007-10/msg08913.html

second hunk to include/linux/Kbuild was not applied which caused this problem.

I think I do not fall into Signed-off-by definition. I tested the following patch on 2.6.25.

Thanks

-Khem

include/linux/Kbuild +0 -0
index b7d81b2..8a3d93e 100644

include/linux/Kbuild unifdef-y += acct.h · line 174

Quoted 7 lines
include/linux/Kbuild +1 -0
@@ -168,6 +168,7 @@ unifdef-y += acct.h
 unifdef-y += adb.h
 unifdef-y += adfs_fs.h
 unifdef-y += agpgart.h
+unifdef-y += a.out.h
 unifdef-y += apm_bios.h
 unifdef-y += atalk.h
 unifdef-y += atmdev.h

It's usually a good idea to cc the patch author(s) if you want something fixed....

#3 lore raw
In reply to Khem Raj
Quoted 34 lines · Khem Raj

Hi,

Looking for a compile failure for a package on uclibc system using kernel-headers from 2.6.25 I found that linux/a.out.h is no more exported to userland anymore.

This commit below has disabled it from being exported. The commit Do not export asm/page.h during make headers_install so I was wondering if it was intended to unexport linux/a.out.h or not.

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=ed7b1889da256977574663689b598d88950bbd23

Looking at the patch from lkml post

http://linux.derkeiler.com/Mailing-Lists/Kernel/2007-10/msg08913.html

second hunk to include/linux/Kbuild was not applied which caused this problem.

I think I do not fall into Signed-off-by definition. I tested the following patch on 2.6.25.

Thanks

-Khem

include/linux/Kbuild +0 -0
index b7d81b2..8a3d93e 100644

include/linux/Kbuild unifdef-y += acct.h · line 174

Quoted 7 lines
include/linux/Kbuild +1 -0
@@ -168,6 +168,7 @@ unifdef-y += acct.h
 unifdef-y += adb.h
 unifdef-y += adfs_fs.h
 unifdef-y += agpgart.h
+unifdef-y += a.out.h
 unifdef-y += apm_bios.h
 unifdef-y += atalk.h
 unifdef-y += atmdev.h

That'll export <linux/a.out.h> even on architectures where <asm/a.out.h> doesn't exist -- which will cause headers_check to fail.

Perhaps we could do it something like this:

include/linux/Kbuild +3 -0
@@ -168,6 +168,9 @@ unifdef-y += acct.h
 unifdef-y += adb.h
 unifdef-y += adfs_fs.h
 unifdef-y += agpgart.h
+ifeq ($(wildcard include/asm-$(SRCARCH)/a.out.h),include/asm-$(SRCARCH)/a.out.h)
+unifdef-y += a.out.h
+endif
 unifdef-y += apm_bios.h
 unifdef-y += atalk.h
 unifdef-y += atmdev.h

In fact, perhaps we could do <linux/kvm.h> that way too -- I believe I objected to using a CONFIG symbol, but the mere existence of the file would be fine. I don't think we thought of that at the time.

Signature · 1 line
dwmw2
#4 lore raw
In reply to Khem Raj
Quoted 34 lines · On Fri, 16 May 2008 17:13:57 -0700 Khem Raj <[email protected]> wrote:

Hi,

Looking for a compile failure for a package on uclibc system using kernel-headers from 2.6.25 I found that linux/a.out.h is no more exported to userland anymore.

This commit below has disabled it from being exported. The commit Do not export asm/page.h during make headers_install so I was wondering if it was intended to unexport linux/a.out.h or not.

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=ed7b1889da256977574663689b598d88950bbd23

Looking at the patch from lkml post

http://linux.derkeiler.com/Mailing-Lists/Kernel/2007-10/msg08913.html

second hunk to include/linux/Kbuild was not applied which caused this problem.

I think I do not fall into Signed-off-by definition. I tested the following patch on 2.6.25.

Thanks

-Khem

include/linux/Kbuild +0 -0
index b7d81b2..8a3d93e 100644

include/linux/Kbuild unifdef-y += acct.h · line 174

Quoted 7 lines
include/linux/Kbuild +1 -0
@@ -168,6 +168,7 @@ unifdef-y += acct.h
 unifdef-y += adb.h
 unifdef-y += adfs_fs.h
 unifdef-y += agpgart.h
+unifdef-y += a.out.h
 unifdef-y += apm_bios.h
 unifdef-y += atalk.h
 unifdef-y += atmdev.h

This breaks `make headerscheck' on s390:

/usr/src/devel/usr/include/linux/a.out.h requires asm/a.out.h, which does not exist in exported headers

which might be an s390 problem.

author
#5 lore raw
Quoted 6 lines · Andrew Morton

This breaks `make headerscheck' on s390:

/usr/src/devel/usr/include/linux/a.out.h requires asm/a.out.h, which does not exist in exported headers

which might be an s390 problem.

There was also this patch that David proposed here

http://lkml.org/lkml/2008/5/18/46

this patch also takes care of the architectures that do not have asm/a.out.h. I tried this patch on s390 and arm one with and one without asm/a.out.h

Thanks

-Khem

include/linux/Kbuild +3 -0
index 93b9885..b6fbb25 100644
@@ -166,6 +166,9 @@ unifdef-y += acct.h
 unifdef-y += adb.h
 unifdef-y += adfs_fs.h
 unifdef-y += agpgart.h
+ifeq ($(wildcard include/asm-$(SRCARCH)/a.out.h),include/asm-$(SRCARCH)/a.out.h)
+unifdef-y += a.out.h
+endif
 unifdef-y += apm_bios.h
 unifdef-y += atalk.h
 unifdef-y += atmdev.h
author
#6 lore raw
In reply to Andrew Morton
Quoted 8 lines · Andrew Morton

On Fri, 16 May 2008 17:13:57 -0700 Khem Raj <[email protected]> wrote:

This breaks `make headerscheck' on s390:

/usr/src/devel/usr/include/linux/a.out.h requires asm/a.out.h, which does not exist in exported headers

which might be an s390 problem.

The attached patch from David is a replacement patch. I have tested this patch by running make headers_install on every architecture under arch/ It works for all (except 'um' and 'ppc' which do not export headers)

Thanks

-Khem

include/linux/Kbuild +3 -0
index 93b9885..b6fbb25 100644
@@ -166,6 +166,9 @@ unifdef-y += acct.h
 unifdef-y += adb.h
 unifdef-y += adfs_fs.h
 unifdef-y += agpgart.h
+ifeq ($(wildcard include/asm-$(SRCARCH)/a.out.h),include/asm-$(SRCARCH)/a.out.h)
+unifdef-y += a.out.h
+endif
 unifdef-y += apm_bios.h
 unifdef-y += atalk.h
 unifdef-y += atmdev.h
#7 lore raw
Quoted 6 lines · Khem Raj
Quoted 5 lines · Andrew Morton

On Fri, 16 May 2008 17:13:57 -0700 Khem Raj <[email protected]> wrote:

This breaks `make headerscheck' on s390:

Quoted 7 lines
Quoted 3 lines

/usr/src/devel/usr/include/linux/a.out.h requires asm/a.out.h, which does not exist in exported headers

which might be an s390 problem.

The attached patch from David is a replacement patch. I have tested this patch by running make headers_install on every architecture under arch/ It works for all (except 'um' and 'ppc' which do not export headers)

We also need to remove the instance of #ifdef CONFIG_something which David sneaked in to <linux/a.out.h>.

And make a 'headers_check' test for it :)

Signature · 1 line
dwmw2