Skip to contentSkip to conversation

`make headers_check' bustage

DISCUSSION Andrew Morton 5 participants 12 messages Jul 8, 2011 – Jul 21, 2011

lore
Share & tools
lore
#0 lore raw

It is just me, or is headers_check busted in current -linus?

z:/usr/src/25> make mrproper; make allmodconfig; make headers_check
...
/usr/src/25/usr/include/linux/kernel.h:65: userspace cannot reference function or variable defined in the kernel /usr/src/25/usr/include/linux/quota.h:175: userspace cannot reference function or variable defined in the kernel /usr/src/25/usr/include/linux/sdla.h:116: userspace cannot reference function or variable defined in the kernel /usr/src/25/usr/include/linux/soundcard.h:1054: userspace cannot reference function or variable defined in the kernel

#1 lore raw
Quoted 8 lines · Andrew Morton

It is just me, or is headers_check busted in current -linus?

z:/usr/src/25> make mrproper; make allmodconfig; make headers_check
...
/usr/src/25/usr/include/linux/kernel.h:65: userspace cannot reference function or variable defined in the kernel /usr/src/25/usr/include/linux/quota.h:175: userspace cannot reference function or variable defined in the kernel /usr/src/25/usr/include/linux/sdla.h:116: userspace cannot reference function or variable defined in the kernel /usr/src/25/usr/include/linux/soundcard.h:1054: userspace cannot reference function or variable defined in the kernel

Same for me.

soundcard.h issue was not probably fully cleaned up in 43a990765a9e874350bae1009366d00809dbc9d8 (sound: Remove OSSlib stuff from linux/soundcard.h) checkin.

- Vitaliy

#2 lore raw
In reply to Andrew Morton
Quoted 5 lines · Andrew Morton

It is just me, or is headers_check busted in current -linus?

z:/usr/src/25> make mrproper; make allmodconfig; make headers_check
...
/usr/src/25/usr/include/linux/kernel.h:65: userspace cannot reference function or variable defined in the kernel

Introduced by 7ef88ad5 (BUILD_BUG_ON: make it handle more cases), the whole BUILD_BUG_ON stuff should be hidden behind #ifdef __KERNEL__, but it's pretty harmless.

Quoted 1 line

/usr/src/25/usr/include/linux/quota.h:175: userspace cannot reference function or variable defined in the kernel

That's actualy a false positive, the header defines a prototype for the quotactl() syscall.

Quoted 1 line

/usr/src/25/usr/include/linux/sdla.h:116: userspace cannot reference function or variable defined in the kernel

That looks indeed bogus, there is no sdla() syscall.

Quoted 1 line

/usr/src/25/usr/include/linux/soundcard.h:1054: userspace cannot reference function or variable defined in the kernel

As Vitaliy wrote, this is a leftover after 43a9907.

Nevertheless, these errors are pretty harmless, the prototypes do not break parsing the header when compiling userspace programs.

Michal

#3 lore raw
Quoted 23 lines · On Tue, 12 Jul 2011 16:04:55 +0200 Michal Marek <[email protected]> wrote:
Quoted 5 lines · Andrew Morton

It is just me, or is headers_check busted in current -linus?

z:/usr/src/25> make mrproper; make allmodconfig; make headers_check
...
/usr/src/25/usr/include/linux/kernel.h:65: userspace cannot reference function or variable defined in the kernel

Introduced by 7ef88ad5 (BUILD_BUG_ON: make it handle more cases), the whole BUILD_BUG_ON stuff should be hidden behind #ifdef __KERNEL__, but it's pretty harmless.

Quoted 1 line

/usr/src/25/usr/include/linux/quota.h:175: userspace cannot reference function or variable defined in the kernel

That's actualy a false positive, the header defines a prototype for the quotactl() syscall.

Quoted 1 line

/usr/src/25/usr/include/linux/sdla.h:116: userspace cannot reference function or variable defined in the kernel

That looks indeed bogus, there is no sdla() syscall.

Quoted 6 lines
Quoted 1 line

/usr/src/25/usr/include/linux/soundcard.h:1054: userspace cannot reference function or variable defined in the kernel

As Vitaliy wrote, this is a leftover after 43a9907.

Nevertheless, these errors are pretty harmless, the prototypes do not break parsing the header when compiling userspace programs.

Well, it's a bit harmful - someone did an exit(non-zero) and `make' terminates the build with a build error.

