Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4129402ybg; Fri, 25 Oct 2019 13:47:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqzFQauAB6dMh5Sw1faTgi1finzdK/TeduCHAlu4tnuJ77TZeUKv5s0o7UKO9NLAProGlP5b X-Received: by 2002:a17:906:f1c5:: with SMTP id gx5mr5218151ejb.314.1572036469021; Fri, 25 Oct 2019 13:47:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572036469; cv=none; d=google.com; s=arc-20160816; b=QvWL0hSmWthodRG6ti5wziF5Zi/eebLa2K+9E44yt83+kWJxD6dVsAWqgf6XZLxlv+ rFBpp//jO/b+Fwcd9Nego74WMXIARIupVU+CDt/n603bZTyXAzfwG2zOd/iZKKtXBgf2 GEJhpwvvrUDGrjPzrc1tondVsJqHQUlvQuWR/IyVdkSATg7l/2xkr8WNJuAI7cNp9Yy6 rxwJr9fZhT/8gS8THH7VsdRfDjNK3zBnczRo+X5401uRQtUXD1e6oKoeMBfZaCH92oY2 tW8E8WuKTBJacC66H5bp8GAbAt3Hdfp2FOql60MzgZ6k4DN4z7NxyF8n4NlI/lNCve/y KBdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Fpbc4l1PVeJ8Cg+HGdkkkV6TuQnc7zQSPZuY0stymUE=; b=h2WXNNhd10dU1O/UJSffsSCSy3UnBWzhsFFVR1xXwHFyexKM1ulzN+5oXtzeQOiAUd WvUtzrZ2WmD3zqYvR0O+DDXghCJVJI61Du9sdUjoHw6eb6B9BQY98aMj/NwL3T3sUm/Q UWRfRmeTnAUQnmYDnL92+MJdSSrRJwOqV9NFyVM+HbOVIvJB6O6IpyGEFCN2C+IQtgfY lFQWExNodUMMujinofwUL/c7FKHU4+LCWM+y7VGzn02BmjVATghtBBvZvtX1zB+w02Jj XrUUi9phY0qr0XG/1gXS+o+ctLXaAXk3U8Gk9NrgpNv7g6NHDN7c6AsbAS+6JNwFeoUP zevg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f24si2061410edf.15.2019.10.25.13.47.25; Fri, 25 Oct 2019 13:47:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2440804AbfJYQut (ORCPT + 99 others); Fri, 25 Oct 2019 12:50:49 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:26512 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2440795AbfJYQut (ORCPT ); Fri, 25 Oct 2019 12:50:49 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x9PGgRKx105512; Fri, 25 Oct 2019 12:50:27 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 2vv1reqhs5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 25 Oct 2019 12:50:27 -0400 Received: from m0098394.ppops.net (m0098394.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.27/8.16.0.27) with SMTP id x9PGi1Lh119460; Fri, 25 Oct 2019 12:50:27 -0400 Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0a-001b2d01.pphosted.com with ESMTP id 2vv1reqhrc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 25 Oct 2019 12:50:27 -0400 Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x9PGkI2D026797; Fri, 25 Oct 2019 16:50:25 GMT Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by ppma05wdc.us.ibm.com with ESMTP id 2vqt48b4mn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 25 Oct 2019 16:50:25 +0000 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x9PGoPdQ51315120 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 25 Oct 2019 16:50:25 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1B31AB2065; Fri, 25 Oct 2019 16:50:25 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 09420B2066; Fri, 25 Oct 2019 16:50:24 +0000 (GMT) Received: from [9.85.155.79] (unknown [9.85.155.79]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Fri, 25 Oct 2019 16:50:23 +0000 (GMT) Subject: Re: [PATCH v9 3/8] powerpc: detect the trusted boot state of the system To: Lakshmi Ramasubramanian , Nayna Jain , linuxppc-dev@ozlabs.org, linux-efi@vger.kernel.org, linux-integrity@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Ard Biesheuvel , Jeremy Kerr , Matthew Garret , Mimi Zohar , Greg Kroah-Hartman , Claudio Carvalho , George Wilson , Elaine Palmer , Eric Ricther , "Oliver O'Halloran" , Prakhar Srivastava References: <20191024034717.70552-1-nayna@linux.ibm.com> <20191024034717.70552-4-nayna@linux.ibm.com> From: Nayna Jain Message-ID: <8a929e75-52c2-105b-365b-7521404a8ead@linux.vnet.ibm.com> Date: Fri, 25 Oct 2019 11:50:23 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-10-25_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=997 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910250154 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/24/19 12:38 PM, Lakshmi Ramasubramanian wrote: > On 10/23/2019 8:47 PM, Nayna Jain wrote: > >> +bool is_ppc_trustedboot_enabled(void) >> +{ >> +    struct device_node *node; >> +    bool enabled = false; >> + >> +    node = get_ppc_fw_sb_node(); >> +    enabled = of_property_read_bool(node, "trusted-enabled"); > > Can get_ppc_fw_sb_node return NULL? > Would of_property_read_bool handle the case when node is NULL? Yes. Thanks & Regards,      - Nayna