Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4659989ybi; Tue, 11 Jun 2019 10:15:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqz9jWHJMFmxLEjdpCkKUBGuIsROwlIeIsvrSTXULG5WLeoA7a5nQyiEF3uPXaPbWdez5o0A X-Received: by 2002:a17:902:bc83:: with SMTP id bb3mr55008164plb.56.1560273325448; Tue, 11 Jun 2019 10:15:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560273325; cv=none; d=google.com; s=arc-20160816; b=rrHkuy6V/ZGzbHJb4cZKCSLAtt2lKmOFNfzPGnkYasAjzjoACf4elOU9NLsylEqFL4 sY1lqT+6F4IzjXZTW4lSiv8YKWaXzqC7DN/6HJDc2LDBDk5Uh861YAkcIvFGXcm9YjKV 8aGDRKJwe/TQHp8K2/VLlVO/VLGmkRFiQbXUBmXjfm113jaQhVDqPEMgv1Fl1P4nLe2a U284GfSuymsNZbUMkjJEZ8R9zOkDQBMAI8IpoUnlrUHOz25IhIcl3RZ334j9A6pFZqfC 0fOHbnePKcVppt/sQucZwxLeRyKjcSjrX/2EA9jbsG+3i1UCdyD94owTkFKQvQ1d6oXP m/Qw== 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-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :from:references:cc:to:subject; bh=L9XT7dEiFTjHtRr6QZybp68CFBxDDC+DK2pLz6W6qBw=; b=pLm7HDoW9Dwtz/UuW/+X4vNUFd5Y6CXOG38Ob4v6OommARmox0U4o1EEuxDB//jUmt PgoTXqOAkhB6jEH2urA35HuL0XuXzVcYzw5DPRsjKxknqBegHrih+aRrXqcqhHr6GWFB bmgYXd+VV4xCgQTymmEn5cybnlDiVzCiOF6zHvH4Memsg1/s7/6M3zAttn7cqM9G0mGO 5rPvJD+F+UbJDEh06pfxW5jqJELGq8P6z1cqJoD4Ojk0YykpxO0dghMpeqF3i7/7LXE/ ySru1jnlPOsTv7h0jQek5T+PSpkTzJEK/9vLM4ZqbKAtDKWLoiKmE1AbaDRUujAEXmuU 29zA== 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 y10si2671387pjr.109.2019.06.11.10.15.10; Tue, 11 Jun 2019 10:15:25 -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; 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 S2405861AbfFKRHt (ORCPT + 99 others); Tue, 11 Jun 2019 13:07:49 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:37496 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2405345AbfFKRHs (ORCPT ); Tue, 11 Jun 2019 13:07:48 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5BH2gqf131275 for ; Tue, 11 Jun 2019 13:07:46 -0400 Received: from e14.ny.us.ibm.com (e14.ny.us.ibm.com [129.33.205.204]) by mx0a-001b2d01.pphosted.com with ESMTP id 2t2enadnst-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 11 Jun 2019 13:07:46 -0400 Received: from localhost by e14.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 11 Jun 2019 18:07:45 +0100 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e14.ny.us.ibm.com (146.89.104.201) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 11 Jun 2019 18:07:42 +0100 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x5BH7fKg12583310 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 11 Jun 2019 17:07:41 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2E9902805A; Tue, 11 Jun 2019 17:07:41 +0000 (GMT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6639C28059; Tue, 11 Jun 2019 17:07:40 +0000 (GMT) Received: from swastik.ibm.com (unknown [9.80.199.191]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 11 Jun 2019 17:07:40 +0000 (GMT) Subject: Re: [PATCH v3 3/3] powerpc: Add support to initialize ima policy rules To: Satheesh Rajendran , Nayna Jain Cc: linuxppc-dev@ozlabs.org, linux-efi@vger.kernel.org, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, Ard Biesheuvel , Claudio Carvalho , Mimi Zohar , Matthew Garret , Paul Mackerras , Jeremy Kerr References: <1560198837-18857-1-git-send-email-nayna@linux.ibm.com> <1560198837-18857-4-git-send-email-nayna@linux.ibm.com> <20190611051943.GA7516@sathnaga86.in.ibm.com> From: Nayna Date: Tue, 11 Jun 2019 13:07:39 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190611051943.GA7516@sathnaga86.in.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-TM-AS-GCONF: 00 x-cbid: 19061117-0052-0000-0000-000003CE8E55 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00011247; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000286; SDB=6.01216515; UDB=6.00639636; IPR=6.00997614; MB=3.00027265; MTD=3.00000008; XFM=3.00000015; UTC=2019-06-11 17:07:44 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19061117-0053-0000-0000-00006148D898 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-06-11_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=872 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906110109 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/11/2019 01:19 AM, Satheesh Rajendran wrote: > On Mon, Jun 10, 2019 at 04:33:57PM -0400, Nayna Jain wrote: >> PowerNV secure boot relies on the kernel IMA security subsystem to >> perform the OS kernel image signature verification. Since each secure >> boot mode has different IMA policy requirements, dynamic definition of >> the policy rules based on the runtime secure boot mode of the system is >> required. On systems that support secure boot, but have it disabled, >> only measurement policy rules of the kernel image and modules are >> defined. >> >> This patch defines the arch-specific implementation to retrieve the >> secure boot mode of the system and accordingly configures the IMA policy >> rules. >> >> This patch provides arch-specific IMA policies if PPC_SECURE_BOOT >> config is enabled. >> >> Signed-off-by: Nayna Jain >> --- >> arch/powerpc/Kconfig | 14 +++++++++ >> arch/powerpc/kernel/Makefile | 1 + >> arch/powerpc/kernel/ima_arch.c | 54 ++++++++++++++++++++++++++++++++++ >> include/linux/ima.h | 3 +- >> 4 files changed, 71 insertions(+), 1 deletion(-) >> create mode 100644 arch/powerpc/kernel/ima_arch.c > Hi, > > This series failed to build against linuxppc/merge tree with `ppc64le_defconfig`, > > arch/powerpc/platforms/powernv/secboot.c:14:6: error: redefinition of 'get_powerpc_sb_mode' > 14 | bool get_powerpc_sb_mode(void) > | ^~~~~~~~~~~~~~~~~~~ > In file included from arch/powerpc/platforms/powernv/secboot.c:11: > ./arch/powerpc/include/asm/secboot.h:15:20: note: previous definition of 'get_powerpc_sb_mode' was here > 15 | static inline bool get_powerpc_sb_mode(void) > | ^~~~~~~~~~~~~~~~~~~ > make[3]: *** [scripts/Makefile.build:278: arch/powerpc/platforms/powernv/secboot.o] Error 1 > make[3]: *** Waiting for unfinished jobs.... > make[2]: *** [scripts/Makefile.build:489: arch/powerpc/platforms/powernv] Error 2 > make[1]: *** [scripts/Makefile.build:489: arch/powerpc/platforms] Error 2 > make: *** [Makefile:1071: arch/powerpc] Error 2 > make: *** Waiting for unfinished jobs.... Thanks for reporting. I have fixed it and reposted as v4. Please retry. Thanks & Regards,      - Nayna