From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E4A8C28CF6 for ; Fri, 3 Aug 2018 07:53:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D36C72172E for ; Fri, 3 Aug 2018 07:53:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D36C72172E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731309AbeHCJs6 (ORCPT ); Fri, 3 Aug 2018 05:48:58 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:33626 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727594AbeHCJs6 (ORCPT ); Fri, 3 Aug 2018 05:48:58 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2591F40216F4; Fri, 3 Aug 2018 07:53:53 +0000 (UTC) Received: from oldenburg.str.redhat.com (dhcp-192-212.str.redhat.com [10.33.192.212]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BDD272026D65; Fri, 3 Aug 2018 07:53:50 +0000 (UTC) Subject: Re: framebuffer corruption due to overlapping stp instructions on arm64 To: Andrew Pinski , mpatocka@redhat.com Cc: Catalin Marinas , Will Deacon , linux@armlinux.org.uk, thomas.petazzoni@free-electrons.com, linux-arm-kernel@lists.infradead.org, LKML , GNU C Library References: From: Florian Weimer Message-ID: <9acdacdb-3bd5-b71a-3003-e48132ee1371@redhat.com> Date: Fri, 3 Aug 2018 09:53:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Fri, 03 Aug 2018 07:53:53 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Fri, 03 Aug 2018 07:53:53 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'fweimer@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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-( If we don't want people to use memcpy, we probably need to provide a credible alternative. Thanks, Florian