Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2302800pxj; Sun, 30 May 2021 21:33:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz35esVtyRt957UAgK6MTG0iJZbRqaKmhHxNTIQlJfyhsTSag1KNLjaLiRK30V7+qxDF7FT X-Received: by 2002:a92:d58a:: with SMTP id a10mr16534498iln.234.1622435579985; Sun, 30 May 2021 21:32:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622435579; cv=none; d=google.com; s=arc-20160816; b=QTY2dC9O5tIzIqymqG+hSqioV4h+trwvhIvUSasDTxA1zJrAbCqlMs5SRsHPPGiKvb y6sO9c95gzz4WvmbqbD6a58NjfxWAd6jE7Pie2CkhDhEKVV5BMIs+jPw41EBXkc9V/zI GLJuiTh7fHUCcJnDScBIb2D6KJqyD2zLlxau6brY3vK1tM3bYP33d4pgaMjZ6dtXO2E3 dKM51JbVd71A/Mv9c/bwUQ4jsewvNcGe7s6CgLgJwj8J4wEtJQt+PYFolgSfj51mcL2a bV4RNrJOHEOraWKpTOt4HPZDHyIvg13ia8F5UYxyyh8sUu7Qc3LSn9OazPlQuncMaFO5 Ybqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:in-reply-to:date:sender:references:subject:cc:to:from :dkim-signature:dkim-filter; bh=l4NPvVhYwcCMSvsz+fATcKqeBrkYke26i4Qu64Bnbw8=; b=q1nYYuWal2OmlIA3G+oSRv5XB2hDlOgBAg6tDKikMfxy8e4mYFSTmV2fk5cY1LFY+W e9J8hV/Nk9uKInvdronG2Ltk6Cke/gaA5TTP8JtGeg29zM/vxNoH29JDsGhe6N6SsMwp Fs52fih/631Lc0TH9AMtyE7pivveZ5T2V7o0hKSAYlPIYsh1pyxO3LOXQ8LVUULMsPaN 4BBWK70WTWpunHVx7e12Jma8mQ4UgwZTphRS0wp3R8jTxvtTIiUXqTKsXu83KFHobUei oo+q5GC9bHuSF1PRKrTqDJSDO5wwP77iqygTKX7OTrK3ziJl/8Y+uTWqfGUWgDdUkWHP 93cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@piap.pl header.s=mail header.b=Ck8rmuk1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=piap.pl Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x6si9419486ilv.67.2021.05.30.21.32.46; Sun, 30 May 2021 21:32:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@piap.pl header.s=mail header.b=Ck8rmuk1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=piap.pl Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229803AbhEaEb4 (ORCPT + 99 others); Mon, 31 May 2021 00:31:56 -0400 Received: from ni.piap.pl ([195.187.100.5]:37872 "EHLO ni.piap.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229717AbhEaEby (ORCPT ); Mon, 31 May 2021 00:31:54 -0400 Received: from t19.piap.pl (OSB1819.piap.pl [10.0.9.19]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ni.piap.pl (Postfix) with ESMTPSA id 67CBC4441AA; Mon, 31 May 2021 06:30:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 ni.piap.pl 67CBC4441AA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=piap.pl; s=mail; t=1622435411; bh=l4NPvVhYwcCMSvsz+fATcKqeBrkYke26i4Qu64Bnbw8=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Ck8rmuk1u2sqYDwFInX8OlXhOPW+/tfZY0HhLdclfnCwdpYo+3B4J/eGu3kfBKruT 36bLdfAE5uWq3BpJs7JnTtXMqoCfw00tklJC6ARLEoRAIZn+safgRUNa09+nOfjDG5 uY9PTFbKSQvxXsWi9FKKZmXqZhuRZKu0sygnXm+E= From: =?utf-8?Q?Krzysztof_Ha=C5=82asa?= To: "Russell King (Oracle)" Cc: linux-arm-kernel , lkml Subject: Re: Data corruption on i.MX6 IPU in arm_copy_from_user() References: <20210526100843.GD30436@shell.armlinux.org.uk> <20210526131853.GE30436@shell.armlinux.org.uk> <20210528143544.GQ30436@shell.armlinux.org.uk> Sender: khalasa@piap.pl Date: Mon, 31 May 2021 06:30:10 +0200 In-Reply-To: <20210528143544.GQ30436@shell.armlinux.org.uk> (Russell King's message of "Fri, 28 May 2021 15:35:44 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-KLMS-Rule-ID: 4 X-KLMS-Message-Action: skipped X-KLMS-AntiSpam-Status: not scanned, whitelist X-KLMS-AntiPhishing: not scanned, whitelist X-KLMS-AntiVirus: Kaspersky Security for Linux Mail Server, version 8.0.3.30, not scanned, whitelist Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "Russell King (Oracle)" writes: >> LDM12: 1 3 4 5 6 7 8 9 A B C D > > That's rather sad, and does look very much like a hardware bug. > > The question is what to do about it... there's Linus' "do not break > userspace" edict and that's exactly what this change has done. So I > suppose we're going to have to revert the change and put up with > everything being slightly slower on arm32 than it otherwise would > have been. That probably means we'll end up with almost every kernel > tree out there carrying a revert of the revert to work around the > fact that seemingly NXP broke their hardware - which itself is not > a good idea. I guess we're just going to have to put up with that. For userspace, it's quite a corner case, basically development-only - and I guess there are very few people who will do things like this. The same problem can manifest itself without any kernel involvement - it's enough to mmap /dev/mem and use LDM on in completely in userspace. This can't be fixed - unless we disallow IPU mmap. Perhaps making sure the bug is clearly documented is better than doing a partial fix. Ideally NXP should document it in their papers, and we should add notes to IPU driver code. The last one - I guess I can do. --=20 Krzysztof Ha=C5=82asa Sie=C4=87 Badawcza =C5=81ukasiewicz Przemys=C5=82owy Instytut Automatyki i Pomiar=C3=B3w PIAP Al. Jerozolimskie 202, 02-486 Warszawa