Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3481094ybt; Tue, 30 Jun 2020 04:02:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLK6D1xJQRk4A83/PiWmprD9lgcLfHbjRmLSnPiwIDrVwyvjWDtLKut75NpEmCa81sB23a X-Received: by 2002:a05:6402:b9b:: with SMTP id cf27mr20053441edb.84.1593514928027; Tue, 30 Jun 2020 04:02:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593514928; cv=none; d=google.com; s=arc-20160816; b=Ecg8qsGZbEEdRTAC+56KQT/gyYd14P4HX6A1v/mZb0IophdUJ/twGSLx3yGf+mfjxX b+ulB59QBaV7yvLmaLcoIH2XugLRvaU2UtgjYmp6bvn36NK7wRfg2g7ypqXvi0YP9hp6 CI7mlltDx7acesQjA2IBFGp5mTWanq8yBnOUkibHk9JHN43G6CitbjL4eoT5+qMZirTW /Lg5ufU/yTkh4jyvHGSyDdbbMES3kGyfW5eyLkKTs+bm6oOGiJbWhZVek484FXzAKyyA AHNHNZO15m4/CbvY6+uUPk5Fxny+zftXT/ZMIduRh306VamVUjB9HxqBGVNuU6lI6mI9 +rxQ== 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=1AB4uQQLfjlzWitfNWSMAMTiVGOCu/jDevkTjGTRDEI=; b=mtoASjafJXTpbheRUMws1ILq7M8sFL0nozy/d5pkePFIoCx1qyR+u+Kl3It0J+QxBS aO/b6EIelpDiivU/rudwg3FILgW+eSNKHZ12H2xvgxfC6MXOLJinl1WMcPIRBLi1by1A vbfKN9Y/U55dAkcgKcGXlwQ1mfIV2GS3r6maoo036jTNRCA6wGTRvr0B+HFVQy6MqFF1 VvHfrXhRhMyd3ukvvdGeizEVd1ibNFuH0YJKFMEppFeupayLqa9yNJrR4Sq4nyW4Yh/h rKI8ofngXJplCslBk57HcJPyebEdNVw8zBw3IT9q5tEAjwl88wngny+FZFz0bZCcHzJy n+Cw== 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 m27si1641714edj.431.2020.06.30.04.01.44; Tue, 30 Jun 2020 04:02:08 -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 S1732774AbgF3LA5 (ORCPT + 99 others); Tue, 30 Jun 2020 07:00:57 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:43410 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732578AbgF3LA5 (ORCPT ); Tue, 30 Jun 2020 07:00:57 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 05UAW5uE004699; Tue, 30 Jun 2020 07:00:56 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 31ycd52wpt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 Jun 2020 07:00:55 -0400 Received: from m0098393.ppops.net (m0098393.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 05UAXjbF018111; Tue, 30 Jun 2020 07:00:55 -0400 Received: from ppma04fra.de.ibm.com (6a.4a.5195.ip4.static.sl-reverse.com [149.81.74.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 31ycd52wnp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 Jun 2020 07:00:55 -0400 Received: from pps.filterd (ppma04fra.de.ibm.com [127.0.0.1]) by ppma04fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 05UAt6BY009757; Tue, 30 Jun 2020 11:00:53 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma04fra.de.ibm.com with ESMTP id 31wwr81nmc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 Jun 2020 11:00:52 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 05UB0o2R56492310 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 30 Jun 2020 11:00:50 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 290A9AE05F; Tue, 30 Jun 2020 11:00:50 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 62A08AE071; Tue, 30 Jun 2020 11:00:49 +0000 (GMT) Received: from localhost.localdomain (unknown [9.85.137.220]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 30 Jun 2020 11:00:49 +0000 (GMT) Message-ID: <1593514848.5085.82.camel@linux.ibm.com> Subject: Re: [PATCH v3 2/2] ima: move APPRAISE_BOOTPARAM dependency on ARCH_POLICY to runtime From: Mimi Zohar To: Bruno Meneguele Cc: linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, erichte@linux.ibm.com, nayna@linux.ibm.com Date: Tue, 30 Jun 2020 07:00:48 -0400 In-Reply-To: <20200629234744.GA2756@glitch> References: <20200623202640.4936-1-bmeneg@redhat.com> <20200623202640.4936-3-bmeneg@redhat.com> <1593204023.27152.476.camel@linux.ibm.com> <20200629234744.GA2756@glitch> 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-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-06-30_04:2020-06-30,2020-06-29 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 spamscore=0 cotscore=-2147483648 malwarescore=0 mlxscore=0 mlxlogscore=999 adultscore=0 suspectscore=0 phishscore=0 impostorscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006300073 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2020-06-29 at 20:47 -0300, Bruno Meneguele wrote: > > > I'm not if the "secure_boot" flag is available prior to calling > > default_appraise_setup(), but if it is, you could modify the test > > there to also check if the system is booted in secure boot mode (eg. > > IS_ENABLED(CONFIG_IMA_APPRAISE_BOOTPARAM) && > > !arch_ima_get_secureboot()) > > > > Well pointed. I built a custom x86 kernel with some workaround to get > this flag status within default_appraise_setup() and as a result the > flag is was correctly available. > > Considering the nature of this flag (platform's firmware (in all > arches?)) can we trust that every arch supporting secure/trusted boot > will have it available in the __setup() call time? Calling default_appraise_setup() could be deferred. > > > > + /* In secure and/or trusted boot the appraisal must be > > > + * enforced, regardless kernel parameters, preventing > > > + * runtime changes */ > > > > Only "appraise" rules are enforced. > > > > Hmm.. do you mean the comment wording is wrong/"could be better", > pointing the "appraise" action explicitly? No, it's more than just the comment.  Like "trusted boot", IMA- measurement only measures files, never enforces integrity.  "ima_appraise" mode is only applicable to IMA-appraisal. Mimi