From patchwork Thu Nov 15 23:25:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 998630 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.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="TGhAO2Yn"; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42wyCC2wfJz9s9h; Fri, 16 Nov 2018 10:25:27 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1gNR0m-0001qb-RQ; Thu, 15 Nov 2018 23:25:24 +0000 Received: from mail-wm1-f66.google.com ([209.85.128.66]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1gNR0j-0001pe-UO for fwts-devel@lists.ubuntu.com; Thu, 15 Nov 2018 23:25:21 +0000 Received: by mail-wm1-f66.google.com with SMTP id r11-v6so20337306wmb.2 for ; Thu, 15 Nov 2018 15:25:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=bJASZ1mIwy75elj73L5FS7GngUoqSAM4UwZ8IgCZZ0g=; b=TGhAO2YnX9W3G2kPL4c4j8VIwqdMU9vSoGAnnKkLgKaHJ0DT0cDkbLiDTluJrbrj0o xnV6JVU2MntB+SgB/FOoeBCB3/k4xl6e90XXdQmtsn8uezbJbmudBjLlVGoidD5wRjQY 0sa9t4groxxkSsufpDAE0FoiEGcp6P6q/NKbY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=bJASZ1mIwy75elj73L5FS7GngUoqSAM4UwZ8IgCZZ0g=; b=TPBbp0FYKMA0yCsSy/08cGGRpMAIgSYUpjuBknIamsAfiXCHbcGaEsdbXPqlkyDNr+ kijrbQN8/C4mHsaMS38xfDCc/FIUt2nu9XwM951yZzjNuk2K3M3xv9GdyiTSKFXrEEQe Hh95uFpRF11lMXhgHGgwWF7fZ8ijOmsfR+6XGx794Ha3n+rmCKaMfkNt0VLkji8PE1h2 +lDmLHyi+HoTflP7KHqIf6boWkq1k5j++VqzvMLHJ271aRYsqoIgzySkRkmdzRj5UTr3 XaA1dQ4RfyNiVQV9ieaQ12wpDn/NZ9efjBJce1UXCDeAM0t4JkLJTgNeR5K/7Tcr1qzj qCag== X-Gm-Message-State: AGRZ1gI4+7+fGqPxfCa/S6ZxK1GCgECiT/TuhUjVMU7JqTMvYwsXhXrB v1xdiwyuBoFhh9STySfmRr3Ekcy4Acb0VQ== X-Google-Smtp-Source: AJdET5f7Zg1RBznJBL9aRU9EOBEJxYIyJqwhGUeoNRyn1/1l7n4kwKestq15MjgWiBUG2ulawaoc8Q== X-Received: by 2002:a1c:f30b:: with SMTP id q11-v6mr6762755wmq.45.1542324321208; Thu, 15 Nov 2018 15:25:21 -0800 (PST) Received: from vanye.hemma.eciton.net (cpc92302-cmbg19-2-0-cust304.5-4.cable.virginm.net. [82.1.209.49]) by smtp.gmail.com with ESMTPSA id h2sm5261791wrv.87.2018.11.15.15.25.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Nov 2018 15:25:20 -0800 (PST) From: Leif Lindholm To: fwts-devel@lists.ubuntu.com Subject: [PATCH 2/4] dmicheck: drop unaligned memcpy Date: Thu, 15 Nov 2018 23:25:15 +0000 Message-Id: <20181115232517.4588-3-leif.lindholm@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181115232517.4588-1-leif.lindholm@linaro.org> References: <20181115232517.4588-1-leif.lindholm@linaro.org> X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" fwts_memcpy_unaligned was used to deal with the fact that the kernel was giving access to smbios tables through /dev/mem on aarch64 with device memory mappings. This was never a valid way of accessing SMBIOS tables on aarch64, so now /dev/mem access has been disabled on that architecture, go back to a normal memcpy. Signed-off-by: Leif Lindholm Acked-by: Alex Hung Acked-by: Colin Ian King --- src/dmi/dmicheck/dmicheck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c index ba6f03c0..c794973b 100644 --- a/src/dmi/dmicheck/dmicheck.c +++ b/src/dmi/dmicheck/dmicheck.c @@ -379,7 +379,7 @@ static void* dmi_table_smbios30(fwts_framework *fw, fwts_smbios30_entry *entry) } table = malloc(length); if (table) - fwts_memcpy_unaligned(table, mem, length); + memcpy(table, mem, length); (void)fwts_munmap(mem, length); return table; }