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: 1404302 X-Patchwork-Delegate: xypron.glpk@gmx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=s4LopAcN; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CdVp92VFxz9s0b for ; Sat, 21 Nov 2020 22:00:55 +1100 (AEDT) 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-Google-Smtp-Source: ABdhPJxI1KR+IKp+XDZFtxOWVt9UhGYzzUsQFKocj6uWWzNPMRMKtTaLReycAzoVO3+LSV854pSVqQ== 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(-) 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[];