Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3566404ybi; Tue, 2 Jul 2019 09:47:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqyU7nwot3wURsR6CHdlQB78D4UmZhfKcyP9mf4HxRSR4T6LMbXxd13Sw2IBDEcst4d3l8aS X-Received: by 2002:a63:df46:: with SMTP id h6mr31062353pgj.181.1562086078549; Tue, 02 Jul 2019 09:47:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562086078; cv=none; d=google.com; s=arc-20160816; b=kzHOx/nCGBl8/re30S/XVRdQrpQU9I5Xn9rUyKpUkDrEU46vsUdx0ncNkVMkPI4G+a olhpAudN/48K7w6/ecyj06YFHpxPBUzOwa44tlN65JJgiT3QFI9VZ0qnSvG1WOsbK0cj rbd8y5ps5p6X17md9Se4ADb/N10goc0cws204F5ieXv7d3SlRuNPKj5jbn3MZo/EVNGK YIwWxFDkRgmzQLlXfcm9bcDtXqIgcsk0kxkRSFJNTOybYLtCKBwDAowbbCNXV4kFBuQt AdidM9uL2ZTVhK295IY7k5sYsv9GBOxTs8JP4reUN+XXDaddMYkP+TRny/EtDVON+8gI lt7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=AwqtYCgoVgMFd7zLHFhWGcqejisGWIssWVV7qBN5clA=; b=e3o4sMZYW+BejUVbro6tfMwmk4FsngbaTviHMTqxRvxuVAC518jO+mKU5vGfKYnkw6 x3uF7srTN1wAWKLvURJcBzhxPEXRvipqLfY15052yD7uJriDXiT2NExKKN7B/nf7x9m2 9XAQ02sVZpENQVF0fImIYmoFdtZXuKvuMK2RnSDtNDLWJ1+x/STjtcsUhK44MgHL2vHl Pen6SGdUVlq5STZNTqWwBmfDjwATUla+wf8eU2rlL7LZwdymnLa60x8ovhYile+oF8BU w1XUP4QIOM8UJabdw0JNRsa5tph/AHdqXk0ql11dOV2RhtFq0aNnnfUx4hxEKOpFK15W JzMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=fzB5MVLq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 6si9655242pgb.201.2019.07.02.09.47.41; Tue, 02 Jul 2019 09:47:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=fzB5MVLq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726434AbfGBQrQ (ORCPT + 99 others); Tue, 2 Jul 2019 12:47:16 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:36853 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726046AbfGBQrP (ORCPT ); Tue, 2 Jul 2019 12:47:15 -0400 Received: by mail-pg1-f195.google.com with SMTP id c13so7958590pgg.3 for ; Tue, 02 Jul 2019 09:47:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=AwqtYCgoVgMFd7zLHFhWGcqejisGWIssWVV7qBN5clA=; b=fzB5MVLqWtyuS6TrHWjeVZWCRt7xTFDG2hc/XyaXBc42/GpMFNc0clWc7wyZC3/x9k lKWMANDwnbugpxtIihI9PPsv7PZU6CAqFs74AAgSzug0hb03S3WTAXUqkf6OA2TLqj/F lAVi3uicaXPR015jxEg0o8Lz9CCKLPKG65XS0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=AwqtYCgoVgMFd7zLHFhWGcqejisGWIssWVV7qBN5clA=; b=qHMDuuZe/AW8XM6PboWxtXcswrBPRcUvk4e6F3q/6CI12+/tj6dBqnrkDP+E2LMuWQ 5MjX9RO5UN1L9Sy7jIb5N6D/ffN3OPlAfjOQjrFjS3dX83COY4T4Pohvag+NeYvoW3Jg yZNQaXiGS1BcX1AH1T21dn0gb+CghCAyAyJXuL9sIKRjN46U3rkSX41UpIQPRZVb/XBy 7xhEl59vrNnavppWIRzeyBx5QP20XwfV5KQ/0uKtGCjOicoXWIZzfbv2mjzC1NdUubQD +O+VlFw96QneOc3aAuoV8BQDOV1KWKt5STlyQ/opA1b262NnS+r/2eVTECj7CETXahSm XesQ== X-Gm-Message-State: APjAAAWjd07BX28iJS7SvcbK7421hHPhmfkv+Y+TIoErMlvAZ5c+8vEO Bx/0C2PppeeWL2Fs2WT4l2y8iw== X-Received: by 2002:a63:bd0a:: with SMTP id a10mr17207509pgf.55.1562086034555; Tue, 02 Jul 2019 09:47:14 -0700 (PDT) Received: from localhost ([2620:15c:6:12:9c46:e0da:efbf:69cc]) by smtp.gmail.com with ESMTPSA id q1sm20178917pfg.84.2019.07.02.09.47.13 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 02 Jul 2019 09:47:13 -0700 (PDT) Date: Tue, 2 Jul 2019 12:47:12 -0400 From: Joel Fernandes To: Masahiro Yamada Cc: linux-kbuild@vger.kernel.org, Sam Ravnborg , 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: Re: [PATCH 7/7] kbuild: compile-test kernel headers to ensure they are self-contained Message-ID: <20190702164712.GA98338@google.com> References: <20190701005845.12475-1-yamada.masahiro@socionext.com> <20190701005845.12475-8-yamada.masahiro@socionext.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190701005845.12475-8-yamada.masahiro@socionext.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 01, 2019 at 09:58:45AM +0900, Masahiro Yamada wrote: > The headers in include/ are globally used in the kernel source tree > to provide common APIs. They are included from external modules, too. > > It will be useful to make as many headers self-contained as possible > so that we do not have to rely on a specific include order. > > There are more than 4000 headers in include/. In my rough analysis, > 70% of them are already self-contained. With efforts, most of them > can be self-contained. > > For now, we must exclude more than 1000 headers just because they > cannot be compiled as standalone units. I added them to header-test-. > The 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 > --- > > 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 [snip > 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. Nit: modules. Otherwise lgtm, thanks for the cc. Reviewed-by: Joel Fernandes (Google)