From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 167B313835B for ; Fri, 9 Oct 2020 13:47:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 13962E086C; Fri, 9 Oct 2020 13:47:14 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DC884E0869 for ; Fri, 9 Oct 2020 13:47:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B7B13340FC7 for ; Fri, 9 Oct 2020 13:47:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3C6CA332 for ; Fri, 9 Oct 2020 13:47:11 +0000 (UTC) From: "Conrad Kostecki" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Conrad Kostecki" Message-ID: <1602251067.b0c21fbbcd45cea8afada073831869d39e152fa8.conikost@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/sbsigntools/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-crypt/sbsigntools/files/0002-image.c-clear-image-variable.patch app-crypt/sbsigntools/files/0003-Fix-for-multi-sign.patch X-VCS-Directories: app-crypt/sbsigntools/files/ X-VCS-Committer: conikost X-VCS-Committer-Name: Conrad Kostecki X-VCS-Revision: b0c21fbbcd45cea8afada073831869d39e152fa8 X-VCS-Branch: master Date: Fri, 9 Oct 2020 13:47:11 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: bbc1a62e-7011-4c77-9fb7-1f08cd835190 X-Archives-Hash: f537f6d1151b82eb28b28bfebdc15466 commit: b0c21fbbcd45cea8afada073831869d39e152fa8 Author: Michael Mair-Keimberger gmail com> AuthorDate: Thu Oct 1 18:23:49 2020 +0000 Commit: Conrad Kostecki gentoo org> CommitDate: Fri Oct 9 13:44:27 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0c21fbb app-crypt/sbsigntools: remove unused patches Closes: https://github.com/gentoo/gentoo/pull/17740 Package-Manager: Portage-3.0.8, Repoman-3.0.1 Signed-off-by: Michael Mair-Keimberger gmail.com> Signed-off-by: Conrad Kostecki gentoo.org> .../files/0002-image.c-clear-image-variable.patch | 29 ---------------- .../files/0003-Fix-for-multi-sign.patch | 39 ---------------------- 2 files changed, 68 deletions(-) diff --git a/app-crypt/sbsigntools/files/0002-image.c-clear-image-variable.patch b/app-crypt/sbsigntools/files/0002-image.c-clear-image-variable.patch deleted file mode 100644 index dfe183e66cd..00000000000 --- a/app-crypt/sbsigntools/files/0002-image.c-clear-image-variable.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 21e984fa9d93a760cc03f5d9d13d023809227df2 Mon Sep 17 00:00:00 2001 -From: James Bottomley -Date: Thu, 11 Apr 2013 21:12:17 -0700 -Subject: image.c: clear image variable - -Not zeroing the image after talloc occasionally leads to a segfault because -the programme thinks it has a signature when in reality it just has a junk -pointer and segfaults. - -Signed-off-by: James Bottomley ---- - src/image.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/image.c b/src/image.c -index cc55791..10eba0e 100644 ---- a/src/image.c -+++ b/src/image.c -@@ -401,6 +401,7 @@ struct image *image_load(const char *filename) - return NULL; - } - -+ memset(image, 0, sizeof(*image)); - rc = fileio_read_file(image, filename, &image->buf, &image->size); - if (rc) - goto err; --- -1.8.2.1 - diff --git a/app-crypt/sbsigntools/files/0003-Fix-for-multi-sign.patch b/app-crypt/sbsigntools/files/0003-Fix-for-multi-sign.patch deleted file mode 100644 index f42c69616d1..00000000000 --- a/app-crypt/sbsigntools/files/0003-Fix-for-multi-sign.patch +++ /dev/null @@ -1,39 +0,0 @@ -From e58a528ef57e53008222f238cce7c326a14572e2 Mon Sep 17 00:00:00 2001 -From: James Bottomley -Date: Mon, 30 Sep 2013 19:25:37 -0700 -Subject: [PATCH 4/4] Fix for multi-sign - -The new Tianocore multi-sign code fails now for images signed with -sbsigntools. The reason is that we don't actually align the signature table, -we just slap it straight after the binary data. Unfortunately, the new -multi-signature code checks that our alignment offsets are correct and fails -the signature for this reason. Fix by adding junk to the end of the image to -align the signature section. - -Signed-off-by: James Bottomley ---- - src/image.c | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/src/image.c b/src/image.c -index 10eba0e..519e288 100644 ---- a/src/image.c -+++ b/src/image.c -@@ -385,7 +385,13 @@ static int image_find_regions(struct image *image) - - /* record the size of non-signature data */ - r = &image->checksum_regions[image->n_checksum_regions - 1]; -- image->data_size = (r->data - (void *)image->buf) + r->size; -+ /* -+ * The new Tianocore multisign does a stricter check of the signatures -+ * in particular, the signature table must start at an aligned offset -+ * fix this by adding bytes to the end of the text section (which must -+ * be included in the hash) -+ */ -+ image->data_size = align_up((r->data - (void *)image->buf) + r->size, 8); - - return 0; - } --- -1.8.4 -