Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1568552pxa; Sun, 2 Aug 2020 12:14:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpEpixircxyGhRHEoyEPh37zuPOJNxku3V5sJtRLkX+tiSVy5OHEDcSy4xDN79QckhAmoD X-Received: by 2002:a05:6402:148a:: with SMTP id e10mr12630542edv.25.1596395685498; Sun, 02 Aug 2020 12:14:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596395685; cv=none; d=google.com; s=arc-20160816; b=liVoyM3JSIy59MBuvN8eKOvp/hIkpeA7D3Fc1KRzSaUWCyw2ErV+IuSwh492jFqTQw noa0g2vkP2LHTTBhA8ODb5K+BzBl9s9QGJSWDihMCSKzifP8LO/0f5Ff0TL7/j/0RKWs JKKUYHqhGwv0k10U+epRUpS4XxAteKJzrpbopuHbYch20XHtqLXA4c0HX7jXR96oagI8 RPNrb4MZi+pusBvupUEW/6wEl1Uy46a9sLQI5S298Pbh3q978NZ3nmUf52oocvOj4reT 0OqqFrMR4B8xoRIQQjI5amKhaWnSVgS6dd3KWG5Ynp8mjXIRcALcKm00iZPf0kUTMjJP CU+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=6M1VSzWUB99lKj5oO7vXvXQbBZaY942j6IYRkt52/X4=; b=R/bWVu7TCMjQ+bvYfU9G6XF2PTMl+LpNS+7xcqHPKQ2iEGpnGtBbuP4BbBo9Xlzmva Ru6C21teA5tCiaXi0nKwviEkECDLu8zStnBKVO6Y3EAUFfTXpuCn3fbaD2ZdCDTcFFeD 4GO86x5AtgJmJAbf5ijJjC2wCo5Gki4XPyFTYlXBg9UYBDtk0M+sKuMLvFmICWdM9xYB ASZLFJgiVryDTn2IZkmkx4awxDF0se7gil+9/kCBdt3jZT5AXndYMfTB7Ru23jmdlsJS xMXNlsOFka2nwF+paSMfjymsZ8As+8fNGWUID9R0EdoLSvOJresj1ebb5hoNx1rLDA1L OJVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="i/jHSvTU"; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ov30si9430540ejb.181.2020.08.02.12.14.14; Sun, 02 Aug 2020 12:14:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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=@kernel.org header.s=default header.b="i/jHSvTU"; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726708AbgHBTOJ (ORCPT + 99 others); Sun, 2 Aug 2020 15:14:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:36902 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725917AbgHBTOJ (ORCPT ); Sun, 2 Aug 2020 15:14:09 -0400 Received: from localhost (mobile-166-175-186-42.mycingular.net [166.175.186.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E9B0F206E9; Sun, 2 Aug 2020 19:14:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596395648; bh=8BmtM5Wz6njp3alR4dE4/v12QyDF8IHMxGR5An5fCEM=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=i/jHSvTUizuVlNBRmQdxRNPe6coho/ATL8nGKi/xOmyBYjKmz9+xWg85IsgGxSgIS dL1yfc+oHKYsaeZL0AE3OSX+Y10i5fuMEzdWvutU18j1LA95jrbDgF15+X0v94hhxC 1mNVxGQqYc9cBpDxqrC9KNkOyCMbtt1kU/iMoM8s= Date: Sun, 2 Aug 2020 14:14:06 -0500 From: Bjorn Helgaas To: Borislav Petkov Cc: Saheed Bolarinwa , trix@redhat.com, Kalle Valo , "David S. Miller" , Jakub Kicinski , Wolfgang Grandegger , Marc Kleine-Budde , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Joerg Roedel , bjorn@helgaas.com, skhan@linuxfoundation.org, linux-kernel-mentees@lists.linuxfoundation.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-mtd@lists.infradead.org, iommu@lists.linux-foundation.org, linux-rdma@vger.kernel.org, linux-ide@vger.kernel.org, linux-i2c@vger.kernel.org, linux-hwmon@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-gpio@vger.kernel.org, linux-fpga@vger.kernel.org, linux-edac@vger.kernel.org, dmaengine@vger.kernel.org, linux-crypto@vger.kernel.org, linux-atm-general@lists.sourceforge.net Subject: Re: [RFC PATCH 00/17] Drop uses of pci_read_config_*() return value Message-ID: <20200802191406.GA248232@bjorn-Precision-5520> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200802184648.GA23190@nazgul.tnic> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Sun, Aug 02, 2020 at 08:46:48PM +0200, Borislav Petkov wrote: > On Sun, Aug 02, 2020 at 07:28:00PM +0200, Saheed Bolarinwa wrote: > > Because the value ~0 has a meaning to some drivers and only > > No, ~0 means that the PCI read failed. For *every* PCI device I know. Wait, I'm not convinced yet. I know that if a PCI read fails, you normally get ~0 data because the host bridge fabricates it to complete the CPU load. But what guarantees that a PCI config register cannot contain ~0? If there's something about that in the spec I'd love to know where it is because it would simplify a lot of things. I don't think we should merge any of these patches as-is. If we *do* want to go this direction, we at least need some kind of macro or function that tests for ~0 so we have a clue about what's happening and can grep for it. Bjorn