From: kbuild test robot <lkp@intel.com>
To: Chintan Pandya <cpandya@codeaurora.org>
Cc: kbuild-all@01.org, catalin.marinas@arm.com, will.deacon@arm.com,
arnd@arndb.de, mark.rutland@arm.com, ard.biesheuvel@linaro.org,
marc.zyngier@arm.com, james.morse@arm.com,
kristina.martsenko@arm.com, takahiro.akashi@linaro.org,
gregkh@linuxfoundation.org, tglx@linutronix.de,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
akpm@linux-foundation.org, toshi.kani@hpe.com,
Chintan Pandya <cpandya@codeaurora.org>
Subject: Re: [PATCH v1 3/4] arm64: Fix the page leak in pud/pmd_set_huge
Date: Fri, 16 Mar 2018 22:50:42 +0800 [thread overview]
Message-ID: <201803162229.qR3oMfXU%fengguang.wu@intel.com> (raw)
In-Reply-To: <1521017305-28518-4-git-send-email-cpandya@codeaurora.org>
[-- Attachment #1: Type: text/plain, Size: 3838 bytes --]
Hi Chintan,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v4.16-rc5]
[cannot apply to next-20180316]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Chintan-Pandya/Fix-issues-with-huge-mapping-in-ioremap/20180316-132223
config: arm64-allmodconfig (attached as .config)
compiler: aarch64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm64
All error/warnings (new ones prefixed by >>):
In file included from arch/arm64/include/asm/page.h:27:0,
from include/linux/shm.h:6,
from include/linux/sched.h:16,
from include/linux/sched/task_stack.h:9,
from include/linux/elfcore.h:7,
from include/linux/crash_core.h:6,
from include/linux/kexec.h:18,
from arch/arm64/mm/mmu.c:26:
arch/arm64/mm/mmu.c: In function 'pud_set_huge':
>> arch/arm64/mm/mmu.c:943:15: error: 'pud' undeclared (first use in this function); did you mean 'pudp'?
if (pud_val(*pud) && !pud_huge(*pud))
^
arch/arm64/include/asm/pgtable-types.h:50:22: note: in definition of macro 'pgd_val'
#define pgd_val(x) ((x).pgd)
^
>> arch/arm64/mm/mmu.c:943:6: note: in expansion of macro 'pud_val'
if (pud_val(*pud) && !pud_huge(*pud))
^~~~~~~
arch/arm64/mm/mmu.c:943:15: note: each undeclared identifier is reported only once for each function it appears in
if (pud_val(*pud) && !pud_huge(*pud))
^
arch/arm64/include/asm/pgtable-types.h:50:22: note: in definition of macro 'pgd_val'
#define pgd_val(x) ((x).pgd)
^
>> arch/arm64/mm/mmu.c:943:6: note: in expansion of macro 'pud_val'
if (pud_val(*pud) && !pud_huge(*pud))
^~~~~~~
arch/arm64/mm/mmu.c: In function 'pmd_set_huge':
>> arch/arm64/mm/mmu.c:960:15: error: 'pmd' undeclared (first use in this function); did you mean 'pmdp'?
if (pmd_val(*pmd) && !pmd_huge(*pmd))
^
arch/arm64/include/asm/pgtable-types.h:39:22: note: in definition of macro 'pmd_val'
#define pmd_val(x) ((x).pmd)
^
vim +943 arch/arm64/mm/mmu.c
932
933 int pud_set_huge(pud_t *pudp, phys_addr_t phys, pgprot_t prot)
934 {
935 pgprot_t sect_prot = __pgprot(PUD_TYPE_SECT |
936 pgprot_val(mk_sect_prot(prot)));
937
938 /* ioremap_page_range doesn't honour BBM */
939 if (pud_present(READ_ONCE(*pudp)))
940 return 0;
941
942 BUG_ON(phys & ~PUD_MASK);
> 943 if (pud_val(*pud) && !pud_huge(*pud))
944 free_page((unsigned long)__va(pud_val(*pud)));
945
946 set_pud(pudp, pfn_pud(__phys_to_pfn(phys), sect_prot));
947 return 1;
948 }
949
950 int pmd_set_huge(pmd_t *pmdp, phys_addr_t phys, pgprot_t prot)
951 {
952 pgprot_t sect_prot = __pgprot(PMD_TYPE_SECT |
953 pgprot_val(mk_sect_prot(prot)));
954
955 /* ioremap_page_range doesn't honour BBM */
956 if (pmd_present(READ_ONCE(*pmdp)))
957 return 0;
958
959 BUG_ON(phys & ~PMD_MASK);
> 960 if (pmd_val(*pmd) && !pmd_huge(*pmd))
961 free_page((unsigned long)__va(pmd_val(*pmd)));
962
963 set_pmd(pmdp, pfn_pmd(__phys_to_pfn(phys), sect_prot));
964 return 1;
965 }
966
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 59091 bytes --]
next prev parent reply other threads:[~2018-03-16 14:50 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-14 8:48 [PATCH v1 0/4] Fix issues with huge mapping in ioremap Chintan Pandya
2018-03-14 8:48 ` [PATCH v1 1/4] asm/tlbflush: Add flush_tlb_pgtable() for ARM64 Chintan Pandya
2018-03-16 8:26 ` kbuild test robot
2018-03-14 8:48 ` [PATCH v1 2/4] ioremap: Invalidate TLB after huge mappings Chintan Pandya
2018-03-14 10:48 ` Mark Rutland
2018-03-14 11:20 ` Chintan Pandya
2018-03-14 11:48 ` Mark Rutland
2018-03-14 8:48 ` [PATCH v1 3/4] arm64: Fix the page leak in pud/pmd_set_huge Chintan Pandya
2018-03-14 10:35 ` Marc Zyngier
2018-03-14 10:53 ` Mark Rutland
2018-03-14 11:27 ` Chintan Pandya
2018-03-14 11:50 ` Mark Rutland
2018-03-16 14:50 ` kbuild test robot [this message]
2018-03-14 8:48 ` [PATCH v1 4/4] Revert "arm64: Enforce BBM for huge IO/VMAP mappings" Chintan Pandya
2018-03-14 10:46 ` Marc Zyngier
2018-03-14 11:32 ` Chintan Pandya
2018-03-14 14:38 ` [PATCH v1 0/4] Fix issues with huge mapping in ioremap Kani, Toshi
2018-03-15 7:17 ` Chintan Pandya
2018-03-15 14:38 ` Kani, Toshi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201803162229.qR3oMfXU%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=ard.biesheuvel@linaro.org \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=cpandya@codeaurora.org \
--cc=gregkh@linuxfoundation.org \
--cc=james.morse@arm.com \
--cc=kbuild-all@01.org \
--cc=kristina.martsenko@arm.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=mark.rutland@arm.com \
--cc=takahiro.akashi@linaro.org \
--cc=tglx@linutronix.de \
--cc=toshi.kani@hpe.com \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®