Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp904616ybp; Fri, 11 Oct 2019 06:16:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWETOX2qfmPJbDSfvSfaCYObLSW/4V+dlMpUn2qcArEkt0TkfPvDwqOilj5YmXNHwPazNs X-Received: by 2002:a17:906:480a:: with SMTP id w10mr13720545ejq.212.1570799801216; Fri, 11 Oct 2019 06:16:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570799801; cv=none; d=google.com; s=arc-20160816; b=v4f3eTnEChsY654p//IazMvTOxmHFdlVWhdeYEtchmQ6vCDxUfxnogDA+hjEKEj9iH EfzKa+B+mXnV6LXGSbCvoSDFpv01EoHV1fJmGSLRuDzHR9oCw3pmt4GvNZtHnN3usCkd 7G+q5cBYWO4i5LfTD57zNz7b57BHYH9BoTKFPui6PnTRRJKWbRwtUkhYbdg8dP2zfzZW OT/BvPmuwqa1+GTH6PvmOiqfnAJgRh8Y0jX+cFs0k6vo+FJ3EFclrfeMtsTgna7/IVTl Ep8qsDj4TEXnbA0gZE8lbiCUqCyiVF7jbhKU53cP0w7AXHvBKFlkyRe00JrU9XmWUSa2 eO8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:references:in-reply-to:date:cc:to:from:subject; bh=2VgAVDE7AyR1DyS9+vLGMrJwLoMthrvv/kFy3+EBpcQ=; b=AoXXvJj0U+dCpTWT870ft1JJA4CFEmhqODBGFEn3P2RcXV4c4lVBCCsptDa3+5gArZ 4X9g/D99KwlyLwzpnUuAD9QAcoVdkmP7dnK/3bXkEs+4uQUFNGIQclSaEzKHn1FouEfC heuX/9M1y2zLFAaRZEO2yDWHomgLiZ7MTeRkO8u9pWDiPh/sZcYEiXAdI4D13dHHKy4R D+wnuZHPfeInQpwW5a6w1cKWOF2d2g+u4h+IwNNvZUXnYmaIXoSnIfyjRDEOTURwQq1n D5RGFpV9uRJDpkX9AwWti0N5YExdgXuCtTzCg2fU0UB+H0vvzvpE8Zht2ohDhwdRHpug tROw== 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 y7si5331450ejp.378.2019.10.11.06.16.16; Fri, 11 Oct 2019 06:16:41 -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 S1728315AbfJKNNM (ORCPT + 99 others); Fri, 11 Oct 2019 09:13:12 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:31584 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728187AbfJKNNL (ORCPT ); Fri, 11 Oct 2019 09:13:11 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x9BD93HO002384 for ; Fri, 11 Oct 2019 09:13:10 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 2vjqmbpdmy-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 11 Oct 2019 09:13:10 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 11 Oct 2019 14:13:08 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 11 Oct 2019 14:13:04 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x9BDD2OD50135232 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 11 Oct 2019 13:13:02 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 54091A4053; Fri, 11 Oct 2019 13:13:02 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C7CF1A4040; Fri, 11 Oct 2019 13:12:59 +0000 (GMT) Received: from localhost.localdomain (unknown [9.85.178.57]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 11 Oct 2019 13:12:59 +0000 (GMT) Subject: Re: [PATCH v7 2/8] powerpc: add support to initialize ima policy rules From: Mimi Zohar 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 , Greg Kroah-Hartman , Claudio Carvalho , George Wilson , Elaine Palmer , Eric Ricther , "Oliver O'Halloran" Date: Fri, 11 Oct 2019 09:12:59 -0400 In-Reply-To: <1570497267-13672-3-git-send-email-nayna@linux.ibm.com> References: <1570497267-13672-1-git-send-email-nayna@linux.ibm.com> <1570497267-13672-3-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-cbid: 19101113-0008-0000-0000-000003212EDE X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19101113-0009-0000-0000-00004A403B8F Message-Id: <1570799579.5250.72.camel@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-10-11_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=919 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910110124 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2019-10-07 at 21:14 -0400, Nayna Jain wrote: > PowerNV systems uses kernel based bootloader, thus its secure boot > implementation uses kernel IMA security subsystem to verify the kernel > before kexec. ^use a Linux based bootloader, which rely on the IMA subsystem to enforce different secure boot modes. > Since the verification policy might differ based on the > secure boot mode of the system, the policies are defined at runtime. ^the policies need to be defined at runtime. > > This patch implements the arch-specific support to define the IMA policy > rules based on the runtime secure boot mode of the system. > > This patch provides arch-specific IMA policies if PPC_SECURE_BOOT > config is enabled. > > Signed-off-by: Nayna Jain > --- > arch/powerpc/Kconfig | 2 ++ > arch/powerpc/kernel/Makefile | 2 +- > arch/powerpc/kernel/ima_arch.c | 33 +++++++++++++++++++++++++++++++++ > include/linux/ima.h | 3 ++- > 4 files changed, 38 insertions(+), 2 deletions(-) > create mode 100644 arch/powerpc/kernel/ima_arch.c > > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > index b4a221886fcf..deb19ec6ba3d 100644 > --- a/arch/powerpc/Kconfig > +++ b/arch/powerpc/Kconfig > @@ -938,6 +938,8 @@ config PPC_SECURE_BOOT > prompt "Enable secure boot support" > bool > depends on PPC_POWERNV > + depends on IMA > + depends on IMA_ARCH_POLICY As IMA_ARCH_POLICY is dependent on IMA, I don't see a need for depending on both IMA and IMA_ARCH_POLICY. Mimi