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=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, USER_AGENT_MUTT 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 0905BC10F0C for ; Thu, 4 Apr 2019 17:43:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D410020820 for ; Thu, 4 Apr 2019 17:43:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dMCI0Ool"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Lqez6s/Y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D410020820 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uuK7fS96PJ9GBdfmPJ/ZOnM4SRAL6MSwMfDc8qKb45I=; b=dMCI0OolJM2GWY CybTRLhkttMEfAg0E5OMICkhRtGYWrI3Y/z6+jZFe/ZMWFulOOdmjcQ0ZAMHN/Gf2MGNQBHf7Ljop QfqzqJs+HdZX66JnYxZpcihoDN8v/zbjJOlwdsA49U1BLWnm/UshlWP2IUBsH3pSLZzNiricgHa4b 6vZ56Q3wCmU7miTwhsHTHYdeLceE5nieO6WkqVcB/cGVqOpB1g9kY/V1QeC05ZjjGLu7gQcm03XYL azpstmhBe4+C1ssjgovZ2KKUOZyk3GPPjrODmTcMOtqbkI64IBNINHRmnIc/2e5YI/fRNbnF2LUcR I9Ylm5FnqyVvV6oYRcoQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hC6Ot-00023C-9r; Thu, 04 Apr 2019 17:43:43 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hC6Op-00022S-Sq for linux-arm-kernel@lists.infradead.org; Thu, 04 Apr 2019 17:43:41 +0000 Received: by mail-pf1-x441.google.com with SMTP id 9so1700473pfj.13 for ; Thu, 04 Apr 2019 10:43:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Rw59mnYBwE31EofwCYWp9fHG8pJWkdccXV+StBpDPoU=; b=Lqez6s/YMN02xFVk9qKTLxa93b73yf9hM64lzjxls1ik8P5VXssRCJbAW+CBANPK1D fuyukaWIPBDPyji9nOn3OX7a0HIDxgdLYZdh6e69Xbiyw3W9TcjiXPmAcl7Si70zJS2m pqhgtICWrnRx/fOVvWSpZBqsC9v6keYsFYvxe4aqCPnervQfnRARknhguPM+yLNm4m9T 0FFAwL+JTTJpBnb7euz+cBoIoujwm0nPhvHAZDFaIQ9iwr6uCtUThprcGfYCLyw2fvUt 9w3bCmke+/fwXfmgYmpD7ll6n2eNVrZ7OctLg4QB8v/xLlhx4JWgzbhyZLNa1YnRKaHV 0jbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=Rw59mnYBwE31EofwCYWp9fHG8pJWkdccXV+StBpDPoU=; b=Jxy5I7FFDaFaOs/Q+qCuJZhwpqSx0lZ+7ZjUvFKB4LzsYyd/WpMLbke96anbeBJufB s2XqfB/GCPOuBIqYJp4SHdzgWUfaWZgWldLDgsoSOaODteLBqFNtmP0ucd4ck4JL06Yv P800+ZgmL6Dz/6aH2HzGHjzDdYi3UBYfsEPO7N5qvF6oAR+dn1T6pG1LHXXCkWe50imr /P+F2KplpsWnl7RGEvHijM5Gxp05OnxewMgEN0gnKzLrE9Q7YH708HPiheARzoTzlSud eh2X+kS982PAFDzZ7+jdMc7V40+RKfyp1wGMJ+dVjhh/ZhHdQ/dbxPfQwiBaWwrW/HgJ Swwg== X-Gm-Message-State: APjAAAVIeQ2DK29a4U57qTGTZzPCApeZoZe+RaVnIasOOUM/fwaiTF4o a+QO6BmHGrgedsm2k9FujTY= X-Google-Smtp-Source: APXvYqz7MwIFyvMSGvcA9434eYuYKMo3uh2ZGK5fwvVxHPwTD0XUCVDbtU5ueCgJr049b2q+L7LpNA== X-Received: by 2002:aa7:8282:: with SMTP id s2mr7296745pfm.7.1554399819049; Thu, 04 Apr 2019 10:43:39 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id m23sm29760901pfa.117.2019.04.04.10.43.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Apr 2019 10:43:38 -0700 (PDT) Date: Thu, 4 Apr 2019 10:43:36 -0700 From: Guenter Roeck To: John Garry Subject: Re: [PATCH v3 3/4] lib: logic_pio: Reject accesses to unregistered CPU MMIO regions Message-ID: <20190404174336.GA10404@roeck-us.net> References: <1554393602-152448-1-git-send-email-john.garry@huawei.com> <1554393602-152448-4-git-send-email-john.garry@huawei.com> <20190404164130.GA12203@roeck-us.net> <24cc8006-0f0d-6b20-a466-e4a32a0bb656@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <24cc8006-0f0d-6b20-a466-e4a32a0bb656@huawei.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190404_104339_958472_C292E48F X-CRM114-Status: GOOD ( 15.79 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: wangkefeng.wang@huawei.com, lorenzo.pieralisi@arm.com, arnd@arndb.de, rafael@kernel.org, linux-pci@vger.kernel.org, will.deacon@arm.com, linux-kernel@vger.kernel.org, linuxarm@huawei.com, andy.shevchenko@gmail.com, catalin.marinas@arm.com, bhelgaas@google.com, bp@suse.de, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Apr 04, 2019 at 05:52:35PM +0100, John Garry wrote: [ ... ] > >> > >>Note that the f71805f driver does not call request_{muxed_}region(), as it > >>should. > >> > > Hi Guenter, > > >... which is the real problem, one that is not solved by this patch. This may > >result in parallel and descructive accesses if there is another device on the > >LPC bus, and another driver accessing that device. Personally I'd rather have > >request_muxed_region() added to the f71805f driver. > > Right, we should and will still fix f71805f. If you recall, I did have the > f71805f fix in the v1 series, but you committed that it was orthogonal, so I > decided to take it out of this work for now. > > And even if we fix up f71805f and other known drivers which don't call > request_muxed_region(), we still need to police against these rogue > accesses, which is what this patch attempts to do. > Do we ? I am personally not convinced that LPC accesses _have_ to occur through PCI on any given system. I won't object to this series of patches - not my area. I do mind, though, if one of the drivers I am responsible for is cited as reason or argument for this series. I would prefer for those drivers to get fixed. Guenter _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel