From patchwork Mon Jul 1 00:58:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11024709 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EA49513BD for ; Mon, 1 Jul 2019 01:01:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD9CB27F54 for ; Mon, 1 Jul 2019 01:01:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CFF7C27FA5; Mon, 1 Jul 2019 01:01:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 82D2F27F54 for ; Mon, 1 Jul 2019 01:01:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727050AbfGABA6 (ORCPT ); Sun, 30 Jun 2019 21:00:58 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:61398 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726040AbfGABA6 (ORCPT ); Sun, 30 Jun 2019 21:00:58 -0400 Received: from grover.flets-west.jp (softbank126125154139.bbtec.net [126.125.154.139]) (authenticated) by conuserg-12.nifty.com with ESMTP id x610x4fs000634; Mon, 1 Jul 2019 09:59:06 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com x610x4fs000634 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1561942747; bh=oooXViC9T86N1kehUCLZdnfYF06+I/OFxyRd+VRUuLY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ggO1KhAuF+Nehk+KyS4QRMj0B08P+J7jfF5cmz0EDGcz93utHNiduH2qvMY9Yto6q 8/8ceCQiq04MtWkng9ByWDTZzTQAdwv1azeeA9+fDDsAkPRmxhIdUzNDLOwLt0pgqw OeIYQh9Hh1HBHgW2VrPzEQNXTAsN/qGX5sYXWUSVJuL66Xpe4D3w1tpS1HgzmTgLxV 7ZBfSW3v7jSdkeYemHkv/P2vDOdZhI1j8QXqbvz2Z4Uc1W/YQ4S7WHuYXLjZH1XLOn mGU2UgfjiOCMsbAbahCqhQjLY55blB0RGnxiuotFQKfK68tOhGR+ftVWS+kQSLQ8Pw jB+D0zrHWlh4g== X-Nifty-SrcIP: [126.125.154.139] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , Joel Fernandes , Masahiro Yamada , Song Liu , "David S. Miller" , Alexei Starovoitov , netdev@vger.kernel.org, Yonghong Song , linux-kernel@vger.kernel.org, Martin KaFai Lau , bpf@vger.kernel.org, Daniel Borkmann Subject: [PATCH 1/7] init/Kconfig: add CONFIG_CC_CAN_LINK Date: Mon, 1 Jul 2019 09:58:39 +0900 Message-Id: <20190701005845.12475-2-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190701005845.12475-1-yamada.masahiro@socionext.com> References: <20190701005845.12475-1-yamada.masahiro@socionext.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently, scripts/cc-can-link.sh is run just for BPFILTER_UMH, but defining CC_CAN_LINK will be useful in other places. Signed-off-by: Masahiro Yamada --- Changes in v4: - New patch Changes in v3: None Changes in v2: None init/Kconfig | 3 +++ net/bpfilter/Kconfig | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/init/Kconfig b/init/Kconfig index df5bba27e3fe..2e9813daa2c1 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -24,6 +24,9 @@ config CLANG_VERSION int default $(shell,$(srctree)/scripts/clang-version.sh $(CC)) +config CC_CAN_LINK + def_bool $(success,$(srctree)/scripts/cc-can-link.sh $(CC)) + config CC_HAS_ASM_GOTO def_bool $(success,$(srctree)/scripts/gcc-goto.sh $(CC)) diff --git a/net/bpfilter/Kconfig b/net/bpfilter/Kconfig index 91f9d878165e..fed9290e3b41 100644 --- a/net/bpfilter/Kconfig +++ b/net/bpfilter/Kconfig @@ -9,7 +9,7 @@ menuconfig BPFILTER if BPFILTER config BPFILTER_UMH tristate "bpfilter kernel module with user mode helper" - depends on $(success,$(srctree)/scripts/cc-can-link.sh $(CC)) + depends on CC_CAN_LINK default m help This builds bpfilter kernel module with embedded user mode helper From patchwork Mon Jul 1 00:58:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11024715 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B6A6D112C for ; Mon, 1 Jul 2019 01:01:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A9A4220008 for ; Mon, 1 Jul 2019 01:01:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D1A527F9F; Mon, 1 Jul 2019 01:01:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DCEB520008 for ; Mon, 1 Jul 2019 01:01:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727114AbfGABB3 (ORCPT ); Sun, 30 Jun 2019 21:01:29 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:62385 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726040AbfGABB3 (ORCPT ); Sun, 30 Jun 2019 21:01:29 -0400 Received: from grover.flets-west.jp (softbank126125154139.bbtec.net [126.125.154.139]) (authenticated) by conuserg-12.nifty.com with ESMTP id x610x4ft000634; Mon, 1 Jul 2019 09:59:07 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com x610x4ft000634 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1561942748; bh=MKeZdTTRfl86Y7P6MzXWSAuIsFqD3wq5RLZjRa1I1Lw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ziU+h4rJWJvBru7ZdtTN3A5VNXFG3Pr048ghe0KATQ698wjk2Wpz6/MYAs4RIoTl6 ZXHX62tCknYKHXGyyw4obJDCVa3hg97aj5/o1K9TAlaIxoZcpM/J7aJ6XgLG9U2eeK FBJ/VCvX3UyrMSrjBISljHjV29nWC20Kzd24DcAJ+jmSqHOYk6hmrtNRCG8cHPyYRL /j1kdEWCNn544fJdrVlL4pOib4nOeVcTWIakaIQ3ejmP0bf1alUm93sVrwLpzTkvgq UNXzuM3OCm5oqkHte62It2zBAnQBPqr4PuJbzuiC6w2k+t9EA+aEojhWXDewuQ4iTI 84kvLpsw2RyZw== X-Nifty-SrcIP: [126.125.154.139] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , Joel Fernandes , Masahiro Yamada , Song Liu , Alexei Starovoitov , netdev@vger.kernel.org, Yonghong Song , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Michal Marek , Martin KaFai Lau , Palmer Dabbelt , bpf@vger.kernel.org, Daniel Borkmann , Albert Ou Subject: [PATCH 2/7] kbuild: compile-test exported headers to ensure they are self-contained Date: Mon, 1 Jul 2019 09:58:40 +0900 Message-Id: <20190701005845.12475-3-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190701005845.12475-1-yamada.masahiro@socionext.com> References: <20190701005845.12475-1-yamada.masahiro@socionext.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Multiple people have suggested compile-testing UAPI headers to ensure they can be really included from user-space. "make headers_check" is obviously not enough to catch bugs, and we often leak unresolved references to user-space. Use the new header-test-y syntax to implement it. Please note exported headers are compile-tested with a completely different set of compiler flags. The header search path is set to $(objtree)/usr/include since exported headers should not include unexported ones. We use -std=gnu89 for the kernel space since the kernel code highly depends on GNU extensions. On the other hand, UAPI headers should be written in more standardized C, so they are compiled with -std=c90. This will emit errors if C++ style comments, the keyword 'inline', etc. are used. Please use C style comments (/* ... */), '__inline__', etc. in UAPI headers. There is additional compiler requirement to enable this test because many of UAPI headers include , , , etc. directly or indirectly. You cannot use kernel.org pre-built toolchains [1] since they lack . I reused CONFIG_CC_CAN_LINK to check the system header availability. The intention is slightly different, but a compiler that can link userspace programs provide system headers. For now, a lot of headers need to be excluded because they cannot be compiled standalone, but this is a good start point. [1] https://mirrors.edge.kernel.org/pub/tools/crosstool/index.html Signed-off-by: Masahiro Yamada Reviewed-by: Sam Ravnborg --- Changes in v4: - Sort the blacklist alphabetically - Add a little more comments - Remove scripts/cc-system-headers.sh and reuse CC_CAN_LINK Changes in v3: None Changes in v2: - Add CONFIG_CPU_{BIG,LITTLE}_ENDIAN guard to avoid build error - Use 'header-test-' instead of 'no-header-test' - Avoid weird 'find' warning when cleaning Makefile | 2 +- init/Kconfig | 10 ++++ usr/.gitignore | 1 - usr/Makefile | 2 + usr/include/.gitignore | 3 + usr/include/Makefile | 131 +++++++++++++++++++++++++++++++++++++++++ 6 files changed, 147 insertions(+), 2 deletions(-) create mode 100644 usr/include/.gitignore create mode 100644 usr/include/Makefile diff --git a/Makefile b/Makefile index 1f35aca4fe05..f23516980796 100644 --- a/Makefile +++ b/Makefile @@ -1363,7 +1363,7 @@ CLEAN_DIRS += $(MODVERDIR) include/ksym CLEAN_FILES += modules.builtin.modinfo # Directories & files removed with 'make mrproper' -MRPROPER_DIRS += include/config usr/include include/generated \ +MRPROPER_DIRS += include/config include/generated \ arch/$(SRCARCH)/include/generated .tmp_objdiff MRPROPER_FILES += .config .config.old .version \ Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \ diff --git a/init/Kconfig b/init/Kconfig index 2e9813daa2c1..74192de8ada6 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -108,6 +108,16 @@ config HEADER_TEST If you are a developer or tester and want to ensure the requested headers are self-contained, say Y here. Otherwise, choose N. +config UAPI_HEADER_TEST + bool "Compile test UAPI headers" + depends on HEADER_TEST && HEADERS_INSTALL && CC_CAN_LINK + help + Compile test headers exported to user-space to ensure they are + self-contained, i.e. compilable as standalone units. + + If you are a developer or tester and want to ensure the exported + headers are self-contained, say Y here. Otherwise, choose N. + config LOCALVERSION string "Local version - append to kernel release" help diff --git a/usr/.gitignore b/usr/.gitignore index 8e48117a3f3d..be5eae1df7eb 100644 --- a/usr/.gitignore +++ b/usr/.gitignore @@ -7,4 +7,3 @@ initramfs_data.cpio.gz initramfs_data.cpio.bz2 initramfs_data.cpio.lzma initramfs_list -include diff --git a/usr/Makefile b/usr/Makefile index 4a70ae43c9cb..6a89eb019275 100644 --- a/usr/Makefile +++ b/usr/Makefile @@ -56,3 +56,5 @@ $(deps_initramfs): klibcdirs $(obj)/$(datafile_y): $(obj)/gen_init_cpio $(deps_initramfs) klibcdirs $(Q)$(initramfs) -l $(ramfs-input) > $(obj)/$(datafile_d_y) $(call if_changed,initfs) + +subdir-$(CONFIG_UAPI_HEADER_TEST) += include diff --git a/usr/include/.gitignore b/usr/include/.gitignore new file mode 100644 index 000000000000..a0991ff4402b --- /dev/null +++ b/usr/include/.gitignore @@ -0,0 +1,3 @@ +* +!.gitignore +!Makefile diff --git a/usr/include/Makefile b/usr/include/Makefile new file mode 100644 index 000000000000..0f9f92c6016a --- /dev/null +++ b/usr/include/Makefile @@ -0,0 +1,131 @@ +# SPDX-License-Identifier: GPL-2.0-only + +# Unlike the kernel space, exported headers are written in standard C. +# - Forbid C++ style comments +# - Use '__inline__', '__asm__' instead of 'inline', 'asm' +# +# -std=c90 (equivalent to -ansi) catches the violation of those. +# We cannot go as far as adding -Wpedantic since it emits too many warnings. +UAPI_CFLAGS := -std=c90 -Wall -Werror=implicit-function-declaration + +override c_flags = $(UAPI_CFLAGS) -Wp,-MD,$(depfile) -I$(objtree)/usr/include + +# The following are excluded for now because they fail to build. +# +# Do not add a new header to the blacklist without legitimate reason. +# Please consider to fix the header first. +# +# Sorted alphabetically. +header-test- += asm/ipcbuf.h +header-test- += asm/msgbuf.h +header-test- += asm/sembuf.h +header-test- += asm/shmbuf.h +header-test- += asm/signal.h +header-test- += asm/ucontext.h +header-test- += drm/vmwgfx_drm.h +header-test- += linux/am437x-vpfe.h +header-test- += linux/android/binder.h +header-test- += linux/android/binderfs.h +header-test-$(CONFIG_CPU_BIG_ENDIAN) += linux/byteorder/big_endian.h +header-test-$(CONFIG_CPU_LITTLE_ENDIAN) += linux/byteorder/little_endian.h +header-test- += linux/coda.h +header-test- += linux/coda_psdev.h +header-test- += linux/dvb/audio.h +header-test- += linux/dvb/osd.h +header-test- += linux/elfcore.h +header-test- += linux/errqueue.h +header-test- += linux/fsmap.h +header-test- += linux/hdlc/ioctl.h +header-test- += linux/ivtv.h +header-test- += linux/jffs2.h +header-test- += linux/kexec.h +header-test- += linux/matroxfb.h +header-test- += linux/netfilter_bridge/ebtables.h +header-test- += linux/netfilter_ipv4/ipt_LOG.h +header-test- += linux/netfilter_ipv6/ip6t_LOG.h +header-test- += linux/nfc.h +header-test- += linux/nilfs2_ondisk.h +header-test- += linux/omap3isp.h +header-test- += linux/omapfb.h +header-test- += linux/patchkey.h +header-test- += linux/phonet.h +header-test- += linux/reiserfs_xattr.h +header-test- += linux/scc.h +header-test- += linux/sctp.h +header-test- += linux/signal.h +header-test- += linux/sysctl.h +header-test- += linux/usb/audio.h +header-test- += linux/v4l2-mediabus.h +header-test- += linux/v4l2-subdev.h +header-test- += linux/videodev2.h +header-test- += linux/vm_sockets.h +header-test- += misc/ocxl.h +header-test- += mtd/mtd-abi.h +header-test- += scsi/scsi_bsg_fc.h +header-test- += scsi/scsi_netlink.h +header-test- += scsi/scsi_netlink_fc.h +header-test- += sound/asequencer.h +header-test- += sound/asoc.h +header-test- += sound/asound.h +header-test- += sound/compress_offload.h +header-test- += sound/emu10k1.h +header-test- += sound/sfnt_info.h +header-test- += sound/sof/eq.h +header-test- += sound/sof/fw.h +header-test- += sound/sof/header.h +header-test- += sound/sof/manifest.h +header-test- += sound/sof/trace.h +header-test- += xen/evtchn.h +header-test- += xen/gntdev.h +header-test- += xen/privcmd.h + +# More headers are broken in some architectures + +ifeq ($(SRCARCH),arc) +header-test- += linux/bpf_perf_event.h +endif + +ifeq ($(SRCARCH),ia64) +header-test- += asm/setup.h +header-test- += asm/sigcontext.h +header-test- += asm/perfmon.h +header-test- += asm/perfmon_default_smpl.h +header-test- += linux/if_bonding.h +endif + +ifeq ($(SRCARCH),mips) +header-test- += asm/stat.h +endif + +ifeq ($(SRCARCH),powerpc) +header-test- += asm/stat.h +header-test- += linux/bpf_perf_event.h +endif + +ifeq ($(SRCARCH),riscv) +header-test- += linux/bpf_perf_event.h +endif + +ifeq ($(SRCARCH),s390) +header-test- += asm/runtime_instr.h +header-test- += asm/zcrypt.h +endif + +ifeq ($(SRCARCH),sparc) +header-test- += asm/stat.h +header-test- += asm/uctx.h +header-test- += asm/fbio.h +header-test- += asm/openpromio.h +endif + +# asm-generic/*.h is used by asm/*.h, and should not be included directly +header-test- += asm-generic/% + +# The rest are compile-tested +header-test-y += $(filter-out $(header-test-), \ + $(patsubst $(obj)/%,%, $(wildcard \ + $(addprefix $(obj)/, *.h */*.h */*/*.h */*/*/*.h)))) + +# For GNU Make <= 4.2.1, $(wildcard $(obj)/*/) matches to not only directories +# but also regular files. Use $(filter %/, ...) just in case. +clean-dirs += $(patsubst $(obj)/%/,%,$(filter %/, $(wildcard $(obj)/*/))) From patchwork Mon Jul 1 00:58:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11024703 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 80E9813BD for ; Mon, 1 Jul 2019 01:00:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 75A0420008 for ; Mon, 1 Jul 2019 01:00:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6753627F9F; Mon, 1 Jul 2019 01:00:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D5E9427F54 for ; Mon, 1 Jul 2019 01:00:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726934AbfGABAX (ORCPT ); Sun, 30 Jun 2019 21:00:23 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:60232 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726563AbfGABAX (ORCPT ); Sun, 30 Jun 2019 21:00:23 -0400 Received: from grover.flets-west.jp (softbank126125154139.bbtec.net [126.125.154.139]) (authenticated) by conuserg-12.nifty.com with ESMTP id x610x4fu000634; Mon, 1 Jul 2019 09:59:09 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com x610x4fu000634 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1561942749; bh=rM1OWC0NYjNzccPK//0F4tGu6ozRHQZMCkGhKTcJdWI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oXq9dvO3uZ/pRTSUNd0h3q4yicM3BbqFnLQVqEjcb7HmyXctmNJ2nn+yl2Ty+1Uov ImA9EKvIFO/neA8oRXsMtqtXZC1PC1cmt5YhrSxQUQOKcFO+dHjLvl5Iuq3x4TWPX1 YRYVx4D/vyv9kmWHdIXq3xhJZ3daUIuCfShIftHuqVbeciPIfGqBow1mxLO6k39jLg LB92YfjcbrmQ0HUTCtKm/IRC6SoOE5OsiL9wgm9QfoRTzMGzbp7Cxte6u0yK23M0JD IXJohMaxWWrs2IPIk+LyFQfcdeQHGiaFWbXjMv5RrCBrjy8D3QrXwshn3xFKsY9m8I JCa5bGO45B+RQ== X-Nifty-SrcIP: [126.125.154.139] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , Joel Fernandes , Masahiro Yamada , linux-doc@vger.kernel.org, Jonathan Corbet , linux-kernel@vger.kernel.org, Michal Marek Subject: [PATCH 3/7] kbuild: do not create wrappers for header-test-y Date: Mon, 1 Jul 2019 09:58:41 +0900 Message-Id: <20190701005845.12475-4-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190701005845.12475-1-yamada.masahiro@socionext.com> References: <20190701005845.12475-1-yamada.masahiro@socionext.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP header-test-y does not work with headers in sub-directories. For example, you may want to write a Makefile, like this: include/linux/Kbuild: header-test-y += mtd/nand.h This entry will create a wrapper include/linux/mtd/nand.hdrtest.c with the following content: #include "mtd/nand.h" To make this work, we need to add $(srctree)/include/linux to the header search path. It would be tedious to add ccflags-y. Instead, we could change the *.hdrtest.c rule to wrap: #include "nand.h" This works for in-tree build since #include "..." searches in the relative path from the header with this directive. For O=... build, we need to add $(srctree)/include/linux/mtd to the header search path, which will be even more tedious. After all, I thought it would be handier to compile headers directly without creating wrappers. I added a new build rule to compile %.h into %.h.s The target is %.h.s instead of %.h.o because it is slightly faster. Also, as for GCC, an empty assembly is smaller than an empty object. I wrote the build rule: $(CC) $(c_flags) -S -o $@ -x c /dev/null -include $< instead of: $(CC) $(c_flags) -S -o $@ -x c $< Both work fine with GCC, but the latter is bad for Clang. This comes down to the difference in the -Wunused-function policy. GCC does not warn about unused 'static inline' functions at all. Clang does not warn about the ones in included headers, but does about the ones in the source. So, we should handle headers as headers, not as source files. In fact, this has been hidden since commit abb2ea7dfd82 ("compiler, clang: suppress warning for unused static inline functions"), but we should not rely on that. Signed-off-by: Masahiro Yamada Acked-by: Jani Nikula Tested-by: Jani Nikula --- Changes in v4: None Changes in v3: None Changes in v2: - New patch .gitignore | 1 - Documentation/dontdiff | 1 - Documentation/kbuild/makefiles.txt | 3 +-- Makefile | 1 - scripts/Makefile.build | 10 +++++----- scripts/Makefile.lib | 2 +- 6 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 4bb60f0fa23b..7587ef56b92d 100644 --- a/.gitignore +++ b/.gitignore @@ -22,7 +22,6 @@ *.elf *.gcno *.gz -*.hdrtest.c *.i *.ko *.lex.c diff --git a/Documentation/dontdiff b/Documentation/dontdiff index 554dfe4883d2..5eba889ea84d 100644 --- a/Documentation/dontdiff +++ b/Documentation/dontdiff @@ -19,7 +19,6 @@ *.grep *.grp *.gz -*.hdrtest.c *.html *.i *.jpeg diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index ca4b24ec0399..5080fec34609 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt @@ -1023,8 +1023,7 @@ When kbuild executes, the following steps are followed (roughly): header-test-y specifies headers (*.h) in the current directory that should be compile tested to ensure they are self-contained, i.e. compilable as standalone units. If CONFIG_HEADER_TEST is enabled, - this autogenerates dummy sources to include the headers, and builds them - as part of extra-y. + this builds them as part of extra-y. --- 6.7 Commands useful for building a boot image diff --git a/Makefile b/Makefile index f23516980796..7f293b0431fe 100644 --- a/Makefile +++ b/Makefile @@ -1648,7 +1648,6 @@ clean: $(clean-dirs) -o -name '*.dwo' -o -name '*.lst' \ -o -name '*.su' \ -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ - -o -name '*.hdrtest.c' \ -o -name '*.lex.c' -o -name '*.tab.[ch]' \ -o -name '*.asn1.[ch]' \ -o -name '*.symtypes' -o -name 'modules.order' \ diff --git a/scripts/Makefile.build b/scripts/Makefile.build index ee0319560513..776842b7e6a3 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -294,14 +294,14 @@ quiet_cmd_cc_lst_c = MKLST $@ $(obj)/%.lst: $(src)/%.c FORCE $(call if_changed_dep,cc_lst_c) -# Dummy C sources for header test (header-test-y target) +# header test (header-test-y target) # --------------------------------------------------------------------------- -quiet_cmd_header_test = HDRTEST $@ - cmd_header_test = echo "\#include \"$*.h\"" > $@ +quiet_cmd_cc_s_h = CC $@ + cmd_cc_s_h = $(CC) $(c_flags) -S -o $@ -x c /dev/null -include $< -$(obj)/%.hdrtest.c: - $(call cmd,header_test) +$(obj)/%.h.s: $(src)/%.h FORCE + $(call if_changed_dep,cc_s_h) # Compile assembler sources (.S) # --------------------------------------------------------------------------- diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 3e630fcaffd1..55ae1ec65342 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -67,7 +67,7 @@ extra-$(CONFIG_OF_ALL_DTBS) += $(patsubst %.dtb,%.dt.yaml, $(dtb-)) endif # Test self-contained headers -extra-$(CONFIG_HEADER_TEST) += $(patsubst %.h,%.hdrtest.o,$(header-test-y)) +extra-$(CONFIG_HEADER_TEST) += $(addsuffix .s, $(header-test-y)) # Add subdir path From patchwork Mon Jul 1 00:58:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11024701 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 48DD6746 for ; Mon, 1 Jul 2019 01:00:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CEF420008 for ; Mon, 1 Jul 2019 01:00:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 301A327FA5; Mon, 1 Jul 2019 01:00:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ACBAC20008 for ; Mon, 1 Jul 2019 01:00:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726920AbfGABAX (ORCPT ); Sun, 30 Jun 2019 21:00:23 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:60237 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726896AbfGABAW (ORCPT ); Sun, 30 Jun 2019 21:00:22 -0400 Received: from grover.flets-west.jp (softbank126125154139.bbtec.net [126.125.154.139]) (authenticated) by conuserg-12.nifty.com with ESMTP id x610x4fv000634; Mon, 1 Jul 2019 09:59:09 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com x610x4fv000634 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1561942750; bh=1HcjEC7wLR2+UWOsM11fHQgnI022Sfeb8n0eROHz6Dw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DLEkV7w0not3hRjNOpSRVgM8jLvb2EBRfxQUh0olJzWpK6eUm9EGNPUlreEq8tRPO e1MoyrbgT7Bn135uJgldXUPf9oHzqClPpEk7y578D5OBYaOhTwzHSrMwU+5HNxm6cP 77YaiaHL9X1hYqj7zHyT7XSjC+lQTb4IGS2BpLqcX+irOHFObhpPFzDABaSgkOJYBj S/cVbafWaWaCp5knXhwsgxaeDhjXFKoQfTv9DPMBKxckEVcx+MOPnoApQ5jKyc+x+S 5kg2rijkRp5cW8ETcthjRVEUiUH0AoI2rdLr/5f+ZAsc0GFo1fiYav/xVO8hsuE4Vr 5F1k6FlUG22/Q== X-Nifty-SrcIP: [126.125.154.139] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , Joel Fernandes , Masahiro Yamada , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Corbet , Michal Marek Subject: [PATCH 4/7] kbuild: support header-test-pattern-y Date: Mon, 1 Jul 2019 09:58:42 +0900 Message-Id: <20190701005845.12475-5-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190701005845.12475-1-yamada.masahiro@socionext.com> References: <20190701005845.12475-1-yamada.masahiro@socionext.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In my view, most of headers can be self-contained. So, it would be tedious to add every header to header-test-y explicitly. We usually end up with "all headers with some exceptions". There are two types in exceptions: [1] headers that are never compiled as standalone units For examples, include/linux/compiler-gcc.h is not intended for direct inclusion. We should always exclude such ones. [2] headers that are conditionally compiled as standalone units Some headers can be compiled only for particular architectures. For example, include/linux/arm-cci.h can be compiled only for arm/arm64 because it requires to exist. Clang can compile include/soc/nps/mtm.h only for arc because it contains an arch-specific register in inline assembler. So, you can write Makefile like this: header-test- += linux/compiler-gcc.h header-test-$(CONFIG_ARM) += linux/arm-cci.h header-test-$(CONFIG_ARM64) += linux/arm-cci.h header-test-$(CONFIG_ARC) += soc/nps/mtm.h The new syntax header-test-pattern-y will be useful to specify "the rest". The typical usage is like this: header-test-pattern-y += */*.h This will add all the headers in sub-directories to the test coverage, excluding $(header-test-). In this regards, header-test-pattern-y behaves like a weaker variant of header-test-y. Caveat: The patterns in header-test-pattern-y are prefixed with $(srctree)/$(src)/ but not $(objtree)/$(obj)/. Stale generated headers are often left over when you traverse the git history without cleaning. Wildcard patterns for $(objtree) may match to stale headers, which could fail to compile. One pitfall is $(srctree)/$(src)/ and $(objtree)/$(obj)/ point to the same directory for in-tree building. So, header-test-pattern-y should be used with care since it can potentially match to stale headers. Caveat2: You could use wildcard for header-test-. For example, header-test- += asm-generic/% ... will exclude headers in asm-generic directory. Unfortunately, the wildcard character is '%' instead of '*' here because this is evaluated by $(filter-out ...) whereas header-test-pattern-y is evaluated by $(wildcard ...). This is a kludge, but seems useful in some places... Signed-off-by: Masahiro Yamada Tested-by: Jani Nikula --- Changes in v4: None Changes in v3: None Changes in v2: - New patch Documentation/kbuild/makefiles.txt | 10 ++++++++++ scripts/Makefile.lib | 11 +++++++++++ 2 files changed, 21 insertions(+) diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index 5080fec34609..b817e6cefb77 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt @@ -1025,6 +1025,16 @@ When kbuild executes, the following steps are followed (roughly): i.e. compilable as standalone units. If CONFIG_HEADER_TEST is enabled, this builds them as part of extra-y. + header-test-pattern-y + + This works as a weaker version of header-test-y, and accepts wildcard + patterns. The typical usage is: + + header-test-pattern-y += *.h + + This specifies all the files that matches to '*.h' in the current + directory, but the files in 'header-test-' are excluded. + --- 6.7 Commands useful for building a boot image Kbuild provides a few macros that are useful when building a diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 55ae1ec65342..281864fcf0fe 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -67,6 +67,17 @@ extra-$(CONFIG_OF_ALL_DTBS) += $(patsubst %.dtb,%.dt.yaml, $(dtb-)) endif # Test self-contained headers + +# Wildcard searches in $(srctree)/$(src)/, but not in $(objtree)/$(obj)/. +# Stale generated headers are often left over, so pattern matching should +# be avoided. Please notice $(srctree)/$(src)/ and $(objtree)/$(obj) point +# to the same location for in-tree building. So, header-test-pattern-y should +# be used with care. +header-test-y += $(filter-out $(header-test-), \ + $(patsubst $(srctree)/$(src)/%, %, \ + $(wildcard $(addprefix $(srctree)/$(src)/, \ + $(header-test-pattern-y))))) + extra-$(CONFIG_HEADER_TEST) += $(addsuffix .s, $(header-test-y)) # Add subdir path From patchwork Mon Jul 1 00:58:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11024697 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3F02413BD for ; Mon, 1 Jul 2019 01:00:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3340727DCD for ; Mon, 1 Jul 2019 01:00:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2798228445; Mon, 1 Jul 2019 01:00:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 89D7227DCD for ; Mon, 1 Jul 2019 01:00:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726565AbfGABAO (ORCPT ); Sun, 30 Jun 2019 21:00:14 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:59957 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726086AbfGABAO (ORCPT ); Sun, 30 Jun 2019 21:00:14 -0400 Received: from grover.flets-west.jp (softbank126125154139.bbtec.net [126.125.154.139]) (authenticated) by conuserg-12.nifty.com with ESMTP id x610x4fw000634; Mon, 1 Jul 2019 09:59:10 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com x610x4fw000634 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1561942750; bh=rpeL0VIy/UIykKSqi/KZPVDb8+AGL27FhHoeS6eYDfM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A208QQaso4Ua3Xv5StoEy7N1uTKOr3ov4gE6NKkSxARIu7tAZuEmCkclp9x8NjcJp oFY/qVU3caS+6bbgTVAj1iLPi8Y0ETnU/wEhwR6cx00EaltEeEZqVP7L17Ey/gix/8 H5KfHmHVxPgj4gQl6bjXByCEHWvb2XPRyNCWXZC73o196m4uBTVEEGQONivak15yub K6rBITpjIYIfyEOilus6E8Uq/6r8QTNOV/w3ODQ8twMeQOBt/m8AfzBi7LKY8OWTAO hCxWp+9RySYVpeHTnBnhYbuBBfv1zIwep96sIk44AB135uXBgMD1Fr8Ij+99jgGtES 9kIQAx5rBMxXQ== X-Nifty-SrcIP: [126.125.154.139] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , Joel Fernandes , Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 5/7] kheaders: remove meaningless -R option of 'ls' Date: Mon, 1 Jul 2019 09:58:43 +0900 Message-Id: <20190701005845.12475-6-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190701005845.12475-1-yamada.masahiro@socionext.com> References: <20190701005845.12475-1-yamada.masahiro@socionext.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The -R option of 'ls' is supposed to be used for directories. -R, --recursive list subdirectories recursively Since 'find ... -type f' only matches to regular files, we do not expect directories passed to the 'ls' command here. Giving -R is harmless at least, but unneeded. Signed-off-by: Masahiro Yamada Reviewed-by: Joel Fernandes (Google) --- Changes in v4: - New patch Changes in v3: None Changes in v2: None kernel/gen_kheaders.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/gen_kheaders.sh b/kernel/gen_kheaders.sh index 9a34e1d9bd7f..86a666f5cb17 100755 --- a/kernel/gen_kheaders.sh +++ b/kernel/gen_kheaders.sh @@ -33,8 +33,8 @@ arch/$SRCARCH/include/ # Uncomment it for debugging. # if [ ! -f /tmp/iter ]; then iter=1; echo 1 > /tmp/iter; # else iter=$(($(cat /tmp/iter) + 1)); echo $iter > /tmp/iter; fi -# find $src_file_list -type f | xargs ls -lR > /tmp/src-ls-$iter -# find $obj_file_list -type f | xargs ls -lR > /tmp/obj-ls-$iter +# find $src_file_list -type f | xargs ls -l > /tmp/src-ls-$iter +# find $obj_file_list -type f | xargs ls -l > /tmp/obj-ls-$iter # include/generated/compile.h is ignored because it is touched even when none # of the source files changed. This causes pointless regeneration, so let us @@ -46,7 +46,7 @@ src_files_md5="$(find $src_file_list -type f | grep -v "include/config/auto.conf" | grep -v "include/config/auto.conf.cmd" | grep -v "include/config/tristate.conf" | - xargs ls -lR | md5sum | cut -d ' ' -f1)" + xargs ls -l | md5sum | cut -d ' ' -f1)" popd > /dev/null obj_files_md5="$(find $obj_file_list -type f | grep -v "include/generated/compile.h" | @@ -54,7 +54,7 @@ obj_files_md5="$(find $obj_file_list -type f | grep -v "include/config/auto.conf" | grep -v "include/config/auto.conf.cmd" | grep -v "include/config/tristate.conf" | - xargs ls -lR | md5sum | cut -d ' ' -f1)" + xargs ls -l | md5sum | cut -d ' ' -f1)" if [ -f $tarfile ]; then tarfile_md5="$(md5sum $tarfile | cut -d ' ' -f1)"; fi if [ -f kernel/kheaders.md5 ] && From patchwork Mon Jul 1 00:58:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11024699 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 294C6746 for ; Mon, 1 Jul 2019 01:00:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C93127DCD for ; Mon, 1 Jul 2019 01:00:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 10C292847F; Mon, 1 Jul 2019 01:00:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 87F0627DCD for ; Mon, 1 Jul 2019 01:00:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726086AbfGABAQ (ORCPT ); Sun, 30 Jun 2019 21:00:16 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:60031 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726563AbfGABAP (ORCPT ); Sun, 30 Jun 2019 21:00:15 -0400 Received: from grover.flets-west.jp (softbank126125154139.bbtec.net [126.125.154.139]) (authenticated) by conuserg-12.nifty.com with ESMTP id x610x4fx000634; Mon, 1 Jul 2019 09:59:10 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com x610x4fx000634 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1561942751; bh=+UpIu10WCEZP6+HNL9px3zwBEqpAxSsMePRRBKj3x4o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nki3gYfhvgkiXFwtL93SL+mwz10BSbkHJh9srmQUWGFUs3hKu+t5Q+dToCV/smjlE QvgrZuo5HqN4B5WFWSSIQGBgYPRDsO0dfWdAHrbYAO8qC9lz2U1GfzhVfQSq+Vh5oz hlUMFO0543qoGvAQcojYv/tbgFOtNbiFkDB/H2NlMBCSYvZKj1j/HzxIXGqPs2T8Sn T0mmsPNHPq0Byd5rN9VT5mdqh1FJbmxjM3qlGBHlQwn7FpQXFI7STuPiFAgdQrA4kT UBk/0HMAPGtcnLe9iTFZ5rENISHkbc6uM+mhmLXMxtfLt4N+QivaJNMvs3KI8SPaSF EQJsEcpBFtpNA== X-Nifty-SrcIP: [126.125.154.139] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , Joel Fernandes , Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 6/7] kheaders: include only headers into kheaders_data.tar.xz Date: Mon, 1 Jul 2019 09:58:44 +0900 Message-Id: <20190701005845.12475-7-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190701005845.12475-1-yamada.masahiro@socionext.com> References: <20190701005845.12475-1-yamada.masahiro@socionext.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently, kheaders_data.tar.xz contains some build scripts as well as headers. None of them is needed in the header archive. For ARCH=x86, this commit excludes the following from the archive: arch/x86/include/asm/Kbuild arch/x86/include/uapi/asm/Kbuild include/asm-generic/Kbuild include/config/auto.conf include/config/kernel.release include/config/tristate.conf include/uapi/asm-generic/Kbuild include/uapi/Kbuild kernel/gen_kheaders.sh This change is actually motivated for the planned header compile-testing because it will generate more build artifacts, which should not be included in the archive. Signed-off-by: Masahiro Yamada --- Changes in v4: - New patch Changes in v3: None Changes in v2: None kernel/gen_kheaders.sh | 47 ++++++++++++++---------------------------- 1 file changed, 16 insertions(+), 31 deletions(-) diff --git a/kernel/gen_kheaders.sh b/kernel/gen_kheaders.sh index 86a666f5cb17..9ff449888d9c 100755 --- a/kernel/gen_kheaders.sh +++ b/kernel/gen_kheaders.sh @@ -4,24 +4,12 @@ # This script generates an archive consisting of kernel headers # for CONFIG_IKHEADERS. set -e -spath="$(dirname "$(readlink -f "$0")")" -kroot="$spath/.." +sfile="$(readlink -f "$0")" outdir="$(pwd)" tarfile=$1 cpio_dir=$outdir/$tarfile.tmp -# Script filename relative to the kernel source root -# We add it to the archive because it is small and any changes -# to this script will also cause a rebuild of the archive. -sfile="$(realpath --relative-to $kroot "$(readlink -f "$0")")" - -src_file_list=" -include/ -arch/$SRCARCH/include/ -$sfile -" - -obj_file_list=" +dir_list=" include/ arch/$SRCARCH/include/ " @@ -33,33 +21,29 @@ arch/$SRCARCH/include/ # Uncomment it for debugging. # if [ ! -f /tmp/iter ]; then iter=1; echo 1 > /tmp/iter; # else iter=$(($(cat /tmp/iter) + 1)); echo $iter > /tmp/iter; fi -# find $src_file_list -type f | xargs ls -l > /tmp/src-ls-$iter -# find $obj_file_list -type f | xargs ls -l > /tmp/obj-ls-$iter +# find $src_file_list -name "*.h" | xargs ls -l > /tmp/src-ls-$iter +# find $obj_file_list -name "*.h" | xargs ls -l > /tmp/obj-ls-$iter # include/generated/compile.h is ignored because it is touched even when none # of the source files changed. This causes pointless regeneration, so let us # ignore them for md5 calculation. -pushd $kroot > /dev/null -src_files_md5="$(find $src_file_list -type f | +pushd $srctree > /dev/null +src_files_md5="$(find $dir_list -name "*.h" | grep -v "include/generated/compile.h" | grep -v "include/generated/autoconf.h" | - grep -v "include/config/auto.conf" | - grep -v "include/config/auto.conf.cmd" | - grep -v "include/config/tristate.conf" | xargs ls -l | md5sum | cut -d ' ' -f1)" popd > /dev/null -obj_files_md5="$(find $obj_file_list -type f | +obj_files_md5="$(find $dir_list -name "*.h" | grep -v "include/generated/compile.h" | grep -v "include/generated/autoconf.h" | - grep -v "include/config/auto.conf" | - grep -v "include/config/auto.conf.cmd" | - grep -v "include/config/tristate.conf" | xargs ls -l | md5sum | cut -d ' ' -f1)" - +# Any changes to this script will also cause a rebuild of the archive. +this_file_md5="$(ls -l $sfile | md5sum | cut -d ' ' -f1)" if [ -f $tarfile ]; then tarfile_md5="$(md5sum $tarfile | cut -d ' ' -f1)"; fi if [ -f kernel/kheaders.md5 ] && [ "$(cat kernel/kheaders.md5|head -1)" == "$src_files_md5" ] && [ "$(cat kernel/kheaders.md5|head -2|tail -1)" == "$obj_files_md5" ] && + [ "$(cat kernel/kheaders.md5|head -3|tail -1)" == "$this_file_md5" ] && [ "$(cat kernel/kheaders.md5|tail -1)" == "$tarfile_md5" ]; then exit fi @@ -71,16 +55,16 @@ fi rm -rf $cpio_dir mkdir $cpio_dir -pushd $kroot > /dev/null -for f in $src_file_list; - do find "$f" ! -name "*.cmd" ! -name ".*"; +pushd $srctree > /dev/null +for f in $dir_list; + do find "$f" -name "*.h"; done | cpio --quiet -pd $cpio_dir popd > /dev/null # The second CPIO can complain if files already exist which can # happen with out of tree builds. Just silence CPIO for now. -for f in $obj_file_list; - do find "$f" ! -name "*.cmd" ! -name ".*"; +for f in $dir_list; + do find "$f" -name "*.h"; done | cpio --quiet -pd $cpio_dir >/dev/null 2>&1 # Remove comments except SDPX lines @@ -91,6 +75,7 @@ tar -Jcf $tarfile -C $cpio_dir/ . > /dev/null echo "$src_files_md5" > kernel/kheaders.md5 echo "$obj_files_md5" >> kernel/kheaders.md5 +echo "$this_file_md5" >> kernel/kheaders.md5 echo "$(md5sum $tarfile | cut -d ' ' -f1)" >> kernel/kheaders.md5 rm -rf $cpio_dir From patchwork Mon Jul 1 00:58:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11024721 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CBA0B112C for ; Mon, 1 Jul 2019 01:02:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA5BB27F54 for ; Mon, 1 Jul 2019 01:02:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A9DF727FA5; Mon, 1 Jul 2019 01:02:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CFF0027F54 for ; Mon, 1 Jul 2019 01:02:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726618AbfGABCQ (ORCPT ); Sun, 30 Jun 2019 21:02:16 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:63685 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726040AbfGABCP (ORCPT ); Sun, 30 Jun 2019 21:02:15 -0400 Received: from grover.flets-west.jp (softbank126125154139.bbtec.net [126.125.154.139]) (authenticated) by conuserg-12.nifty.com with ESMTP id x610x4g0000634; Mon, 1 Jul 2019 09:59:11 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com x610x4g0000634 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1561942752; bh=z2zBFQm3Xnq7slhEAuuZdmmKAGaVqqdp9EDxWCAyB+A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GBG9A/5jbwp1ROMyOc3bYbBFKSEE+GFc3T8eUCKPpSh9sHHib3mq44w36E3U8xuEx n0S/0BkqlauRGzKRozLHuXpDVvld1SxR4UWyYzdJoWQKoUhPhiO0I3X3Pg9LEhIuXy Fn1uIoVF66Ylu+lHq/RrKmsH/0Q4MjPXnJfCVJgZmn8LAMTrnk0xRveNVXRmueFcbW nXLt6lJI1KPAhcvJeklwMsug2wFAcDP8KoyyLAct+RmQx/IyeULcU3a43u5N2hyG1D fz5Wudvic0+Ab6hY6GvkFH0w3Psy2Cmr/K6+iUgDbYlrzDcx1Ehzys5hA3pfLMpWdz gAJsAZG5UvzSA== X-Nifty-SrcIP: [126.125.154.139] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , Joel Fernandes , Masahiro Yamada , Tony Luck , John Fastabend , Jakub Kicinski , Daniel Borkmann , xdp-newbies@vger.kernel.org, Anton Vorontsov , Matthias Brugger , Song Liu , Yonghong Song , Michal Marek , Jesper Dangaard Brouer , Martin KaFai Lau , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Colin Cross , "David S. Miller" , Kees Cook , Alexei Starovoitov , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org Subject: [PATCH 7/7] kbuild: compile-test kernel headers to ensure they are self-contained Date: Mon, 1 Jul 2019 09:58:45 +0900 Message-Id: <20190701005845.12475-8-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190701005845.12475-1-yamada.masahiro@socionext.com> References: <20190701005845.12475-1-yamada.masahiro@socionext.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 blacklist was mostly generated by a script, so the reason of the breakage should be checked later. Signed-off-by: Masahiro Yamada Tested-by: Jani Nikula Reviewed-by: Joel Fernandes (Google) --- Changes in v4: - Fix vmlinux build error - Exclude more headers for sparc Changes in v3: - Exclude more headers (Tested for allnoconfig + CONFIG_HEADER_TEST=y) Changes in v2: - Add everything to test coverage, and exclude broken ones - Rename 'Makefile' to 'Kbuild' - Add CONFIG_KERNEL_HEADER_TEST option Makefile | 1 + include/Kbuild | 1253 ++++++++++++++++++++++++++++++++++++++++++++++++ init/Kconfig | 11 + 3 files changed, 1265 insertions(+) create mode 100644 include/Kbuild diff --git a/Makefile b/Makefile index 7f293b0431fe..d20e9d2725b8 100644 --- a/Makefile +++ b/Makefile @@ -609,6 +609,7 @@ ifeq ($(KBUILD_EXTMOD),) init-y := init/ drivers-y := drivers/ sound/ drivers-$(CONFIG_SAMPLES) += samples/ +drivers-$(CONFIG_KERNEL_HEADER_TEST) += include/ net-y := net/ libs-y := lib/ core-y := usr/ diff --git a/include/Kbuild b/include/Kbuild new file mode 100644 index 000000000000..4f9524d92a75 --- /dev/null +++ b/include/Kbuild @@ -0,0 +1,1253 @@ +# SPDX-License-Identifier: GPL-2.0-only + +# The following are excluded for now because they fail to build. +# +# Do not add a new header to the blacklist without legitimate reason. +# Please consider to fix the header first. +# +# Sorted alphabetically. +header-test- += acpi/acbuffer.h +header-test- += acpi/acpi.h +header-test- += acpi/acpi_bus.h +header-test- += acpi/acpi_drivers.h +header-test- += acpi/acpi_io.h +header-test- += acpi/acpi_lpat.h +header-test- += acpi/acpiosxf.h +header-test- += acpi/acpixf.h +header-test- += acpi/acrestyp.h +header-test- += acpi/actbl.h +header-test- += acpi/actbl1.h +header-test- += acpi/actbl2.h +header-test- += acpi/actbl3.h +header-test- += acpi/actypes.h +header-test- += acpi/battery.h +header-test- += acpi/cppc_acpi.h +header-test- += acpi/nfit.h +header-test- += acpi/platform/acenv.h +header-test- += acpi/platform/acenvex.h +header-test- += acpi/platform/acintel.h +header-test- += acpi/platform/aclinux.h +header-test- += acpi/platform/aclinuxex.h +header-test- += acpi/processor.h +header-test- += clocksource/timer-sp804.h +header-test- += crypto/cast_common.h +header-test- += crypto/internal/cryptouser.h +header-test- += crypto/pkcs7.h +header-test- += crypto/poly1305.h +header-test- += crypto/sha3.h +header-test- += drm/ati_pcigart.h +header-test- += drm/bridge/dw_hdmi.h +header-test- += drm/bridge/dw_mipi_dsi.h +header-test- += drm/drm_audio_component.h +header-test- += drm/drm_auth.h +header-test- += drm/drm_debugfs.h +header-test- += drm/drm_debugfs_crc.h +header-test- += drm/drm_displayid.h +header-test- += drm/drm_encoder_slave.h +header-test- += drm/drm_fb_cma_helper.h +header-test- += drm/drm_fixed.h +header-test- += drm/drm_format_helper.h +header-test- += drm/drm_lease.h +header-test- += drm/drm_legacy.h +header-test- += drm/drm_panel.h +header-test- += drm/drm_plane_helper.h +header-test- += drm/drm_rect.h +header-test- += drm/i915_component.h +header-test- += drm/intel-gtt.h +header-test- += drm/tinydrm/tinydrm-helpers.h +header-test- += drm/ttm/ttm_debug.h +header-test- += keys/asymmetric-parser.h +header-test- += keys/asymmetric-subtype.h +header-test- += keys/asymmetric-type.h +header-test- += keys/big_key-type.h +header-test- += keys/request_key_auth-type.h +header-test- += keys/trusted.h +header-test- += kvm/arm_arch_timer.h +header-test- += kvm/arm_pmu.h +header-test-$(CONFIG_ARM) += kvm/arm_psci.h +header-test-$(CONFIG_ARM64) += kvm/arm_psci.h +header-test- += kvm/arm_vgic.h +header-test- += linux/8250_pci.h +header-test- += linux/a.out.h +header-test- += linux/adxl.h +header-test- += linux/agpgart.h +header-test- += linux/alcor_pci.h +header-test- += linux/amba/clcd.h +header-test- += linux/amba/pl080.h +header-test- += linux/amd-iommu.h +header-test-$(CONFIG_ARM) += linux/arm-cci.h +header-test-$(CONFIG_ARM64) += linux/arm-cci.h +header-test- += linux/arm_sdei.h +header-test- += linux/asn1_decoder.h +header-test- += linux/ata_platform.h +header-test- += linux/ath9k_platform.h +header-test- += linux/atm_tcp.h +header-test- += linux/atomic-fallback.h +header-test- += linux/avf/virtchnl.h +header-test- += linux/bcm47xx_sprom.h +header-test- += linux/bcma/bcma_driver_gmac_cmn.h +header-test- += linux/bcma/bcma_driver_mips.h +header-test- += linux/bcma/bcma_driver_pci.h +header-test- += linux/bcma/bcma_driver_pcie2.h +header-test- += linux/bit_spinlock.h +header-test- += linux/blk-mq-rdma.h +header-test- += linux/blk-mq.h +header-test- += linux/blktrace_api.h +header-test- += linux/blockgroup_lock.h +header-test- += linux/bma150.h +header-test- += linux/bpf_lirc.h +header-test- += linux/bpf_types.h +header-test- += linux/bsg-lib.h +header-test- += linux/bsg.h +header-test- += linux/btf.h +header-test- += linux/btree-128.h +header-test- += linux/btree-type.h +header-test-$(CONFIG_CPU_BIG_ENDIAN) += linux/byteorder/big_endian.h +header-test- += linux/byteorder/generic.h +header-test-$(CONFIG_CPU_LITTLE_ENDIAN) += linux/byteorder/little_endian.h +header-test- += linux/c2port.h +header-test- += linux/can/dev/peak_canfd.h +header-test- += linux/can/platform/cc770.h +header-test- += linux/can/platform/sja1000.h +header-test- += linux/ceph/ceph_features.h +header-test- += linux/ceph/ceph_frag.h +header-test- += linux/ceph/ceph_fs.h +header-test- += linux/ceph/debugfs.h +header-test- += linux/ceph/msgr.h +header-test- += linux/ceph/rados.h +header-test- += linux/cgroup_subsys.h +header-test- += linux/clk/sunxi-ng.h +header-test- += linux/clk/ti.h +header-test- += linux/cn_proc.h +header-test- += linux/coda_psdev.h +header-test- += linux/compaction.h +header-test- += linux/console_struct.h +header-test- += linux/count_zeros.h +header-test- += linux/cs5535.h +header-test- += linux/cuda.h +header-test- += linux/cyclades.h +header-test- += linux/dcookies.h +header-test- += linux/delayacct.h +header-test- += linux/delayed_call.h +header-test- += linux/device-mapper.h +header-test- += linux/devpts_fs.h +header-test- += linux/dio.h +header-test- += linux/dirent.h +header-test- += linux/dlm_plock.h +header-test- += linux/dm-dirty-log.h +header-test- += linux/dm-region-hash.h +header-test- += linux/dma-debug.h +header-test- += linux/dma/mmp-pdma.h +header-test- += linux/dma/sprd-dma.h +header-test- += linux/dns_resolver.h +header-test- += linux/drbd_genl.h +header-test- += linux/drbd_genl_api.h +header-test- += linux/dw_apb_timer.h +header-test- += linux/dynamic_debug.h +header-test- += linux/dynamic_queue_limits.h +header-test- += linux/ecryptfs.h +header-test- += linux/edma.h +header-test- += linux/eeprom_93cx6.h +header-test- += linux/efs_vh.h +header-test- += linux/elevator.h +header-test- += linux/elfcore-compat.h +header-test- += linux/error-injection.h +header-test- += linux/errseq.h +header-test- += linux/eventpoll.h +header-test- += linux/ext2_fs.h +header-test- += linux/f75375s.h +header-test- += linux/falloc.h +header-test- += linux/fault-inject.h +header-test- += linux/fbcon.h +header-test- += linux/firmware/intel/stratix10-svc-client.h +header-test- += linux/firmware/meson/meson_sm.h +header-test- += linux/firmware/trusted_foundations.h +header-test- += linux/firmware/xlnx-zynqmp.h +header-test- += linux/fixp-arith.h +header-test- += linux/flat.h +header-test- += linux/fs_types.h +header-test- += linux/fs_uart_pd.h +header-test- += linux/fsi-occ.h +header-test- += linux/fsi-sbefifo.h +header-test- += linux/fsl/bestcomm/ata.h +header-test- += linux/fsl/bestcomm/bestcomm.h +header-test- += linux/fsl/bestcomm/bestcomm_priv.h +header-test- += linux/fsl/bestcomm/fec.h +header-test- += linux/fsl/bestcomm/gen_bd.h +header-test- += linux/fsl/bestcomm/sram.h +header-test- += linux/fsl_hypervisor.h +header-test- += linux/fsldma.h +header-test- += linux/ftrace_irq.h +header-test- += linux/genl_magic_func.h +header-test- += linux/genl_magic_struct.h +header-test- += linux/gpio/aspeed.h +header-test- += linux/gpio/gpio-reg.h +header-test- += linux/hid-debug.h +header-test- += linux/hiddev.h +header-test- += linux/hippidevice.h +header-test- += linux/hmm.h +header-test- += linux/hp_sdc.h +header-test- += linux/huge_mm.h +header-test- += linux/hugetlb_cgroup.h +header-test- += linux/hugetlb_inline.h +header-test- += linux/hwmon-vid.h +header-test- += linux/i2c-algo-pca.h +header-test- += linux/i2c-algo-pcf.h +header-test- += linux/i3c/ccc.h +header-test- += linux/i3c/device.h +header-test- += linux/i3c/master.h +header-test- += linux/i8042.h +header-test- += linux/ide.h +header-test- += linux/idle_inject.h +header-test- += linux/if_frad.h +header-test- += linux/if_rmnet.h +header-test- += linux/if_tap.h +header-test- += linux/iio/accel/kxcjk_1013.h +header-test- += linux/iio/adc/ad_sigma_delta.h +header-test- += linux/iio/buffer-dma.h +header-test- += linux/iio/buffer_impl.h +header-test- += linux/iio/common/st_sensors.h +header-test- += linux/iio/common/st_sensors_i2c.h +header-test- += linux/iio/common/st_sensors_spi.h +header-test- += linux/iio/dac/ad5421.h +header-test- += linux/iio/dac/ad5504.h +header-test- += linux/iio/dac/ad5791.h +header-test- += linux/iio/dac/max517.h +header-test- += linux/iio/dac/mcp4725.h +header-test- += linux/iio/frequency/ad9523.h +header-test- += linux/iio/frequency/adf4350.h +header-test- += linux/iio/hw-consumer.h +header-test- += linux/iio/imu/adis.h +header-test- += linux/iio/sysfs.h +header-test- += linux/iio/timer/stm32-timer-trigger.h +header-test- += linux/iio/trigger.h +header-test- += linux/iio/triggered_event.h +header-test- += linux/imx-media.h +header-test- += linux/inet_diag.h +header-test- += linux/init_ohci1394_dma.h +header-test- += linux/initrd.h +header-test- += linux/input/adp5589.h +header-test- += linux/input/bu21013.h +header-test- += linux/input/cma3000.h +header-test- += linux/input/kxtj9.h +header-test- += linux/input/lm8333.h +header-test- += linux/input/sparse-keymap.h +header-test- += linux/input/touchscreen.h +header-test- += linux/input/tps6507x-ts.h +header-test-$(CONFIG_X86) += linux/intel-iommu.h +header-test- += linux/intel-ish-client-if.h +header-test- += linux/intel-pti.h +header-test- += linux/intel-svm.h +header-test- += linux/interconnect-provider.h +header-test- += linux/ioc3.h +header-test- += linux/ipack.h +header-test- += linux/irq_cpustat.h +header-test- += linux/irq_poll.h +header-test- += linux/irqchip/arm-gic-v3.h +header-test- += linux/irqchip/arm-gic-v4.h +header-test- += linux/irqchip/irq-madera.h +header-test- += linux/irqchip/irq-sa11x0.h +header-test- += linux/irqchip/mxs.h +header-test- += linux/irqchip/versatile-fpga.h +header-test- += linux/irqdesc.h +header-test- += linux/irqflags.h +header-test- += linux/iscsi_boot_sysfs.h +header-test- += linux/isdn/capiutil.h +header-test- += linux/isdn/hdlc.h +header-test- += linux/isdn_ppp.h +header-test- += linux/jbd2.h +header-test- += linux/jz4740-adc.h +header-test- += linux/kasan.h +header-test- += linux/kcore.h +header-test- += linux/kdev_t.h +header-test- += linux/kernelcapi.h +header-test- += linux/khugepaged.h +header-test- += linux/kobj_map.h +header-test- += linux/kobject_ns.h +header-test- += linux/kvm_host.h +header-test- += linux/kvm_irqfd.h +header-test- += linux/kvm_para.h +header-test- += linux/lantiq.h +header-test- += linux/lapb.h +header-test- += linux/latencytop.h +header-test- += linux/led-lm3530.h +header-test- += linux/leds-bd2802.h +header-test- += linux/leds-lp3944.h +header-test- += linux/leds-lp3952.h +header-test- += linux/leds_pwm.h +header-test- += linux/libata.h +header-test- += linux/license.h +header-test- += linux/lightnvm.h +header-test- += linux/lis3lv02d.h +header-test- += linux/list_bl.h +header-test- += linux/list_lru.h +header-test- += linux/list_nulls.h +header-test- += linux/lockd/share.h +header-test- += linux/lzo.h +header-test- += linux/mailbox/zynqmp-ipi-message.h +header-test- += linux/maple.h +header-test- += linux/mbcache.h +header-test- += linux/mbus.h +header-test- += linux/mc146818rtc.h +header-test- += linux/mc6821.h +header-test- += linux/mdev.h +header-test- += linux/mem_encrypt.h +header-test- += linux/memfd.h +header-test- += linux/mfd/88pm80x.h +header-test- += linux/mfd/88pm860x.h +header-test- += linux/mfd/abx500/ab8500-bm.h +header-test- += linux/mfd/abx500/ab8500-gpadc.h +header-test- += linux/mfd/adp5520.h +header-test- += linux/mfd/arizona/pdata.h +header-test- += linux/mfd/as3711.h +header-test- += linux/mfd/as3722.h +header-test- += linux/mfd/cros_ec_commands.h +header-test- += linux/mfd/da903x.h +header-test- += linux/mfd/da9055/pdata.h +header-test- += linux/mfd/da9063/pdata.h +header-test- += linux/mfd/db8500-prcmu.h +header-test- += linux/mfd/dbx500-prcmu.h +header-test- += linux/mfd/dln2.h +header-test- += linux/mfd/dm355evm_msp.h +header-test- += linux/mfd/ds1wm.h +header-test- += linux/mfd/ezx-pcap.h +header-test- += linux/mfd/intel_msic.h +header-test- += linux/mfd/janz.h +header-test- += linux/mfd/kempld.h +header-test- += linux/mfd/lm3533.h +header-test- += linux/mfd/lp8788-isink.h +header-test- += linux/mfd/lpc_ich.h +header-test- += linux/mfd/max77693.h +header-test- += linux/mfd/max8998-private.h +header-test- += linux/mfd/menelaus.h +header-test- += linux/mfd/mt6397/core.h +header-test- += linux/mfd/palmas.h +header-test- += linux/mfd/pcf50633/backlight.h +header-test- += linux/mfd/rc5t583.h +header-test- += linux/mfd/retu.h +header-test- += linux/mfd/samsung/core.h +header-test- += linux/mfd/si476x-platform.h +header-test- += linux/mfd/si476x-reports.h +header-test- += linux/mfd/sky81452.h +header-test- += linux/mfd/smsc.h +header-test- += linux/mfd/sta2x11-mfd.h +header-test- += linux/mfd/stmfx.h +header-test- += linux/mfd/tc3589x.h +header-test- += linux/mfd/tc6387xb.h +header-test- += linux/mfd/tc6393xb.h +header-test- += linux/mfd/tps65090.h +header-test- += linux/mfd/tps6586x.h +header-test- += linux/mfd/tps65910.h +header-test- += linux/mfd/tps80031.h +header-test- += linux/mfd/ucb1x00.h +header-test- += linux/mfd/viperboard.h +header-test- += linux/mfd/wm831x/core.h +header-test- += linux/mfd/wm831x/otp.h +header-test- += linux/mfd/wm831x/pdata.h +header-test- += linux/mfd/wm8994/core.h +header-test- += linux/mfd/wm8994/pdata.h +header-test- += linux/mlx4/doorbell.h +header-test- += linux/mlx4/srq.h +header-test- += linux/mlx5/doorbell.h +header-test- += linux/mlx5/eq.h +header-test- += linux/mlx5/fs_helpers.h +header-test- += linux/mlx5/mlx5_ifc.h +header-test- += linux/mlx5/mlx5_ifc_fpga.h +header-test- += linux/mm-arch-hooks.h +header-test- += linux/mm_inline.h +header-test- += linux/mmu_context.h +header-test- += linux/mpage.h +header-test- += linux/mtd/bbm.h +header-test- += linux/mtd/cfi.h +header-test- += linux/mtd/doc2000.h +header-test- += linux/mtd/flashchip.h +header-test- += linux/mtd/ftl.h +header-test- += linux/mtd/gen_probe.h +header-test- += linux/mtd/jedec.h +header-test- += linux/mtd/nand_bch.h +header-test- += linux/mtd/nand_ecc.h +header-test- += linux/mtd/ndfc.h +header-test- += linux/mtd/onenand.h +header-test- += linux/mtd/pismo.h +header-test- += linux/mtd/plat-ram.h +header-test- += linux/mtd/spi-nor.h +header-test- += linux/mv643xx.h +header-test- += linux/mv643xx_eth.h +header-test- += linux/mvebu-pmsu.h +header-test- += linux/mxm-wmi.h +header-test- += linux/n_r3964.h +header-test- += linux/ndctl.h +header-test- += linux/netfilter/ipset/ip_set.h +header-test- += linux/netfilter/ipset/ip_set_bitmap.h +header-test- += linux/netfilter/ipset/ip_set_comment.h +header-test- += linux/netfilter/ipset/ip_set_counter.h +header-test- += linux/netfilter/ipset/ip_set_getport.h +header-test- += linux/netfilter/ipset/ip_set_hash.h +header-test- += linux/netfilter/ipset/ip_set_list.h +header-test- += linux/netfilter/ipset/ip_set_skbinfo.h +header-test- += linux/netfilter/ipset/ip_set_timeout.h +header-test- += linux/netfilter/nf_conntrack_amanda.h +header-test- += linux/netfilter/nf_conntrack_ftp.h +header-test- += linux/netfilter/nf_conntrack_h323.h +header-test- += linux/netfilter/nf_conntrack_h323_asn1.h +header-test- += linux/netfilter/nf_conntrack_irc.h +header-test- += linux/netfilter/nf_conntrack_pptp.h +header-test- += linux/netfilter/nf_conntrack_proto_gre.h +header-test- += linux/netfilter/nf_conntrack_sip.h +header-test- += linux/netfilter/nf_conntrack_snmp.h +header-test- += linux/netfilter/nf_conntrack_tftp.h +header-test- += linux/netfilter/x_tables.h +header-test- += linux/netfilter_arp/arp_tables.h +header-test- += linux/netfilter_bridge/ebtables.h +header-test- += linux/netfilter_ipv4/ip4_tables.h +header-test- += linux/netfilter_ipv4/ip_tables.h +header-test- += linux/netfilter_ipv6/ip6_tables.h +header-test- += linux/nfs.h +header-test- += linux/nfs_fs_i.h +header-test- += linux/nfs_fs_sb.h +header-test- += linux/nfs_page.h +header-test- += linux/nfs_xdr.h +header-test- += linux/nfsacl.h +header-test- += linux/nl802154.h +header-test- += linux/ns_common.h +header-test- += linux/nsc_gpio.h +header-test- += linux/ntb_transport.h +header-test- += linux/nubus.h +header-test- += linux/nvme-fc-driver.h +header-test- += linux/nvme-fc.h +header-test- += linux/nvme-rdma.h +header-test- += linux/nvram.h +header-test- += linux/objagg.h +header-test- += linux/of_clk.h +header-test- += linux/of_net.h +header-test- += linux/of_pdt.h +header-test- += linux/olpc-ec.h +header-test- += linux/omap-dma.h +header-test- += linux/omap-dmaengine.h +header-test- += linux/omap-gpmc.h +header-test- += linux/omap-iommu.h +header-test- += linux/omap-mailbox.h +header-test- += linux/osq_lock.h +header-test- += linux/overflow.h +header-test- += linux/page-flags-layout.h +header-test- += linux/page-isolation.h +header-test- += linux/page_ext.h +header-test- += linux/page_owner.h +header-test- += linux/parport_pc.h +header-test- += linux/parser.h +header-test- += linux/pci-acpi.h +header-test- += linux/pci-dma-compat.h +header-test- += linux/pci_hotplug.h +header-test- += linux/pda_power.h +header-test- += linux/perf/arm_pmu.h +header-test- += linux/perf_regs.h +header-test- += linux/phy/omap_control_phy.h +header-test- += linux/phy/tegra/xusb.h +header-test- += linux/phy/ulpi_phy.h +header-test- += linux/phy_fixed.h +header-test- += linux/pinctrl/pinconf-generic.h +header-test- += linux/pinctrl/pinconf.h +header-test- += linux/pinctrl/pinctrl.h +header-test- += linux/pipe_fs_i.h +header-test- += linux/pktcdvd.h +header-test- += linux/pl320-ipc.h +header-test- += linux/pl353-smc.h +header-test- += linux/platform_data/ad5449.h +header-test- += linux/platform_data/ad5755.h +header-test- += linux/platform_data/ad7266.h +header-test- += linux/platform_data/ad7291.h +header-test- += linux/platform_data/ad7298.h +header-test- += linux/platform_data/ad7303.h +header-test- += linux/platform_data/ad7791.h +header-test- += linux/platform_data/ad7793.h +header-test- += linux/platform_data/ad7887.h +header-test- += linux/platform_data/adau17x1.h +header-test- += linux/platform_data/adp8870.h +header-test- += linux/platform_data/ads1015.h +header-test- += linux/platform_data/ads7828.h +header-test- += linux/platform_data/apds990x.h +header-test- += linux/platform_data/arm-ux500-pm.h +header-test- += linux/platform_data/asoc-s3c.h +header-test- += linux/platform_data/at91_adc.h +header-test- += linux/platform_data/ata-pxa.h +header-test- += linux/platform_data/atmel.h +header-test- += linux/platform_data/bh1770glc.h +header-test- += linux/platform_data/brcmfmac.h +header-test- += linux/platform_data/clk-u300.h +header-test- += linux/platform_data/cyttsp4.h +header-test- += linux/platform_data/dma-coh901318.h +header-test- += linux/platform_data/dma-imx-sdma.h +header-test- += linux/platform_data/dma-mcf-edma.h +header-test- += linux/platform_data/dma-s3c24xx.h +header-test- += linux/platform_data/dmtimer-omap.h +header-test- += linux/platform_data/dsa.h +header-test- += linux/platform_data/edma.h +header-test- += linux/platform_data/elm.h +header-test- += linux/platform_data/emif_plat.h +header-test- += linux/platform_data/fsa9480.h +header-test- += linux/platform_data/g762.h +header-test- += linux/platform_data/gpio-ath79.h +header-test- += linux/platform_data/gpio-davinci.h +header-test- += linux/platform_data/gpio-dwapb.h +header-test- += linux/platform_data/gpio-htc-egpio.h +header-test- += linux/platform_data/gpmc-omap.h +header-test- += linux/platform_data/hsmmc-omap.h +header-test- += linux/platform_data/hwmon-s3c.h +header-test- += linux/platform_data/i2c-davinci.h +header-test- += linux/platform_data/i2c-imx.h +header-test- += linux/platform_data/i2c-mux-reg.h +header-test- += linux/platform_data/i2c-ocores.h +header-test- += linux/platform_data/i2c-xiic.h +header-test- += linux/platform_data/intel-spi.h +header-test- += linux/platform_data/invensense_mpu6050.h +header-test- += linux/platform_data/irda-pxaficp.h +header-test- += linux/platform_data/irda-sa11x0.h +header-test- += linux/platform_data/itco_wdt.h +header-test- += linux/platform_data/jz4740/jz4740_nand.h +header-test- += linux/platform_data/keyboard-pxa930_rotary.h +header-test- += linux/platform_data/keypad-omap.h +header-test- += linux/platform_data/leds-lp55xx.h +header-test- += linux/platform_data/leds-omap.h +header-test- += linux/platform_data/lp855x.h +header-test- += linux/platform_data/lp8727.h +header-test- += linux/platform_data/max197.h +header-test- += linux/platform_data/max3421-hcd.h +header-test- += linux/platform_data/max732x.h +header-test- += linux/platform_data/mcs.h +header-test- += linux/platform_data/mdio-bcm-unimac.h +header-test- += linux/platform_data/mdio-gpio.h +header-test- += linux/platform_data/media/si4713.h +header-test- += linux/platform_data/mlxreg.h +header-test- += linux/platform_data/mmc-omap.h +header-test- += linux/platform_data/mmc-sdhci-s3c.h +header-test- += linux/platform_data/mmp_audio.h +header-test- += linux/platform_data/mtd-orion_nand.h +header-test- += linux/platform_data/mv88e6xxx.h +header-test- += linux/platform_data/net-cw1200.h +header-test- += linux/platform_data/omap-twl4030.h +header-test- += linux/platform_data/omapdss.h +header-test- += linux/platform_data/pcf857x.h +header-test- += linux/platform_data/pixcir_i2c_ts.h +header-test- += linux/platform_data/pwm_omap_dmtimer.h +header-test- += linux/platform_data/pxa2xx_udc.h +header-test- += linux/platform_data/pxa_sdhci.h +header-test- += linux/platform_data/remoteproc-omap.h +header-test- += linux/platform_data/sa11x0-serial.h +header-test- += linux/platform_data/sc18is602.h +header-test- += linux/platform_data/sdhci-pic32.h +header-test- += linux/platform_data/serial-sccnxp.h +header-test- += linux/platform_data/sht3x.h +header-test- += linux/platform_data/shtc1.h +header-test- += linux/platform_data/si5351.h +header-test- += linux/platform_data/sky81452-backlight.h +header-test- += linux/platform_data/spi-davinci.h +header-test- += linux/platform_data/spi-ep93xx.h +header-test- += linux/platform_data/spi-mt65xx.h +header-test- += linux/platform_data/spi-nuc900.h +header-test- += linux/platform_data/st_sensors_pdata.h +header-test- += linux/platform_data/ti-sysc.h +header-test- += linux/platform_data/timer-ixp4xx.h +header-test- += linux/platform_data/touchscreen-s3c2410.h +header-test- += linux/platform_data/tsc2007.h +header-test- += linux/platform_data/tsl2772.h +header-test- += linux/platform_data/uio_pruss.h +header-test- += linux/platform_data/usb-davinci.h +header-test- += linux/platform_data/usb-ehci-mxc.h +header-test- += linux/platform_data/usb-ehci-orion.h +header-test- += linux/platform_data/usb-mx2.h +header-test- += linux/platform_data/usb-ohci-s3c2410.h +header-test- += linux/platform_data/usb-omap.h +header-test- += linux/platform_data/usb-s3c2410_udc.h +header-test- += linux/platform_data/usb3503.h +header-test- += linux/platform_data/ux500_wdt.h +header-test- += linux/platform_data/video-clcd-versatile.h +header-test- += linux/platform_data/video-imxfb.h +header-test- += linux/platform_data/video-nuc900fb.h +header-test- += linux/platform_data/video-pxafb.h +header-test- += linux/platform_data/video_s3c.h +header-test- += linux/platform_data/voltage-omap.h +header-test- += linux/platform_data/x86/apple.h +header-test- += linux/platform_data/x86/clk-pmc-atom.h +header-test- += linux/platform_data/x86/pmc_atom.h +header-test- += linux/platform_data/xtalk-bridge.h +header-test- += linux/pm2301_charger.h +header-test- += linux/pm_wakeirq.h +header-test- += linux/pm_wakeup.h +header-test- += linux/pmbus.h +header-test- += linux/pmu.h +header-test- += linux/posix_acl.h +header-test- += linux/posix_acl_xattr.h +header-test- += linux/power/ab8500.h +header-test- += linux/power/bq27xxx_battery.h +header-test- += linux/power/generic-adc-battery.h +header-test- += linux/power/jz4740-battery.h +header-test- += linux/power/max17042_battery.h +header-test- += linux/power/max8903_charger.h +header-test- += linux/ppp-comp.h +header-test- += linux/pps-gpio.h +header-test- += linux/pr.h +header-test- += linux/proc_ns.h +header-test- += linux/processor.h +header-test- += linux/psi.h +header-test- += linux/psp-sev.h +header-test- += linux/pstore.h +header-test- += linux/ptr_ring.h +header-test- += linux/qcom-geni-se.h +header-test- += linux/qed/eth_common.h +header-test- += linux/qed/fcoe_common.h +header-test- += linux/qed/iscsi_common.h +header-test- += linux/qed/iwarp_common.h +header-test- += linux/qed/qed_eth_if.h +header-test- += linux/qed/qed_fcoe_if.h +header-test- += linux/qed/rdma_common.h +header-test- += linux/qed/storage_common.h +header-test- += linux/qed/tcp_common.h +header-test- += linux/qnx6_fs.h +header-test- += linux/quicklist.h +header-test- += linux/ramfs.h +header-test- += linux/range.h +header-test- += linux/rcu_node_tree.h +header-test- += linux/rculist_bl.h +header-test- += linux/rculist_nulls.h +header-test- += linux/rcutiny.h +header-test- += linux/rcutree.h +header-test- += linux/reboot-mode.h +header-test- += linux/regulator/fixed.h +header-test- += linux/regulator/gpio-regulator.h +header-test- += linux/regulator/max8973-regulator.h +header-test- += linux/regulator/of_regulator.h +header-test- += linux/regulator/tps51632-regulator.h +header-test- += linux/regulator/tps62360.h +header-test- += linux/regulator/tps6507x.h +header-test- += linux/regulator/userspace-consumer.h +header-test- += linux/remoteproc/st_slim_rproc.h +header-test- += linux/reset/socfpga.h +header-test- += linux/reset/sunxi.h +header-test- += linux/rtc/m48t59.h +header-test- += linux/rtc/rtc-omap.h +header-test- += linux/rtc/sirfsoc_rtciobrg.h +header-test- += linux/rwlock.h +header-test- += linux/rwlock_types.h +header-test- += linux/scc.h +header-test- += linux/sched/deadline.h +header-test- += linux/sched/sysctl.h +header-test- += linux/sched_clock.h +header-test- += linux/scpi_protocol.h +header-test- += linux/scx200_gpio.h +header-test- += linux/seccomp.h +header-test- += linux/sed-opal.h +header-test- += linux/seg6_iptunnel.h +header-test- += linux/selection.h +header-test- += linux/set_memory.h +header-test- += linux/shrinker.h +header-test- += linux/sirfsoc_dma.h +header-test- += linux/skb_array.h +header-test- += linux/slab_def.h +header-test- += linux/slub_def.h +header-test- += linux/sm501.h +header-test- += linux/smc91x.h +header-test- += linux/soc/actions/owl-sps.h +header-test- += linux/soc/amlogic/meson-canvas.h +header-test- += linux/soc/brcmstb/brcmstb.h +header-test- += linux/soc/ixp4xx/npe.h +header-test- += linux/soc/mediatek/infracfg.h +header-test- += linux/soc/qcom/smd-rpm.h +header-test- += linux/soc/qcom/smem.h +header-test- += linux/soc/qcom/smem_state.h +header-test- += linux/soc/qcom/wcnss_ctrl.h +header-test- += linux/soc/renesas/rcar-rst.h +header-test- += linux/soc/samsung/exynos-pmu.h +header-test- += linux/soc/sunxi/sunxi_sram.h +header-test- += linux/soc/ti/ti-msgmgr.h +header-test- += linux/soc/ti/ti_sci_inta_msi.h +header-test- += linux/soc/ti/ti_sci_protocol.h +header-test- += linux/soundwire/sdw.h +header-test- += linux/soundwire/sdw_intel.h +header-test- += linux/soundwire/sdw_type.h +header-test- += linux/spi/ad7877.h +header-test- += linux/spi/ads7846.h +header-test- += linux/spi/at86rf230.h +header-test- += linux/spi/ds1305.h +header-test- += linux/spi/libertas_spi.h +header-test- += linux/spi/lms283gf05.h +header-test- += linux/spi/max7301.h +header-test- += linux/spi/mcp23s08.h +header-test- += linux/spi/rspi.h +header-test- += linux/spi/s3c24xx.h +header-test- += linux/spi/sh_msiof.h +header-test- += linux/spi/spi-fsl-dspi.h +header-test- += linux/spi/spi_bitbang.h +header-test- += linux/spi/spi_gpio.h +header-test- += linux/spi/xilinx_spi.h +header-test- += linux/spinlock_api_smp.h +header-test- += linux/spinlock_api_up.h +header-test- += linux/spinlock_types.h +header-test- += linux/splice.h +header-test- += linux/sram.h +header-test- += linux/srcutiny.h +header-test- += linux/srcutree.h +header-test- += linux/ssb/ssb_driver_chipcommon.h +header-test- += linux/ssb/ssb_driver_extif.h +header-test- += linux/ssb/ssb_driver_mips.h +header-test- += linux/ssb/ssb_driver_pci.h +header-test- += linux/ssbi.h +header-test- += linux/stackdepot.h +header-test- += linux/stmp3xxx_rtc_wdt.h +header-test- += linux/string_helpers.h +header-test- += linux/sungem_phy.h +header-test- += linux/sunrpc/msg_prot.h +header-test- += linux/sunrpc/rpc_pipe_fs.h +header-test- += linux/sunrpc/xprtmultipath.h +header-test- += linux/sunrpc/xprtsock.h +header-test- += linux/sunxi-rsb.h +header-test- += linux/svga.h +header-test- += linux/sw842.h +header-test- += linux/swapfile.h +header-test- += linux/swapops.h +header-test- += linux/swiotlb.h +header-test- += linux/sysv_fs.h +header-test- += linux/t10-pi.h +header-test- += linux/task_io_accounting.h +header-test- += linux/tick.h +header-test- += linux/timb_dma.h +header-test- += linux/timekeeping.h +header-test- += linux/timekeeping32.h +header-test- += linux/ts-nbus.h +header-test- += linux/tsacct_kern.h +header-test- += linux/tty_flip.h +header-test- += linux/tty_ldisc.h +header-test- += linux/ucb1400.h +header-test- += linux/usb/association.h +header-test- += linux/usb/cdc-wdm.h +header-test- += linux/usb/cdc_ncm.h +header-test- += linux/usb/ezusb.h +header-test- += linux/usb/gadget_configfs.h +header-test- += linux/usb/gpio_vbus.h +header-test- += linux/usb/hcd.h +header-test- += linux/usb/iowarrior.h +header-test- += linux/usb/irda.h +header-test- += linux/usb/isp116x.h +header-test- += linux/usb/isp1362.h +header-test- += linux/usb/musb.h +header-test- += linux/usb/net2280.h +header-test- += linux/usb/ohci_pdriver.h +header-test- += linux/usb/otg-fsm.h +header-test- += linux/usb/pd_ado.h +header-test- += linux/usb/r8a66597.h +header-test- += linux/usb/rndis_host.h +header-test- += linux/usb/serial.h +header-test- += linux/usb/sl811.h +header-test- += linux/usb/storage.h +header-test- += linux/usb/uas.h +header-test- += linux/usb/usb338x.h +header-test- += linux/usb/usbnet.h +header-test- += linux/usb/wusb-wa.h +header-test- += linux/usb/xhci-dbgp.h +header-test- += linux/usb_usual.h +header-test- += linux/user-return-notifier.h +header-test- += linux/userfaultfd_k.h +header-test- += linux/verification.h +header-test- += linux/via_core.h +header-test- += linux/via_i2c.h +header-test- += linux/virtio_byteorder.h +header-test- += linux/virtio_ring.h +header-test- += linux/visorbus.h +header-test- += linux/vme.h +header-test- += linux/vmstat.h +header-test- += linux/vmw_vmci_api.h +header-test- += linux/vmw_vmci_defs.h +header-test- += linux/vringh.h +header-test- += linux/vt_buffer.h +header-test- += linux/zorro.h +header-test- += linux/zpool.h +header-test- += math-emu/double.h +header-test- += math-emu/op-common.h +header-test- += math-emu/quad.h +header-test- += math-emu/single.h +header-test- += math-emu/soft-fp.h +header-test- += media/davinci/dm355_ccdc.h +header-test- += media/davinci/dm644x_ccdc.h +header-test- += media/davinci/isif.h +header-test- += media/davinci/vpbe_osd.h +header-test- += media/davinci/vpbe_types.h +header-test- += media/davinci/vpif_types.h +header-test- += media/demux.h +header-test- += media/drv-intf/soc_mediabus.h +header-test- += media/dvb_net.h +header-test- += media/fwht-ctrls.h +header-test- += media/i2c/ad9389b.h +header-test- += media/i2c/adv7343.h +header-test- += media/i2c/adv7511.h +header-test- += media/i2c/adv7842.h +header-test- += media/i2c/m5mols.h +header-test- += media/i2c/mt9m032.h +header-test- += media/i2c/mt9t112.h +header-test- += media/i2c/mt9v032.h +header-test- += media/i2c/ov2659.h +header-test- += media/i2c/ov7670.h +header-test- += media/i2c/rj54n1cb0c.h +header-test- += media/i2c/saa6588.h +header-test- += media/i2c/saa7115.h +header-test- += media/i2c/sr030pc30.h +header-test- += media/i2c/tc358743.h +header-test- += media/i2c/tda1997x.h +header-test- += media/i2c/ths7303.h +header-test- += media/i2c/tvaudio.h +header-test- += media/i2c/tvp514x.h +header-test- += media/i2c/tvp7002.h +header-test- += media/i2c/wm8775.h +header-test- += media/imx.h +header-test- += media/media-dev-allocator.h +header-test- += media/mpeg2-ctrls.h +header-test- += media/rcar-fcp.h +header-test- += media/tuner-types.h +header-test- += media/tveeprom.h +header-test- += media/v4l2-flash-led-class.h +header-test- += misc/altera.h +header-test- += misc/cxl-base.h +header-test- += misc/cxllib.h +header-test- += net/9p/9p.h +header-test- += net/9p/client.h +header-test- += net/9p/transport.h +header-test- += net/af_vsock.h +header-test- += net/ax88796.h +header-test- += net/bluetooth/hci.h +header-test- += net/bluetooth/hci_core.h +header-test- += net/bluetooth/hci_mon.h +header-test- += net/bluetooth/hci_sock.h +header-test- += net/bluetooth/l2cap.h +header-test- += net/bluetooth/mgmt.h +header-test- += net/bluetooth/rfcomm.h +header-test- += net/bluetooth/sco.h +header-test- += net/bond_options.h +header-test- += net/caif/cfsrvl.h +header-test- += net/codel_impl.h +header-test- += net/codel_qdisc.h +header-test- += net/compat.h +header-test- += net/datalink.h +header-test- += net/dcbevent.h +header-test- += net/dcbnl.h +header-test- += net/dn_dev.h +header-test- += net/dn_fib.h +header-test- += net/dn_neigh.h +header-test- += net/dn_nsp.h +header-test- += net/dn_route.h +header-test- += net/erspan.h +header-test- += net/esp.h +header-test- += net/ethoc.h +header-test- += net/firewire.h +header-test- += net/flow_offload.h +header-test- += net/fq.h +header-test- += net/fq_impl.h +header-test- += net/garp.h +header-test- += net/gtp.h +header-test- += net/gue.h +header-test- += net/hwbm.h +header-test- += net/ila.h +header-test- += net/inet6_connection_sock.h +header-test- += net/inet_common.h +header-test- += net/inet_frag.h +header-test- += net/ip6_route.h +header-test- += net/ip_vs.h +header-test- += net/ipcomp.h +header-test- += net/ipconfig.h +header-test- += net/iucv/af_iucv.h +header-test- += net/iucv/iucv.h +header-test- += net/lapb.h +header-test- += net/llc_c_ac.h +header-test- += net/llc_c_st.h +header-test- += net/llc_s_ac.h +header-test- += net/llc_s_ev.h +header-test- += net/llc_s_st.h +header-test- += net/mpls_iptunnel.h +header-test- += net/mrp.h +header-test- += net/ncsi.h +header-test- += net/netevent.h +header-test- += net/netfilter/br_netfilter.h +header-test- += net/netfilter/ipv4/nf_dup_ipv4.h +header-test- += net/netfilter/ipv6/nf_defrag_ipv6.h +header-test- += net/netfilter/ipv6/nf_dup_ipv6.h +header-test- += net/netfilter/nf_conntrack.h +header-test- += net/netfilter/nf_conntrack_acct.h +header-test- += net/netfilter/nf_conntrack_bridge.h +header-test- += net/netfilter/nf_conntrack_core.h +header-test- += net/netfilter/nf_conntrack_count.h +header-test- += net/netfilter/nf_conntrack_ecache.h +header-test- += net/netfilter/nf_conntrack_expect.h +header-test- += net/netfilter/nf_conntrack_extend.h +header-test- += net/netfilter/nf_conntrack_helper.h +header-test- += net/netfilter/nf_conntrack_l4proto.h +header-test- += net/netfilter/nf_conntrack_labels.h +header-test- += net/netfilter/nf_conntrack_seqadj.h +header-test- += net/netfilter/nf_conntrack_synproxy.h +header-test- += net/netfilter/nf_conntrack_timeout.h +header-test- += net/netfilter/nf_conntrack_timestamp.h +header-test- += net/netfilter/nf_conntrack_tuple.h +header-test- += net/netfilter/nf_dup_netdev.h +header-test- += net/netfilter/nf_flow_table.h +header-test- += net/netfilter/nf_nat.h +header-test- += net/netfilter/nf_nat_helper.h +header-test- += net/netfilter/nf_nat_masquerade.h +header-test- += net/netfilter/nf_nat_redirect.h +header-test- += net/netfilter/nf_queue.h +header-test- += net/netfilter/nf_reject.h +header-test- += net/netfilter/nf_synproxy.h +header-test- += net/netfilter/nf_tables.h +header-test- += net/netfilter/nf_tables_core.h +header-test- += net/netfilter/nf_tables_ipv4.h +header-test- += net/netfilter/nf_tables_ipv6.h +header-test- += net/netfilter/nft_fib.h +header-test- += net/netfilter/nft_reject.h +header-test- += net/netns/can.h +header-test- += net/netns/generic.h +header-test- += net/netns/ieee802154_6lowpan.h +header-test- += net/netns/ipv4.h +header-test- += net/netns/ipv6.h +header-test- += net/netns/mpls.h +header-test- += net/netns/nftables.h +header-test- += net/netns/sctp.h +header-test- += net/netrom.h +header-test- += net/p8022.h +header-test- += net/phonet/pep.h +header-test- += net/phonet/phonet.h +header-test- += net/phonet/pn_dev.h +header-test- += net/pptp.h +header-test- += net/psample.h +header-test- += net/psnap.h +header-test- += net/regulatory.h +header-test- += net/rose.h +header-test- += net/sctp/auth.h +header-test- += net/sctp/stream_interleave.h +header-test- += net/sctp/stream_sched.h +header-test- += net/sctp/tsnmap.h +header-test- += net/sctp/ulpevent.h +header-test- += net/sctp/ulpqueue.h +header-test- += net/secure_seq.h +header-test- += net/smc.h +header-test- += net/stp.h +header-test- += net/transp_v6.h +header-test- += net/tun_proto.h +header-test- += net/udplite.h +header-test- += net/xdp.h +header-test- += net/xdp_priv.h +header-test- += pcmcia/cistpl.h +header-test- += pcmcia/ds.h +header-test- += rdma/ib.h +header-test- += rdma/iw_portmap.h +header-test- += rdma/opa_port_info.h +header-test- += rdma/rdmavt_cq.h +header-test- += rdma/restrack.h +header-test- += rdma/signature.h +header-test- += rdma/tid_rdma_defs.h +header-test- += scsi/fc/fc_encaps.h +header-test- += scsi/fc/fc_fc2.h +header-test- += scsi/fc/fc_fcoe.h +header-test- += scsi/fc/fc_fip.h +header-test- += scsi/fc_encode.h +header-test- += scsi/fc_frame.h +header-test- += scsi/iser.h +header-test- += scsi/libfc.h +header-test- += scsi/libfcoe.h +header-test- += scsi/libsas.h +header-test- += scsi/sas_ata.h +header-test- += scsi/scsi_cmnd.h +header-test- += scsi/scsi_dbg.h +header-test- += scsi/scsi_device.h +header-test- += scsi/scsi_dh.h +header-test- += scsi/scsi_eh.h +header-test- += scsi/scsi_host.h +header-test- += scsi/scsi_ioctl.h +header-test- += scsi/scsi_request.h +header-test- += scsi/scsi_tcq.h +header-test- += scsi/scsi_transport.h +header-test- += scsi/scsi_transport_fc.h +header-test- += scsi/scsi_transport_sas.h +header-test- += scsi/scsi_transport_spi.h +header-test- += scsi/scsi_transport_srp.h +header-test- += scsi/scsicam.h +header-test- += scsi/sg.h +header-test- += soc/arc/aux.h +header-test- += soc/arc/mcip.h +header-test- += soc/arc/timers.h +header-test- += soc/brcmstb/common.h +header-test- += soc/fsl/bman.h +header-test- += soc/fsl/qe/qe.h +header-test- += soc/fsl/qe/qe_ic.h +header-test- += soc/fsl/qe/qe_tdm.h +header-test- += soc/fsl/qe/ucc.h +header-test- += soc/fsl/qe/ucc_fast.h +header-test- += soc/fsl/qe/ucc_slow.h +header-test- += soc/fsl/qman.h +header-test- += soc/nps/common.h +header-test-$(CONFIG_ARC) += soc/nps/mtm.h +header-test- += soc/qcom/cmd-db.h +header-test- += soc/qcom/rpmh.h +header-test- += soc/qcom/tcs.h +header-test- += soc/tegra/ahb.h +header-test- += soc/tegra/bpmp-abi.h +header-test- += soc/tegra/common.h +header-test- += soc/tegra/flowctrl.h +header-test- += soc/tegra/fuse.h +header-test- += soc/tegra/mc.h +header-test- += sound/ac97/compat.h +header-test- += sound/aci.h +header-test- += sound/ad1843.h +header-test- += sound/adau1373.h +header-test- += sound/ak4113.h +header-test- += sound/ak4114.h +header-test- += sound/ak4117.h +header-test- += sound/cs35l33.h +header-test- += sound/cs35l34.h +header-test- += sound/cs35l35.h +header-test- += sound/cs35l36.h +header-test- += sound/cs4271.h +header-test- += sound/cs42l52.h +header-test- += sound/cs8427.h +header-test- += sound/da7218.h +header-test- += sound/da7219-aad.h +header-test- += sound/da7219.h +header-test- += sound/da9055.h +header-test- += sound/emu8000.h +header-test- += sound/emux_synth.h +header-test- += sound/hda_component.h +header-test- += sound/hda_hwdep.h +header-test- += sound/hda_i915.h +header-test- += sound/hwdep.h +header-test- += sound/i2c.h +header-test- += sound/l3.h +header-test- += sound/max98088.h +header-test- += sound/max98095.h +header-test- += sound/mixer_oss.h +header-test- += sound/omap-hdmi-audio.h +header-test- += sound/pcm_drm_eld.h +header-test- += sound/pcm_iec958.h +header-test- += sound/pcm_oss.h +header-test- += sound/pxa2xx-lib.h +header-test- += sound/rt286.h +header-test- += sound/rt298.h +header-test- += sound/rt5645.h +header-test- += sound/rt5659.h +header-test- += sound/rt5660.h +header-test- += sound/rt5665.h +header-test- += sound/rt5670.h +header-test- += sound/s3c24xx_uda134x.h +header-test- += sound/seq_device.h +header-test- += sound/seq_kernel.h +header-test- += sound/seq_midi_emul.h +header-test- += sound/seq_oss.h +header-test- += sound/soc-acpi-intel-match.h +header-test- += sound/soc-dai.h +header-test- += sound/soc-dapm.h +header-test- += sound/soc-dpcm.h +header-test- += sound/sof/control.h +header-test- += sound/sof/dai-intel.h +header-test- += sound/sof/dai.h +header-test- += sound/sof/header.h +header-test- += sound/sof/info.h +header-test- += sound/sof/pm.h +header-test- += sound/sof/stream.h +header-test- += sound/sof/topology.h +header-test- += sound/sof/trace.h +header-test- += sound/sof/xtensa.h +header-test- += sound/spear_spdif.h +header-test- += sound/sta32x.h +header-test- += sound/sta350.h +header-test- += sound/tea6330t.h +header-test- += sound/tlv320aic32x4.h +header-test- += sound/tlv320dac33-plat.h +header-test- += sound/uda134x.h +header-test- += sound/wavefront.h +header-test- += sound/wm8903.h +header-test- += sound/wm8904.h +header-test- += sound/wm8960.h +header-test- += sound/wm8962.h +header-test- += sound/wm8993.h +header-test- += sound/wm8996.h +header-test- += sound/wm9081.h +header-test- += sound/wm9090.h +header-test- += target/iscsi/iscsi_target_stat.h +header-test- += trace/bpf_probe.h +header-test- += trace/events/9p.h +header-test- += trace/events/afs.h +header-test- += trace/events/asoc.h +header-test- += trace/events/bcache.h +header-test- += trace/events/block.h +header-test- += trace/events/cachefiles.h +header-test- += trace/events/cgroup.h +header-test- += trace/events/clk.h +header-test- += trace/events/cma.h +header-test- += trace/events/ext4.h +header-test- += trace/events/f2fs.h +header-test- += trace/events/fs_dax.h +header-test- += trace/events/fscache.h +header-test- += trace/events/fsi.h +header-test- += trace/events/fsi_master_ast_cf.h +header-test- += trace/events/fsi_master_gpio.h +header-test- += trace/events/huge_memory.h +header-test- += trace/events/ib_mad.h +header-test- += trace/events/ib_umad.h +header-test- += trace/events/iscsi.h +header-test- += trace/events/jbd2.h +header-test- += trace/events/kvm.h +header-test- += trace/events/kyber.h +header-test- += trace/events/libata.h +header-test- += trace/events/mce.h +header-test- += trace/events/mdio.h +header-test- += trace/events/migrate.h +header-test- += trace/events/mmflags.h +header-test- += trace/events/nbd.h +header-test- += trace/events/nilfs2.h +header-test- += trace/events/pwc.h +header-test- += trace/events/rdma.h +header-test- += trace/events/rpcgss.h +header-test- += trace/events/rpcrdma.h +header-test- += trace/events/rxrpc.h +header-test- += trace/events/scsi.h +header-test- += trace/events/siox.h +header-test- += trace/events/spi.h +header-test- += trace/events/swiotlb.h +header-test- += trace/events/syscalls.h +header-test- += trace/events/target.h +header-test- += trace/events/thermal_power_allocator.h +header-test- += trace/events/timer.h +header-test- += trace/events/wbt.h +header-test- += trace/events/xen.h +header-test- += trace/perf.h +header-test- += trace/trace_events.h +header-test- += uapi/drm/vmwgfx_drm.h +header-test- += uapi/linux/a.out.h +header-test- += uapi/linux/coda.h +header-test- += uapi/linux/coda_psdev.h +header-test- += uapi/linux/errqueue.h +header-test- += uapi/linux/eventpoll.h +header-test- += uapi/linux/hdlc/ioctl.h +header-test- += uapi/linux/input.h +header-test- += uapi/linux/kvm.h +header-test- += uapi/linux/kvm_para.h +header-test- += uapi/linux/lightnvm.h +header-test- += uapi/linux/mic_common.h +header-test- += uapi/linux/mman.h +header-test- += uapi/linux/netfilter/ipset/ip_set_bitmap.h +header-test- += uapi/linux/netfilter/ipset/ip_set_hash.h +header-test- += uapi/linux/netfilter/ipset/ip_set_list.h +header-test- += uapi/linux/netfilter/nf_synproxy.h +header-test- += uapi/linux/netfilter/xt_policy.h +header-test- += uapi/linux/netfilter/xt_set.h +header-test- += uapi/linux/netfilter_arp/arp_tables.h +header-test- += uapi/linux/netfilter_arp/arpt_mangle.h +header-test- += uapi/linux/netfilter_ipv4/ip_tables.h +header-test- += uapi/linux/netfilter_ipv4/ipt_LOG.h +header-test- += uapi/linux/netfilter_ipv6/ip6_tables.h +header-test- += uapi/linux/netfilter_ipv6/ip6t_LOG.h +header-test- += uapi/linux/nilfs2_ondisk.h +header-test- += uapi/linux/patchkey.h +header-test- += uapi/linux/scc.h +header-test- += uapi/linux/seg6_iptunnel.h +header-test- += uapi/linux/smc_diag.h +header-test- += uapi/linux/timex.h +header-test- += uapi/linux/videodev2.h +header-test- += uapi/scsi/scsi_bsg_fc.h +header-test- += uapi/sound/asound.h +header-test- += uapi/sound/sof/eq.h +header-test- += uapi/sound/sof/fw.h +header-test- += uapi/sound/sof/header.h +header-test- += uapi/sound/sof/manifest.h +header-test- += uapi/sound/sof/trace.h +header-test- += uapi/xen/evtchn.h +header-test- += uapi/xen/gntdev.h +header-test- += uapi/xen/privcmd.h +header-test- += vdso/vsyscall.h +header-test- += video/broadsheetfb.h +header-test- += video/cvisionppc.h +header-test- += video/gbe.h +header-test- += video/kyro.h +header-test- += video/maxinefb.h +header-test- += video/metronomefb.h +header-test- += video/neomagic.h +header-test- += video/of_display_timing.h +header-test- += video/omapvrfb.h +header-test- += video/s1d13xxxfb.h +header-test- += video/sstfb.h +header-test- += video/tgafb.h +header-test- += video/udlfb.h +header-test- += video/uvesafb.h +header-test- += video/w100fb.h +header-test- += xen/acpi.h +header-test- += xen/arm/hypercall.h +header-test- += xen/arm/page-coherent.h +header-test- += xen/arm/page.h +header-test- += xen/balloon.h +header-test- += xen/events.h +header-test- += xen/features.h +header-test- += xen/grant_table.h +header-test- += xen/hvm.h +header-test- += xen/interface/callback.h +header-test- += xen/interface/event_channel.h +header-test- += xen/interface/grant_table.h +header-test- += xen/interface/hvm/dm_op.h +header-test- += xen/interface/hvm/hvm_op.h +header-test- += xen/interface/hvm/hvm_vcpu.h +header-test- += xen/interface/hvm/params.h +header-test- += xen/interface/hvm/start_info.h +header-test- += xen/interface/io/9pfs.h +header-test- += xen/interface/io/blkif.h +header-test- += xen/interface/io/console.h +header-test- += xen/interface/io/displif.h +header-test- += xen/interface/io/fbif.h +header-test- += xen/interface/io/kbdif.h +header-test- += xen/interface/io/netif.h +header-test- += xen/interface/io/pciif.h +header-test- += xen/interface/io/protocols.h +header-test- += xen/interface/io/pvcalls.h +header-test- += xen/interface/io/ring.h +header-test- += xen/interface/io/sndif.h +header-test- += xen/interface/io/tpmif.h +header-test- += xen/interface/io/vscsiif.h +header-test- += xen/interface/io/xs_wire.h +header-test- += xen/interface/memory.h +header-test- += xen/interface/nmi.h +header-test- += xen/interface/physdev.h +header-test- += xen/interface/platform.h +header-test- += xen/interface/sched.h +header-test- += xen/interface/vcpu.h +header-test- += xen/interface/version.h +header-test- += xen/interface/xen-mca.h +header-test- += xen/interface/xen.h +header-test- += xen/interface/xenpmu.h +header-test- += xen/mem-reservation.h +header-test- += xen/page.h +header-test- += xen/platform_pci.h +header-test- += xen/swiotlb-xen.h +header-test- += xen/xen-front-pgdir-shbuf.h +header-test- += xen/xen-ops.h +header-test- += xen/xen.h +header-test- += xen/xenbus.h + +# Do not include directly +header-test- += linux/compiler-clang.h +header-test- += linux/compiler-gcc.h +header-test- += linux/patchkey.h +header-test- += linux/rwlock_api_smp.h +header-test- += linux/spinlock_types_up.h +header-test- += linux/spinlock_up.h +header-test- += linux/wimax/debug.h +header-test- += rdma/uverbs_named_ioctl.h + +# asm-generic/*.h is used by asm/*.h, and should not be included directly +header-test- += asm-generic/% uapi/asm-generic/% + +# Timestamp files touched by Kconfig +header-test- += config/% + +# Timestamp files touched by scripts/adjust_autoksyms.sh +header-test- += ksym/% + +# You could compile-test these, but maybe not so useful... +header-test- += dt-bindings/% + +# Do not test generated headers. Stale headers are often left over when you +# traverse the git history without cleaning. +header-test- += generated/% + +# The rest are compile-tested +header-test-pattern-y += */*.h */*/*.h */*/*/*.h */*/*/*/*.h diff --git a/init/Kconfig b/init/Kconfig index 74192de8ada6..e2e99544da8d 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -108,6 +108,17 @@ config HEADER_TEST If you are a developer or tester and want to ensure the requested headers are self-contained, say Y here. Otherwise, choose N. +config KERNEL_HEADER_TEST + bool "Compile test kernel headers" + depends on HEADER_TEST + help + Headers in include/ are used to build external moduls. + Compile test them to ensure they are self-contained, i.e. + compilable as standalone units. + + If you are a developer or tester and want to ensure the headers + in include/ are self-contained, say Y here. Otherwise, choose N. + config UAPI_HEADER_TEST bool "Compile test UAPI headers" depends on HEADER_TEST && HEADERS_INSTALL && CC_CAN_LINK