* arch/riscv/mm/ptdump.c:210 note_page() warn: should '(pte_pfn(($expr_0x7f0526438120(24)))) << (12)' be a 64 bit
@ 2021-01-12 23:55 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-01-12 23:55 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 4476 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Zong Li <zong.li@sifive.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
Hi Zong,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e609571b5ffa3528bf85292de1ceaddac342bc1c
commit: b422d28b21773bbfc9e84dbb5579a8ce355279ca riscv: support DEBUG_WX
date: 7 months ago
:::::: branch date: 6 hours ago
:::::: commit date: 7 months ago
config: riscv-randconfig-m031-20210112 (attached as .config)
compiler: riscv32-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
arch/riscv/mm/ptdump.c:210 note_page() warn: should '(pte_pfn(($expr_0x7f0526438120(24)))) << (12)' be a 64 bit type?
vim +210 arch/riscv/mm/ptdump.c
59c4da8640ccf472 Zong Li 2020-03-12 205
59c4da8640ccf472 Zong Li 2020-03-12 206 static void note_page(struct ptdump_state *pt_st, unsigned long addr,
99395ee3f7b4accc Steven Price 2020-06-01 207 int level, u64 val)
59c4da8640ccf472 Zong Li 2020-03-12 208 {
59c4da8640ccf472 Zong Li 2020-03-12 209 struct pg_state *st = container_of(pt_st, struct pg_state, ptdump);
59c4da8640ccf472 Zong Li 2020-03-12 @210 u64 pa = PFN_PHYS(pte_pfn(__pte(val)));
59c4da8640ccf472 Zong Li 2020-03-12 211 u64 prot = 0;
59c4da8640ccf472 Zong Li 2020-03-12 212
59c4da8640ccf472 Zong Li 2020-03-12 213 if (level >= 0)
59c4da8640ccf472 Zong Li 2020-03-12 214 prot = val & pg_level[level].mask;
59c4da8640ccf472 Zong Li 2020-03-12 215
59c4da8640ccf472 Zong Li 2020-03-12 216 if (st->level == -1) {
59c4da8640ccf472 Zong Li 2020-03-12 217 st->level = level;
59c4da8640ccf472 Zong Li 2020-03-12 218 st->current_prot = prot;
59c4da8640ccf472 Zong Li 2020-03-12 219 st->start_address = addr;
59c4da8640ccf472 Zong Li 2020-03-12 220 st->start_pa = pa;
59c4da8640ccf472 Zong Li 2020-03-12 221 st->last_pa = pa;
59c4da8640ccf472 Zong Li 2020-03-12 222 pt_dump_seq_printf(st->seq, "---[ %s ]---\n", st->marker->name);
59c4da8640ccf472 Zong Li 2020-03-12 223 } else if (prot != st->current_prot ||
59c4da8640ccf472 Zong Li 2020-03-12 224 level != st->level || addr >= st->marker[1].start_address) {
59c4da8640ccf472 Zong Li 2020-03-12 225 if (st->current_prot) {
59c4da8640ccf472 Zong Li 2020-03-12 226 note_prot_wx(st, addr);
59c4da8640ccf472 Zong Li 2020-03-12 227 dump_addr(st, addr);
59c4da8640ccf472 Zong Li 2020-03-12 228 dump_prot(st);
59c4da8640ccf472 Zong Li 2020-03-12 229 pt_dump_seq_puts(st->seq, "\n");
59c4da8640ccf472 Zong Li 2020-03-12 230 }
59c4da8640ccf472 Zong Li 2020-03-12 231
59c4da8640ccf472 Zong Li 2020-03-12 232 while (addr >= st->marker[1].start_address) {
59c4da8640ccf472 Zong Li 2020-03-12 233 st->marker++;
59c4da8640ccf472 Zong Li 2020-03-12 234 pt_dump_seq_printf(st->seq, "---[ %s ]---\n",
59c4da8640ccf472 Zong Li 2020-03-12 235 st->marker->name);
59c4da8640ccf472 Zong Li 2020-03-12 236 }
59c4da8640ccf472 Zong Li 2020-03-12 237
59c4da8640ccf472 Zong Li 2020-03-12 238 st->start_address = addr;
59c4da8640ccf472 Zong Li 2020-03-12 239 st->start_pa = pa;
59c4da8640ccf472 Zong Li 2020-03-12 240 st->last_pa = pa;
59c4da8640ccf472 Zong Li 2020-03-12 241 st->current_prot = prot;
59c4da8640ccf472 Zong Li 2020-03-12 242 st->level = level;
59c4da8640ccf472 Zong Li 2020-03-12 243 } else {
59c4da8640ccf472 Zong Li 2020-03-12 244 st->last_pa = pa;
59c4da8640ccf472 Zong Li 2020-03-12 245 }
59c4da8640ccf472 Zong Li 2020-03-12 246 }
59c4da8640ccf472 Zong Li 2020-03-12 247
:::::: The code at line 210 was first introduced by commit
:::::: 59c4da8640ccf4721d54d36835706f3eefb521a4 riscv: Add support to dump the kernel page tables
:::::: TO: Zong Li <zong.li@sifive.com>
:::::: CC: Palmer Dabbelt <palmerdabbelt@google.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 19428 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-12 23:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12 23:55 arch/riscv/mm/ptdump.c:210 note_page() warn: should '(pte_pfn(($expr_0x7f0526438120(24)))) << (12)' be a 64 bit kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.