Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp940694ybz; Wed, 15 Apr 2020 23:02:22 -0700 (PDT) X-Google-Smtp-Source: APiQypJswy7eQsCC1I2JSSpnwTD0M4YOmIyidOB2u/J0rw7D3yYMkTLPvH6tkyAsKew9GWbCGOKn X-Received: by 2002:a17:906:16ca:: with SMTP id t10mr8442011ejd.122.1587016942565; Wed, 15 Apr 2020 23:02:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587016942; cv=none; d=google.com; s=arc-20160816; b=Pid+wa70RTLUDlrk8VJibzwpcInEQYsmrDQrH3QuoKS/botNzqt/wXocO2GhUAvBHa 5QHebw7cuViK9w8tgHVgSh6Gr2hrlTJgmR2OuIewcKl9o/keNTyWM+QezxqqN4ZL3CKs MFIYldAD/wHT49BlgWmFSEcB/b6qn9IGzhrBBzHcSKmgGzDOUoztj8dV0njgob89pRk5 4RVfHGKqffXREFGQR59gqrhiTtz+n7oSXHWcEC/vL56ikinUEvg2SUa0hXS7X8LqcZH7 l6b/SZHlWyWeLCLHhsBVefNNFje3fOtWBSryYnYNwv47Yq2lmGLU6RzsNgmQTuguOde/ XfCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=FAXeeAl+06npcabuQvuYuTP3jQapHCqy0Znm1m8x2B8=; b=GtdEeFCSvARm+RdkpZoDD1PXPb3KKPAADeOvOw9+YsML6PNayoz3l23i7trbIVokEb 9MGTRE4yrLhSerNlIPrsm4KVcLjlQlzhR8J0nugTOraBtJJAQi43cw7hQtoBYSp34BIx usqhHztn3Wicvc22KVkJFgIrHa2SrzBhC7NUrAs9KAFZrJUpX5cZuB2FGj3zTd1dgg3X RV/HpmiztgOhhrKqRzjctqmp/BJgTUq+GefTcKOPr4EoJ42OL0qOYsrDvSXG1JL0WwjA 671LWetvAogU2FvRDNovj/FjQwsZHhIxo3G3TqJs6fd1kTTGzvlezNzvYrpzwrOMSRwn A7pQ== ARC-Authentication-Results: i=1; mx.google.com; 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=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 dd13si11818162edb.199.2020.04.15.23.01.59; Wed, 15 Apr 2020 23:02:22 -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; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407300AbgDPGAV (ORCPT + 99 others); Thu, 16 Apr 2020 02:00:21 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:33195 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407207AbgDPGAP (ORCPT ); Thu, 16 Apr 2020 02:00:15 -0400 Received: by mail-pf1-f196.google.com with SMTP id c138so1203914pfc.0; Wed, 15 Apr 2020 23:00:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=FAXeeAl+06npcabuQvuYuTP3jQapHCqy0Znm1m8x2B8=; b=iP6f3iMHUfMmkbuyoThhrT00qQSQkzJMJmkB8O0Y6zk/6F7bDP1uwppX7Ax1n4pc0m ij1axBsmWvIKBXyZVsPULpNtPE97C1YVNJHXsgMVYkUx/qnO7/xhZJoiIRtRoZsVZ0lV XfcrzdjOqL4ifTecs2St0d40XmxWfmXAg2rHaGFqgMmgSvpzCbwcc+wiEACnfpEgMFZC YfVCzOC1WsULzNqy77dVUy8pnfDfqFx8q1Ng3CO4DBWR6qnuMeGHZbNniN0nCaSjQYKp vks11fANGSBanXTx6szcEvbfU4jKldxecEvXYW0Z/9k+kAbqd/DP/nzg+MiU5NihyX2b jg/w== X-Gm-Message-State: AGi0PuaWQf+05rcZJG6RiUM1IEFoxQO/TwtlbKGANikoY+BS79aPoIsh YSL/DhntgM98mh3ZUWHe2uM= X-Received: by 2002:a63:a07:: with SMTP id 7mr29039722pgk.261.1587016814132; Wed, 15 Apr 2020 23:00:14 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id z7sm6449944pff.47.2020.04.15.23.00.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2020 23:00:12 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id E2FE740277; Thu, 16 Apr 2020 06:00:11 +0000 (UTC) Date: Thu, 16 Apr 2020 06:00:11 +0000 From: Luis Chamberlain To: Kees Cook Cc: Scott Branden , Greg Kroah-Hartman , David Brown , Alexander Viro , Shuah Khan , bjorn.andersson@linaro.org, Shuah Khan , Arnd Bergmann , "Rafael J . Wysocki" , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-fsdevel@vger.kernel.org, BCM Kernel Feedback , Olof Johansson , Andrew Morton , Dan Carpenter , Colin Ian King , Takashi Iwai , linux-kselftest@vger.kernel.org, Andy Gross Subject: Re: [PATCH] test_firmware: remove unnecessary test_fw_mutex in test_dev_config_show_xxx Message-ID: <20200416060011.GK11244@42.do-not-panic.com> References: <20200415002517.4328-1-scott.branden@broadcom.com> <202004142010.C0847F5@keescook> <202004150943.01DF9E85@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202004150943.01DF9E85@keescook> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 15, 2020 at 09:44:31AM -0700, Kees Cook wrote: > On Wed, Apr 15, 2020 at 09:28:18AM -0700, Scott Branden wrote: > > Hi Kees, > > > > On 2020-04-14 8:10 p.m., Kees Cook wrote: > > > On Tue, Apr 14, 2020 at 05:25:17PM -0700, Scott Branden wrote: > > > > Remove unnecessary use of test_fw_mutex in test_dev_config_show_xxx > > > > functions that show simple bool, int, and u8. > > > I would expect at least a READ_ONCE(), yes? > > I don't understand why you need a READ_ONCE when removing a mutex around an > > assignment > > of a parameter passed into a function being assigned to a local variable. > > > > Could you please explain your expectations. > > Oops, yes, you're right. I misread and was thinking this was reading > from a global. This looks fine. > > Reviewed-by: Kees Cook Reviewed-by: Luis Chamberlain Luis