Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp260660imu; Wed, 12 Dec 2018 16:22:17 -0800 (PST) X-Google-Smtp-Source: AFSGD/WSNrJpGpN9xFyLqTjo6CkWnBEod2Z+4gu9gw0R2QHhJp4VKJ7kVQnow5hfq6cBjvXrg9M9 X-Received: by 2002:a62:ea09:: with SMTP id t9mr23372771pfh.228.1544660536953; Wed, 12 Dec 2018 16:22:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544660536; cv=none; d=google.com; s=arc-20160816; b=Yi1/Q/KzT4t9OD+h7+tv+5sKeB7Qu4XnVaNkmn//eE4mGDZRUA0g3oW1h+0ucitf7R MmLtAv0WMWW3BNt1rhrHBBNvsXq+wtak2Jac3qBZzYFJWx71OjZXN0RstcK4QhP1HzWN s3Ru0O3em3Y14UJ8zJrdRFgbMgDkwgwXn9Ab9dbMNiF+8nAj1W/qXG0ce9gAIC0rHwSd t5cR+6D3IX6NgUsIHus25bdXUSSkwaUwgPZCpu9zaiDZ+oZKl6FpiZsARXxiPh2aGNLr X2Z33cYaaKJ/r8JEGbFi5ldO7mnOjMkNxug9P1v+foKRnZQGX0kIp5zcsXRIPWza5aDp VPZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:mime-version:date:in-reply-to :subject:cc:to:from:user-agent:references; bh=qX45gu0AyBKMKnfsY99ncCe7T4ZpIlAcA9+G+9Gi310=; b=fkB/Bk6S5ypdV3RewZGKjgULQutu2UEv5HgcrWlIdpfYYq2SgXCB5YO6Tg8JE8ofBd 2HhRwWpLJKpyLG9PfdwIcCiSyoD1XFrOmMqenWtRiqpbfkSFRJQb213dGO4sGauufssn owLmoHBVNM6a6D9uKnoYSi5HoEuAejOEm2xQeuHJnwzpcgQ3uiIYEpybl1tdXvsMsW9T 2udc29RHnKvDfp2FTCXXBnNal514dqyYzs1eXL/IJdCAOLKYoBvV1XPQw9qOV0AIsZDA 1Fokqz4bvolxMacBsFUHZA+QkeiCr+T2g5uNxxsAd97AOXSZPcp6F56RiEk1cB/KwwDK lmjw== 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 j10si205015pll.179.2018.12.12.16.22.01; Wed, 12 Dec 2018 16:22:16 -0800 (PST) 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 S1728545AbeLMAUJ (ORCPT + 99 others); Wed, 12 Dec 2018 19:20:09 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:56148 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726960AbeLMAUI (ORCPT ); Wed, 12 Dec 2018 19:20:08 -0500 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wBD0IZD6093655 for ; Wed, 12 Dec 2018 19:20:07 -0500 Received: from e14.ny.us.ibm.com (e14.ny.us.ibm.com [129.33.205.204]) by mx0b-001b2d01.pphosted.com with ESMTP id 2pbacvdy88-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 12 Dec 2018 19:20:07 -0500 Received: from localhost by e14.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 13 Dec 2018 00:20:06 -0000 Received: from b01cxnp23033.gho.pok.ibm.com (9.57.198.28) by e14.ny.us.ibm.com (146.89.104.201) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 13 Dec 2018 00:20:02 -0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wBD0K1wV18022650 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 13 Dec 2018 00:20:01 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BBF68AE060; Thu, 13 Dec 2018 00:20:01 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 78C67AE05C; Thu, 13 Dec 2018 00:19:58 +0000 (GMT) Received: from morokweng.localdomain (unknown [9.80.227.60]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTPS; Thu, 13 Dec 2018 00:19:58 +0000 (GMT) References: <20181208202705.18673-1-nayna@linux.ibm.com> <20181208202705.18673-8-nayna@linux.ibm.com> User-agent: mu4e 1.0; emacs 26.1 From: Thiago Jung Bauermann To: Nayna Jain Cc: linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, zohar@linux.ibm.com, dhowells@redhat.com, jforbes@redhat.com, seth.forshee@canonical.com, kexec@lists.infradead.org, keyrings@vger.kernel.org, vgoyal@redhat.com, ebiederm@xmission.com, mpe@ellerman.id.au Subject: Re: [PATCH v2 7/7] ima: Support platform keyring for kernel appraisal In-reply-to: <20181208202705.18673-8-nayna@linux.ibm.com> Date: Wed, 12 Dec 2018 22:19:56 -0200 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 x-cbid: 18121300-0052-0000-0000-000003664475 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010216; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000270; SDB=6.01130914; UDB=6.00587692; IPR=6.00911047; MB=3.00024673; MTD=3.00000008; XFM=3.00000015; UTC=2018-12-13 00:20:06 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18121300-0053-0000-0000-00005F156D44 Message-Id: <87y38ue0r7.fsf@morokweng.localdomain> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-12-12_04:,, 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=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812130001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Nayna Jain writes: > On secure boot enabled systems, the bootloader verifies the kernel > image and possibly the initramfs signatures based on a set of keys. A > soft reboot(kexec) of the system, with the same kernel image and > initramfs, requires access to the original keys to verify the > signatures. > > This patch allows IMA-appraisal access to those original keys, now > loaded on the platform keyring, needed for verifying the kernel image > and initramfs signatures. > > Signed-off-by: Nayna Jain > Reviewed-by: Mimi Zohar > Acked-by: Serge Hallyn > - replace 'rc' with 'xattr_len' when calling integrity_digsig_verify() > with INTEGRITY_KEYRING_IMA for readability > Suggested-by: Serge Hallyn > --- > Changelog: > > v2: > - replace 'rc' with 'xattr_len' when calling integrity_digsig_verify() > with INTEGRITY_KEYRING_IMA for readability > > security/integrity/ima/ima_appraise.c | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) With the change to only access the platform keyring when it is enabled: Reviewed-by: Thiago Jung Bauermann -- Thiago Jung Bauermann IBM Linux Technology Center