From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D522C43334 for ; Sat, 2 Jul 2022 18:17:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C42FB6B0072; Sat, 2 Jul 2022 14:17:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BC8DD6B0073; Sat, 2 Jul 2022 14:17:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A694F6B0074; Sat, 2 Jul 2022 14:17:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 9634F6B0072 for ; Sat, 2 Jul 2022 14:17:11 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 691EF1205B6 for ; Sat, 2 Jul 2022 18:17:11 +0000 (UTC) X-FDA: 79642966662.21.2EFC53B Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by imf01.hostedemail.com (Postfix) with ESMTP id 467B940047 for ; Sat, 2 Jul 2022 18:17:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656785830; x=1688321830; h=date:from:to:cc:subject:message-id:mime-version; bh=/KJMbz1NoOnQ1M9aHPgAv2tqUcq7ou5VdcXzGezIFLw=; b=fb61By7aA7QE4zAw2ZNmA3Jz/QnKSHsXeIKrhmxDLu6qTk9mtGnqqgQg su7XPa07Vfs7omeocJxFodn07zLPyOAUlItmeNOQtMgvEEtirbcloF9Sv MMmQvgp6+xSx3xOY4y0JylLTYe4+O5MZwqfrQcejEhZXsx9BDHWdwgkkD UW4C3jDWHQ+dnKEDaorCFgYbucqqayfv9J1/z+HvqF3SCuE3sFThfPX1I N3zYJ57jbHbd7v4cIcCeU9bZ6HoU9C1JqrkYJLFkOvPuh6goMRnw+MVmt xDDvNRC5BEOJVXXbBanogw+yNdtKh7hD33XZMLKEBizAFyWzpdMsXdyLj A==; X-IronPort-AV: E=McAfee;i="6400,9594,10396"; a="283969407" X-IronPort-AV: E=Sophos;i="5.92,240,1650956400"; d="scan'208";a="283969407" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2022 11:17:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,240,1650956400"; d="scan'208";a="768813249" Received: from lkp-server01.sh.intel.com (HELO 68b931ab7ac1) ([10.239.97.150]) by orsmga005.jf.intel.com with ESMTP; 02 Jul 2022 11:17:06 -0700 Received: from kbuild by 68b931ab7ac1 with local (Exim 4.95) (envelope-from ) id 1o7hg2-000FWS-5A; Sat, 02 Jul 2022 18:17:06 +0000 Date: Sun, 3 Jul 2022 02:16:09 +0800 From: kernel test robot To: Anshuman Khandual Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Andrew Morton , Linux Memory Management List Subject: [akpm-mm:mm-unstable 321/323] include/linux/pgtable.h:1713:10: error: redefinition of 'vm_get_page_prot' Message-ID: <202207030224.tqi3q1Wh-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656785831; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=binGmmTeqPAd6++t1vlsaaglW09WuFKKdSPG4S4ja7M=; b=ZswDwpNI9xrXp/QKaCNK/BEXCPffrYCV0T7wnu/CWtWvOoYa5bfgaOf0apCr12qgGMDWDB pbvxp6UTFncBnfQWYxPxdskDZVgt4MpO7sCe3csefbevf98jdx3l/xw+C9k/t4XsVZJURV 7Kv3qBEGtwUpYG4g68TVL3ynf3XEw7U= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656785831; a=rsa-sha256; cv=none; b=LfbOk3Mcwu0huU46mFt+1N+JZlfzi7rXTrZvgmRcvn2/lnJBqyxcSJlBglAn9BOuzIXD/X 2ZLEiH/WT/dRk8pmIdt7OWueFNGtBGzBvKpYqtN0dUsi6c49+Ral6wC3jhnp17vR1ucRXP HVQcUPqApiDtF6NCaADxmE955+fnTVU= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=fb61By7a; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf01.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 134.134.136.65) smtp.mailfrom=lkp@intel.com X-Stat-Signature: 94atidwcm5h9kjekp516g3mi37aka44d X-Rspam-User: Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=fb61By7a; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf01.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 134.134.136.65) smtp.mailfrom=lkp@intel.com X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 467B940047 X-HE-Tag: 1656785830-110071 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable head: 706370e5c2ea7bb4544eee6e1172c4d68117a526 commit: 5b0de55b24615b5f5f600e2a61c297a0432a5e82 [321/323] sh/mm: enable ARCH_HAS_VM_GET_PAGE_PROT config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20220703/202207030224.tqi3q1Wh-lkp@intel.com/config) compiler: sh4-linux-gcc (GCC) 11.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/commit/?id=5b0de55b24615b5f5f600e2a61c297a0432a5e82 git remote add akpm-mm https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git git fetch --no-tags akpm-mm mm-unstable git checkout 5b0de55b24615b5f5f600e2a61c297a0432a5e82 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All errors (new ones prefixed by >>): In file included from arch/sh/include/asm/io.h:21, from include/linux/io.h:13, from arch/sh/mm/mmap.c:10: >> include/linux/pgtable.h:1713:10: error: redefinition of 'vm_get_page_prot' 1713 | pgprot_t vm_get_page_prot(unsigned long vm_flags) \ | ^~~~~~~~~~~~~~~~ arch/sh/mm/mmap.c:184:1: note: in expansion of macro 'DECLARE_VM_GET_PAGE_PROT' 184 | DECLARE_VM_GET_PAGE_PROT | ^~~~~~~~~~~~~~~~~~~~~~~~ In file included from arch/sh/mm/mmap.c:11: include/linux/mm.h:2864:24: note: previous definition of 'vm_get_page_prot' with type 'pgprot_t(long unsigned int)' 2864 | static inline pgprot_t vm_get_page_prot(unsigned long vm_flags) | ^~~~~~~~~~~~~~~~ vim +/vm_get_page_prot +1713 include/linux/pgtable.h c0f8aa4fa815da Daniel Axtens 2021-06-28 1691 d3af9262355115 Anshuman Khandual 2022-06-30 1692 /* description of effects of mapping type and prot in current implementation. d3af9262355115 Anshuman Khandual 2022-06-30 1693 * this is due to the limited x86 page protection hardware. The expected d3af9262355115 Anshuman Khandual 2022-06-30 1694 * behavior is in parens: d3af9262355115 Anshuman Khandual 2022-06-30 1695 * d3af9262355115 Anshuman Khandual 2022-06-30 1696 * map_type prot d3af9262355115 Anshuman Khandual 2022-06-30 1697 * PROT_NONE PROT_READ PROT_WRITE PROT_EXEC d3af9262355115 Anshuman Khandual 2022-06-30 1698 * MAP_SHARED r: (no) no r: (yes) yes r: (no) yes r: (no) yes d3af9262355115 Anshuman Khandual 2022-06-30 1699 * w: (no) no w: (no) no w: (yes) yes w: (no) no d3af9262355115 Anshuman Khandual 2022-06-30 1700 * x: (no) no x: (no) yes x: (no) yes x: (yes) yes d3af9262355115 Anshuman Khandual 2022-06-30 1701 * d3af9262355115 Anshuman Khandual 2022-06-30 1702 * MAP_PRIVATE r: (no) no r: (yes) yes r: (no) yes r: (no) yes d3af9262355115 Anshuman Khandual 2022-06-30 1703 * w: (no) no w: (no) no w: (copy) copy w: (no) no d3af9262355115 Anshuman Khandual 2022-06-30 1704 * x: (no) no x: (no) yes x: (no) yes x: (yes) yes d3af9262355115 Anshuman Khandual 2022-06-30 1705 * d3af9262355115 Anshuman Khandual 2022-06-30 1706 * On arm64, PROT_EXEC has the following behaviour for both MAP_SHARED and d3af9262355115 Anshuman Khandual 2022-06-30 1707 * MAP_PRIVATE (with Enhanced PAN supported): d3af9262355115 Anshuman Khandual 2022-06-30 1708 * r: (no) no d3af9262355115 Anshuman Khandual 2022-06-30 1709 * w: (no) no d3af9262355115 Anshuman Khandual 2022-06-30 1710 * x: (yes) yes d3af9262355115 Anshuman Khandual 2022-06-30 1711 */ d3af9262355115 Anshuman Khandual 2022-06-30 1712 #define DECLARE_VM_GET_PAGE_PROT \ d3af9262355115 Anshuman Khandual 2022-06-30 @1713 pgprot_t vm_get_page_prot(unsigned long vm_flags) \ d3af9262355115 Anshuman Khandual 2022-06-30 1714 { \ d3af9262355115 Anshuman Khandual 2022-06-30 1715 return protection_map[vm_flags & \ d3af9262355115 Anshuman Khandual 2022-06-30 1716 (VM_READ | VM_WRITE | VM_EXEC | VM_SHARED)]; \ d3af9262355115 Anshuman Khandual 2022-06-30 1717 } \ d3af9262355115 Anshuman Khandual 2022-06-30 1718 EXPORT_SYMBOL(vm_get_page_prot); d3af9262355115 Anshuman Khandual 2022-06-30 1719 :::::: The code at line 1713 was first introduced by commit :::::: d3af92623551153853497bf6434b9b4843ab78e1 mm/mmap: define DECLARE_VM_GET_PAGE_PROT :::::: TO: Anshuman Khandual :::::: CC: akpm -- 0-DAY CI Kernel Test Service https://01.org/lkp