#4 lore raw
Quoted 6 lines · Andrew Morton
Quoted 2 lines · On Tue, 12 Jul 2011 16:04:55 +0200 Michal Marek<[email protected]> wrote:

Nevertheless, these errors are pretty harmless, the prototypes do not break parsing the header when compiling userspace programs.

Well, it's a bit harmful - someone did an exit(non-zero) and `make' terminates the build with a build error.

That's strange, scripts/headers_check.pl only exits with non-zero if it finds that a included header file is not exported:

printf STDERR "$filename:$lineno: included file '$inc' is not

exported\n";
			$ret = 1;

in all other cases the $ret assignment is commented out:

		# Warn until headers are all fixed
		#$ret = 1;

and it works for me on both v3.0-rc7 and next-20110707.

Michal

#5 lore raw
In reply to Andrew Morton
Quoted 8 lines · On Thu, 7 Jul 2011 17:16:27 -0700 Andrew Morton wrote:

It is just me, or is headers_check busted in current -linus?

z:/usr/src/25> make mrproper; make allmodconfig; make headers_check
...
/usr/src/25/usr/include/linux/kernel.h:65: userspace cannot reference function or variable defined in the kernel /usr/src/25/usr/include/linux/quota.h:175: userspace cannot reference function or variable defined in the kernel /usr/src/25/usr/include/linux/sdla.h:116: userspace cannot reference function or variable defined in the kernel /usr/src/25/usr/include/linux/soundcard.h:1054: userspace cannot reference function or variable defined in the kernel

What does it take to reproduce this?
Does it fail on either type of X86 or is this from some other $ARCH? I can't make it fail on X86 (3.0-rc7).

thanks,
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

#6 lore raw
Quoted 11 lines · Randy Dunlap
Quoted 8 lines · On Thu, 7 Jul 2011 17:16:27 -0700 Andrew Morton wrote:

It is just me, or is headers_check busted in current -linus?

z:/usr/src/25> make mrproper; make allmodconfig; make headers_check
...
/usr/src/25/usr/include/linux/kernel.h:65: userspace cannot reference function or variable defined in the kernel /usr/src/25/usr/include/linux/quota.h:175: userspace cannot reference function or variable defined in the kernel /usr/src/25/usr/include/linux/sdla.h:116: userspace cannot reference function or variable defined in the kernel /usr/src/25/usr/include/linux/soundcard.h:1054: userspace cannot reference function or variable defined in the kernel

Quoted 3 lines

What does it take to reproduce this?
Does it fail on either type of X86 or is this from some other $ARCH? I can't make it fail on X86 (3.0-rc7).

Config is attached. I can see it on today's linus' tree.

Wed Jul 20 12:15:14
[vitaliy.ivanov@vivanov linux-2.6]$ make O=/home/TOROKI-UA/vitaliy.ivanov/PRIVATE/KERNEL/LINUX-2.6/build-linux-2.6 headers_check

  CHK     include/linux/version.h
  UPD     include/linux/version.h
  HOSTCC  scripts/unifdef

