From: kernel test robot <lkp@intel.com>
To: Naoya Horiguchi <naoya.horiguchi@linux.dev>, linux-mm@kvack.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>,
Alistair Popple <apopple@nvidia.com>,
Peter Xu <peterx@redhat.com>,
Mike Kravetz <mike.kravetz@oracle.com>,
Konstantin Khlebnikov <koct9i@gmail.com>,
Bin Wang <wangbin224@huawei.com>,
Naoya Horiguchi <naoya.horiguchi@nec.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] mm, pagemap: expose hwpoison entry
Date: Tue, 5 Oct 2021 04:17:08 +0800 [thread overview]
Message-ID: <202110050458.rQPdLcUk-lkp@intel.com> (raw)
In-Reply-To: <20211004115001.1544259-1-naoya.horiguchi@linux.dev>
[-- Attachment #1: Type: text/plain, Size: 3766 bytes --]
Hi Naoya,
I love your patch! Perhaps something to improve:
[auto build test WARNING on hnaz-mm/master]
url: https://github.com/0day-ci/linux/commits/Naoya-Horiguchi/mm-pagemap-expose-hwpoison-entry/20211004-195200
base: https://github.com/hnaz/linux-mm master
config: riscv-randconfig-r035-20211004 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dec2257f354d39dbd8232e6bd1a417d91c4f14a2)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/f1735ae85d981e413e70ff0041fcb7f775525699
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Naoya-Horiguchi/mm-pagemap-expose-hwpoison-entry/20211004-195200
git checkout f1735ae85d981e413e70ff0041fcb7f775525699
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> fs/proc/task_mmu.c:1561:4: warning: add explicit braces to avoid dangling else [-Wdangling-else]
else if (flags & PM_SWAP)
^
1 warning generated.
vim +1561 fs/proc/task_mmu.c
1505
1506 #ifdef CONFIG_HUGETLB_PAGE
1507 /* This function walks within one hugetlb entry in the single call */
1508 static int pagemap_hugetlb_range(pte_t *ptep, unsigned long hmask,
1509 unsigned long addr, unsigned long end,
1510 struct mm_walk *walk)
1511 {
1512 struct pagemapread *pm = walk->private;
1513 struct vm_area_struct *vma = walk->vma;
1514 u64 flags = 0, frame = 0;
1515 int err = 0;
1516 pte_t pte;
1517 struct page *page = NULL;
1518
1519 if (vma->vm_flags & VM_SOFTDIRTY)
1520 flags |= PM_SOFT_DIRTY;
1521
1522 pte = huge_ptep_get(ptep);
1523 if (pte_present(pte)) {
1524 page = pte_page(pte);
1525
1526 flags |= PM_PRESENT;
1527 if (pm->show_pfn)
1528 frame = pte_pfn(pte) +
1529 ((addr & ~hmask) >> PAGE_SHIFT);
1530 } else if (is_swap_pte(pte)) {
1531 swp_entry_t entry = pte_to_swp_entry(pte);
1532 unsigned long offset;
1533
1534 if (pm->show_pfn) {
1535 offset = swp_offset(entry) +
1536 ((addr & ~hmask) >> PAGE_SHIFT);
1537 frame = swp_type(entry) |
1538 (offset << MAX_SWAPFILES_SHIFT);
1539 }
1540 flags |= PM_SWAP;
1541 if (is_migration_entry(entry))
1542 page = compound_head(pfn_swap_entry_to_page(entry));
1543 if (is_hwpoison_entry(entry))
1544 flags |= PM_HWPOISON;
1545 }
1546
1547 if (page && !PageAnon(page))
1548 flags |= PM_FILE;
1549 if (page && page_mapcount(page) == 1)
1550 flags |= PM_MMAP_EXCLUSIVE;
1551
1552 for (; addr != end; addr += PAGE_SIZE) {
1553 pagemap_entry_t pme = make_pme(frame, flags);
1554
1555 err = add_to_pagemap(addr, &pme, pm);
1556 if (err)
1557 return err;
1558 if (pm->show_pfn)
1559 if (flags & PM_PRESENT)
1560 frame++;
> 1561 else if (flags & PM_SWAP)
1562 frame += (1 << MAX_SWAPFILES_SHIFT);
1563 }
1564
1565 cond_resched();
1566
1567 return err;
1568 }
1569 #else
1570 #define pagemap_hugetlb_range NULL
1571 #endif /* HUGETLB_PAGE */
1572
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32850 bytes --]
next prev parent reply other threads:[~2021-10-05 1:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-04 11:50 Naoya Horiguchi
2021-10-04 11:55 ` David Hildenbrand
2021-10-04 14:32 ` Naoya Horiguchi
2021-10-26 23:27 ` Naoya Horiguchi
2021-10-27 2:09 ` Peter Xu
2021-10-27 6:45 ` Naoya Horiguchi
2021-10-27 7:02 ` Peter Xu
2021-10-27 7:15 ` David Hildenbrand
2021-10-04 20:17 ` kernel test robot [this message]
2021-10-05 2:53 ` kernel test robot
2021-10-13 2:49 ` Peter Xu
2021-10-14 13:36 ` Naoya Horiguchi
2021-10-14 23:32 ` Peter Xu
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=202110050458.rQPdLcUk-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=kbuild-all@lists.01.org \
--cc=koct9i@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=llvm@lists.linux.dev \
--cc=mike.kravetz@oracle.com \
--cc=naoya.horiguchi@linux.dev \
--cc=naoya.horiguchi@nec.com \
--cc=peterx@redhat.com \
--cc=wangbin224@huawei.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