From patchwork Thu Feb 22 11:53:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 876609 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=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3znCRw4l1zz9sW3; Thu, 22 Feb 2018 22:53:48 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1eopRY-0001Qp-OU; Thu, 22 Feb 2018 11:53:44 +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 1eopRW-0001Pw-3m for kernel-team@lists.ubuntu.com; Thu, 22 Feb 2018 11:53:42 +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 1eopRV-0002vJ-RG; Thu, 22 Feb 2018 11:53:41 +0000 From: Andy Whitcroft To: kernel-team@lists.ubuntu.com Subject: [artful/master-next 1/3] UBUNTU: [Packaging] retpoline-extract -- instantiate retpoline files for i386 Date: Thu, 22 Feb 2018 11:53:38 +0000 Message-Id: <20180222115340.11733-2-apw@canonical.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180222115340.11733-1-apw@canonical.com> References: <20180222115340.11733-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" We are extracting all indirect callq/jmpq but in 32bit mode these are call/jmp so we need to allow those as well in our extraction. BugLink: http://bugs.launchpad.net/bugs/1751021 Signed-off-by: Andy Whitcroft --- debian/scripts/retpoline-extract | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/scripts/retpoline-extract b/debian/scripts/retpoline-extract index c401f2f72354..3bdc8b5a4631 100755 --- a/debian/scripts/retpoline-extract +++ b/debian/scripts/retpoline-extract @@ -9,5 +9,5 @@ cd "$1" || exit 1 awk -F' ' ' /^.\// { file=$1; sub(":.*", "", file); sub("^.*/", "", file); } /^[0-9a-f][0-9a-f]* <.*>:/ { tag=$1; sub(".*<", "", tag); sub(">.*", "", tag); tag=file " " tag; } - $3 ~ /(callq|jmpq) *\*%/ { print(tag " " $3); } + $3 ~ /(call|jmp)q? *\*%/ { print(tag " " $3); } ' From patchwork Thu Feb 22 11:53:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 876610 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=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3znCRz1Ns8z9sW1; Thu, 22 Feb 2018 22:53:51 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1eopRa-0001Rq-UJ; Thu, 22 Feb 2018 11:53:46 +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 1eopRW-0001Q3-Hy for kernel-team@lists.ubuntu.com; Thu, 22 Feb 2018 11:53:42 +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 1eopRW-0002vO-9O; Thu, 22 Feb 2018 11:53:42 +0000 From: Andy Whitcroft To: kernel-team@lists.ubuntu.com Subject: [artful/master-next 2/3] UBUNTU: [Packaging] final-checks -- sanity checking ABI contents Date: Thu, 22 Feb 2018 11:53:39 +0000 Message-Id: <20180222115340.11733-3-apw@canonical.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180222115340.11733-1-apw@canonical.com> References: <20180222115340.11733-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/1751021 Signed-off-by: Andy Whitcroft --- debian/rules.d/1-maintainer.mk | 7 +++-- debian/scripts/misc/final-checks | 55 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 2 deletions(-) create mode 100755 debian/scripts/misc/final-checks diff --git a/debian/rules.d/1-maintainer.mk b/debian/rules.d/1-maintainer.mk index 49ad8ba28881..d67488366339 100644 --- a/debian/rules.d/1-maintainer.mk +++ b/debian/rules.d/1-maintainer.mk @@ -1,7 +1,7 @@ # The following targets are for the maintainer only! do not run if you don't # know what they do. -.PHONY: printenv updateconfigs printchanges insertchanges startnewrelease diffupstream help updateportsconfigs editportsconfigs autoreconstruct +.PHONY: printenv updateconfigs printchanges insertchanges startnewrelease diffupstream help updateportsconfigs editportsconfigs autoreconstruct finalchecks help: @echo "These are the targets in addition to the normal $(DEBIAN) ones:" @@ -107,12 +107,15 @@ printchanges: git log "$$baseCommit"..HEAD | \ $(DROOT)/scripts/misc/git-ubuntu-log $(ubuntu_log_opts) -insertchanges: autoreconstruct +insertchanges: autoreconstruct finalchecks @perl -w -f $(DROOT)/scripts/misc/insert-changes.pl $(DROOT) $(DEBIAN) autoreconstruct: $(DROOT)/scripts/misc/gen-auto-reconstruct $(upstream_tag) $(DEBIAN)/reconstruct $(DROOT)/source/options +finalchecks: + $(DROOT)/scripts/misc/final-checks "$(DEBIAN)" "$(prev_fullver)" + diffupstream: @git diff-tree -p refs/remotes/linux-2.6/master..HEAD $(shell ls | grep -vE '^(ubuntu|$(DEBIAN)|\.git.*)') diff --git a/debian/scripts/misc/final-checks b/debian/scripts/misc/final-checks new file mode 100755 index 000000000000..548dea99e6a0 --- /dev/null +++ b/debian/scripts/misc/final-checks @@ -0,0 +1,55 @@ +#!/bin/bash + +debian="$1" +abi="$2" + +. "$debian/etc/kernelconfig" + +fail=0 + +failure() +{ + echo "EE: $@" 1>&2 + fail=1 +} + +abi_check() +{ + local abidir="$1" + local arch="$2" + local flavour="$3" + + local abidir="$abidir/$arch" + + if [ ! -f "$abidir/$flavour" -a \ + ! -f "$abidir/$flavour.ignore" -a \ + ! -f "$abidir/ignore" ] + then + failure "$arch/$flavour ABI symbol file missing" + fi + + if [ ! -f "$abidir/$flavour.modules" -a \ + ! -f "$abidir/$flavour.ignore.modules" -a \ + ! -f "$abidir/ignore.modules" ] + then + failure "$arch/$flavour ABI modules file missing" + fi + + if [ ! -f "$abidir/$flavour.retpoline" -a \ + ! -f "$abidir/$flavour.ignore.retpoline" -a \ + ! -f "$abidir/ignore.retpoline" ] + then + failure "$arch/$flavour ABI retpoline file missing" + fi +} + +for arch in $archs +do + for flavour in $(ls -1 "$debian/config/$arch/config.flavour."*) + do + flavour=$(echo "$flavour" | sed -e 's@.*/config.flavour.@@') + abi_check "$debian/abi/$abi" "$arch" "$flavour" + done +done + +exit "$fail" From patchwork Thu Feb 22 11:53:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 876611 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=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3znCRz0CT2z9sVw; Thu, 22 Feb 2018 22:53:51 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1eopRb-0001S2-2M; Thu, 22 Feb 2018 11:53:47 +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 1eopRX-0001QN-3x for kernel-team@lists.ubuntu.com; Thu, 22 Feb 2018 11:53:43 +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 1eopRW-0002vV-Rp; Thu, 22 Feb 2018 11:53:42 +0000 From: Andy Whitcroft To: kernel-team@lists.ubuntu.com Subject: [artful/master-next 3/3] UBUNTU: [Packaging] final-checks -- check for empty retpoline files Date: Thu, 22 Feb 2018 11:53:40 +0000 Message-Id: <20180222115340.11733-4-apw@canonical.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180222115340.11733-1-apw@canonical.com> References: <20180222115340.11733-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/1751021 Signed-off-by: Andy Whitcroft --- debian/scripts/misc/final-checks | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/debian/scripts/misc/final-checks b/debian/scripts/misc/final-checks index 548dea99e6a0..aec25770ea1b 100755 --- a/debian/scripts/misc/final-checks +++ b/debian/scripts/misc/final-checks @@ -41,6 +41,11 @@ 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