Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp385836imp; Wed, 20 Feb 2019 01:59:31 -0800 (PST) X-Google-Smtp-Source: AHgI3IZDpep93yS1DMeMY4r37oSov9E7JviDApMgZ0WAeF18vaOmd+M4FsBJ/x1zsLBrRmUZd/pj X-Received: by 2002:a17:902:7586:: with SMTP id j6mr19820812pll.259.1550656771124; Wed, 20 Feb 2019 01:59:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550656771; cv=none; d=google.com; s=arc-20160816; b=OmJFwISQrlWs1TSljEniRGzI4/3xIuReuAtA1q3QNiioKKNV7LM6GNt7NvAjTnbiTY ag2PJ1YUgo1EhJDwG0ZZ3Gn5xUW8/Y8Yu69RvvvZMiFX4BJpbMsr+UUIA1YgkXWaGzIK 2Vbd5t3g3OBbizqJ1fbKruVqe0CgJZQ3XzzYKKWJpesMy2UVwc2wRpRlknrs28F+wejj 73PBRXietlmqh+YBQ4fndaXfLnoMMABybqwujCGxvtW4VksIoM5ZZRjSvUT3291WKkb3 Q8VlcoYCVPa/0hmhaiE/afuHKBt8C3ZzURKBPHtkP3BqTlXOR6S8isCaFcgupJtMezPu wJDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=QiMG5ulJhETzfj3/mKB/R/zqKLIvd5a5RaiaDZlUa78=; b=UG9gT3URXaXKglbYm+85nc7VsS/CSw6lOqbz5sLfkF8lZLZ+bqKPS2Fz/y0SV4aSNP L2fFFI2pwtmqWFiITH+JYD7TZm7JxEQ1EC9GITGjhBNUZzbxa9KTnrz7k0slDq9B/L7H 0nz2gzH828FJuAdQ3btMNG80EqWcbNhvY5wqvpMBivLpW6D3fFMw244H0HpnQuOxXRFE irF7WPe2bHxPDQEpuBnCdwqFQZWM1631IX1Z3RecOD7awrYhUI26zRyaEPNYxp6NbtN3 gC5vtv1TI794RI29ZU4U+oXz6aT0XWztA1hkR5VO6fg7QsYlZ0wMsZTNAJSKUL/fUCUL 3wvg== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u63si18078993pfi.196.2019.02.20.01.59.15; Wed, 20 Feb 2019 01:59:31 -0800 (PST) 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727209AbfBTJ6M (ORCPT + 99 others); Wed, 20 Feb 2019 04:58:12 -0500 Received: from mga18.intel.com ([134.134.136.126]:11945 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725816AbfBTJ6L (ORCPT ); Wed, 20 Feb 2019 04:58:11 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Feb 2019 01:58:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,390,1544515200"; d="scan'208";a="276434869" Received: from jsakkine-mobl1.tm.intel.com (HELO localhost) ([10.237.50.169]) by orsmga004.jf.intel.com with ESMTP; 20 Feb 2019 01:58:07 -0800 Date: Wed, 20 Feb 2019 11:58:06 +0200 From: Jarkko Sakkinen To: Zhangshaokun , ard.biesheuvel@linaro.org, zohar@linux.ibm.com Cc: Stephen Rothwell , Linux Next Mailing List , Roberto Sassu , Linux Kernel Mailing List , linux-efi@vger.kernel.org, linux-integrity@vger.kernel.org Subject: Re: linux-next: Tree for Feb 20 Message-ID: <20190220095806.GB9089@linux.intel.com> References: <20190220184341.73bd2084@canb.auug.org.au> <1114b964-8ff8-5632-64d4-e94a9160b998@hisilicon.com> <20190220095252.GA9089@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190220095252.GA9089@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 20, 2019 at 11:52:52AM +0200, Jarkko Sakkinen wrote: > On Wed, Feb 20, 2019 at 05:11:15PM +0800, Zhangshaokun wrote: > > There is a compiler failure on arm64 platform, as follow: > > > > AS arch/arm64/kvm/hyp.o > > CC kernel/trace/ring_buffer.o > > In file included from security/integrity/ima/ima_fs.c:30:0: > > security/integrity/ima/ima.h:176:7: error: redeclaration of enumerator ‘NONE’ > > hook(NONE) \ > > ^ > > security/integrity/ima/ima.h:188:34: note: in definition of macro ‘__ima_hook_enumify’ > > #define __ima_hook_enumify(ENUM) ENUM, > > ^ > > security/integrity/ima/ima.h:191:2: note: in expansion of macro ‘__ima_hooks’ > > __ima_hooks(__ima_hook_enumify) > > ^ > > In file included from ./arch/arm64/include/asm/acpi.h:15:0, > > from ./include/acpi/acpi_io.h:7, > > from ./include/linux/acpi.h:47, > > from ./include/linux/tpm.h:26, > > from security/integrity/ima/ima.h:25, > > from security/integrity/ima/ima_fs.c:30: > > ./include/linux/efi.h:1716:2: note: previous definition of ‘NONE’ was here > > NONE, > > ^ > > scripts/Makefile.build:276: recipe for target 'security/integrity/ima/ima_fs.o' failed > > make[3]: *** [security/integrity/ima/ima_fs.o] Error 1 > > > > I dug it and it is the commit 901615cb916d ("tpm: move tpm_chip definition to include/linux/tpm.h") > > This results from a new include in tpm.h: > > #include > > Must be fixed either in include/linux/efi.h or security/integrity/ima.h as > those files have a name collision. Makes me wonder why neither has taken > care of prefixing the constants properly. Preferably both subsystems should be fixed with proper 'EFI_' and 'IMA_' prefixes. Defining a constant named as NONE in a non-generic subsystem (e.g. not part of the core data structures of Linux) and especially exporting it to include/linux is not too well considered act. /Jarkko