Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp259980imu; Wed, 12 Dec 2018 16:21:20 -0800 (PST) X-Google-Smtp-Source: AFSGD/W5CoCAGj6eHpLpRjoH/bkgxw2hjEeREnm4CDQiEpRC4DBhaA5RtTkvfFAE1bZN1iF+ARyd X-Received: by 2002:a62:8e19:: with SMTP id k25mr22133597pfe.185.1544660480581; Wed, 12 Dec 2018 16:21:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544660480; cv=none; d=google.com; s=arc-20160816; b=Hh0tomkBpGwCvsXvbsgP01xjaEjS+VXJqdBBxH6jukfuarJ3cW0Y9llkqHrtGU8S+0 KlPY94UoLVeVB8/Gme1UHFCyHT2brXt41PgFmsi+WoyLIeFed84e5uX8tGNSNtGQ640A 1lQgC0qh96BjDF1BysFOKTQWs1Jd2Jb4wICk0VT2Ugk1UoSl60QjZk5mvp2y2EXe3Q6M HIvwnIssHK40EKpK2Rg2/5Y5ERuuhQ2vb6trlaQ6N0L9meleNFcUHpkMxOzU/XNmQJwZ RDwswLE1GFx4oNM8zzCHv/mgXoA0yLTVVCZUf4JDeHGXefe4WzpiBn6jYgNzlj9E7wHo UvGw== 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=lu9oerRw3d2dISeTEWHycRhVFp/19iCo9SVmDC3hPnw=; b=rFNtiT7NSr4c52/GficHks5p9ljyeahi4aUYx4kpH0Vs6ZQP4+Iqp9/PZ/lnwPKT8k XDd7or9glIr3ivqbLNAOJlS4UTDD5pPkvNp60njaGWLJlt463dt8w9QfmAaJgMSizWKl 4lMXnLn/e0vG/h1RUwOTdUHR4wqzzKnKQmBilbTLuus1luFI2Pa9vGKSdOGHT/4wy0d/ E89nEN3pTNcMLC6pNPCv+lCNIpblnw8wd3cYKdcEuxIG4Z6qz+Jtvk6Hj8IJtrqLKa3h NTNFqrcgXssWROI9SBYnBU707KFh8kluOTm/efHBJeaBmTXKQ4edZjqNhgpy2+qj8ZHp GKaA== 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 l3si205393pld.229.2018.12.12.16.21.05; Wed, 12 Dec 2018 16:21:20 -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 S1728632AbeLMASi (ORCPT + 99 others); Wed, 12 Dec 2018 19:18:38 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:41930 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728582AbeLMASi (ORCPT ); Wed, 12 Dec 2018 19:18:38 -0500 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wBD0IamL032586 for ; Wed, 12 Dec 2018 19:18:36 -0500 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2pbamj5hyu-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 12 Dec 2018 19:18:31 -0500 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 13 Dec 2018 00:18:29 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp05.uk.ibm.com (192.168.101.135) 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:18:24 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wBD0INBL3277198 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 13 Dec 2018 00:18:23 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3B6244C04E; Thu, 13 Dec 2018 00:18:23 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AC7784C040; Thu, 13 Dec 2018 00:18:21 +0000 (GMT) Received: from dhcp-9-31-102-82.watson.ibm.com (unknown [9.31.102.82]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 13 Dec 2018 00:18:21 +0000 (GMT) Subject: Re: [PATCH v2 7/7] ima: Support platform keyring for kernel appraisal From: Mimi Zohar To: Thiago Jung Bauermann , Nayna Jain Cc: linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, 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 Date: Wed, 12 Dec 2018 19:18:21 -0500 In-Reply-To: <8736r2fw88.fsf@morokweng.localdomain> References: <20181208202705.18673-1-nayna@linux.ibm.com> <20181208202705.18673-8-nayna@linux.ibm.com> <8736r2fw88.fsf@morokweng.localdomain> 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: 8bit X-TM-AS-GCONF: 00 x-cbid: 18121300-0020-0000-0000-000002F62DD4 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18121300-0021-0000-0000-000021465CEF Message-Id: <1544660301.3956.3.camel@linux.ibm.com> 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=3 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 On Wed, 2018-12-12 at 16:14 -0200, Thiago Jung Bauermann wrote: [snip] > Subject: [PATCH] ima: Only use the platform keyring if it's enabled > > Signed-off-by: Thiago Jung Bauermann Good catch!  Thanks. Mimi > --- > security/integrity/ima/ima_appraise.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/security/integrity/ima/ima_appraise.c b/security/integrity/ima/ima_appraise.c > index e8f520450895..f6ac405daabb 100644 > --- a/security/integrity/ima/ima_appraise.c > +++ b/security/integrity/ima/ima_appraise.c > @@ -297,7 +297,8 @@ int ima_appraise_measurement(enum ima_hooks func, > status = INTEGRITY_UNKNOWN; > break; > } > - if (rc && func == KEXEC_KERNEL_CHECK) > + if (IS_ENABLED(CONFIG_INTEGRITY_PLATFORM_KEYRING) && rc && > + func == KEXEC_KERNEL_CHECK) > rc = integrity_digsig_verify(INTEGRITY_KEYRING_PLATFORM, > (const char *)xattr_value, > xattr_len,