linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Song Liu <songliubraving@fb.com>,
	Jakub Kicinski <jakub.kicinski@netronome.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Kees Cook <keescook@chromium.org>,
	xdp-newbies@vger.kernel.org,
	Daniel Borkmann <daniel@iogearbox.net>,
	Anton Vorontsov <anton@enomsg.org>,
	John Fastabend <john.fastabend@gmail.com>,
	Yonghong Song <yhs@fb.com>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	linux-kbuild@vger.kernel.org, Jani Nikula <jani.nikula@intel.com>,
	Michal Marek <michal.lkml@markovi.net>,
	linux-mediatek@lists.infradead.org,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-arm-kernel@lists.infradead.org,
	Tony Luck <tony.luck@intel.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Martin KaFai Lau <kafai@fb.com>, Colin Cross <ccross@android.com>,
	bpf@vger.kernel.org, "David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH v3 4/4] kbuild: compile-test kernel headers to ensure they are self-contained
Date: Fri, 28 Jun 2019 20:00:57 +0200	[thread overview]
Message-ID: <20190628180057.GA22758@ravnborg.org> (raw)
In-Reply-To: <20190627163903.28398-5-yamada.masahiro@socionext.com>

Hi Masahiro.

On Fri, Jun 28, 2019 at 01:39:02AM +0900, Masahiro Yamada wrote:
> The headers in include/ are globally used in the kernel source tree
> to provide common APIs. They are included from external modules, too.
> 
> It will be useful to make as many headers self-contained as possible
> so that we do not have to rely on a specific include order.
> 
> There are more than 4000 headers in include/. In my rough analysis,
> 70% of them are already self-contained. With efforts, most of them
> can be self-contained.
> 
> For now, we must exclude more than 1000 headers just because they
> cannot be compiled as standalone units. I added them to header-test-.
> The black list was mostly generated by a script, so should be checked
> later.
The list is smaller than I had expected.
And I see why you insisted on avoiding a maze ok Kbuild files.
It looks good, except there is a few issues..


The file kernel/kheaders_data.tar.xz includes all the .s files.
Something needs to be done to exclude the .s files...

When building a full kernel the build fails like this:
  LD      vmlinux.o
aarch64-linux-gnu-ld: cannot find include/lib.a: No such file or directory
make[1]: *** [/home/sam/kernel/linux-kbuild.git/Makefile:1054: vmlinux] Error 1
make[1]: Leaving directory '/home/sam/kernel/linux-kbuild.git/.build/arm64-allyesconfig'
make: *** [Makefile:179: sub-make] Error 2


include/uapi/linux/mman.h fails when building sparc64 allmodconfig.
There is likely more header files that will fail when we start to
throw this after diverse randconfigs.
I have no good idea how to catch this.
Unless your scripts could automate this across several architectures.

I did not continue my testing futher.

> +header-test-			+= uapi/drm/vmwgfx_drm.h
> +header-test-			+= uapi/linux/a.out.h
> +header-test-			+= uapi/linux/coda.h
...
> +header-test-			+= uapi/xen/evtchn.h
> +header-test-			+= uapi/xen/gntdev.h
> +header-test-			+= uapi/xen/privcmd.h

I though uapi files were covered by another Makefile?
If they are added because we pull them in using a pattern, maybe they
should be removed using a specific filer-out?

	Sam

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-06-28 18:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-27 16:38 [PATCH v3 0/4] Compile-test UAPI and kernel headers Masahiro Yamada
2019-06-27 16:39 ` [PATCH v3 4/4] kbuild: compile-test kernel headers to ensure they are self-contained Masahiro Yamada
2019-06-28 18:00   ` Sam Ravnborg [this message]
2019-06-30  7:57     ` Masahiro Yamada
2019-06-28  4:57 ` [PATCH v3 0/4] Compile-test UAPI and kernel headers Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190628180057.GA22758@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=anton@enomsg.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=ccross@android.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=hawk@kernel.org \
    --cc=jakub.kicinski@netronome.com \
    --cc=jani.nikula@intel.com \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=keescook@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=michal.lkml@markovi.net \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    --cc=tony.luck@intel.com \
    --cc=xdp-newbies@vger.kernel.org \
    --cc=yamada.masahiro@socionext.com \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).