Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp218891imm; Fri, 3 Aug 2018 02:17:55 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfInNlQIcENlxCvdlHoO1Jqaew645/uTujPAinDgxNSIkfkD2aCuQvkThagQnxvZc6VEv0L X-Received: by 2002:a17:902:7884:: with SMTP id q4-v6mr2774257pll.174.1533287875183; Fri, 03 Aug 2018 02:17:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533287875; cv=none; d=google.com; s=arc-20160816; b=jzO78eqZU+oiMJkHsaf28r5BvkQQe+CTTXydTE7N1zP1C+3GLJPUK7w7ryWTsd4yYT hS9FxSZVj2M2z7481vU+3aGbhK6se9i/QTw4cQWOeZwl2tgJE0Ju+iBARqaDmNkSUZKg 3zeBrMyVW47p1p1oGS4AyzjeBc7kZWUrHBZL4fA5g9Akk/bPGibrcpUUxNQOZQvUDrTd sKphEtQ4gq9v1yaD1JZ6rDccXOYEaI+UcMTDa247jCMbWsJ7x78OrdvI5AFFlrjo+WBm Rcdok4hzExwjSqZmogBz/qOm79UOmrvQCodJrnjQjpACrFalLT25q8tQUPHz4y9nPGA/ c1dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=dBQBMMYTDcETJ0Up5rgAPd9eoi4Ge2rTP70yMTSlvtc=; b=sHVmY7LcuuhXJh2PwykV8P+2hCsLll/df0sMD2iq349gpbytrO03Vd5PWktMemyOhl aLhHWPtOX6tX5zlZJ02H/TaVuwY7O8psMt9BuuVtzrqbXsAtqBGEV69v/jX08zA6WRJw 1h08DEpPkQBcnfcQ46YXzyxxbiryy6JTVI/JILI2BJ/g4Bn5v7MyErY1of6tx13BAos1 AXCcDbRECwDUEWzuw7zxQ+t8GTrlT8AEwhS4240xxFdZGIHTIaBsLKRSccvpuAJOQHUr dwuvGJPuaTtuTgQLJcRCn0PFhTpaqNMprDsLJrTy2lqTeikIE3eMRPDeEPDxUvif1dTj plbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=mYxiXJiO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b6-v6si4500405pgm.644.2018.08.03.02.17.37; Fri, 03 Aug 2018 02:17:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=mYxiXJiO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732327AbeHCLLS (ORCPT + 99 others); Fri, 3 Aug 2018 07:11:18 -0400 Received: from mail-ua0-f171.google.com ([209.85.217.171]:40883 "EHLO mail-ua0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728442AbeHCLLS (ORCPT ); Fri, 3 Aug 2018 07:11:18 -0400 Received: by mail-ua0-f171.google.com with SMTP id m13-v6so3594132uaq.7 for ; Fri, 03 Aug 2018 02:15:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=dBQBMMYTDcETJ0Up5rgAPd9eoi4Ge2rTP70yMTSlvtc=; b=mYxiXJiObeTyBz7a4vWICwKpPZuIl9AtmJgsj9kk98NVx4jSJRAacHYrBWhGi2BDOV JznAekzFcTp6u7vWWYzzj21CMkwEEgRmMdSAf0+U+7mmdhLcvWcJ2/UsoF+k4NNmrinX QK/kzTsSoAlWqX2yUeoS/FWcnXECkUv1WW4h5c3x2hon+bOKOcGqHX8ks7ZrgxthoONU OUdN7nojXqD1v5zEyXBHEjogeGcMKyYQfBGzRvDBltye6nXmbIBGho9NGDThXUKD3zrK KHn9Xs1vHdhGedSIHZtTsw6BRDpmPAUT4frekeRRU5DabL4exzvJQAyYeglf9paVt6AP UvEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=dBQBMMYTDcETJ0Up5rgAPd9eoi4Ge2rTP70yMTSlvtc=; b=Ga2QZUylGVO3zWsdIXaLjpa77LBu2ZJj4Qol9WZYvkGJwbKZTx/oe6/mqTaMKKrTuL i5xROOjk6Gf34G4sqlGmdwaDd2OLcRMXwshlbMx0UvJgOFMBxhFpqbF62mRftKZco82Q sUbGx2iOxZOdnzt59Yazj0/znxA07gw+qlQEnpJL5eDKQTXNhb5++XBfHtxdSWX8ih4e sSoCW0KOY4Jy2akhC/qeFfbjaOqiLkzFrhIJ8ENqw4pKEmuaeh/jRh6aakPZF9v58Fp9 ZQrJb713/l9YQAhAX1XTVyaksOLbWu4gVvzI2Pxo243gzez5XKanaUHV+luF48WHPklT jpPA== X-Gm-Message-State: AOUpUlEneMcE26fClnBLEm0VxJ5dl8/yc/hUUeKaMFEPcveX/RR2hFTY H7fdpkRktkAi6FiKwUI0LdVxZeHDR0dw3lrb2zo= X-Received: by 2002:a1f:311:: with SMTP id 17-v6mr1938708vkd.13.1533287753126; Fri, 03 Aug 2018 02:15:53 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab0:6044:0:0:0:0:0 with HTTP; Fri, 3 Aug 2018 02:15:52 -0700 (PDT) In-Reply-To: <9acdacdb-3bd5-b71a-3003-e48132ee1371@redhat.com> References: <9acdacdb-3bd5-b71a-3003-e48132ee1371@redhat.com> From: Ramana Radhakrishnan Date: Fri, 3 Aug 2018 10:15:52 +0100 Message-ID: Subject: Re: framebuffer corruption due to overlapping stp instructions on arm64 To: Florian Weimer Cc: Andrew Pinski , mpatocka@redhat.com, Catalin Marinas , Will Deacon , linux@armlinux.org.uk, thomas.petazzoni@free-electrons.com, linux-arm-kernel@lists.infradead.org, LKML , GNU C Library Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 3, 2018 at 8:53 AM, Florian Weimer wrote: > On 08/03/2018 09:11 AM, Andrew Pinski wrote: >> >> Yes fix Links not to use memcpy on the framebuffer. >> It is undefined behavior to use device memory with memcpy. > > > Some (de facto) ABIs require that it is supported, though. For example, the > POWER string functions avoid unaligned loads and stores for this reason > because the platform has the same issue with device memory. And yes, GCC > will expand memcpy on POWER to something that is incompatible with device > memory. 8-( GCC for AArch64 - use -mstrict-align GCC for AArch32 - use -mno-unaligned-access. If you see unaligned accesses coming out of the compiler for well defined programs then that's a bug. Frequently we see undefined programs that get the compiler to produce traps - atleast one or 2 bugs a year in GCC . > > If we don't want people to use memcpy, we probably need to provide a > credible alternative. I believe a number of packages have rolled their own to take these constraints into account for AArch32, perhaps it needs to be expanded for AArch64 as well. regards Ramana > > Thanks, > Florian