Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4466065ybf; Wed, 4 Mar 2020 04:35:53 -0800 (PST) X-Google-Smtp-Source: ADFU+vsLyQKO7rMEMREi5OpgbXmW49nlaa20ciUK1pIJ9/N2pGHPwQLd3s02Txas15NsmHERIfs+ X-Received: by 2002:a05:6830:155a:: with SMTP id l26mr2174081otp.339.1583325353134; Wed, 04 Mar 2020 04:35:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583325353; cv=none; d=google.com; s=arc-20160816; b=sg+efGjM6d9aTav68KxHCtD3xipeFU8nbF/JpiXwUwhjKuf/XpQBNH4ZBsRG/58/Ra RT4aqgGcUyuVBrfjFlp9N+BoMKdZYCHI4C+rbUVkgZh0Xx4uPucGZnep51HcFFJ94y7h cU3MSr7h82kpe9UutEs8hKaCxizFNC5lQ1WM+W25IndfhuMXyLlaSCmFerTWqnznPjeA nOfkHRXVRS+zZx1COUZ/FeWPospkqmUXyleVvgZxUeCzztnjhP8MzXbOdHkpq58Ia6lO wcj0buFf679bIGjQaW5ets+8iM9kZQsrk6BKyMb79HkkgQxsA8/l8ddlZXwJf1+1MOvM jc5A== 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=xTUdlpRRlHFpqA3DV5mgGwR6/DPh/AyjLUq3jHiMmLU=; b=kJKMJTOjc67d63Xv3nnimj9ia8cfmaGNRw9wT476Pl7W2/3ZrPW1SxV/kqRXy38S1S NTha9gGcGFL7cEol9UtyP5+vqTIky0QEH3B7KVbuTOpjEQpzWIy12C35YHcW0kqrfV6u 0AXpnUQmpJGTW6H78ODOyFqs+optod8yuNTVyNeCwvY4YaVFH/N0sscGDEbYTUDAE4xb 5UpPL2s1vG7o+r/HymoY7BMU0hb1ZHSdu2h+qOq+5nCNYgxvUHsC64fPcZ8wnqh9stTA v02vpXUHLHETfvWstnAWmygR2fziqXMpD9wMInEQmtxCvbmVeX9nSQJggNE+0Mm8v+MQ GXSA== 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 t11si1014518otm.47.2020.03.04.04.35.40; Wed, 04 Mar 2020 04:35:53 -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 S1729420AbgCDMfV (ORCPT + 99 others); Wed, 4 Mar 2020 07:35:21 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:62760 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729386AbgCDMfV (ORCPT ); Wed, 4 Mar 2020 07:35:21 -0500 Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 024CWneD033698 for ; Wed, 4 Mar 2020 07:35:19 -0500 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0a-001b2d01.pphosted.com with ESMTP id 2yfknbwvxc-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 04 Mar 2020 07:35:19 -0500 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 4 Mar 2020 12:35:17 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 4 Mar 2020 12:35:13 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 024CZBJP38928546 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 4 Mar 2020 12:35:11 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8565711C052; Wed, 4 Mar 2020 12:35:11 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5C57811C054; Wed, 4 Mar 2020 12:35:10 +0000 (GMT) Received: from localhost.localdomain (unknown [9.80.200.112]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 4 Mar 2020 12:35:10 +0000 (GMT) Subject: Re: [PATCH v2] ima: add a new CONFIG for loading arch-specific policies From: Mimi Zohar To: James Bottomley , Nayna Jain , linux-integrity@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-efi@vger.kernel.org, linux-s390@vger.kernel.org Cc: Ard Biesheuvel , Philipp Rudo , Michael Ellerman , linux-kernel@vger.kernel.org Date: Wed, 04 Mar 2020 07:35:09 -0500 In-Reply-To: <1583307813.3907.4.camel@HansenPartnership.com> References: <1583289211-5420-1-git-send-email-nayna@linux.ibm.com> <1583307813.3907.4.camel@HansenPartnership.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: 8bit X-TM-AS-GCONF: 00 x-cbid: 20030412-0016-0000-0000-000002ED176D X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20030412-0017-0000-0000-0000335064A5 Message-Id: <1583325309.6264.23.camel@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-03-04_03:2020-03-04,2020-03-04 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 spamscore=0 mlxlogscore=976 lowpriorityscore=0 priorityscore=1501 bulkscore=0 adultscore=0 suspectscore=0 clxscore=1015 mlxscore=0 phishscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2003040096 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2020-03-03 at 23:43 -0800, James Bottomley wrote: > On Tue, 2020-03-03 at 21:33 -0500, Nayna Jain wrote: > > diff --git a/security/integrity/ima/Kconfig > > b/security/integrity/ima/Kconfig > > index 3f3ee4e2eb0d..d17972aa413a 100644 > > --- a/security/integrity/ima/Kconfig > > +++ b/security/integrity/ima/Kconfig > > @@ -327,3 +327,12 @@ config IMA_QUEUE_EARLY_BOOT_KEYS > > depends on IMA_MEASURE_ASYMMETRIC_KEYS > > depends on SYSTEM_TRUSTED_KEYRING > > default y > > + > > +config IMA_SECURE_AND_OR_TRUSTED_BOOT > > + bool > > + depends on IMA > > + depends on IMA_ARCH_POLICY > > + default n > > You can't do this: a symbol designed to be selected can't depend on > other symbols because Kconfig doesn't see the dependencies during > select. We even have a doc for this now: > > Documentation/kbuild/Kconfig.select-break The document is discussing a circular dependency, where C selects B.  IMA_SECURE_AND_OR_TRUSTED_BOOT is not selecting anything, but is being selected.  All of the Kconfig's are now dependent on IMA_ARCH_POLICY being enabled before selecting IMA_SECURE_AND_OR_TRUSTED_BOOT. As Ard pointed out, both IMA and IMA_ARCH_POLICY are not needed, as IMA_ARCH_POLICY is already dependent on IMA. Mimi