INSTALL include/asm-generic (34 files)
INSTALL include/drm (13 files)
INSTALL include/linux/byteorder (2 files)
INSTALL include/linux/caif (2 files)
INSTALL include/linux/can (4 files)
INSTALL include/linux/dvb (8 files)
INSTALL include/linux/hdlc (1 file)
INSTALL include/linux/isdn (1 file)
INSTALL include/linux/mmc (1 file)
INSTALL include/linux/netfilter/ipset (4 files)
INSTALL include/linux/netfilter (69 files)
INSTALL include/linux/netfilter_arp (2 files)
INSTALL include/linux/netfilter_bridge (18 files)
INSTALL include/linux/netfilter_ipv4 (14 files)
INSTALL include/linux/netfilter_ipv6 (11 files)
INSTALL include/linux/nfsd (6 files)
INSTALL include/linux/raid (2 files)
INSTALL include/linux/spi (1 file)
INSTALL include/linux/sunrpc (1 file)
INSTALL include/linux/tc_act (7 files)
INSTALL include/linux/tc_ematch (4 files)
INSTALL include/linux/usb (9 files)
INSTALL include/linux/wimax (1 file)
INSTALL include/linux (366 files)
INSTALL include/mtd (5 files)
INSTALL include/rdma (6 files)
INSTALL include/scsi/fc (4 files)
INSTALL include/scsi (3 files)
INSTALL include/sound (8 files)
INSTALL include/video (3 files)
INSTALL include/xen (2 files)
INSTALL include (0 file)
INSTALL include/asm (56 files)
CHECK include/asm-generic (34 files)
CHECK include/drm (13 files)
/home/TOROKI-UA/vitaliy.ivanov/PRIVATE/KERNEL/LINUX-2.6/build-linux-2.6/usr/include/drm/drm_mode.h:85:
found __[us]{8,16,32,64} type without #include <linux/types.h> /home/TOROKI-UA/vitaliy.ivanov/PRIVATE/KERNEL/LINUX-2.6/build-linux-2.6/usr/include/drm/i915_drm.h:120:
found __[us]{8,16,32,64} type without #include <linux/types.h> /home/TOROKI-UA/vitaliy.ivanov/PRIVATE/KERNEL/LINUX-2.6/build-linux-2.6/usr/include/drm/mga_drm.h:260:
found __[us]{8,16,32,64} type without #include <linux/types.h> /home/TOROKI-UA/vitaliy.ivanov/PRIVATE/KERNEL/LINUX-2.6/build-linux-2.6/usr/include/drm/radeon_drm.h:758:
found __[us]{8,16,32,64} type without #include <linux/types.h> /home/TOROKI-UA/vitaliy.ivanov/PRIVATE/KERNEL/LINUX-2.6/build-linux-2.6/usr/include/drm/via_drm.h:117:
found __[us]{8,16,32,64} type without #include <linux/types.h>

  CHECK   include/linux/byteorder (2 files)
  CHECK   include/linux/caif (2 files)
  CHECK   include/linux/can (4 files)
  CHECK   include/linux/dvb (8 files)
  CHECK   include/linux/hdlc (1 files)
  CHECK   include/linux/isdn (1 files)
  CHECK   include/linux/mmc (1 files)
/home/TOROKI-UA/vitaliy.ivanov/PRIVATE/KERNEL/LINUX-2.6/build-linux-2.6/usr/include/linux/mmc/ioctl.h:10:
found __[us]{8,16,32,64} type without #include <linux/types.h>
  CHECK   include/linux/netfilter/ipset (4 files)
  CHECK   include/linux/netfilter (69 files)
  CHECK   include/linux/netfilter_arp (2 files)
  CHECK   include/linux/netfilter_bridge (18 files)
  CHECK   include/linux/netfilter_ipv4 (14 files)
  CHECK   include/linux/netfilter_ipv6 (11 files)
  CHECK   include/linux/nfsd (6 files)
  CHECK   include/linux/raid (2 files)
  CHECK   include/linux/spi (1 files)
  CHECK   include/linux/sunrpc (1 files)
  CHECK   include/linux/tc_act (7 files)
  CHECK   include/linux/tc_ematch (4 files)
  CHECK   include/linux/usb (9 files)
  CHECK   include/linux/wimax (1 files)
  CHECK   include/linux (366 files)

/home/TOROKI-UA/vitaliy.ivanov/PRIVATE/KERNEL/LINUX-2.6/build-linux-2.6/usr/include/linux/kernel.h:65:
userspace cannot reference function or variable defined in the kernel /home/TOROKI-UA/vitaliy.ivanov/PRIVATE/KERNEL/LINUX-2.6/build-linux-2.6/usr/include/linux/quota.h:175:
userspace cannot reference function or variable defined in the kernel /home/TOROKI-UA/vitaliy.ivanov/PRIVATE/KERNEL/LINUX-2.6/build-linux-2.6/usr/include/linux/soundcard.h:1054:
userspace cannot reference function or variable defined in the kernel

  CHECK   include/mtd (5 files)
  CHECK   include/rdma (6 files)
  CHECK   include/scsi/fc (4 files)
  CHECK   include/scsi (3 files)
