From patchwork Sat Nov 21 10:59:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Carriere X-Patchwork-Id: 329944 Delivered-To: patch@linaro.org Received: by 2002:a92:ae0b:0:0:0:0:0 with SMTP id s11csp598943ilh; Sat, 21 Nov 2020 03:00:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJynW9GgBfX7B1SBJZLLx68hnnFBKURj6CqrbdUDKtSHq6tucCuDhkzhsSwrMjO9wCfmn7no X-Received: by 2002:a17:906:1282:: with SMTP id k2mr5078570ejb.554.1605956444883; Sat, 21 Nov 2020 03:00:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605956444; cv=none; d=google.com; s=arc-20160816; b=Y/G41vYTf3bl+K2w80f5fzIOONDN8NBkz9QWMTJ3W2DBD+PDJRdQ2Ao8FNApNcF0J7 mE+EU/JMfV5VJy65B3JC94SalxObxxcEotw5Wj+7KuOiu0W4ytZODlOV6XX4nN7xYHwN NcFDIMkeS45F5zE3QyHoo2vNSlyfgvJ/w1MiAYX+gO8Cuf6oNpXeHGRcj6aFBADmp8OF uaeaq1Y6k1s2wJpTOpNnOVdYMoT5pMXLAjuGkiOIDLs7ccqom8l7e6Npe59VroE3uuFa j0KlgckBfExry2qLT065y7K3wz+dtMFXs8KriVmqk4xEc+ScYUqy9vjEmXyK1xJZ6goO g8mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=J0sVAsvssqFZTL687B5Qd3Tc920ymQxTNocH3nmc3hc=; b=RS6hQw+3IPOS7EdRuNwU+BYdeWRoH89MFywZkfrs9JOOcON1HSyjJGNEAkkZ1GvDuz TUAR5g+gmW/5q7XmQMLGhtOSAwhYbweh8fzgxDoAx1VAr37eAI7X2/ER7pR372D3gqzg p1OLszb1QropSgmC3iczIJkcPU6MQKTnzDA1PIHkMs56Ab0EAkh8wz1cfNrcJ4Bq/rMY +nEEfDgvMTQS+YTE0RcMFexqvKHUP+tj5Py7BQUHMOpIntE+AH8eZSxiEi8UavMHP6Ka dGey7Lszr7+KztJ10Y/XuO/pBUZZo65wYDChVLybWoyDufz4Rd0Sv/aEtka8kiurA/eh 1vgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=s4LopAcN; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id r8si119864edx.358.2020.11.21.03.00.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Nov 2020 03:00:44 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=s4LopAcN; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 34BBF825A0; Sat, 21 Nov 2020 12:00:43 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="s4LopAcN"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3C5AA825A0; Sat, 21 Nov 2020 12:00:41 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4ED5882563 for ; Sat, 21 Nov 2020 12:00:33 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=etienne.carriere@linaro.org Received: by mail-wr1-x441.google.com with SMTP id b6so13537948wrt.4 for ; Sat, 21 Nov 2020 03:00:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=J0sVAsvssqFZTL687B5Qd3Tc920ymQxTNocH3nmc3hc=; b=s4LopAcNxiMenIo0qjmsiFsdx4+SxsOPeSahccvkNiKA40iw8ZBGNzoR6RtVOrKTqv 555VD9FNEHoAheP50dZhIoiY76SSFzi60uvgfcQHjsyHVvaKOXmGuAK9WHjFA4PSxX55 Q+Z+oY7kfBisP3lQO9k0hC1+YsZ4pEv12OwfFb0lPuYfOaGSURsPQyjyU6q7P4CCdEYi LmsrVAghb2ABzBCxNzKbRkEi/pb6H1BeKoMnlsptjOdLp1VcykXnvQ/QHxqfkUOZEQww GtyKlb+NQEr0tyEzcE9a/4l+yp9C9wXu12XDTuAIKT5m6clRSpYJNLPz6mF7LHn+Xlyj 9n8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=J0sVAsvssqFZTL687B5Qd3Tc920ymQxTNocH3nmc3hc=; b=nOMENd7Uml6YLQv/Lgeq5KxmyzUyNAFw3gI/I+nmNsBA6TZrZYOyDItbDDlsFgZX5T oTp+hRNYnEI9BZ0Fm31MObrpCeHNY3Gbn5sQMcGX0nwtAEMj5tHH1/CF11W2PyoPVwCL /YtImBZdWvDgPLE9BP6096jeOqex895J8oYecB99TCO+2D3dHvzODBFJVAFbNEJQifco kJke62VlQuqq5R7wmM3h62+EvcwwpWnV0hSBuYxd8wi0sjUgBhEoPAoUjZ2UELAcL9Yw ry77pyBdoPa3PYozmK8UHJYD2o+T7E2tHWE+9wqL5mLs9ajjJzggwV99fyHhfBpfqgPJ VLmA== X-Gm-Message-State: AOAM531MROHPnCpGorH6gyCgkqMlMdS5UptR+nLSZOpjLsn4kUk0JbAv /WnO8KMtEVDSq/toSF336nucCRkx2htOLfXZ X-Received: by 2002:a5d:4ec5:: with SMTP id s5mr402732wrv.30.1605956432744; Sat, 21 Nov 2020 03:00:32 -0800 (PST) Received: from lmecxl0524.home (2a01cb058b85080038c6c12f28980b2b.ipv6.abo.wanadoo.fr. [2a01:cb05:8b85:800:38c6:c12f:2898:b2b]) by smtp.gmail.com with ESMTPSA id k16sm8478597wrl.65.2020.11.21.03.00.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Nov 2020 03:00:32 -0800 (PST) From: Etienne Carriere To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Etienne Carriere Subject: [PATCH] lib/efi_loader: fix ABI in efi_mm_communicate_header Date: Sat, 21 Nov 2020 11:59:33 +0100 Message-Id: <20201121105933.3967-1-etienne.carriere@linaro.org> X-Mailer: git-send-email 2.17.1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Pack struct efi_mm_communicate_header as done in EDK2 as seen in release 201808 [1]. If not packed sizeof() for the structure adds 4 additional bytes on 32bit targets which breaks the ABI. Link: [1] https://github.com/tianocore/edk2/blob/edk2-stable201808/MdePkg/Include/Protocol/MmCommunication.h#L21 Fixes: 23a397d2e2fb ("efi_loader: Add headers for EDK2 StandAloneMM communication") Signed-off-by: Etienne Carriere --- include/mm_communication.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/include/mm_communication.h b/include/mm_communication.h index e464cbb48e..e65fbde60d 100644 --- a/include/mm_communication.h +++ b/include/mm_communication.h @@ -43,7 +43,7 @@ * To avoid confusion in interpreting frames, the communication buffer should * always begin with efi_mm_communicate_header. */ -struct efi_mm_communicate_header { +struct __packed efi_mm_communicate_header { efi_guid_t header_guid; size_t message_len; u8 data[];