From patchwork Mon May 18 13:37:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thadeu Lima de Souza Cascardo X-Patchwork-Id: 1292535 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49Qg6g6872z9sTY; Mon, 18 May 2020 23:37:15 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1jafx9-0007zP-Nl; Mon, 18 May 2020 13:37:11 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jafx8-0007yu-19 for kernel-team@lists.ubuntu.com; Mon, 18 May 2020 13:37:10 +0000 Received: from [191.13.27.32] (helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jafx7-00016h-AE for kernel-team@lists.ubuntu.com; Mon, 18 May 2020 13:37:09 +0000 From: Thadeu Lima de Souza Cascardo To: kernel-team@lists.ubuntu.com Subject: [SRU F/G/U 1/3] UBUNTU: [Config]: do not enforce CONFIG_VERSION_SIGNATURE Date: Mon, 18 May 2020 10:37:00 -0300 Message-Id: <20200518133702.226714-2-cascardo@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200518133702.226714-1-cascardo@canonical.com> References: <20200518133702.226714-1-cascardo@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1879327 This config option is dynamically changed by our build, which would make annotating it require changes coupled with the changelog, making it too cumbersome. Signed-off-by: Thadeu Lima de Souza Cascardo --- debian/scripts/config-check | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/scripts/config-check b/debian/scripts/config-check index 95edd39dc407..b7e37a38c207 100755 --- a/debian/scripts/config-check +++ b/debian/scripts/config-check @@ -135,6 +135,8 @@ for $config (keys %annot) { $check = 0; } if ($check) { + # CONFIG_VERSION_SIGNATURE is dynamically set during the build + next if ($config eq "CONFIG_VERSION_SIGNATURE"); my $is = '-'; $is = $values{$config} if (defined $values{$config}); From patchwork Mon May 18 13:37:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thadeu Lima de Souza Cascardo X-Patchwork-Id: 1292537 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49Qg6j1bYvz9sTd; Mon, 18 May 2020 23:37:17 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1jafxB-00080R-U8; Mon, 18 May 2020 13:37:13 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jafx9-0007zH-C2 for kernel-team@lists.ubuntu.com; Mon, 18 May 2020 13:37:11 +0000 Received: from [191.13.27.32] (helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jafx8-00016h-KC for kernel-team@lists.ubuntu.com; Mon, 18 May 2020 13:37:11 +0000 From: Thadeu Lima de Souza Cascardo To: kernel-team@lists.ubuntu.com Subject: [SRU F/G/U 2/3] UBUNTU: [Config]: prepare to enforce all Date: Mon, 18 May 2020 10:37:01 -0300 Message-Id: <20200518133702.226714-3-cascardo@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200518133702.226714-1-cascardo@canonical.com> References: <20200518133702.226714-1-cascardo@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1879327 Add an extra option to config-check script, which means to enforce all options. In case it's false, it behaves like before. In case it's true, it treats all options as enforced. By default, we call it with a false value, allowing that to be changed in $(DEBIAN)/rules.d/hooks.mk, for example. Signed-off-by: Thadeu Lima de Souza Cascardo --- debian/rules | 1 + debian/rules.d/4-checks.mk | 3 ++- debian/scripts/config-check | 10 ++++++---- debian/scripts/misc/kernelconfig | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/debian/rules b/debian/rules index 8585c1c95086..0b29cc7f4adc 100755 --- a/debian/rules +++ b/debian/rules @@ -38,6 +38,7 @@ do_cloud_tools=$(sort $(filter-out false,$(do_tools_hyperv))) do_tools_common?=true do_tools_host?=false do_tools_perf_jvmti?=false +do_enforce_all?=false # Don't build tools or udebs in a cross compile environment. ifneq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH)) diff --git a/debian/rules.d/4-checks.mk b/debian/rules.d/4-checks.mk index 3ce7e6e6f8e2..b99a1023fe5b 100644 --- a/debian/rules.d/4-checks.mk +++ b/debian/rules.d/4-checks.mk @@ -23,5 +23,6 @@ checks-%: module-check-% abi-check-% retpoline-check-% config-prepare-check-%: $(stampdir)/stamp-prepare-tree-% @echo Debug: $@ @perl -f $(DROOT)/scripts/config-check \ - $(builddir)/build-$*/.config "$(arch)" "$*" "$(commonconfdir)" "$(skipconfig)" + $(builddir)/build-$*/.config "$(arch)" "$*" "$(commonconfdir)" \ + "$(skipconfig)" "$(do_enforce_all)" diff --git a/debian/scripts/config-check b/debian/scripts/config-check index b7e37a38c207..df0cd52069b4 100755 --- a/debian/scripts/config-check +++ b/debian/scripts/config-check @@ -11,11 +11,11 @@ my $P = 'check-config'; my $test = -1; if ($ARGV[0] eq '--test') { $test = $ARGV[1] + 0; -} elsif ($#ARGV != 4) { - die "Usage: $P \n"; +} elsif ($#ARGV != 5) { + die "Usage: $P \n"; } -my ($configfile, $arch, $flavour, $commonconfig, $warn_only) = @ARGV; +my ($configfile, $arch, $flavour, $commonconfig, $warn_only, $enforce_all) = @ARGV; my %values = (); @@ -26,6 +26,8 @@ my $fail_exit = 1; $fail_exit = 0 if ($warn_only eq 'true' || $warn_only eq '1'); my $exit_val = 0; +$enforce_all = 0 if $enforce_all eq "no" or $enforce_all eq "false"; + # Load up the current configuration values -- FATAL if this fails print "$P: $configfile: loading config\n"; open(CONFIG, "<$configfile") || die "$P: $configfile: open failed -- $! -- aborting\n"; @@ -109,7 +111,7 @@ my $pass = 0; my $total = 0; my ($config, $value, $options, $option, $check, $policy); for $config (keys %annot) { - $check = 0; + $check = $enforce_all; $options = $annot{$config}; $policy = undef; diff --git a/debian/scripts/misc/kernelconfig b/debian/scripts/misc/kernelconfig index 8fc1de62ab15..fc50c48df3b7 100755 --- a/debian/scripts/misc/kernelconfig +++ b/debian/scripts/misc/kernelconfig @@ -176,7 +176,7 @@ for arch in $archs; do flavour="${config##*.}" if [ -f $archconfdir/$config ]; then fullconf="$tmpdir/CONFIGS/$arch-$config" - "$bindir/../config-check" "$fullconf" "$arch" "$flavour" "$confdir" "0" || let "fail=$fail+1" + "$bindir/../config-check" "$fullconf" "$arch" "$flavour" "$confdir" "0" "0" || let "fail=$fail+1" fi done done From patchwork Mon May 18 13:37:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thadeu Lima de Souza Cascardo X-Patchwork-Id: 1292538 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49Qg6k6F49z9sTj; Mon, 18 May 2020 23:37:18 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1jafxD-00081T-5t; Mon, 18 May 2020 13:37:15 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jafxA-000807-P1 for kernel-team@lists.ubuntu.com; Mon, 18 May 2020 13:37:12 +0000 Received: from [191.13.27.32] (helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jafx9-00016h-Vb for kernel-team@lists.ubuntu.com; Mon, 18 May 2020 13:37:12 +0000 From: Thadeu Lima de Souza Cascardo To: kernel-team@lists.ubuntu.com Subject: [SRU F/G/U 3/3] UBUNTU: [Config]: enforce all config options Date: Mon, 18 May 2020 10:37:02 -0300 Message-Id: <20200518133702.226714-4-cascardo@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200518133702.226714-1-cascardo@canonical.com> References: <20200518133702.226714-1-cascardo@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1879327 This turns the enforce all annotations option on for this branch. Signed-off-by: Thadeu Lima de Souza Cascardo --- debian.master/rules.d/hooks.mk | 1 + 1 file changed, 1 insertion(+) create mode 100644 debian.master/rules.d/hooks.mk diff --git a/debian.master/rules.d/hooks.mk b/debian.master/rules.d/hooks.mk new file mode 100644 index 000000000000..94db6b78d498 --- /dev/null +++ b/debian.master/rules.d/hooks.mk @@ -0,0 +1 @@ +do_enforce_all = true