Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp592099ybh; Wed, 15 Jul 2020 09:55:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDy4FdKDGqWuJ86ItLxNz/lvbksY4wNUMnqgV0uPcN/h14lLDQIaTLAISIamAIi/rE3gKu X-Received: by 2002:a17:906:c7c3:: with SMTP id dc3mr10617151ejb.376.1594832121519; Wed, 15 Jul 2020 09:55:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594832121; cv=none; d=google.com; s=arc-20160816; b=dG0CZmDl+OO2GXU+uoM15ah7Q8BdNC1S+Yf405oU4FIHhEr/XDkFIBpuM417/+uwPC 6uGSC4mKqCn2i4OBchzvW9MPNxk86E/VQIZXtU0GPGVcqBHL5OyOzMS73YmyqmQ9lU3r 1aAse/ODGFqSN/OtcFzebGJSRl9Zp/iNmfomdJnC71iBV+i3zYmrNaczYMRYWHXVaX+U ZqWtf7m+HoaVDP/W2mRHCM0tl9evfyhezIhDqIgxpHdzEY6OpLckgI3GcBODzBw5evqc C00IQAlGgktk/AgC/oevpno8w45M3qm7saiOJbrvPYtgKx/gCLGm7/p7da0XXwlF0QAi OBOg== 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:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=A83CqraPyYHA7PAr0Px0p6I89GS/KpiLkv+oXDd95lM=; b=VtuJj0V0cLkCs0w59FYjqg5m+cVIZoZgpoLdDCfYQs0FVr/cltaIS/DdckzAIw9Ru5 mp2fNa4x2FcwUbT+1zV2iDZTlQQzROluS9F+ktzxfo8hZcxQVqHJR7rA8W1SeTLi8Puu p6NBNoysyvwYV6cTRO6U/74RLM1psJ1DLBJQyHxvHxIdIuFzMIy/lQc7U/WKytwdg1gG UGdz03MTnE7+IkcLeRmmBh8BlxxI6ROLfsRdS9WDO3sdjyoqicUvGzZ81cQJZXTU9ZA6 Y0nbjTyKpRVByZa8xSJNhThnRbXGyHsbittDO+huCJl32qjfxJzqFDZdcPGx5ipM55x0 t2fg== 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c102si1675057edf.216.2020.07.15.09.54.57; Wed, 15 Jul 2020 09:55:21 -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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725867AbgGOQyv (ORCPT + 99 others); Wed, 15 Jul 2020 12:54:51 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:14830 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725834AbgGOQyv (ORCPT ); Wed, 15 Jul 2020 12:54:51 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06FGVCPS032440; Wed, 15 Jul 2020 12:54:45 -0400 Received: from ppma03fra.de.ibm.com (6b.4a.5195.ip4.static.sl-reverse.com [149.81.74.107]) by mx0b-001b2d01.pphosted.com with ESMTP id 329r2076am-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Jul 2020 12:54:45 -0400 Received: from pps.filterd (ppma03fra.de.ibm.com [127.0.0.1]) by ppma03fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 06FGo5hP008360; Wed, 15 Jul 2020 16:54:42 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma03fra.de.ibm.com with ESMTP id 327527jceh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Jul 2020 16:54:42 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 06FGseUx38863096 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 15 Jul 2020 16:54:40 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 36E9BAE05F; Wed, 15 Jul 2020 16:54:40 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8B15BAE056; Wed, 15 Jul 2020 16:54:39 +0000 (GMT) Received: from localhost.localdomain (unknown [9.85.155.184]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 15 Jul 2020 16:54:39 +0000 (GMT) Message-ID: <1594832079.12900.321.camel@linux.ibm.com> Subject: Re: [PATCH v3] powerpc/pseries: detect secure and trusted boot state of the system. From: Mimi Zohar To: Nayna Jain , linuxppc-dev@ozlabs.org Cc: Michael Ellerman , Daniel Axtens , linux-kernel@vger.kernel.org Date: Wed, 15 Jul 2020 12:54:39 -0400 In-Reply-To: <1594813921-12425-1-git-send-email-nayna@linux.ibm.com> References: <1594813921-12425-1-git-send-email-nayna@linux.ibm.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5 (3.20.5-1.fc24) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-07-15_12:2020-07-15,2020-07-15 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 bulkscore=0 adultscore=0 spamscore=0 mlxscore=0 phishscore=0 malwarescore=0 clxscore=1015 priorityscore=1501 impostorscore=0 mlxlogscore=903 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007150126 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2020-07-15 at 07:52 -0400, Nayna Jain wrote: > The device-tree property to check secure and trusted boot state is > different for guests(pseries) compared to baremetal(powernv). > > This patch updates the existing is_ppc_secureboot_enabled() and > is_ppc_trustedboot_enabled() functions to add support for pseries. > > The secureboot and trustedboot state are exposed via device-tree property: > /proc/device-tree/ibm,secure-boot and /proc/device-tree/ibm,trusted-boot > > The values of ibm,secure-boot under pseries are interpreted as: > > 0 - Disabled > 1 - Enabled in Log-only mode. This patch interprets this value as > disabled, since audit mode is currently not supported for Linux. > 2 - Enabled and enforced. > 3-9 - Enabled and enforcing; requirements are at the discretion of the > operating system. > > The values of ibm,trusted-boot under pseries are interpreted as: > 0 - Disabled > 1 - Enabled > > Signed-off-by: Nayna Jain > Reviewed-by: Daniel Axtens Thanks for updating the patch description. Reviewed-by: Mimi Zohar