Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3991843ybg; Fri, 25 Oct 2019 11:47:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqx2IuLvYRYVvQtM5v5qJXl9TJos1oDAbH6Kr5/T610kYOJ5rkJwDpZXhDp/1KzMyqe4VOBv X-Received: by 2002:aa7:ccda:: with SMTP id y26mr5639495edt.130.1572029238305; Fri, 25 Oct 2019 11:47:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572029238; cv=none; d=google.com; s=arc-20160816; b=ZhFNVJg33J6D8nHUAX3EmpAr73DsHG4WGwb8L57cqEYrEgc7Wah9JtfKQCQeZ/msM9 uEkCc0l0JM29ucFxJLykexH2X1GfzDmvhbFJgwytcxk1C/xfxr59f7CNqWyVK6H4bgyK znrBk6T903ZTNauEpC/Iyfm34dXpOE5Btkd/w+i6QetPqfv0AgtxdzuSUhSis0Stctxh HBHV5C/hxVsDk0tgbjkmdUmk4Bh5tsn533e/Y26lTuDbEQTCHsUV1JayHCeJ/kEP2EzV jWh0AWa7KXiM5W9H5ZXRCuSjS2TVBYowbvsbzgLymApYaO1VWxH9/ESC1J07qKQGiEad ANAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature:dkim-filter; bh=jAzro5QgHA6OVAS90ZdpCnam0CrEJTVosK5szwE7n2M=; b=tAKAJnfa59IwpksH/a7mJhJGMvay9HoWzXl60fEMtXm9ye/ohJ/qMJeMNapxo/syKJ PyW8Fl5CZdC49AqZC1Iv8nhKSrPMc8DDFvCSTAhcUIZfNwZpSshsq+4dnzJNPLY4ey/z PbRz7WpZ86/VlKvyqM9+4tiksYetTi593gMoeoHSj+u8yHEllwNidjoJqRNZFSsch2QJ udARMJLK2PLOvxEXneSaBmtlw+Yc9dVXoTJjV/8NAFB6b0eoYlnJj9cBvZKTXemJwp8H eGIOIkOrWfujTcvf+UYtf+JPJrJYL0U27D2g67eREhszR/DCx0+hSrWKIejqYj9s/kno jcLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=HAKr74f1; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d6si1859016ede.119.2019.10.25.11.46.54; Fri, 25 Oct 2019 11:47:18 -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; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=HAKr74f1; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2503856AbfJXRin (ORCPT + 99 others); Thu, 24 Oct 2019 13:38:43 -0400 Received: from linux.microsoft.com ([13.77.154.182]:59044 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729458AbfJXRim (ORCPT ); Thu, 24 Oct 2019 13:38:42 -0400 Received: from [10.137.112.111] (unknown [131.107.147.111]) by linux.microsoft.com (Postfix) with ESMTPSA id B1CC720F3BC1; Thu, 24 Oct 2019 10:38:41 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com B1CC720F3BC1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1571938721; bh=jAzro5QgHA6OVAS90ZdpCnam0CrEJTVosK5szwE7n2M=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=HAKr74f1Pnx9P2V2H2BkmgTxZjOt5gAvytgB5Le7ZERFnMBkqlNi3+aE2tlopHu2o krpKOkiXFKct7xn4poUOKA7ReFKVdM5B3EFPFge3MvteTnsq5mtwaKzp4vG//bbwCw AwWin41kd2m6SnBRGcbiEhbML+3+4SHCH2WceUf4= Subject: Re: [PATCH v9 3/8] powerpc: detect the trusted boot state of the system To: 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: Lakshmi Ramasubramanian Message-ID: Date: Thu, 24 Oct 2019 10:38:59 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <20191024034717.70552-4-nayna@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? -lakshmi