Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3004399ybt; Mon, 22 Jun 2020 12:23:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrbqQoTCL1KIXkP5hymyzleEdWG9+3CpK5K1y8SmAbPkScIAHF9VQP3vP4T+gG7SIaDCko X-Received: by 2002:a17:906:f155:: with SMTP id gw21mr16848571ejb.388.1592853817484; Mon, 22 Jun 2020 12:23:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592853817; cv=none; d=google.com; s=arc-20160816; b=j4hyvqvk3QPqm57NhXgfrYYaCR52yUDnqSrt2D97Zn9s5HPYUKgv2Znpt+M/l02ntX JsJtbqXPqjEsMU1UFno0iXd+EENLtj7ku9JmzIDyDAIJ78jT5urtg0QqzSixqGVLA9kM XUCvwqj5D0S4eVd0whlVYoe3WuTQHqgKaYk7SquwWAj+LDkeddGsVXCKaarsY10bRK8d nUJkAnJq4art1Be78G38XEc7tF6RlTyCblUycalx/Xv12ZOYHVz90UCyW0qk/vShIV2A R5S5zw9K1qTu2kf3ZoVlgkh0C0hEuSKMYZbb6ocZlcQ4OpU4QN7qcj7loCnWF1fp6BFi hHOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition:in-reply-to :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=C7RyCHezaJ4V0niM26jYi9h0CNHLN7luH74Uczt/+Xg=; b=0I0kds5GP6omwtBHEoIN69c69ZWoDKYB9AuVYJ9iI/pyixoWzAUGB2kuQw5no9si5K /vKvywfqw3hfJnNBkLpr3j9xjNZ4OFt8ilOFHMNhkFa9k5WbAsJzUJc5aCdQ0Ppq7gY4 ocJD9tDtSxsQrnIKHzvIR7jODUl+Vo3s4e7LP2MBkL4aYeXBhVhrkzxgFmxDzaiyvr5V 5yFIhGHf327MCbu8QR8cdfG/ddHNd1yjluifeSCHz9CDzGFqIiukxu0iYROwrAMB5ukn 61Og06PG9djvH+GJMj0Ucy2e3fcvrT59x+x2RbV5qyCw3Pl2KKIgBBmWJhbdv/WncKux xFFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="SdTBK/xQ"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a9si9809268edv.489.2020.06.22.12.23.15; Mon, 22 Jun 2020 12:23:37 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="SdTBK/xQ"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728161AbgFVTVe (ORCPT + 99 others); Mon, 22 Jun 2020 15:21:34 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:48243 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727995AbgFVTVd (ORCPT ); Mon, 22 Jun 2020 15:21:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592853691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=C7RyCHezaJ4V0niM26jYi9h0CNHLN7luH74Uczt/+Xg=; b=SdTBK/xQiJXjY4/dBLHCHJU0URkUQlHWw8vj+I2gsgKQeLvEqUy1WM1vwligRv0bs14qpQ x/BbI/bu49DsINnK7P8enFiiB5EBuCLtbOVUqe8DvhnFQgqiMZJxNlEAKVRJKhaUmwPFRk aJLaqGZD8THeg/uNMJTNtQe11JwEW4I= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-106-N8cZWfZBNRClOT5kctZPuA-1; Mon, 22 Jun 2020 15:21:15 -0400 X-MC-Unique: N8cZWfZBNRClOT5kctZPuA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 08FB4BFC2; Mon, 22 Jun 2020 19:21:14 +0000 (UTC) Received: from localhost (ovpn-116-68.gru2.redhat.com [10.97.116.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id 96CEA2B4BD; Mon, 22 Jun 2020 19:21:13 +0000 (UTC) Date: Mon, 22 Jun 2020 16:21:12 -0300 From: Bruno Meneguele To: Nayna Cc: linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, zohar@linux.ibm.com, erichte@linux.ibm.com, nayna@linux.ibm.com, stable@vger.kernel.org Subject: Re: [PATCH v2] ima: move APPRAISE_BOOTPARAM dependency on ARCH_POLICY to runtime Message-ID: <20200622192112.GB8956@glitch> References: <20200622172754.10763-1-bmeneg@redhat.com> <043e52d4-6835-c2c4-bc9d-d36ddb3db0e9@linux.vnet.ibm.com> MIME-Version: 1.0 In-Reply-To: <043e52d4-6835-c2c4-bc9d-d36ddb3db0e9@linux.vnet.ibm.com> X-PGP-Key: http://keys.gnupg.net/pks/lookup?op=get&search=0x3823031E4660608D X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=bmeneg@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="s2ZSL+KKDSLx8OML" Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --s2ZSL+KKDSLx8OML Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 22, 2020 at 03:01:27PM -0400, Nayna wrote: >=20 > On 6/22/20 1:27 PM, Bruno Meneguele wrote: > > IMA_APPRAISE_BOOTPARAM has been marked as dependent on !IMA_ARCH_POLICY= in > > compile time, enforcing the appraisal whenever the kernel had the arch > > policy option enabled. > >=20 > > However it breaks systems where the option is actually set but the syst= em > > wasn't booted in a "secure boot" platform. In this scenario, anytime th= e > > an appraisal policy (i.e. ima_policy=3Dappraisal_tcb) is used it will b= e > > forced, giving no chance to the user set the 'fix' state (ima_appraise= =3Dfix) > > to actually measure system's files. > >=20 > > This patch remove this compile time dependency and move it to a runtime > > decision, based on the arch policy loading failure/success. >=20 > Thanks for looking at this. >=20 > For arch specific policies, kernel signature verification is enabled base= d > on the secure boot state of the system. Perhaps, enforce the appraisal as > well based on if secure boot is enabled. >=20 > Thanks & Regards, That's a good point. I'm going to take another look and see where the check fits better and come back with a new patch(set). Thanks Nayna. --=20 bmeneg=20 PGP Key: http://bmeneg.com/pubkey.txt --s2ZSL+KKDSLx8OML Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEdWo6nTbnZdbDmXutYdRkFR+RokMFAl7xBKgACgkQYdRkFR+R okM+3gf/WklZhJKgeCkRvrX3iYG8I3bbB7Vve/pzDsKzG9dYjwuriAm4fN8Eoaa9 inXX10GjEZ4s+7bWDQUn++hiYVSG+tfYKvYQZLPa0AJBwar+m7VroeoyoV3W3vu6 GAo9FwHLB50n02qyEv1vwalBy59mazStcToTKDnLQQ6dRetAD/CzZHce5qLojYvS R8GX28GhmyNPxERFrAn/0J72oK1nJV8MOfMrIjLlh8xryBrTM8uLsiPUgwsYrUEZ cPo/jRriLK9d49WWA2adw7mlhlxZ8/RN1ZcByDWthcUOp/a2GzgZaqMNCoYoKSyO EhhSgJkW8xg5/O9jpgh+h+cevAWazQ== =hG7c -----END PGP SIGNATURE----- --s2ZSL+KKDSLx8OML--