From patchwork Tue Apr 3 16:52:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 894705 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) 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]) by ozlabs.org (Postfix) with ESMTP id 40FwBf6rrNz9s1p; Wed, 4 Apr 2018 02:52:58 +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 1f3PB1-0005kL-4R; Tue, 03 Apr 2018 16:52:55 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1f3PAw-0005fq-J8 for kernel-team@lists.ubuntu.com; Tue, 03 Apr 2018 16:52:50 +0000 Received: from 1.general.apw.uk.vpn ([10.172.192.78] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1f3PAw-0004DS-9f; Tue, 03 Apr 2018 16:52:50 +0000 From: Andy Whitcroft To: kernel-team@lists.ubuntu.com Subject: [artful/retpoline-hints 1/3] UBUNTU: [Packaging] retpoline hints -- handle missing files when RETPOLINE not enabled Date: Tue, 3 Apr 2018 17:52:41 +0100 Message-Id: <20180403165249.15489-2-apw@canonical.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180403165249.15489-1-apw@canonical.com> References: <20180403165249.15489-1-apw@canonical.com> 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: , Cc: Andy Whitcroft MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: http://bugs.launchpad.net/bugs/1758856 Signed-off-by: Andy Whitcroft --- debian/rules.d/2-binary-arch.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index f1874e2f8b4e..6a570ab22f24 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -316,7 +316,7 @@ endif rm -f $(hdrdir)/Makefile rm -rf $(hdrdir)/include2 $(hdrdir)/source # We do not need the retpoline information. - find $(hdrdir) -name \*.o.ur-\* | xargs rm + find $(hdrdir) -name \*.o.ur-\* | xargs rm -f # Copy over the compilation version. cp "$(builddir)/build-$*/include/generated/compile.h" \ "$(hdrdir)/include/generated/compile.h" From patchwork Tue Apr 3 16:52:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 894704 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) 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]) by ozlabs.org (Postfix) with ESMTP id 40FwBd48NGz9s3c; Wed, 4 Apr 2018 02:52:57 +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 1f3PAz-0005ie-Vi; Tue, 03 Apr 2018 16:52:53 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1f3PAy-0005h3-Rk for kernel-team@lists.ubuntu.com; Tue, 03 Apr 2018 16:52:52 +0000 Received: from 1.general.apw.uk.vpn ([10.172.192.78] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1f3PAy-0004Dm-Em; Tue, 03 Apr 2018 16:52:52 +0000 From: Andy Whitcroft To: kernel-team@lists.ubuntu.com Subject: [trusty/retpoline-hints 2/3] UBUNTU: [Packaging] final-checks -- remove check for empty retpoline files Date: Tue, 3 Apr 2018 17:52:46 +0100 Message-Id: <20180403165249.15489-7-apw@canonical.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180403165249.15489-1-apw@canonical.com> References: <20180403165249.15489-1-apw@canonical.com> 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: , Cc: Andy Whitcroft MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Seth Forshee With the new support for removing known safe retpoline sequences from the ones which were detected it is now completely valid to end up with an empty retpoline file in the abi. Remove the check for empty retpoline files so this will not cause an error. BugLink: http://bugs.launchpad.net/bugs/1758856 Signed-off-by: Seth Forshee Signed-off-by: Andy Whitcroft --- debian/scripts/misc/final-checks | 5 ----- 1 file changed, 5 deletions(-) diff --git a/debian/scripts/misc/final-checks b/debian/scripts/misc/final-checks index aec25770ea1b..548dea99e6a0 100755 --- a/debian/scripts/misc/final-checks +++ b/debian/scripts/misc/final-checks @@ -41,11 +41,6 @@ abi_check() then failure "$arch/$flavour ABI retpoline file missing" fi - - if [ -f "$abidir/$flavour.retpoline" -a \ - ! -s "$abidir/$flavour.retpoline" ]; then - failure "$arch/$flavour ABI retpoline file empty -- must regenerate or ignore" - fi } for arch in $archs From patchwork Tue Apr 3 16:52:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 894703 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) 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]) by ozlabs.org (Postfix) with ESMTP id 40FwBd2BN9z9s0n; Wed, 4 Apr 2018 02:52:57 +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 1f3PAy-0005hB-P7; Tue, 03 Apr 2018 16:52:52 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1f3PAx-0005gB-FD for kernel-team@lists.ubuntu.com; Tue, 03 Apr 2018 16:52:51 +0000 Received: from 1.general.apw.uk.vpn ([10.172.192.78] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1f3PAx-0004Da-5g; Tue, 03 Apr 2018 16:52:51 +0000 From: Andy Whitcroft To: kernel-team@lists.ubuntu.com Subject: [artful/retpoline-hints 3/3] UBUNTU: [Packaging] include the retpoline extractor in the headers Date: Tue, 3 Apr 2018 17:52:43 +0100 Message-Id: <20180403165249.15489-4-apw@canonical.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180403165249.15489-1-apw@canonical.com> References: <20180403165249.15489-1-apw@canonical.com> 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: , Cc: Andy Whitcroft MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: http://bugs.launchpad.net/bugs/1760876 Signed-off-by: Andy Whitcroft Acked-by: Stefan Bader Acked-by: Kleber Sacilotto de Souza --- debian/rules | 6 +++++- debian/rules.d/2-binary-arch.mk | 2 ++ scripts/Makefile.build | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/rules b/debian/rules index 61680be586f0..7519bc4a9d32 100755 --- a/debian/rules +++ b/debian/rules @@ -119,6 +119,9 @@ clean: debian/control # Install the copyright information. cp $(DEBIAN)/copyright debian/copyright + # Install the retpoline extractor. + cp $(DROOT)/scripts/retpoline-extract-one scripts/ubuntu-retpoline-extract-one + # If we have a reconstruct script use it. [ -f $(DEBIAN)/reconstruct ] && bash $(DEBIAN)/reconstruct @@ -127,7 +130,8 @@ clean: debian/control distclean: clean rm -rf $(DROOT)/control debian/changelog \ - debian/control debian/control.stub debian/copyright + debian/control debian/control.stub debian/copyright \ + scripts/ubuntu-retpoline-extract-one # Builds the image, arch headers and debug packages include $(DROOT)/rules.d/2-binary-arch.mk diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index 6a570ab22f24..9920df16f4d4 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -331,6 +331,8 @@ ifeq ($(build_arch),arm64) mkdir -p $(hdrdir)/arch/arm64/lib cp $(builddir)/build-$*/arch/arm64/kernel/ftrace-mod.o $(hdrdir)/arch/arm64/kernel endif + # Copy over the new retpoline extractor. + cp scripts/ubuntu-retpoline-extract-one $(hdrdir)/scripts # Script to symlink everything up $(SHELL) $(DROOT)/scripts/link-headers "$(hdrdir)" "$(indeppkg)" "$*" # The build symlink diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 9684c1091e62..d74c3f9f1fa8 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -283,7 +283,7 @@ objtool_dep = $(objtool_obj) \ include/config/stack/validation.h) ifdef CONFIG_RETPOLINE -cmd_ubuntu_retpoline = $(CONFIG_SHELL) $(srctree)/debian/scripts/retpoline-extract-one $(@) $(<) "$(filter -m16 %code16gcc.h,$(a_flags))"; +cmd_ubuntu_retpoline = $(CONFIG_SHELL) $(srctree)/scripts/ubuntu-retpoline-extract-one $(@) $(<) "$(filter -m16 %code16gcc.h,$(a_flags))"; else cmd_ubuntu_retpoline = endif