Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3993536ybg; Fri, 25 Oct 2019 11:48:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqze15L02RW9rOhrb7U9mRyMi12DLFFzvBQXSjI7sguAKJM3RLM0maKJQGv9MoY3+SB8SRID X-Received: by 2002:a50:c2c2:: with SMTP id u2mr5718540edf.133.1572029335750; Fri, 25 Oct 2019 11:48:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572029335; cv=none; d=google.com; s=arc-20160816; b=tOcbWA1cIUY7i3gjkbJkMBBCnt1MH6qs6Z4GmwRxQiq8e8mWtM4VnLjtqvMzpob80f G5r/+2ohwUCIHgSKUBfd22pVdepdkMPw0CkUufJR3FNvmoOZFlwh2I20Qg4Cq/cckKLB pxLMbBZB7jlVfEs2FhlSeoPPzmsZF+QhWIs/8PI85qzXusBPdROwL2188Nx185UwIi9h 3LHG/JdPOwZkQuj4/Mut8Srhfr4jqhmGw+sL4GAJCU4TvAmbcaKQiCqOJNwAEd64gUDI jyReid8WrrL+jtA80P7irSdWpU3A2uhh0rv/FNhKQsXRDZXoHbNhJ+2wTfMb30LS9iLW UlSw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature:dkim-filter; bh=IDatuhvAIUC8shfzil97Wc2552dWcbQTynpu3KtnO84=; b=tqgSZ73lavrminh2yJnHxsitXvEzm4fuV2IfOcUSqnpJ78WSsNFlEGO5bC3st3uXB3 YvyXIiRfUjmo4BrwcdGk53n3XZhemfHqV6BM3E585W3pCMzcVH1FfN5IgfK3LXFwx92g MtDRWYC956t4gJ49OZqkKL9PsUr2N5peU4lxdx33BsqJ02Kpsh5mVqeSoSzhQFseMgCf HECs/2OTs51F0DJEggb4Nz7DjBvRfPkOgp7A3/CyHs1dwBPuKXGCv3jneCb8mZ1IdKqI PMOS6CXeM6yGHE6vQfMvWh5NZ6b0AZqiI6X/SyGHmp9oBrD9lR64Grrxt6lAymFmHN3C DQ9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=oq7uLOnC; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f23si2235115edj.380.2019.10.25.11.48.32; Fri, 25 Oct 2019 11:48:55 -0700 (PDT) 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; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=oq7uLOnC; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2503879AbfJXRkU (ORCPT + 99 others); Thu, 24 Oct 2019 13:40:20 -0400 Received: from linux.microsoft.com ([13.77.154.182]:59618 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729458AbfJXRkT (ORCPT ); Thu, 24 Oct 2019 13:40:19 -0400 Received: from [10.137.112.111] (unknown [131.107.147.111]) by linux.microsoft.com (Postfix) with ESMTPSA id C0E872010AC3; Thu, 24 Oct 2019 10:40:18 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C0E872010AC3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1571938819; bh=IDatuhvAIUC8shfzil97Wc2552dWcbQTynpu3KtnO84=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=oq7uLOnCiIJzJwKl9UtoSEsELanj0SNiNpRNkf9QVKFoTu6UFAw3U0jslONs7uWcF A+Pl8F79LgCQ4zHWSptkJGYeWpxb+b8VfxcAT/agpYuQRQJYOtZ5Q/F0REVjtsus4B ynwZmDSY2ruTgnlJoEsiy8VF3xAHRuXX28ZWXfi4= Subject: Re: [PATCH v9 4/8] powerpc/ima: define trusted boot policy To: Nayna Jain , linuxppc-dev@ozlabs.org, linux-efi@vger.kernel.org, linux-integrity@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Ard Biesheuvel , Jeremy Kerr , Matthew Garret , Mimi Zohar , Greg Kroah-Hartman , Claudio Carvalho , George Wilson , Elaine Palmer , Eric Ricther , Oliver O'Halloran , Prakhar Srivastava References: <20191024034717.70552-1-nayna@linux.ibm.com> <20191024034717.70552-5-nayna@linux.ibm.com> From: Lakshmi Ramasubramanian Message-ID: <3e36c14f-d4bb-5da5-b188-ca84bc282f0d@linux.microsoft.com> Date: Thu, 24 Oct 2019 10:40:36 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <20191024034717.70552-5-nayna@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/23/2019 8:47 PM, Nayna Jain wrote: > +/* > + * The "secure_and_trusted_rules" contains rules for both the secure boot and > + * trusted boot. The "template=ima-modsig" option includes the appended > + * signature, when available, in the IMA measurement list. > + */ > +static const char *const secure_and_trusted_rules[] = { > + "measure func=KEXEC_KERNEL_CHECK template=ima-modsig", > + "measure func=MODULE_CHECK template=ima-modsig", > + "appraise func=KEXEC_KERNEL_CHECK appraise_type=imasig|modsig", > +#ifndef CONFIG_MODULE_SIG_FORCE > + "appraise func=MODULE_CHECK appraise_type=imasig|modsig", > +#endif > + NULL > +}; Same comment as earlier - any way to avoid using conditional compilation in C file? -lakshmi