From patchwork Tue Aug 23 16:42:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thiago Jung Bauermann X-Patchwork-Id: 9295959 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6E5AC607F0 for ; Tue, 23 Aug 2016 16:43:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F48528CC6 for ; Tue, 23 Aug 2016 16:43:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 53E3328CCC; Tue, 23 Aug 2016 16:43:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C5A1F28CC6 for ; Tue, 23 Aug 2016 16:43:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752414AbcHWQnU (ORCPT ); Tue, 23 Aug 2016 12:43:20 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:38041 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754250AbcHWQnT (ORCPT ); Tue, 23 Aug 2016 12:43:19 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u7NGcOg8141773 for ; Tue, 23 Aug 2016 12:42:28 -0400 Received: from e24smtp05.br.ibm.com (e24smtp05.br.ibm.com [32.104.18.26]) by mx0a-001b2d01.pphosted.com with ESMTP id 250sbxk1gu-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 23 Aug 2016 12:42:28 -0400 Received: from localhost by e24smtp05.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 23 Aug 2016 13:42:25 -0300 Received: from d24dlp02.br.ibm.com (9.18.248.206) by e24smtp05.br.ibm.com (10.172.0.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 23 Aug 2016 13:42:24 -0300 X-IBM-Helo: d24dlp02.br.ibm.com X-IBM-MailFrom: bauerman@linux.vnet.ibm.com X-IBM-RcptTo: linux-security-module@vger.kernel.org Received: from d24relay02.br.ibm.com (d24relay02.br.ibm.com [9.13.184.26]) by d24dlp02.br.ibm.com (Postfix) with ESMTP id BA27D1DC006F for ; Tue, 23 Aug 2016 12:42:14 -0400 (EDT) Received: from d24av04.br.ibm.com (d24av04.br.ibm.com [9.8.31.97]) by d24relay02.br.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u7NGgOZm19005600 for ; Tue, 23 Aug 2016 13:42:24 -0300 Received: from d24av04.br.ibm.com (localhost [127.0.0.1]) by d24av04.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u7NGgNdG008247 for ; Tue, 23 Aug 2016 13:42:23 -0300 Received: from hactar.localnet ([9.78.128.211]) by d24av04.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u7NGgLKA008184; Tue, 23 Aug 2016 13:42:22 -0300 From: Thiago Jung Bauermann To: kbuild test robot Cc: kbuild-all@01.org, linux-ima-devel@lists.sourceforge.net, linux-security-module@vger.kernel.org, Mimi Zohar Subject: Re: [integrity:next-restore-kexec 5/9] include/linux/ima.h:30:48: warning: 'struct kimage' declared inside parameter list Date: Tue, 23 Aug 2016 13:42:19 -0300 User-Agent: KMail/4.14.3 (Linux/3.13.0-93-generic; KDE/4.14.13; x86_64; ; ) In-Reply-To: <201608232158.3GcYzCBT%fengguang.wu@intel.com> References: <201608232158.3GcYzCBT%fengguang.wu@intel.com> MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16082316-0032-0000-0000-00000279036B X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16082316-0033-0000-0000-00000EC1E53D Message-Id: <1947465.9AqSTXMJDC@hactar> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-08-23_09:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1608230165 Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Am Dienstag, 23 August 2016, 21:52:00 schrieb kbuild test robot: > tree: > https://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.git > next-restore-kexec head: 62bc4b565254de4796a0835f6f67569eb4835f9f > commit: 4733b1cd5da19fc80df1c1a91f1b1f2a94e70938 [5/9] ima: on soft > reboot, save the measurement list config: xtensa-allmodconfig (attached > as .config) > compiler: xtensa-linux-gcc (GCC) 4.9.0 > reproduce: > wget > https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin > /make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross > git checkout 4733b1cd5da19fc80df1c1a91f1b1f2a94e70938 > # save the attached .config to linux build tree > make.cross ARCH=xtensa > > All warnings (new ones prefixed by >>): > > In file included from security/integrity/ima/ima_main.c:26:0: > >> include/linux/ima.h:30:48: warning: 'struct kimage' declared inside > >> parameter list > static inline void ima_add_kexec_buffer(struct kimage *image) > ^ > > >> include/linux/ima.h:30:48: warning: its scope is only this definition > >> or declaration, which is probably not what you want This happens when CONFIG_IMA=y and CONFIG_KEXEC=n. You can fix it with the following change in the patch "ima: on soft reboot, save the measurement list": Declare stub struct kimage when CONFIG_IMA_KEXEC=n. diff --git a/include/linux/ima.h b/include/linux/ima.h index 6a2450ca13f1..412793233677 100644 --- a/include/linux/ima.h +++ b/include/linux/ima.h @@ -27,6 +27,8 @@ extern void ima_post_path_mknod(struct dentry *dentry); #ifdef CONFIG_IMA_KEXEC extern void ima_add_kexec_buffer(struct kimage *image); #else +struct kimage; + static inline void ima_add_kexec_buffer(struct kimage *image) { }