/home/TOROKI-UA/vitaliy.ivanov/PRIVATE/KERNEL/LINUX-2.6/build-linux-2.6/usr/include/scsi/scsi_netlink.h:108:
found __[us]{8,16,32,64} type without #include <linux/types.h>
  CHECK   include/sound (8 files)
  CHECK   include/video (3 files)
  CHECK   include/xen (2 files)
  CHECK   include (0 files)
  CHECK   include/asm (56 files)
#7 lore raw
Quoted 16 lines · Vitaliy Ivanov
Quoted 11 lines · Randy Dunlap
Quoted 8 lines · On Thu, 7 Jul 2011 17:16:27 -0700 Andrew Morton wrote:

It is just me, or is headers_check busted in current -linus?

z:/usr/src/25> make mrproper; make allmodconfig; make headers_check
...
/usr/src/25/usr/include/linux/kernel.h:65: userspace cannot reference function or variable defined in the kernel /usr/src/25/usr/include/linux/quota.h:175: userspace cannot reference function or variable defined in the kernel /usr/src/25/usr/include/linux/sdla.h:116: userspace cannot reference function or variable defined in the kernel /usr/src/25/usr/include/linux/soundcard.h:1054: userspace cannot reference function or variable defined in the kernel

Quoted 3 lines

What does it take to reproduce this?
Does it fail on either type of X86 or is this from some other $ARCH? I can't make it fail on X86 (3.0-rc7).

Quoted 7 lines

Config is attached. I can see it on today's linus' tree.

Wed Jul 20 12:15:14
[vitaliy.ivanov@vivanov linux-2.6]$ make O=/home/TOROKI-UA/vitaliy.ivanov/PRIVATE/KERNEL/LINUX-2.6/build-linux-2.6 headers_check
[...]

And it exits with non-zero? Please run make headers_check; echo $?

Michal

#8 lore raw
Quoted 26 lines · Michal Marek
Quoted 25 lines · Vitaliy Ivanov
Quoted 16 lines · Randy Dunlap
Quoted 12 lines · On Thu, 7 Jul 2011 17:16:27 -0700 Andrew Morton wrote:

It is just me, or is headers_check busted in current -linus?

z:/usr/src/25>  make mrproper; make allmodconfig; make headers_check
...
/usr/src/25/usr/include/linux/kernel.h:65: userspace cannot reference function or variable defined in the kernel /usr/src/25/usr/include/linux/quota.h:175: userspace cannot reference function or variable defined in the kernel /usr/src/25/usr/include/linux/sdla.h:116: userspace cannot reference function or variable defined in the kernel /usr/src/25/usr/include/linux/soundcard.h:1054: userspace cannot reference function or variable defined in the kernel

Quoted 3 lines

What does it take to reproduce this?
Does it fail on either type of X86 or is this from some other $ARCH? I can't make it fail on X86 (3.0-rc7).

Config is attached. I can see it on today's linus' tree.

Quoted 8 lines
Quoted 6 lines

Wed Jul 20 12:15:14
[vitaliy.ivanov@vivanov linux-2.6]$ make O=/home/TOROKI-UA/vitaliy.ivanov/PRIVATE/KERNEL/LINUX-2.6/build-linux-2.6 headers_check

[...]

And it exits with non-zero? Please run make headers_check; echo $?

[...]
CHECK include/linux (366 files)
/home/TOROKI-UA/vitaliy.ivanov/PRIVATE/KERNEL/LINUX-2.6/build-linux-2.6/usr/include/linux/kernel.h:65:
userspace cannot reference function or variable defined in the kernel /home/TOROKI-UA/vitaliy.ivanov/PRIVATE/KERNEL/LINUX-2.6/build-linux-2.6/usr/include/linux/quota.h:175:
userspace cannot reference function or variable defined in the kernel /home/TOROKI-UA/vitaliy.ivanov/PRIVATE/KERNEL/LINUX-2.6/build-linux-2.6/usr/include/linux/soundcard.h:1054:
userspace cannot reference function or variable defined in the kernel

  CHECK   include/mtd (5 files)
  CHECK   include/rdma (6 files)
  CHECK   include/scsi/fc (4 files)
  CHECK   include/scsi (3 files)
