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,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 2093AC432C0 for ; Wed, 20 Nov 2019 19:18:59 +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 E38C32088F for ; Wed, 20 Nov 2019 19:18:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="NZG+yQkV"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="cTYecq8Z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E38C32088F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=kRaKcU5cvLgicRBhxufdn0cR84WhQa3dENzgDVWlpW0=; b=NZG+yQkVB/GrKd +sGbuNVwaw9DQLQkbi550kqDnRx44N7o/YaX4QqFLSfsQPT48ukwcMCmiwV4zahZM/pSm4geqk7bD +ljW2aMbm2yAgkeerCAtfyPe6/fpU5Okagc4+RBhtEhM3QaigBnx5tOE1cf+Hr8WI1eRSvBbXRtNm 018zapYWR0sCoAKwRbO3tDTNtSiXNifpE+ePXSrilOiMtmAtOaPLUSORXe6R6y+Jil9XsuR5/StLo zMJ+XR7JB+mws05NvxSsYweX549rhiHrPekcYNQKSBdPc7rkCQI1u4/0I+z3XNwWcq8RPz5Sc6W9J DKrntsPTsEoGxUGQPiWA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iXVVA-0006pe-OL; Wed, 20 Nov 2019 19:18:56 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iXVUz-0006hk-MV for linux-arm-kernel@lists.infradead.org; Wed, 20 Nov 2019 19:18:47 +0000 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (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 375A020895; Wed, 20 Nov 2019 19:18:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574277525; bh=LpPuYMvyFIdAPrnBkAwX0LIkqA67lt7WNCj3z+XgAho=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cTYecq8ZWrPybQxUE4GijPIWqQdUnwRR/GRLImxxHxFeZha4+2bn2yNyBXwgsl3y6 j3BnVJdtF0Etud0fXa3mNiD5gQV80lg8FAOr8XhfPOUhf4lveI155ZlJ3GJQWb/GTo 1JA2ThiTxyq54+zbYM4lepRihtYSsMtaSIImECjc= Date: Wed, 20 Nov 2019 19:18:40 +0000 From: Will Deacon To: Herbert Xu Subject: Re: [PATCH v2] buffer: Fix I/O error due to ARM read-after-read hazard Message-ID: <20191120191839.GF4799@willie-the-truck> References: <20191113104945.GC25900@willie-the-truck> <20191114132848.55atqtjshjmi2udl@gondor.apana.org.au> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20191114132848.55atqtjshjmi2udl@gondor.apana.org.au> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191120_111845_782651_ABC6D334 X-CRM114-Status: GOOD ( 12.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: axboe@kernel.dk, Richard.Earnshaw@arm.com, rabinv@axis.com, catalin.marinas@arm.com, vincent.whitchurch@axis.com, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, 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, Nov 14, 2019 at 09:28:48PM +0800, Herbert Xu wrote: > Will Deacon wrote: > > > > which is what can happen due to this erratum. It's generally good practice > > to use READ_ONCE() when reading something which can be updated concurrently > > because: > > > > * It ensures that the value is (re-)loaded from memory > > > > * It prevents the compiler from performing harmful optimisations, > > such as merging or tearing (although in this case I suspect > > these are ok because we're dealing with a single bit) > > > > * On Alpha, it gives you a barrier so that dependency ordering > > can be relied upon from the load > > The Alpha barrier matters for pointers, how could it make a > difference for individual bits? I guess you could use the result of test_bit to index into an array or something? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel