From patchwork Sun Jun 3 18:46:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Teddy Reed X-Patchwork-Id: 924736 X-Patchwork-Delegate: sjg@chromium.org 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.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="tSeQ3LY1"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40zRr56pMJz9s15 for ; Mon, 4 Jun 2018 04:47:01 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 8CF16C21DF8; Sun, 3 Jun 2018 18:46:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 62B24C21D4A; Sun, 3 Jun 2018 18:46:55 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B598AC21D4A; Sun, 3 Jun 2018 18:46:53 +0000 (UTC) Received: from mail-qt0-f194.google.com (mail-qt0-f194.google.com [209.85.216.194]) by lists.denx.de (Postfix) with ESMTPS id 2DFF6C21C2F for ; Sun, 3 Jun 2018 18:46:53 +0000 (UTC) Received: by mail-qt0-f194.google.com with SMTP id x34-v6so24909483qtk.5 for ; Sun, 03 Jun 2018 11:46:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version :content-transfer-encoding; bh=jWNhadQLMcA7yo/4r4pCckZCQQpu0YEXNO2DqQx/kGA=; b=tSeQ3LY1FlrBGJspI1z83r4rr6NaqQuQBkojX+4jl7+ZQMiZWXNzDrWK2OEIExZ76x EJ3kokY15+U5ChWc4dN4logG5Y2dL16nsPEc+67u2r0y1fW0nVjnHevfPDs9VHEJqRo4 aYXtdVRyNMOrQjtx8OSYUHqKBckDxVVOM9w1NkWg+XCMHuo6Rytv2DAyQC+/kfolNaqO ZNmlfcQ0QDGbmVqYx5AGbjmVkZoGye0HghgocouQMn+FPtGUwKlnhVV7teB6T65RIbCo IYgplYDXvK0zOJ0+M2/S+HoOjbmrp6xfkFgSH0yXmYGmCNFjruin2pxg4/aN2YPJFTJM /VIg== 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:mime-version :content-transfer-encoding; bh=jWNhadQLMcA7yo/4r4pCckZCQQpu0YEXNO2DqQx/kGA=; b=gfBEDiAngDBfhZeyPk6O2dH3QqUO/Ds0aX5aWCMIjYnKE440V+lsfrHXxzL1yWRwes NsTA4zKP/9IQ4esyT3fIoBy5/fi3CVUaS9QrMgqKrC4+QiTBOjTd1bMXyfTila9Y3thq NjpXk51SybzxJZ+kyLajKS/4UeriqWmzQiuHcs7/+dX2oMK0g69dTEGmuOAXBg2wRzug skITSSiI54uJs6M+XIXSZ7nNr4GHC6oBfXJVBcVSIeyXImR9KzrTtLrIKqBYCdIFq6MD +dkcZP1edS73pqtpi72g9fnu1Oz2/2jfY6fGOwiePgINdY1PadJzpRbARDSY28HGrep/ /x+g== X-Gm-Message-State: APt69E0gayJpqpVfIK3ppk/75PVdKOh+WC6aT47WPzZBHBJFqRWVNBjx wiyRgr/iimBexXFYvv6Z23MXxmZf X-Google-Smtp-Source: ADUXVKKGUpkVa1pyasemC2pCyJqD7Lqae1H1CPrtV3NChjluNcYTEbvSOGMro4ZFexwGhA/r4kpEnw== X-Received: by 2002:ac8:164d:: with SMTP id x13-v6mr13640396qtk.378.1528051611946; Sun, 03 Jun 2018 11:46:51 -0700 (PDT) Received: from maverics (pool-108-35-88-207.nwrknj.fios.verizon.net. [108.35.88.207]) by smtp.gmail.com with ESMTPSA id a18-v6sm21497482qkj.60.2018.06.03.11.46.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Jun 2018 11:46:51 -0700 (PDT) Date: Sun, 3 Jun 2018 14:46:50 -0400 From: Teddy Reed To: u-boot@lists.denx.de Message-Id: <20180603144650.0a2f1ac5840f3276efdb8a34@gmail.com> X-Mailer: Sylpheed 3.5.0 (GTK+ 2.24.30; x86_64-pc-linux-gnu) Mime-Version: 1.0 Subject: [U-Boot] [PATCH] vboot: Do not use hashed-strings offset X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The hashed-strings signature property includes two uint32_t values. The first is unneeded as there should never be a start offset into the strings region. The second, the size, is needed because the added signature node appends to this region. See tools/image-host.c, where a static 0 value is used for the offset. Signed-off-by: Teddy Reed --- common/image-sig.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/image-sig.c b/common/image-sig.c index f65d883..9b0a872 100644 --- a/common/image-sig.c +++ b/common/image-sig.c @@ -372,8 +372,7 @@ int fit_config_check_sig(const void *fit, int noffset, int required_keynode, /* Add the strings */ strings = fdt_getprop(fit, noffset, "hashed-strings", NULL); if (strings) { - fdt_regions[count].offset = fdt_off_dt_strings(fit) + - fdt32_to_cpu(strings[0]); + fdt_regions[count].offset = fdt_off_dt_strings(fit); fdt_regions[count].size = fdt32_to_cpu(strings[1]); count++; }