From patchwork Wed Nov 3 02:04:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 516704 Delivered-To: patch@linaro.org Received: by 2002:ad5:5208:0:0:0:0:0 with SMTP id p8csp81931iml; Tue, 2 Nov 2021 19:02:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxF7LerwreD7wA6xCctyuiV/aRvQ49mVOO/kNRD1onXOqziIfkCdib/Q8Ps7XBixTM0+L13 X-Received: by 2002:a17:906:7216:: with SMTP id m22mr27340088ejk.491.1635904959301; Tue, 02 Nov 2021 19:02:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635904959; cv=none; d=google.com; s=arc-20160816; b=MlomFneo3atxUR018FL+ZC8/b0zOy8yvkh/iaja8Cy4TumnXiCYrCaURqNXLwPFZcI CTlv5BQEtUm1VxIpJ1oMPLCr5BAr7hcTPegGb3vvg5PzuMvMTatdDf9rlAhRzIO5GQml x5kEwy/0bZ2kI6pxo6AnEI2Ep6EBydvZqMKnObEb/psCRMcWvbUBPQo/HVKdW5E24Xc4 2+bK1XuTpAwnNqx9bD+PyGBAx3wYWcNa2cKHBRs0xkuL9d6AwParK2YJmGDG9u4g1JjA gnY+Y4KId70TzdYW+A9wCc2YujJsCl/MKDb4fkuklkhar9VcXyRONXzmtIQkDsp+E3n8 MBbQ== 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=LMXzo4jvSA3w4b8fbsLreQMFdLTR1GHxFJNWZo1L6KU=; b=fYckk1YSh4AUKTPzeoe6olnxW38QXqNiiENb/rNfe4oVeo5j0QaAKIb44ARGL+Uzdq KIyosCOB8eC5X41MFmSk/4cm2F8363aHhr8yWLF9nit4DxjoVsh9Q2+PgD+u7yeV/I1V hYaxqBR6Djs+sU6WSIHn+7iYXVjDrKc1QL8vuoECnqrMJBfmWOwOu4dysELjrXkPBOBq wvVreqUOMOiGzfHv/4bLhcoKhcS2EIwUCyaDcYN4QrIERRDvORuj0a+pKGM2Qiixsj68 RsOJmjB84m927QY/mQ/Mx7A9ldpIlu9KUmAnDc0bVLo57V0dnEMiBJEFm+Oa2v5lpqfh PChg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HTyLxOHf; 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 l18si1269093edq.209.2021.11.02.19.02.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Nov 2021 19:02:39 -0700 (PDT) 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=HTyLxOHf; 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 5E66E82DB4; Wed, 3 Nov 2021 03:02:36 +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="HTyLxOHf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F0B0A8320D; Wed, 3 Nov 2021 03:02:34 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) (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 7743781BC8 for ; Wed, 3 Nov 2021 03:02:31 +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=masahisa.kojima@linaro.org Received: by mail-pl1-x62e.google.com with SMTP id u17so1425646plg.9 for ; Tue, 02 Nov 2021 19:02:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=LMXzo4jvSA3w4b8fbsLreQMFdLTR1GHxFJNWZo1L6KU=; b=HTyLxOHfovJ8EabNh87podmlz+cxq9VuDuswqRlMersBQ2ZGrSKhQJXIn6LzMOJ/dP pIE9rUMnBxJADWJFez0pNW+Eni6cA1cTQRNPAXDcRG5AKvd/2S+sIlla5aJ1YYeosMt8 MTGtunoAApkhuQSuENy4CHChwK87m4AE+WcXFhoYP7V+NrP0bVZwQD3np/nzBMa95zpC XJQfruLtFx5ZWBUs0a6P4gX8AZKQVAY70JfsTGPR7HBpd0kWK3xEPFNz+xRX45+eSccZ FUu9+y8SD92I23sD124QD5H5KIVWB/JQAaOB2glzHfQXYQoTUXE73H/si4MkgHhH6Fr1 Pm8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=LMXzo4jvSA3w4b8fbsLreQMFdLTR1GHxFJNWZo1L6KU=; b=4ja8cvP2Y0xKYQNYXshP8jnx6kyMhseG65Ej6P9TBrmOV8Zooi6jC/XgJ3E7xzvpNW nvOvV4MiF0CPG43BEnKmOSVShl3JaWCYCXEPMkKorhyEFPFxe2aGip521mgpXbFXKm+B 8rbIyLlb8voLV32eCdYgKiSKf7PK9uBnf9cTeGtYQWxjkax717Y5ra9bngat422LB1jn O272hUSdvvUS6qby2Nre6QMX9v2wJvlOxMRnHvPYBT0PREwOJckwGVtTUXs9hMG9u1sy 3ADATD81Qp82+2l5HMczcVqZIOeM+12ou0rhHRvAWT8Ct/x+Ju6QeM3Q9giiTQE0N3lK 675w== X-Gm-Message-State: AOAM530kB4NTt3YpVP2ARr9kNZYjI1jAYr9tJDEHcJhaxo6m1uLUwiQw 4mkQxWgX361l7IcI3z8nTyhghjY30W/JPQ== X-Received: by 2002:a17:90a:bf0b:: with SMTP id c11mr10102868pjs.208.1635904949503; Tue, 02 Nov 2021 19:02:29 -0700 (PDT) Received: from localhost.localdomain ([2400:2411:502:a100:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id z10sm408485pfh.106.2021.11.02.19.02.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Nov 2021 19:02:29 -0700 (PDT) From: Masahisa Kojima To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Masahisa Kojima , Alexander Graf Subject: [PATCH] efi_loader: use byteshift unaligned access helper Date: Wed, 3 Nov 2021 11:04:09 +0900 Message-Id: <20211103020409.22745-1-masahisa.kojima@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.103.2 at phobos.denx.de X-Virus-Status: Clean Calling unaligned/access-ok.h version of put_unaligned_le64() causes data abort in arm 32-bit QEMU. The similar issue also occurs in linux kernel, unaligned/access-ok.h is no longer used in linux kernel[1]. This commit uses the unaligned/be_byteshift.h and unaligned/le_byteshift.h helper instead of unaligned/access-ok.h. [1]https://lore.kernel.org/all/20210507220813.365382-8-arnd@kernel.org/ Signed-off-by: Masahisa Kojima Reviewed-by: Ilias Apalodimas --- lib/efi_loader/efi_tcg2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/lib/efi_loader/efi_tcg2.c b/lib/efi_loader/efi_tcg2.c index cb67006b14..b34d383a7d 100644 --- a/lib/efi_loader/efi_tcg2.c +++ b/lib/efi_loader/efi_tcg2.c @@ -22,7 +22,8 @@ #include #include #include -#include +#include +#include #include #include