Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1531242ybh; Mon, 13 Jul 2020 23:39:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpkMHyOEfHKiern0H9pn2Hmnu8LKzCRWPyghJ/Mr2i3fPmznI5EoBr4LxByCmd4QWyazTF X-Received: by 2002:aa7:d7cf:: with SMTP id e15mr3010978eds.236.1594708793896; Mon, 13 Jul 2020 23:39:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594708793; cv=none; d=google.com; s=arc-20160816; b=Pjud1aY22c+JmI+pWIuP0qey+DeljQrTxzdfCquUWSGVitxHH0S5A2R8ljdBWTfMfv c+3HqyPFpqOyz0JdRZVPMSXITWrC/BD3JJwsBFroUwDGzB0/YQB3G1Zu/H+MTKMQIbpa INus8XGInyeNQ8G81M6aSWqb2rANhu53oBZRfBmVHXrH8kuLnpMS2RNCZPJsrsFURiyK s+BGDHWBfvicjXZ0dwYV5LlGkTVQi+kz0Q2TRl/m5x9WJ8xGEXuHNrLmOf1m4XXHUUtS l3CqH68nHOgZMIWBCgctTven0bc3CDpguBLCAcHTPjXnSqg1yM+RXqFrjCB/yDhhMNxX R5jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=a1VxGILEG42+H8L6GoViFzWZFZSKw5Ols1wGUf0gdqo=; b=0Lb/VOiCQsr62BeEi5vdCzrEEK1ynmPDzzp1RwgOPmKYVkUaQSlQ67HY3Jqyzlq6xh 9J8im1EUfW9iG5wzlZVxKY5aVR21AsuEqbLKMVllT5ZB71ccRqMpMxPI+CUy4fLpWdxF SfHkP1BcD4AGze7f/LM30XlrNC1Rs9yY3fbtagqldG9M5kh3ldIJVpUtJCbl9CKiKw7M xxAn12AUNwVdnpGrYooFtVVMwPmQhaWVoCi73QdxmGfMgmQfjuhPfGQo9P9GZ9kKvpFf CBO8wNdLkKxyhKOVw4OmcZUQjuWHDnQhuEQAS6FRyAwQ/vJi9rgUMWrGjugoVq+anWQW zIHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@axtens.net header.s=google header.b=Xts+McWZ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e6si10628686ejt.528.2020.07.13.23.39.31; Mon, 13 Jul 2020 23:39:53 -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; dkim=pass header.i=@axtens.net header.s=google header.b=Xts+McWZ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726778AbgGNGiq (ORCPT + 99 others); Tue, 14 Jul 2020 02:38:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725788AbgGNGiq (ORCPT ); Tue, 14 Jul 2020 02:38:46 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33AEBC061755 for ; Mon, 13 Jul 2020 23:38:46 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id q17so6608933pls.9 for ; Mon, 13 Jul 2020 23:38:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axtens.net; s=google; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=a1VxGILEG42+H8L6GoViFzWZFZSKw5Ols1wGUf0gdqo=; b=Xts+McWZovvImnzKPR+kJgv321ta/+h+TY/aye5u1KOB2hnbQ34iDFo+AZuD1vvRx2 pFG/PH9yf5hkE7tE9sw1zr8PEmXxMms68RIYOdjI41nx7/RZxGplxkUHqzONT0PK2apj 1wVUjOeXgsAKDDEZeKAaj3HauILJ/hYAfv6ac= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=a1VxGILEG42+H8L6GoViFzWZFZSKw5Ols1wGUf0gdqo=; b=PVDD0EC2foOkQ8zik9lStNGTL/W1vp0Y6aY9TZAKV11mWOGVay69ve5wcv4IU+8Luo AjGOCJmovRP76ajktk43QsX977SI8u6KFB2/jweTpxWPHHLuwBYUPNxHHqXyqDt5mEqk o/ixgJBqRlaMjlsJS1EvaaFwWbegrI8m5GcG0Pc7u2HhqGnAUwx/IFm5H5vocg2NYMS7 DrP6EBR49cDc6ser1N5MxIOkUrkyfAOBZTz2a+p734C0v9OPliKKNCNxQXMXvsvmhZQ0 qngRM0qjb2ZaTw3yz2+Ji2QkYBnJ5mzCpAnZJDDJZ3+VhL3f+D+h3jinNk/mGiikw4Ul YWEw== X-Gm-Message-State: AOAM530arL383BMJRv9ohWTRHu30u1XmCYlUXcjX2Df/OL7/gozyhUuT x/7FLq3KUZ7EDKkmwIpKPYwZPfO1pJM= X-Received: by 2002:a17:90a:1acc:: with SMTP id p70mr3216700pjp.210.1594708725751; Mon, 13 Jul 2020 23:38:45 -0700 (PDT) Received: from localhost (2001-44b8-111e-5c00-0c99-1211-d258-b704.static.ipv6.internode.on.net. [2001:44b8:111e:5c00:c99:1211:d258:b704]) by smtp.gmail.com with ESMTPSA id p12sm1322396pjz.44.2020.07.13.23.38.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 23:38:45 -0700 (PDT) From: Daniel Axtens To: Nayna Jain , linuxppc-dev@ozlabs.org Cc: Michael Ellerman , Mimi Zohar , linux-kernel@vger.kernel.org, Nayna Jain Subject: Re: [PATCH v2] powerpc/pseries: detect secure and trusted boot state of the system. In-Reply-To: <1594434329-31219-1-git-send-email-nayna@linux.ibm.com> References: <1594434329-31219-1-git-send-email-nayna@linux.ibm.com> Date: Tue, 14 Jul 2020 16:38:41 +1000 Message-ID: <87y2nmtxce.fsf@dja-thinkpad.axtens.net> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Nayna, Thanks! Would you be able to fold in some of the information from my reply to v1 into the changelog? Until we have public PAPR release with it, that information is the extent of the public documentation. It would be good to get it into the git log rather than just floating around in the mail archives! A couple of small nits: > + if (enabled) > + goto out; > + > + if (!of_property_read_u32(of_root, "ibm,secure-boot", &secureboot)) { > + if (secureboot) > + enabled = (secureboot > 1) ? true : false; Your tests double up here - you don't need both the 'if' statement and the 'secureboot > 1' ternary operator. Just + if (!of_property_read_u32(of_root, "ibm,secure-boot", &secureboot)) { + enabled = (secureboot > 1) ? true : false; or even + if (!of_property_read_u32(of_root, "ibm,secure-boot", &secureboot)) { + enabled = (secureboot > 1); would work. > + if (!of_property_read_u32(of_root, "ibm,trusted-boot", &trustedboot)) { > + if (trustedboot) > + enabled = (trustedboot > 0) ? true : false; Likewise for trusted boot. Regards, Daniel P.S. please could you add me to the cc: list for future revisions? > + } > + > +out: > pr_info("Trusted boot mode %s\n", enabled ? "enabled" : "disabled"); > > return enabled; > -- > 2.26.2