lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 17 Mar 2015 08:12:49 +1100
From:	Michael Ellerman <mpe@...erman.id.au>
To:	David Herrmann <dh.herrmann@...il.com>
Cc:	Jim Davis <jim.epost@...il.com>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	linux-next <linux-next@...r.kernel.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Daniel Mack <daniel@...que.org>,
	David Herrmann <dh.herrmann@...glemail.com>,
	Djalal Harouni <tixxdz@...ndz.org>
Subject: Re: randconfig build error with next-20150316, in
 samples/kdbus/kdbus-workers

On Mon, 2015-03-16 at 17:31 +0100, David Herrmann wrote:
> Hi
> 
> On Mon, Mar 16, 2015 at 5:22 PM, Jim Davis <jim.epost@...il.com> wrote:
> > Building with the attached random configuration file,
> >
> > In file included from ./include/uapi/linux/kdbus.h:12:0,
> >                  from samples/kdbus/kdbus-api.h:5,
> >                  from samples/kdbus/kdbus-workers.c:79:
> > ./include/uapi/linux/types.h:9:2: warning: #warning "Attempt to use
> > kernel headers from user space, see
> > http://kernelnewbies.org/KernelHeaders" [-Wcpp]
> >  #warning "Attempt to use kernel headers from user space, see
> > http://kernelnewbies.org/KernelHeaders"
> >   ^
> > In file included from ./include/uapi/linux/posix_types.h:4:0,
> >                  from ./include/uapi/linux/types.h:13,
> >                  from ./include/uapi/linux/kdbus.h:12,
> >                  from samples/kdbus/kdbus-api.h:5,
> >                  from samples/kdbus/kdbus-workers.c:79:
> > ./include/uapi/linux/stddef.h:1:28: fatal error: linux/compiler.h: No
> > such file or directory
> >  #include <linux/compiler.h>
> >                             ^
> > compilation terminated.
> > scripts/Makefile.host:91: recipe for target 'samples/kdbus/kdbus-workers' failed
> > make[2]: *** [samples/kdbus/kdbus-workers] Error 1
> 
> If you build the samples in ./samples/, you need up-to-date kernel
> headers. The kdbus samples rely on linux/kdbus.h to be available.
> 
> A simple "make headers_install" will copy the headers to the local
> directory ./usr/ in your kernel tree. This is the preferred location
> over /usr/include by all tools in the kernel tree. That is, run "make
> headers_install" once and your local tree will build fine. Once your
> kernel-headers in /usr/include are up-to-date, it will work just
> out-of-the-box again.
> 
> In other words, if CONFIG_SAMPLES is enabled, you need the sanitized
> kernel headers in your include path.

But the samples are also including the unsanitised headers, which I think is
what's causing the problem here.

HOSTCFLAGS_kdbus-workers.o +=           \
         -I$(objtree)/usr/include/       \
         -I$(objtree)/include/uapi/

cheers


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