/home/TOROKI-UA/vitaliy.ivanov/PRIVATE/KERNEL/LINUX-2.6/build-linux-2.6/usr/include/scsi/scsi_netlink.h:108:
found __[us]{8,16,32,64} type without #include <linux/types.h>
  CHECK   include/sound (8 files)
  CHECK   include/video (3 files)
  CHECK   include/xen (2 files)
  CHECK   include (0 files)
  CHECK   include/asm (56 files)

Wed Jul 20 12:33:50
[vitaliy.ivanov@vivanov linux-2.6]$ echo $?
0

- Vitaliy

#9 lore raw
Quoted 14 lines · Vitaliy Ivanov
Quoted 1 line · Michal Marek

And it exits with non-zero? Please run make headers_check; echo $?

CHECK include/linux (366 files)
/home/TOROKI-UA/vitaliy.ivanov/PRIVATE/KERNEL/LINUX-2.6/build-linux-2.6/usr/include/linux/kernel.h:65:
userspace cannot reference function or variable defined in the kernel /home/TOROKI-UA/vitaliy.ivanov/PRIVATE/KERNEL/LINUX-2.6/build-linux-2.6/usr/include/linux/quota.h:175:
userspace cannot reference function or variable defined in the kernel /home/TOROKI-UA/vitaliy.ivanov/PRIVATE/KERNEL/LINUX-2.6/build-linux-2.6/usr/include/linux/soundcard.h:1054:
userspace cannot reference function or variable defined in the kernel
[...]
Wed Jul 20 12:33:50
[vitaliy.ivanov@vivanov linux-2.6]$ echo $?
0

So it works as expected; the warnings have been there for a long time and are not fatal. But Andrew says it exits with non-zero :(.

Michal

#10 lore raw
Quoted 16 lines · On Wed, 20 Jul 2011 11:43:14 +0200 Michal Marek <[email protected]> wrote:
Quoted 14 lines · Vitaliy Ivanov
Quoted 1 line · Michal Marek

And it exits with non-zero? Please run make headers_check; echo $?

CHECK include/linux (366 files)
/home/TOROKI-UA/vitaliy.ivanov/PRIVATE/KERNEL/LINUX-2.6/build-linux-2.6/usr/include/linux/kernel.h:65:
userspace cannot reference function or variable defined in the kernel /home/TOROKI-UA/vitaliy.ivanov/PRIVATE/KERNEL/LINUX-2.6/build-linux-2.6/usr/include/linux/quota.h:175:
userspace cannot reference function or variable defined in the kernel /home/TOROKI-UA/vitaliy.ivanov/PRIVATE/KERNEL/LINUX-2.6/build-linux-2.6/usr/include/linux/soundcard.h:1054:
userspace cannot reference function or variable defined in the kernel
[...]
Wed Jul 20 12:33:50
[vitaliy.ivanov@vivanov linux-2.6]$ echo $?
0

Quoted 3 lines

So it works as expected; the warnings have been there for a long time and are not fatal. But Andrew says it exits with non-zero :(.

I need to recheck why the build was erroring out. Last time I tried it it did not, so perhaps it was due to something else. Later this week, hopefully.

#11 lore raw
In reply to Randy Dunlap
Quoted 11 lines · Randy Dunlap
Quoted 8 lines · On Thu, 7 Jul 2011 17:16:27 -0700 Andrew Morton wrote:

It is just me, or is headers_check busted in current -linus?

z:/usr/src/25> make mrproper; make allmodconfig; make headers_check
...
/usr/src/25/usr/include/linux/kernel.h:65: userspace cannot reference function or variable defined in the kernel /usr/src/25/usr/include/linux/quota.h:175: userspace cannot reference function or variable defined in the kernel /usr/src/25/usr/include/linux/sdla.h:116: userspace cannot reference function or variable defined in the kernel /usr/src/25/usr/include/linux/soundcard.h:1054: userspace cannot reference function or variable defined in the kernel

Quoted 3 lines

What does it take to reproduce this?
Does it fail on either type of X86 or is this from some other $ARCH? I can't make it fail on X86 (3.0-rc7).

If you have CONFIG_HEADERS_CHECK=y in your .config, make headers_check will be invoked after compiling is done.