Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2028452imm; Sat, 4 Aug 2018 17:13:42 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfd4uL4mcCRw8IjOqPWziaHGTARo7+vMrwjP5ErKYDuqE0GmIQK0TICG83aYNe17sG73qwi X-Received: by 2002:a65:5c4b:: with SMTP id v11-v6mr9332769pgr.445.1533428022416; Sat, 04 Aug 2018 17:13:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533428022; cv=none; d=google.com; s=arc-20160816; b=vduwiwNYOGPjHeOXrrz8e8xq8uDUbkOvQ/huLa0Jp7ckT8X2qe2YA3f/9OTmp8HCuI zwsc1nrE/UVGc5bT86Hlw+dSyMPAGy8yQjtZApWWE7z1zagej2ZEonUJ15BO7ITU9uZL jkyNLk3chDZoMnuz4KLi4Ia0SZ6eL8lh+puWaiVsHGSll1q53p3wp1pyXKRi5x71p8IZ Twov7GWvb2kYADbFDHBCwVXgP3VhjmQ95IPrDEAWOiH5G6d2rXilFcc3FYAJ4Ur431aK 8OotTrXmS02wXP7JvWzU36tn0noicTQPt7XX/7LUsd0yRYBhitBr5CheOMGBvDUURlnq NxGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=Hu9KPv3W5tD7+gCVZok4D9ZZNHx7jk3+i/fUW739RZY=; b=QbRgJ13j3OJ4g5mbMC+5ol/Q+KdGo6p7D0TeThtxNC3edxDrvYlmKPeSSTVsjfyI3w 4YCgY7xubkNkvLylcEsnXmvtjUzg4MKbXoayCYm1kR1LwkFueD1jmyn7Bch01HAQEUNO 8VryqcDxCZMgh9Mrddz3wYls7RazGkfZ361pyeoLK/fFkjj7ukUpXscOT1V/BLiwr4G6 IcwRsNfm6Q+3LBPpbsDOKEVcBP7aq259LhhNa1jI1hXRHQwwxfHcJqO7KVVNypkfzzzh flsSbt5l1DIz9dt4dJ5/OvR+1X70n6YoLpYjKf/g3kSkK075XOtiMFnUOvlEzab0S5D4 Doqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kapsi.fi header.s=20161220 header.b=FqW41dqy; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si6650773ply.354.2018.08.04.17.13.27; Sat, 04 Aug 2018 17:13:42 -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=fail header.i=@kapsi.fi header.s=20161220 header.b=FqW41dqy; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730229AbeHECO1 (ORCPT + 99 others); Sat, 4 Aug 2018 22:14:27 -0400 Received: from mail.kapsi.fi ([91.232.154.25]:37681 "EHLO mail.kapsi.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729690AbeHECO0 (ORCPT ); Sat, 4 Aug 2018 22:14:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kapsi.fi; s=20161220; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Hu9KPv3W5tD7+gCVZok4D9ZZNHx7jk3+i/fUW739RZY=; b=FqW41dqy+jVm0480dTKQTksFLk /im4TBG99nVuTfegmzx4D+fJP3GlFyOFRxeT8Zz+y/1P6J66cOTRJXBwJiKL10ip64cPOOJZs3H55 G+6ykTKUJ+N5ilIR6ttcApuPCEygtzjn8WbubwkobzvLJ2u3Oz7LR+49yCzGjjcb7z+QIv+UiTGY/ 4mQ3sOSIJd4XhxWjRQR2/2I63yRdzXjvWI5h71cdcOjO4fC+IKaFfrDOmniFe9V1ZTRPHjjF81X6M 1S22SuEmScUKzKAxyTFp9QPSH2zVsAsfXLq2f6a2N0FnUX1ruxg/WP+dLOtFM86X5gcQy8lWK1+5h YFRHyehQ==; Received: from dsl-hkibng22-54faa2-250.dhcp.inet.fi ([84.250.162.250]) by mail.kapsi.fi with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1fm6eM-0008Rk-3P; Sun, 05 Aug 2018 03:11:58 +0300 Subject: Re: [RFC PATCH v1] memory: tegra: Block DMA for clients HW on a faulty memory access To: Dmitry Osipenko , Thierry Reding , Jonathan Hunter , Peter De Schrijver Cc: linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180508165841.13758-1-digetx@gmail.com> <2607799.I2xByD6lqT@dimapc> From: Mikko Perttunen Message-ID: <89f0794e-affa-dba0-9684-582ce5570cad@kapsi.fi> Date: Sun, 5 Aug 2018 03:11:57 +0300 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: <2607799.I2xByD6lqT@dimapc> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 84.250.162.250 X-SA-Exim-Mail-From: cyndis@kapsi.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org One potential issue is with host1x clients where userspace processes can submit jobs with invalid memory accesses (addresses not mapped to IOMMU). If when such a failure happens, we disable the DMA for the whole host1x client, unrelated userspace processes may see failures even though there is no problem with their jobs. Mikko On 08/04/2018 02:53 PM, Dmitry Osipenko wrote: > On Tuesday, 8 May 2018 19:58:41 MSK Dmitry Osipenko wrote: >> Currently Memory Controller informs about erroneous memory accesses done >> by memory clients and that's it. Let's make it to block whole HW unit >> that corresponds to the misbehaving memory client in order to try to avoid >> memory corruptions and to stop deliberate attempts of manipulation by a >> misbehaving client. > > Guys, any comments? That is a kinda useful feature, in worst case only some of > memory could get corrupted instead of trashing the whole memory. In my > experience with T20/30, the interrupt handling latency is low and blocking > happens immediately after the first page fault. > > >