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.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 01481C2BA2B for ; Thu, 16 Apr 2020 06:00:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C9C72214AF for ; Thu, 16 Apr 2020 06:00:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587016826; bh=Tht4gbsa/KZVpJXXcLo7O8Op4sfskPiLgyv6Z5k3SsU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=oWFanyAvBRjUKHtNbS31+uBYSLxuLvcimlXG9JGzQYBcW/bY61qCKRP1rgf8TYn1U 6P/SmGsKh5uSr3tfnXsXhl0bTdUcq/BLNd/a3RCs6/Giz6kU4xqU+yVyqoSaE8fb6e 8ls1PUy6am/L3PhcPAEE75Uxe25QcPespWXvsskc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407311AbgDPGAY (ORCPT ); Thu, 16 Apr 2020 02:00:24 -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-Google-Smtp-Source: APiQypICnolUc2W/UZn/odHanFGW9jsn8iT5iFZCqWPgDqKQJOk8NCqaY2uIAeFAHoAedVh6nx2WBg== 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