Message ID | 20200630021436.43281-1-richard.weiyang@linux.alibaba.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | mm/sparse: only sub-section aligned range would be populated | expand |
On 30.06.20 04:14, Wei Yang wrote: > There are two code path which invoke __populate_section_memmap() > > * sparse_init_nid() > * sparse_add_section() > > For both case, we are sure the memory range is sub-section aligned. > > * we pass PAGES_PER_SECTION to sparse_init_nid() > * we check range by check_pfn_span() before calling > sparse_add_section() > > Also, the counterpart of __populate_section_memmap(), we don't do such > calculation and check since the range is checked by check_pfn_span() in > __remove_pages(). > > Clear the calculation and check to keep it simple and comply with its > counterpart. > > Signed-off-by: Wei Yang <richard.weiyang@linux.alibaba.com> > --- > mm/sparse-vmemmap.c | 16 ++-------------- > 1 file changed, 2 insertions(+), 14 deletions(-) > > diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c > index 0db7738d76e9..24b01ebae111 100644 > --- a/mm/sparse-vmemmap.c > +++ b/mm/sparse-vmemmap.c > @@ -247,20 +247,8 @@ int __meminit vmemmap_populate_basepages(unsigned long start, > struct page * __meminit __populate_section_memmap(unsigned long pfn, > unsigned long nr_pages, int nid, struct vmem_altmap *altmap) > { > - unsigned long start; > - unsigned long end; > - > - /* > - * The minimum granularity of memmap extensions is > - * PAGES_PER_SUBSECTION as allocations are tracked in the > - * 'subsection_map' bitmap of the section. > - */ > - end = ALIGN(pfn + nr_pages, PAGES_PER_SUBSECTION); > - pfn &= PAGE_SUBSECTION_MASK; > - nr_pages = end - pfn; > - > - start = (unsigned long) pfn_to_page(pfn); > - end = start + nr_pages * sizeof(struct page); > + unsigned long start = (unsigned long) pfn_to_page(pfn); > + unsigned long end = start + nr_pages * sizeof(struct page); > > if (vmemmap_populate(start, end, nid, altmap)) > return NULL; > Can we add a WARN_ON_ONCE to catch mis-use in the future? if (WARN_ON_ONCE(!IS_ALIGNED(pfn, PAGES_PER_SUBSECTION) || !IS_ALIGNED(nr_pages, PAGES_PER_SUBSECTION)) return NULL;
Hi Wei, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on mmotm/master] url: https://github.com/0day-ci/linux/commits/Wei-Yang/mm-sparse-only-sub-section-aligned-range-would-be-populated/20200630-101713 base: git://git.cmpxchg.org/linux-mmotm.git master config: x86_64-allnoconfig (attached as .config) compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project cf1d04484344be52ada8178e41d18fd15a9b880c) 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 x86_64 cross compiling tool for clang build # apt-get install binutils-x86-64-linux-gnu # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 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 >>): include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' case 1: ^ include/linux/signal.h:177:1: warning: unannotated fall-through between switch labels _SIG_SET_OP(signotset, _sig_not) ^ include/linux/signal.h:167:2: note: expanded from macro '_SIG_SET_OP' case 2: = ^ include/linux/signal.h:177:1: warning: unannotated fall-through between switch labels include/linux/signal.h:169:2: note: expanded from macro '_SIG_SET_OP' case 1: = ^ include/linux/signal.h:190:2: warning: unannotated fall-through between switch labels case 1: = 0; ^ include/linux/jhash.h:95:2: note: insert '__attribute__((fallthrough));' to silence this warning case 6: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ ^ __attribute__((fallthrough)); include/linux/jhash.h:95:2: note: insert 'break;' to avoid fall-through case 6: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ ^ break; include/linux/jhash.h:96:2: warning: unannotated fall-through between switch labels case 5: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ ^ 15include/linux/signal.h:190:2: note: insert '__attribute__((fallthrough));' to silence this warning case 1: = 0; ^ __attribute__((fallthrough)); include/linux/signal.h:190:2: note: insert 'break;' to avoid fall-through case 1: = 0; ^ break; include/linux/signal.h:203:2: warninginclude/linux/jhash.h:96:2: note: insert '__attribute__((fallthrough));' to silence this warning case 5: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ ^ __attribute__((fallthrough)); include/linux/jhash.h:96:2: note: insert 'break;' to avoid fall-through case 5: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ ^ break; include/linux/jhash.h:97:2: warning: unannotated fall-through between switch labels case 4: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ ^ : unannotated fall-through between switch labels case 1: = -1; ^ warnings generated. include/linux/signal.h:203:2: note: insert '__attribute__((fallthrough));' to silence this warning case 1: = -1; ^ __attribute__((fallthrough)); include/linux/signal.h:15203:2: note: insert 'break;' to avoid fall-through case 1: = -1; ^ break; include/linux/jhash.h:97:2: note: insert '__attribute__((fallthrough));' to silence this warning case 4: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ ^ __attribute__((fallthrough)); include/linux/jhash.h:97:2: note: insert 'break;' to avoid fall-through case 4: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ ^ break; include/linux/jhash.h:98:2: warning: unannotated fall-through between switch labels case 3: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ ^ include/linux/signal.h:233:2: warning: unannotated fall-through between switch labels case 1: ; ^ warnings generated. In file included from kernel/printk/printk.c:61: kernel/printk/internal.h:54:20: warninginclude/linux/jhash.h:98:2: note: insert '__attribute__((fallthrough));' to silence this warning case 3: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ ^ __attribute__((fallthrough)); include/linux/jhash.h:98:2: note: no previous prototype for function 'vprintk_func' __printf(1, 0) int vprintk_func(const char va_list args) { return 0; } ^ kernel/printk/internal.h: insert 'break;' to avoid fall-through case 3: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ ^ break; include/linux/jhash.h:99:2: warning: unannotated fall-through between switch labels case 2: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ ^ :54:16: note: declare 'static' if the function is not intended to be used outside of this translation unit __printf(1, 0) int vprintk_func(const char va_list args) { return 0; } ^ static kernel/printk/printk.cinclude/linux/signal.h:233:2: note: insert '__attribute__((fallthrough));' to silence this warning case 1: ; ^ __attribute__((fallthrough)); include/linux/signal.h:233:2: note: insert 'break;' to avoid fall-through case 1: ; ^ break; include/linux/signal.h:245:2: warning: unannotated fall-through between switch labels case 1: ; ^ >> :165:5: warning: no previous prototype for function 'devkmsg_sysctl_set_loglvl' int devkmsg_sysctl_set_loglvl(struct ctl_table int write, ^ kernel/printk/printk.c:165:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int devkmsg_sysctl_set_loglvl(struct ctl_table int write, ^ static include/linux/jhash.h:99:2: note: insert '__attribute__((fallthrough));' to silence this warning case 2: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ ^ __attribute__((fallthrough)); include/linux/jhash.h:99:2: note: insert 'break;' to avoid fall-through case 2: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ ^ break; include/linux/jhash.h:100:2: warning: unannotated fall-through between switch labels case 1: a += ^ include/linux/signal.h:245:2: note: insert '__attribute__((fallthrough));' to silence this warning case 1: ; ^ __attribute__((fallthrough)); include/linux/signal.h:245:2: note: insert 'break;' to avoid fall-through case 1: ; ^ break; kernel/printk/printk.cinclude/linux/jhash.h:100:2: note: insert '__attribute__((fallthrough));' to silence this warning case 1: a += ^ __attribute__((fallthrough)); include/linux/jhash.h:100:2: note: insert 'break;' to avoid fall-through case 1: a += ^ break; include/linux/jhash.h:102:2: warning: unannotated fall-through between switch labels case 0: /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var Nothing left to add arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ ^ include/linux/jhash.h:102:2: note: insert 'break;' to avoid fall-through case 0: /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var Nothing left to add arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ ^ break; :2406:10: warning: 'sprintf' will always overflow; destination buffer has size 0, but format string expands to at least 33 len = sprintf(text, ^ include/linux/jhash.h:136:2: warning: unannotated fall-through between switch labels case 2: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ ^ include/linux/jhash.h:136:2: note: insert '__attribute__((fallthrough));' to silence this warning case 2: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ ^ __attribute__((fallthrough)); include/linux/jhash.h:136:2: note: insert 'break;' to avoid fall-through case 2: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ ^ break; include/linux/jhash.h:137:2: warning: unannotated fall-through between switch labels case 1: a += ^ In file included from kernel/capability.c:13: In file included from include/linux/audit.h:13: In file included from include/linux/ptrace.h:7: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:147:1: warning: unannotated fall-through between switch labels _SIG_SET_BINOP(sigorsets, _sig_or) ^ include/linux/signal.h:133:2: note: expanded from macro '_SIG_SET_BINOP' case 2: ^ include/linux/signal.h:147:1: warning: unannotated fall-through between switch labels include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' case 1: ^ include/linux/signal.h:150:1: warning: unannotated fall-through between switch labels _SIG_SET_BINOP(sigandsets, _sig_and) ^ include/linux/signal.h:133:2:In file included from note: expanded from macro '_SIG_SET_BINOP' case 2: ^ include/linux/signal.h:150:1: warning: unannotated fall-through between switch labels include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' case 1: ^ include/linux/signal.h:153:1: warning: unannotated fall-through between switch labels _SIG_SET_BINOP(sigandnsets, _sig_andn) ^ include/linux/signal.h:133:2: note: expanded from macro '_SIG_SET_BINOP' case 2: kernel/sysctl_binary.c:15: In file included from include/linux/netdevice.h:37: In file included from include/linux/ethtool.h:18: In file included from include/uapi/linux/ethtool.h:19: In file included from include/linux/if_ether.h:19: include/linux/skbuff.h:3690:2: warning: unannotated fall-through between switch labels case 24: diffs |= __it_diff(a, b, 64); ^ -- ^ __attribute__((fallthrough)); include/linux/mm.h:166:2: note: insert 'break;' to avoid fall-through case 56: ^ break; In file included from kernel/printk/printk.c:36: In file included from include/linux/syscalls.h:76: include/linux/signal.h:147:1: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] _SIG_SET_BINOP(sigorsets, _sig_or) ^ include/linux/signal.h:133:2: note: expanded from macro '_SIG_SET_BINOP' case 2: \ ^ include/linux/signal.h:147:1: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' case 1: \ ^ include/linux/signal.h:150:1: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] _SIG_SET_BINOP(sigandsets, _sig_and) ^ include/linux/signal.h:133:2: note: expanded from macro '_SIG_SET_BINOP' case 2: \ ^ include/linux/signal.h:150:1: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' case 1: \ ^ include/linux/signal.h:153:1: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] _SIG_SET_BINOP(sigandnsets, _sig_andn) ^ include/linux/signal.h:133:2: note: expanded from macro '_SIG_SET_BINOP' case 2: \ ^ include/linux/signal.h:153:1: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' case 1: \ ^ include/linux/signal.h:177:1: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] _SIG_SET_OP(signotset, _sig_not) ^ include/linux/signal.h:167:2: note: expanded from macro '_SIG_SET_OP' case 2: set->sig[1] = op(set->sig[1]); \ ^ include/linux/signal.h:177:1: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] include/linux/signal.h:169:2: note: expanded from macro '_SIG_SET_OP' case 1: set->sig[0] = op(set->sig[0]); \ ^ include/linux/signal.h:190:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] case 1: set->sig[0] = 0; ^ include/linux/signal.h:190:2: note: insert '__attribute__((fallthrough));' to silence this warning case 1: set->sig[0] = 0; ^ __attribute__((fallthrough)); include/linux/signal.h:190:2: note: insert 'break;' to avoid fall-through case 1: set->sig[0] = 0; ^ break; include/linux/signal.h:203:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] case 1: set->sig[0] = -1; ^ include/linux/signal.h:203:2: note: insert '__attribute__((fallthrough));' to silence this warning case 1: set->sig[0] = -1; ^ __attribute__((fallthrough)); include/linux/signal.h:203:2: note: insert 'break;' to avoid fall-through case 1: set->sig[0] = -1; ^ break; include/linux/signal.h:233:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] case 1: ; ^ include/linux/signal.h:233:2: note: insert '__attribute__((fallthrough));' to silence this warning case 1: ; ^ __attribute__((fallthrough)); include/linux/signal.h:233:2: note: insert 'break;' to avoid fall-through case 1: ; ^ break; include/linux/signal.h:245:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] case 1: ; ^ include/linux/signal.h:245:2: note: insert '__attribute__((fallthrough));' to silence this warning case 1: ; ^ __attribute__((fallthrough)); include/linux/signal.h:245:2: note: insert 'break;' to avoid fall-through case 1: ; ^ break; In file included from kernel/printk/printk.c:61: kernel/printk/internal.h:54:20: warning: no previous prototype for function 'vprintk_func' [-Wmissing-prototypes] __printf(1, 0) int vprintk_func(const char *fmt, va_list args) { return 0; } ^ kernel/printk/internal.h:54:16: note: declare 'static' if the function is not intended to be used outside of this translation unit __printf(1, 0) int vprintk_func(const char *fmt, va_list args) { return 0; } ^ static >> kernel/printk/printk.c:165:5: warning: no previous prototype for function 'devkmsg_sysctl_set_loglvl' [-Wmissing-prototypes] int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, ^ kernel/printk/printk.c:165:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, ^ static kernel/printk/printk.c:2406:10: warning: 'sprintf' will always overflow; destination buffer has size 0, but format string expands to at least 33 [-Wfortify-source] len = sprintf(text, ^ 18 warnings generated. --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
On Tue, Jun 30, 2020 at 02:52:35PM +0200, David Hildenbrand wrote: >On 30.06.20 04:14, Wei Yang wrote: >> There are two code path which invoke __populate_section_memmap() >> >> * sparse_init_nid() >> * sparse_add_section() >> >> For both case, we are sure the memory range is sub-section aligned. >> >> * we pass PAGES_PER_SECTION to sparse_init_nid() >> * we check range by check_pfn_span() before calling >> sparse_add_section() >> >> Also, the counterpart of __populate_section_memmap(), we don't do such >> calculation and check since the range is checked by check_pfn_span() in >> __remove_pages(). >> >> Clear the calculation and check to keep it simple and comply with its >> counterpart. >> >> Signed-off-by: Wei Yang <richard.weiyang@linux.alibaba.com> >> --- >> mm/sparse-vmemmap.c | 16 ++-------------- >> 1 file changed, 2 insertions(+), 14 deletions(-) >> >> diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c >> index 0db7738d76e9..24b01ebae111 100644 >> --- a/mm/sparse-vmemmap.c >> +++ b/mm/sparse-vmemmap.c >> @@ -247,20 +247,8 @@ int __meminit vmemmap_populate_basepages(unsigned long start, >> struct page * __meminit __populate_section_memmap(unsigned long pfn, >> unsigned long nr_pages, int nid, struct vmem_altmap *altmap) >> { >> - unsigned long start; >> - unsigned long end; >> - >> - /* >> - * The minimum granularity of memmap extensions is >> - * PAGES_PER_SUBSECTION as allocations are tracked in the >> - * 'subsection_map' bitmap of the section. >> - */ >> - end = ALIGN(pfn + nr_pages, PAGES_PER_SUBSECTION); >> - pfn &= PAGE_SUBSECTION_MASK; >> - nr_pages = end - pfn; >> - >> - start = (unsigned long) pfn_to_page(pfn); >> - end = start + nr_pages * sizeof(struct page); >> + unsigned long start = (unsigned long) pfn_to_page(pfn); >> + unsigned long end = start + nr_pages * sizeof(struct page); >> >> if (vmemmap_populate(start, end, nid, altmap)) >> return NULL; >> > >Can we add a WARN_ON_ONCE to catch mis-use in the future? > >if (WARN_ON_ONCE(!IS_ALIGNED(pfn, PAGES_PER_SUBSECTION) || > !IS_ALIGNED(nr_pages, PAGES_PER_SUBSECTION)) > return NULL; How about to add this into both population and depopulation? > >-- >Thanks, > >David / dhildenb
On 01.07.20 04:32, Wei Yang wrote: > On Tue, Jun 30, 2020 at 02:52:35PM +0200, David Hildenbrand wrote: >> On 30.06.20 04:14, Wei Yang wrote: >>> There are two code path which invoke __populate_section_memmap() >>> >>> * sparse_init_nid() >>> * sparse_add_section() >>> >>> For both case, we are sure the memory range is sub-section aligned. >>> >>> * we pass PAGES_PER_SECTION to sparse_init_nid() >>> * we check range by check_pfn_span() before calling >>> sparse_add_section() >>> >>> Also, the counterpart of __populate_section_memmap(), we don't do such >>> calculation and check since the range is checked by check_pfn_span() in >>> __remove_pages(). >>> >>> Clear the calculation and check to keep it simple and comply with its >>> counterpart. >>> >>> Signed-off-by: Wei Yang <richard.weiyang@linux.alibaba.com> >>> --- >>> mm/sparse-vmemmap.c | 16 ++-------------- >>> 1 file changed, 2 insertions(+), 14 deletions(-) >>> >>> diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c >>> index 0db7738d76e9..24b01ebae111 100644 >>> --- a/mm/sparse-vmemmap.c >>> +++ b/mm/sparse-vmemmap.c >>> @@ -247,20 +247,8 @@ int __meminit vmemmap_populate_basepages(unsigned long start, >>> struct page * __meminit __populate_section_memmap(unsigned long pfn, >>> unsigned long nr_pages, int nid, struct vmem_altmap *altmap) >>> { >>> - unsigned long start; >>> - unsigned long end; >>> - >>> - /* >>> - * The minimum granularity of memmap extensions is >>> - * PAGES_PER_SUBSECTION as allocations are tracked in the >>> - * 'subsection_map' bitmap of the section. >>> - */ >>> - end = ALIGN(pfn + nr_pages, PAGES_PER_SUBSECTION); >>> - pfn &= PAGE_SUBSECTION_MASK; >>> - nr_pages = end - pfn; >>> - >>> - start = (unsigned long) pfn_to_page(pfn); >>> - end = start + nr_pages * sizeof(struct page); >>> + unsigned long start = (unsigned long) pfn_to_page(pfn); >>> + unsigned long end = start + nr_pages * sizeof(struct page); >>> >>> if (vmemmap_populate(start, end, nid, altmap)) >>> return NULL; >>> >> >> Can we add a WARN_ON_ONCE to catch mis-use in the future? >> >> if (WARN_ON_ONCE(!IS_ALIGNED(pfn, PAGES_PER_SUBSECTION) || >> !IS_ALIGNED(nr_pages, PAGES_PER_SUBSECTION)) >> return NULL; > > How about to add this into both population and depopulation? We don't have a similar wrapper for vmemmap_free().
On Wed, Jul 01, 2020 at 02:11:10AM +0800, kernel test robot wrote: >Hi Wei, > >Thank you for the patch! Perhaps something to improve: > >[auto build test WARNING on mmotm/master] > >url: https://github.com/0day-ci/linux/commits/Wei-Yang/mm-sparse-only-sub-section-aligned-range-would-be-populated/20200630-101713 >base: git://git.cmpxchg.org/linux-mmotm.git master >config: x86_64-allnoconfig (attached as .config) >compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project cf1d04484344be52ada8178e41d18fd15a9b880c) >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 x86_64 cross compiling tool for clang build > # apt-get install binutils-x86-64-linux-gnu > # save the attached .config to linux build tree > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 > >If you fix the issue, kindly add following tag as appropriate >Reported-by: kernel test robot <lkp@intel.com> > Sorry, I don't follow up with this error report. It looks like a build error, while I just removes some check and the build pass from my side. Confused with this error report. >All warnings (new ones prefixed by >>): > > include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' > case 1: ^ > include/linux/signal.h:177:1: warning: unannotated fall-through between switch labels > _SIG_SET_OP(signotset, _sig_not) > ^ > include/linux/signal.h:167:2: note: expanded from macro '_SIG_SET_OP' > case 2: = ^ > include/linux/signal.h:177:1: warning: unannotated fall-through between switch labels > include/linux/signal.h:169:2: note: expanded from macro '_SIG_SET_OP' > case 1: = ^ > include/linux/signal.h:190:2: warning: unannotated fall-through between switch labels > case 1: = 0; > ^ > include/linux/jhash.h:95:2: note: insert '__attribute__((fallthrough));' to silence this warning > case 6: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > ^ > __attribute__((fallthrough)); > include/linux/jhash.h:95:2: note: insert 'break;' to avoid fall-through > case 6: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > ^ > break; > include/linux/jhash.h:96:2: warning: unannotated fall-through between switch labels > case 5: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > ^ > 15include/linux/signal.h:190:2: note: insert '__attribute__((fallthrough));' to silence this warning > case 1: = 0; > ^ > __attribute__((fallthrough)); > include/linux/signal.h:190:2: note: insert 'break;' to avoid fall-through > case 1: = 0; > ^ > break; > include/linux/signal.h:203:2: warninginclude/linux/jhash.h:96:2: note: insert '__attribute__((fallthrough));' to silence this warning > case 5: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > ^ > __attribute__((fallthrough)); > include/linux/jhash.h:96:2: note: insert 'break;' to avoid fall-through > case 5: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > ^ > break; > include/linux/jhash.h:97:2: warning: unannotated fall-through between switch labels > case 4: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > ^ > : unannotated fall-through between switch labels > case 1: = -1; > ^ > warnings generated. > include/linux/signal.h:203:2: note: insert '__attribute__((fallthrough));' to silence this warning > case 1: = -1; > ^ > __attribute__((fallthrough)); > include/linux/signal.h:15203:2: note: insert 'break;' to avoid fall-through > case 1: = -1; > ^ > break; > include/linux/jhash.h:97:2: note: insert '__attribute__((fallthrough));' to silence this warning > case 4: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > ^ > __attribute__((fallthrough)); > include/linux/jhash.h:97:2: note: insert 'break;' to avoid fall-through > case 4: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > ^ > break; > include/linux/jhash.h:98:2: warning: unannotated fall-through between switch labels > case 3: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > ^ > include/linux/signal.h:233:2: warning: unannotated fall-through between switch labels > case 1: ; > ^ > warnings generated. > In file included from kernel/printk/printk.c:61: > kernel/printk/internal.h:54:20: warninginclude/linux/jhash.h:98:2: note: insert '__attribute__((fallthrough));' to silence this warning > case 3: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > ^ > __attribute__((fallthrough)); > include/linux/jhash.h:98:2: note: no previous prototype for function 'vprintk_func' > __printf(1, 0) int vprintk_func(const char va_list args) { return 0; } > ^ > kernel/printk/internal.h: insert 'break;' to avoid fall-through > case 3: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > ^ > break; > include/linux/jhash.h:99:2: warning: unannotated fall-through between switch labels > case 2: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > ^ > :54:16: note: declare 'static' if the function is not intended to be used outside of this translation unit > __printf(1, 0) int vprintk_func(const char va_list args) { return 0; } > ^ > static > kernel/printk/printk.cinclude/linux/signal.h:233:2: note: insert '__attribute__((fallthrough));' to silence this warning > case 1: ; > ^ > __attribute__((fallthrough)); > include/linux/signal.h:233:2: note: insert 'break;' to avoid fall-through > case 1: ; > ^ > break; > include/linux/signal.h:245:2: warning: unannotated fall-through between switch labels > case 1: ; > ^ >>> :165:5: warning: no previous prototype for function 'devkmsg_sysctl_set_loglvl' > int devkmsg_sysctl_set_loglvl(struct ctl_table int write, > ^ > kernel/printk/printk.c:165:1: note: declare 'static' if the function is not intended to be used outside of this translation unit > int devkmsg_sysctl_set_loglvl(struct ctl_table int write, > ^ > static > include/linux/jhash.h:99:2: note: insert '__attribute__((fallthrough));' to silence this warning > case 2: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > ^ > __attribute__((fallthrough)); > include/linux/jhash.h:99:2: note: insert 'break;' to avoid fall-through > case 2: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > ^ > break; > include/linux/jhash.h:100:2: warning: unannotated fall-through between switch labels > case 1: a += > ^ > include/linux/signal.h:245:2: note: insert '__attribute__((fallthrough));' to silence this warning > case 1: ; > ^ > __attribute__((fallthrough)); > include/linux/signal.h:245:2: note: insert 'break;' to avoid fall-through > case 1: ; > ^ > break; > kernel/printk/printk.cinclude/linux/jhash.h:100:2: note: insert '__attribute__((fallthrough));' to silence this warning > case 1: a += > ^ > __attribute__((fallthrough)); > include/linux/jhash.h:100:2: note: insert 'break;' to avoid fall-through > case 1: a += > ^ > break; > include/linux/jhash.h:102:2: warning: unannotated fall-through between switch labels > case 0: /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var Nothing left to add arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > ^ > include/linux/jhash.h:102:2: note: insert 'break;' to avoid fall-through > case 0: /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var Nothing left to add arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > ^ > break; > :2406:10: warning: 'sprintf' will always overflow; destination buffer has size 0, but format string expands to at least 33 > len = sprintf(text, > ^ > include/linux/jhash.h:136:2: warning: unannotated fall-through between switch labels > case 2: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > ^ > include/linux/jhash.h:136:2: note: insert '__attribute__((fallthrough));' to silence this warning > case 2: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > ^ > __attribute__((fallthrough)); > include/linux/jhash.h:136:2: note: insert 'break;' to avoid fall-through > case 2: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc /home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src /media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr /var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > ^ > break; > include/linux/jhash.h:137:2: warning: unannotated fall-through between switch labels > case 1: a += > ^ > In file included from kernel/capability.c:13: > In file included from include/linux/audit.h:13: > In file included from include/linux/ptrace.h:7: > In file included from include/linux/sched/signal.h:6: > include/linux/signal.h:147:1: warning: unannotated fall-through between switch labels > _SIG_SET_BINOP(sigorsets, _sig_or) > ^ > include/linux/signal.h:133:2: note: expanded from macro '_SIG_SET_BINOP' > case 2: ^ > include/linux/signal.h:147:1: warning: unannotated fall-through between switch labels > include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' > case 1: ^ > include/linux/signal.h:150:1: warning: unannotated fall-through between switch labels > _SIG_SET_BINOP(sigandsets, _sig_and) > ^ > include/linux/signal.h:133:2:In file included from note: expanded from macro '_SIG_SET_BINOP' > case 2: ^ > include/linux/signal.h:150:1: warning: unannotated fall-through between switch labels > include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' > case 1: ^ > include/linux/signal.h:153:1: warning: unannotated fall-through between switch labels > _SIG_SET_BINOP(sigandnsets, _sig_andn) > ^ > include/linux/signal.h:133:2: note: expanded from macro '_SIG_SET_BINOP' > case 2: kernel/sysctl_binary.c:15: > In file included from include/linux/netdevice.h:37: > In file included from include/linux/ethtool.h:18: > In file included from include/uapi/linux/ethtool.h:19: > In file included from include/linux/if_ether.h:19: > include/linux/skbuff.h:3690:2: warning: unannotated fall-through between switch labels > case 24: diffs |= __it_diff(a, b, 64); > ^ >-- > ^ > __attribute__((fallthrough)); > include/linux/mm.h:166:2: note: insert 'break;' to avoid fall-through > case 56: > ^ > break; > In file included from kernel/printk/printk.c:36: > In file included from include/linux/syscalls.h:76: > include/linux/signal.h:147:1: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] > _SIG_SET_BINOP(sigorsets, _sig_or) > ^ > include/linux/signal.h:133:2: note: expanded from macro '_SIG_SET_BINOP' > case 2: \ > ^ > include/linux/signal.h:147:1: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] > include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' > case 1: \ > ^ > include/linux/signal.h:150:1: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] > _SIG_SET_BINOP(sigandsets, _sig_and) > ^ > include/linux/signal.h:133:2: note: expanded from macro '_SIG_SET_BINOP' > case 2: \ > ^ > include/linux/signal.h:150:1: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] > include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' > case 1: \ > ^ > include/linux/signal.h:153:1: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] > _SIG_SET_BINOP(sigandnsets, _sig_andn) > ^ > include/linux/signal.h:133:2: note: expanded from macro '_SIG_SET_BINOP' > case 2: \ > ^ > include/linux/signal.h:153:1: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] > include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' > case 1: \ > ^ > include/linux/signal.h:177:1: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] > _SIG_SET_OP(signotset, _sig_not) > ^ > include/linux/signal.h:167:2: note: expanded from macro '_SIG_SET_OP' > case 2: set->sig[1] = op(set->sig[1]); \ > ^ > include/linux/signal.h:177:1: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] > include/linux/signal.h:169:2: note: expanded from macro '_SIG_SET_OP' > case 1: set->sig[0] = op(set->sig[0]); \ > ^ > include/linux/signal.h:190:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] > case 1: set->sig[0] = 0; > ^ > include/linux/signal.h:190:2: note: insert '__attribute__((fallthrough));' to silence this warning > case 1: set->sig[0] = 0; > ^ > __attribute__((fallthrough)); > include/linux/signal.h:190:2: note: insert 'break;' to avoid fall-through > case 1: set->sig[0] = 0; > ^ > break; > include/linux/signal.h:203:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] > case 1: set->sig[0] = -1; > ^ > include/linux/signal.h:203:2: note: insert '__attribute__((fallthrough));' to silence this warning > case 1: set->sig[0] = -1; > ^ > __attribute__((fallthrough)); > include/linux/signal.h:203:2: note: insert 'break;' to avoid fall-through > case 1: set->sig[0] = -1; > ^ > break; > include/linux/signal.h:233:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] > case 1: ; > ^ > include/linux/signal.h:233:2: note: insert '__attribute__((fallthrough));' to silence this warning > case 1: ; > ^ > __attribute__((fallthrough)); > include/linux/signal.h:233:2: note: insert 'break;' to avoid fall-through > case 1: ; > ^ > break; > include/linux/signal.h:245:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] > case 1: ; > ^ > include/linux/signal.h:245:2: note: insert '__attribute__((fallthrough));' to silence this warning > case 1: ; > ^ > __attribute__((fallthrough)); > include/linux/signal.h:245:2: note: insert 'break;' to avoid fall-through > case 1: ; > ^ > break; > In file included from kernel/printk/printk.c:61: > kernel/printk/internal.h:54:20: warning: no previous prototype for function 'vprintk_func' [-Wmissing-prototypes] > __printf(1, 0) int vprintk_func(const char *fmt, va_list args) { return 0; } > ^ > kernel/printk/internal.h:54:16: note: declare 'static' if the function is not intended to be used outside of this translation unit > __printf(1, 0) int vprintk_func(const char *fmt, va_list args) { return 0; } > ^ > static >>> kernel/printk/printk.c:165:5: warning: no previous prototype for function 'devkmsg_sysctl_set_loglvl' [-Wmissing-prototypes] > int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, > ^ > kernel/printk/printk.c:165:1: note: declare 'static' if the function is not intended to be used outside of this translation unit > int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, > ^ > static > kernel/printk/printk.c:2406:10: warning: 'sprintf' will always overflow; destination buffer has size 0, but format string expands to at least 33 [-Wfortify-source] > len = sprintf(text, > ^ > 18 warnings generated. > >--- >0-DAY CI Kernel Test Service, Intel Corporation >https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
>-----Original Message----- >From: Wei Yang <richard.weiyang@linux.alibaba.com> >Sent: 2020年7月1日 19:58 >To: lkp <lkp@intel.com> >Cc: Wei Yang <richard.weiyang@linux.alibaba.com>; Williams, Dan J ><dan.j.williams@intel.com>; akpm@linux-foundation.org; kbuild-all@lists.01.org; >clang-built-linux@googlegroups.com; linux-mm@kvack.org; linux- >kernel@vger.kernel.org >Subject: Re: [PATCH] mm/sparse: only sub-section aligned range would be >populated > >On Wed, Jul 01, 2020 at 02:11:10AM +0800, kernel test robot wrote: >>Hi Wei, >> >>Thank you for the patch! Perhaps something to improve: >> >>[auto build test WARNING on mmotm/master] >> >>url: https://github.com/0day-ci/linux/commits/Wei-Yang/mm-sparse-only- >sub-section-aligned-range-would-be-populated/20200630-101713 >>base: git://git.cmpxchg.org/linux-mmotm.git master >>config: x86_64-allnoconfig (attached as .config) >>compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project >>cf1d04484344be52ada8178e41d18fd15a9b880c) >>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 x86_64 cross compiling tool for clang build >> # apt-get install binutils-x86-64-linux-gnu >> # save the attached .config to linux build tree >> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross >>ARCH=x86_64 >> >>If you fix the issue, kindly add following tag as appropriate >>Reported-by: kernel test robot <lkp@intel.com> >> > >Sorry, I don't follow up with this error report. > >It looks like a build error, while I just removes some check and the build pass from >my side. Confused with this error report. It is false positive. Please ignore. Sorry for inconvenience. The report complains about " warning: no previous prototype for function 'devkmsg_sysctl_set_loglvl'" which is not caused by commit in this report. We will investigate and fix in 0-day side. > >>All warnings (new ones prefixed by >>): >> >> include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' >> case 1: ^ >> include/linux/signal.h:177:1: warning: unannotated fall-through between >switch labels >> _SIG_SET_OP(signotset, _sig_not) >> ^ >> include/linux/signal.h:167:2: note: expanded from macro '_SIG_SET_OP' >> case 2: = ^ >> include/linux/signal.h:177:1: warning: unannotated fall-through between >switch labels >> include/linux/signal.h:169:2: note: expanded from macro '_SIG_SET_OP' >> case 1: = ^ >> include/linux/signal.h:190:2: warning: unannotated fall-through between >switch labels >> case 1: = 0; >> ^ >> include/linux/jhash.h:95:2: note: insert '__attribute__((fallthrough));' to silence >this warning >> case 6: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ >> ^ >> __attribute__((fallthrough)); >> include/linux/jhash.h:95:2: note: insert 'break;' to avoid fall-through >> case 6: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ >> ^ >> break; >> include/linux/jhash.h:96:2: warning: unannotated fall-through between switch >labels >> case 5: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ >> ^ >> 15include/linux/signal.h:190:2: note: insert '__attribute__((fallthrough));' to >silence this warning >> case 1: = 0; >> ^ >> __attribute__((fallthrough)); >> include/linux/signal.h:190:2: note: insert 'break;' to avoid fall-through >> case 1: = 0; >> ^ >> break; >> include/linux/signal.h:203:2: warninginclude/linux/jhash.h:96:2: note: insert >'__attribute__((fallthrough));' to silence this warning >> case 5: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ >> ^ >> __attribute__((fallthrough)); >> include/linux/jhash.h:96:2: note: insert 'break;' to avoid fall-through >> case 5: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ >> ^ >> break; >> include/linux/jhash.h:97:2: warning: unannotated fall-through between switch >labels >> case 4: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ >> ^ >> : unannotated fall-through between switch labels >> case 1: = -1; >> ^ >> warnings generated. >> include/linux/signal.h:203:2: note: insert '__attribute__((fallthrough));' to >silence this warning >> case 1: = -1; >> ^ >> __attribute__((fallthrough)); >> include/linux/signal.h:15203:2: note: insert 'break;' to avoid fall-through >> case 1: = -1; >> ^ >> break; >> include/linux/jhash.h:97:2: note: insert '__attribute__((fallthrough));' to silence >this warning >> case 4: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ >> ^ >> __attribute__((fallthrough)); >> include/linux/jhash.h:97:2: note: insert 'break;' to avoid fall-through >> case 4: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ >> ^ >> break; >> include/linux/jhash.h:98:2: warning: unannotated fall-through between switch >labels >> case 3: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ >> ^ >> include/linux/signal.h:233:2: warning: unannotated fall-through between >switch labels >> case 1: ; >> ^ >> warnings generated. >> In file included from kernel/printk/printk.c:61: >> kernel/printk/internal.h:54:20: warninginclude/linux/jhash.h:98:2: note: insert >'__attribute__((fallthrough));' to silence this warning >> case 3: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ >> ^ >> __attribute__((fallthrough)); >> include/linux/jhash.h:98:2: note: no previous prototype for function >'vprintk_func' >> __printf(1, 0) int vprintk_func(const char va_list args) { return 0; } >> ^ >> kernel/printk/internal.h: insert 'break;' to avoid fall-through >> case 3: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ >> ^ >> break; >> include/linux/jhash.h:99:2: warning: unannotated fall-through between switch >labels >> case 2: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ >> ^ >> :54:16: note: declare 'static' if the function is not intended to be used outside >of this translation unit >> __printf(1, 0) int vprintk_func(const char va_list args) { return 0; } >> ^ >> static >> kernel/printk/printk.cinclude/linux/signal.h:233:2: note: insert >'__attribute__((fallthrough));' to silence this warning >> case 1: ; >> ^ >> __attribute__((fallthrough)); >> include/linux/signal.h:233:2: note: insert 'break;' to avoid fall-through >> case 1: ; >> ^ >> break; >> include/linux/signal.h:245:2: warning: unannotated fall-through between >switch labels >> case 1: ; >> ^ >>>> :165:5: warning: no previous prototype for function >'devkmsg_sysctl_set_loglvl' >> int devkmsg_sysctl_set_loglvl(struct ctl_table int write, >> ^ >> kernel/printk/printk.c:165:1: note: declare 'static' if the function is not >intended to be used outside of this translation unit >> int devkmsg_sysctl_set_loglvl(struct ctl_table int write, >> ^ >> static >> include/linux/jhash.h:99:2: note: insert '__attribute__((fallthrough));' to silence >this warning >> case 2: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ >> ^ >> __attribute__((fallthrough)); >> include/linux/jhash.h:99:2: note: insert 'break;' to avoid fall-through >> case 2: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ >> ^ >> break; >> include/linux/jhash.h:100:2: warning: unannotated fall-through between >switch labels >> case 1: a += >> ^ >> include/linux/signal.h:245:2: note: insert '__attribute__((fallthrough));' to >silence this warning >> case 1: ; >> ^ >> __attribute__((fallthrough)); >> include/linux/signal.h:245:2: note: insert 'break;' to avoid fall-through >> case 1: ; >> ^ >> break; >> kernel/printk/printk.cinclude/linux/jhash.h:100:2: note: insert >'__attribute__((fallthrough));' to silence this warning >> case 1: a += >> ^ >> __attribute__((fallthrough)); >> include/linux/jhash.h:100:2: note: insert 'break;' to avoid fall-through >> case 1: a += >> ^ >> break; >> include/linux/jhash.h:102:2: warning: unannotated fall-through between >switch labels >> case 0: /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr >/var Nothing left to add arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ >kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ >> ^ >> include/linux/jhash.h:102:2: note: insert 'break;' to avoid fall-through >> case 0: /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr >/var Nothing left to add arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ >kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ >> ^ >> break; >> :2406:10: warning: 'sprintf' will always overflow; destination buffer has size 0, >but format string expands to at least 33 >> len = sprintf(text, >> ^ >> include/linux/jhash.h:136:2: warning: unannotated fall-through between >switch labels >> case 2: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ >> ^ >> include/linux/jhash.h:136:2: note: insert '__attribute__((fallthrough));' to >silence this warning >> case 2: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ >> ^ >> __attribute__((fallthrough)); >> include/linux/jhash.h:136:2: note: insert 'break;' to avoid fall-through >> case 2: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ >> ^ >> break; >> include/linux/jhash.h:137:2: warning: unannotated fall-through between >switch labels >> case 1: a += >> ^ >> In file included from kernel/capability.c:13: >> In file included from include/linux/audit.h:13: >> In file included from include/linux/ptrace.h:7: >> In file included from include/linux/sched/signal.h:6: >> include/linux/signal.h:147:1: warning: unannotated fall-through between >switch labels >> _SIG_SET_BINOP(sigorsets, _sig_or) >> ^ >> include/linux/signal.h:133:2: note: expanded from macro '_SIG_SET_BINOP' >> case 2: ^ >> include/linux/signal.h:147:1: warning: unannotated fall-through between >switch labels >> include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' >> case 1: ^ >> include/linux/signal.h:150:1: warning: unannotated fall-through between >switch labels >> _SIG_SET_BINOP(sigandsets, _sig_and) >> ^ >> include/linux/signal.h:133:2:In file included from note: expanded from macro >'_SIG_SET_BINOP' >> case 2: ^ >> include/linux/signal.h:150:1: warning: unannotated fall-through between >switch labels >> include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' >> case 1: ^ >> include/linux/signal.h:153:1: warning: unannotated fall-through between >switch labels >> _SIG_SET_BINOP(sigandnsets, _sig_andn) >> ^ >> include/linux/signal.h:133:2: note: expanded from macro '_SIG_SET_BINOP' >> case 2: kernel/sysctl_binary.c:15: >> In file included from include/linux/netdevice.h:37: >> In file included from include/linux/ethtool.h:18: >> In file included from include/uapi/linux/ethtool.h:19: >> In file included from include/linux/if_ether.h:19: >> include/linux/skbuff.h:3690:2: warning: unannotated fall-through between >switch labels >> case 24: diffs |= __it_diff(a, b, 64); >> ^ >>-- >> ^ >> __attribute__((fallthrough)); >> include/linux/mm.h:166:2: note: insert 'break;' to avoid fall-through >> case 56: >> ^ >> break; >> In file included from kernel/printk/printk.c:36: >> In file included from include/linux/syscalls.h:76: >> include/linux/signal.h:147:1: warning: unannotated fall-through between >switch labels [-Wimplicit-fallthrough] >> _SIG_SET_BINOP(sigorsets, _sig_or) >> ^ >> include/linux/signal.h:133:2: note: expanded from macro '_SIG_SET_BINOP' >> case 2: \ >> ^ >> include/linux/signal.h:147:1: warning: unannotated fall-through between >switch labels [-Wimplicit-fallthrough] >> include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' >> case 1: \ >> ^ >> include/linux/signal.h:150:1: warning: unannotated fall-through between >switch labels [-Wimplicit-fallthrough] >> _SIG_SET_BINOP(sigandsets, _sig_and) >> ^ >> include/linux/signal.h:133:2: note: expanded from macro '_SIG_SET_BINOP' >> case 2: \ >> ^ >> include/linux/signal.h:150:1: warning: unannotated fall-through between >switch labels [-Wimplicit-fallthrough] >> include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' >> case 1: \ >> ^ >> include/linux/signal.h:153:1: warning: unannotated fall-through between >switch labels [-Wimplicit-fallthrough] >> _SIG_SET_BINOP(sigandnsets, _sig_andn) >> ^ >> include/linux/signal.h:133:2: note: expanded from macro '_SIG_SET_BINOP' >> case 2: \ >> ^ >> include/linux/signal.h:153:1: warning: unannotated fall-through between >switch labels [-Wimplicit-fallthrough] >> include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' >> case 1: \ >> ^ >> include/linux/signal.h:177:1: warning: unannotated fall-through between >switch labels [-Wimplicit-fallthrough] >> _SIG_SET_OP(signotset, _sig_not) >> ^ >> include/linux/signal.h:167:2: note: expanded from macro '_SIG_SET_OP' >> case 2: set->sig[1] = op(set->sig[1]); \ >> ^ >> include/linux/signal.h:177:1: warning: unannotated fall-through between >switch labels [-Wimplicit-fallthrough] >> include/linux/signal.h:169:2: note: expanded from macro '_SIG_SET_OP' >> case 1: set->sig[0] = op(set->sig[0]); \ >> ^ >> include/linux/signal.h:190:2: warning: unannotated fall-through between >switch labels [-Wimplicit-fallthrough] >> case 1: set->sig[0] = 0; >> ^ >> include/linux/signal.h:190:2: note: insert '__attribute__((fallthrough));' to >silence this warning >> case 1: set->sig[0] = 0; >> ^ >> __attribute__((fallthrough)); >> include/linux/signal.h:190:2: note: insert 'break;' to avoid fall-through >> case 1: set->sig[0] = 0; >> ^ >> break; >> include/linux/signal.h:203:2: warning: unannotated fall-through between >switch labels [-Wimplicit-fallthrough] >> case 1: set->sig[0] = -1; >> ^ >> include/linux/signal.h:203:2: note: insert '__attribute__((fallthrough));' to >silence this warning >> case 1: set->sig[0] = -1; >> ^ >> __attribute__((fallthrough)); >> include/linux/signal.h:203:2: note: insert 'break;' to avoid fall-through >> case 1: set->sig[0] = -1; >> ^ >> break; >> include/linux/signal.h:233:2: warning: unannotated fall-through between >switch labels [-Wimplicit-fallthrough] >> case 1: ; >> ^ >> include/linux/signal.h:233:2: note: insert '__attribute__((fallthrough));' to >silence this warning >> case 1: ; >> ^ >> __attribute__((fallthrough)); >> include/linux/signal.h:233:2: note: insert 'break;' to avoid fall-through >> case 1: ; >> ^ >> break; >> include/linux/signal.h:245:2: warning: unannotated fall-through between >switch labels [-Wimplicit-fallthrough] >> case 1: ; >> ^ >> include/linux/signal.h:245:2: note: insert '__attribute__((fallthrough));' to >silence this warning >> case 1: ; >> ^ >> __attribute__((fallthrough)); >> include/linux/signal.h:245:2: note: insert 'break;' to avoid fall-through >> case 1: ; >> ^ >> break; >> In file included from kernel/printk/printk.c:61: >> kernel/printk/internal.h:54:20: warning: no previous prototype for function >'vprintk_func' [-Wmissing-prototypes] >> __printf(1, 0) int vprintk_func(const char *fmt, va_list args) { return 0; } >> ^ >> kernel/printk/internal.h:54:16: note: declare 'static' if the function is not >intended to be used outside of this translation unit >> __printf(1, 0) int vprintk_func(const char *fmt, va_list args) { return 0; } >> ^ >> static >>>> kernel/printk/printk.c:165:5: warning: no previous prototype for >>>> function 'devkmsg_sysctl_set_loglvl' [-Wmissing-prototypes] >> int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, >> ^ >> kernel/printk/printk.c:165:1: note: declare 'static' if the function is not >intended to be used outside of this translation unit >> int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, >> ^ >> static >> kernel/printk/printk.c:2406:10: warning: 'sprintf' will always overflow; >destination buffer has size 0, but format string expands to at least 33 [-Wfortify- >source] >> len = sprintf(text, >> ^ >> 18 warnings generated. >> >>--- >>0-DAY CI Kernel Test Service, Intel Corporation >>https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org > > > >-- >Wei Yang >Help you, Help me
On Wed, Jul 8, 2020 at 12:23 AM Xia, Hui <hui.xia@intel.com> wrote: > > > > >-----Original Message----- > >From: Wei Yang <richard.weiyang@linux.alibaba.com> > >Sent: 2020年7月1日 19:58 > >To: lkp <lkp@intel.com> > >Cc: Wei Yang <richard.weiyang@linux.alibaba.com>; Williams, Dan J > ><dan.j.williams@intel.com>; akpm@linux-foundation.org; kbuild-all@lists.01.org; > >clang-built-linux@googlegroups.com; linux-mm@kvack.org; linux- > >kernel@vger.kernel.org > >Subject: Re: [PATCH] mm/sparse: only sub-section aligned range would be > >populated > > > >On Wed, Jul 01, 2020 at 02:11:10AM +0800, kernel test robot wrote: > >>Hi Wei, > >> > >>Thank you for the patch! Perhaps something to improve: > >> > >>[auto build test WARNING on mmotm/master] > >> > >>url: https://github.com/0day-ci/linux/commits/Wei-Yang/mm-sparse-only- > >sub-section-aligned-range-would-be-populated/20200630-101713 > >>base: git://git.cmpxchg.org/linux-mmotm.git master > >>config: x86_64-allnoconfig (attached as .config) Another issue was that this was an allnoconfig x86_64 build with Clang. While ARCH=x86_64 defconfigs set: CONFIG_64BIT=y CONFIG_X86_64=y allnoconfig turns those off, making it a 32b x86 build. We cannot yet build an ARCH=i386 build yet with Clang, so that means this target is not green to begin with. + Arnd There might be a way for us to disable maybe CONFIG_X86_32 when building with Clang? or make it so that randconfig can't dig this up? +Philip I'm not sure if it's easy to disable `allnoconfig` x86 builds with Clang? Also, I feel like we're asking for a bunch of special cases while we work through all the issues. We would like to revert these special cases once we're in better shape. Are you tracking a list of exceptions, so that we can estimate the work to fix on our side, and that we know to re-enable test coverage once fixed? > >>compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project > >>cf1d04484344be52ada8178e41d18fd15a9b880c) > >>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 x86_64 cross compiling tool for clang build > >> # apt-get install binutils-x86-64-linux-gnu > >> # save the attached .config to linux build tree > >> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross > >>ARCH=x86_64 > >> > >>If you fix the issue, kindly add following tag as appropriate > >>Reported-by: kernel test robot <lkp@intel.com> > >> > > > >Sorry, I don't follow up with this error report. > > > >It looks like a build error, while I just removes some check and the build pass from > >my side. Confused with this error report. > It is false positive. Please ignore. Sorry for inconvenience. > The report complains about " warning: no previous prototype for function 'devkmsg_sysctl_set_loglvl'" which is not caused by commit in this report. We will investigate and fix in 0-day side. > > > > >>All warnings (new ones prefixed by >>): > >> > >> include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' > >> case 1: ^ > >> include/linux/signal.h:177:1: warning: unannotated fall-through between > >switch labels > >> _SIG_SET_OP(signotset, _sig_not) > >> ^ > >> include/linux/signal.h:167:2: note: expanded from macro '_SIG_SET_OP' > >> case 2: = ^ > >> include/linux/signal.h:177:1: warning: unannotated fall-through between > >switch labels > >> include/linux/signal.h:169:2: note: expanded from macro '_SIG_SET_OP' > >> case 1: = ^ > >> include/linux/signal.h:190:2: warning: unannotated fall-through between > >switch labels > >> case 1: = 0; > >> ^ > >> include/linux/jhash.h:95:2: note: insert '__attribute__((fallthrough));' to silence > >this warning > >> case 6: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > >> ^ > >> __attribute__((fallthrough)); > >> include/linux/jhash.h:95:2: note: insert 'break;' to avoid fall-through > >> case 6: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > >> ^ > >> break; > >> include/linux/jhash.h:96:2: warning: unannotated fall-through between switch > >labels > >> case 5: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > >> ^ > >> 15include/linux/signal.h:190:2: note: insert '__attribute__((fallthrough));' to > >silence this warning > >> case 1: = 0; > >> ^ > >> __attribute__((fallthrough)); > >> include/linux/signal.h:190:2: note: insert 'break;' to avoid fall-through > >> case 1: = 0; > >> ^ > >> break; > >> include/linux/signal.h:203:2: warninginclude/linux/jhash.h:96:2: note: insert > >'__attribute__((fallthrough));' to silence this warning > >> case 5: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > >> ^ > >> __attribute__((fallthrough)); > >> include/linux/jhash.h:96:2: note: insert 'break;' to avoid fall-through > >> case 5: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > >> ^ > >> break; > >> include/linux/jhash.h:97:2: warning: unannotated fall-through between switch > >labels > >> case 4: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > >> ^ > >> : unannotated fall-through between switch labels > >> case 1: = -1; > >> ^ > >> warnings generated. > >> include/linux/signal.h:203:2: note: insert '__attribute__((fallthrough));' to > >silence this warning > >> case 1: = -1; > >> ^ > >> __attribute__((fallthrough)); > >> include/linux/signal.h:15203:2: note: insert 'break;' to avoid fall-through > >> case 1: = -1; > >> ^ > >> break; > >> include/linux/jhash.h:97:2: note: insert '__attribute__((fallthrough));' to silence > >this warning > >> case 4: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > >> ^ > >> __attribute__((fallthrough)); > >> include/linux/jhash.h:97:2: note: insert 'break;' to avoid fall-through > >> case 4: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > >> ^ > >> break; > >> include/linux/jhash.h:98:2: warning: unannotated fall-through between switch > >labels > >> case 3: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > >> ^ > >> include/linux/signal.h:233:2: warning: unannotated fall-through between > >switch labels > >> case 1: ; > >> ^ > >> warnings generated. > >> In file included from kernel/printk/printk.c:61: > >> kernel/printk/internal.h:54:20: warninginclude/linux/jhash.h:98:2: note: insert > >'__attribute__((fallthrough));' to silence this warning > >> case 3: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > >> ^ > >> __attribute__((fallthrough)); > >> include/linux/jhash.h:98:2: note: no previous prototype for function > >'vprintk_func' > >> __printf(1, 0) int vprintk_func(const char va_list args) { return 0; } > >> ^ > >> kernel/printk/internal.h: insert 'break;' to avoid fall-through > >> case 3: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > >> ^ > >> break; > >> include/linux/jhash.h:99:2: warning: unannotated fall-through between switch > >labels > >> case 2: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > >> ^ > >> :54:16: note: declare 'static' if the function is not intended to be used outside > >of this translation unit > >> __printf(1, 0) int vprintk_func(const char va_list args) { return 0; } > >> ^ > >> static > >> kernel/printk/printk.cinclude/linux/signal.h:233:2: note: insert > >'__attribute__((fallthrough));' to silence this warning > >> case 1: ; > >> ^ > >> __attribute__((fallthrough)); > >> include/linux/signal.h:233:2: note: insert 'break;' to avoid fall-through > >> case 1: ; > >> ^ > >> break; > >> include/linux/signal.h:245:2: warning: unannotated fall-through between > >switch labels > >> case 1: ; > >> ^ > >>>> :165:5: warning: no previous prototype for function > >'devkmsg_sysctl_set_loglvl' > >> int devkmsg_sysctl_set_loglvl(struct ctl_table int write, > >> ^ > >> kernel/printk/printk.c:165:1: note: declare 'static' if the function is not > >intended to be used outside of this translation unit > >> int devkmsg_sysctl_set_loglvl(struct ctl_table int write, > >> ^ > >> static > >> include/linux/jhash.h:99:2: note: insert '__attribute__((fallthrough));' to silence > >this warning > >> case 2: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > >> ^ > >> __attribute__((fallthrough)); > >> include/linux/jhash.h:99:2: note: insert 'break;' to avoid fall-through > >> case 2: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > >> ^ > >> break; > >> include/linux/jhash.h:100:2: warning: unannotated fall-through between > >switch labels > >> case 1: a += > >> ^ > >> include/linux/signal.h:245:2: note: insert '__attribute__((fallthrough));' to > >silence this warning > >> case 1: ; > >> ^ > >> __attribute__((fallthrough)); > >> include/linux/signal.h:245:2: note: insert 'break;' to avoid fall-through > >> case 1: ; > >> ^ > >> break; > >> kernel/printk/printk.cinclude/linux/jhash.h:100:2: note: insert > >'__attribute__((fallthrough));' to silence this warning > >> case 1: a += > >> ^ > >> __attribute__((fallthrough)); > >> include/linux/jhash.h:100:2: note: insert 'break;' to avoid fall-through > >> case 1: a += > >> ^ > >> break; > >> include/linux/jhash.h:102:2: warning: unannotated fall-through between > >switch labels > >> case 0: /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > >/var Nothing left to add arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ > >kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > >> ^ > >> include/linux/jhash.h:102:2: note: insert 'break;' to avoid fall-through > >> case 0: /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > >/var Nothing left to add arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ > >kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > >> ^ > >> break; > >> :2406:10: warning: 'sprintf' will always overflow; destination buffer has size 0, > >but format string expands to at least 33 > >> len = sprintf(text, > >> ^ > >> include/linux/jhash.h:136:2: warning: unannotated fall-through between > >switch labels > >> case 2: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > >> ^ > >> include/linux/jhash.h:136:2: note: insert '__attribute__((fallthrough));' to > >silence this warning > >> case 2: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > >> ^ > >> __attribute__((fallthrough)); > >> include/linux/jhash.h:136:2: note: insert 'break;' to avoid fall-through > >> case 2: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > >> ^ > >> break; > >> include/linux/jhash.h:137:2: warning: unannotated fall-through between > >switch labels > >> case 1: a += > >> ^ > >> In file included from kernel/capability.c:13: > >> In file included from include/linux/audit.h:13: > >> In file included from include/linux/ptrace.h:7: > >> In file included from include/linux/sched/signal.h:6: > >> include/linux/signal.h:147:1: warning: unannotated fall-through between > >switch labels > >> _SIG_SET_BINOP(sigorsets, _sig_or) > >> ^ > >> include/linux/signal.h:133:2: note: expanded from macro '_SIG_SET_BINOP' > >> case 2: ^ > >> include/linux/signal.h:147:1: warning: unannotated fall-through between > >switch labels > >> include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' > >> case 1: ^ > >> include/linux/signal.h:150:1: warning: unannotated fall-through between > >switch labels > >> _SIG_SET_BINOP(sigandsets, _sig_and) > >> ^ > >> include/linux/signal.h:133:2:In file included from note: expanded from macro > >'_SIG_SET_BINOP' > >> case 2: ^ > >> include/linux/signal.h:150:1: warning: unannotated fall-through between > >switch labels > >> include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' > >> case 1: ^ > >> include/linux/signal.h:153:1: warning: unannotated fall-through between > >switch labels > >> _SIG_SET_BINOP(sigandnsets, _sig_andn) > >> ^ > >> include/linux/signal.h:133:2: note: expanded from macro '_SIG_SET_BINOP' > >> case 2: kernel/sysctl_binary.c:15: > >> In file included from include/linux/netdevice.h:37: > >> In file included from include/linux/ethtool.h:18: > >> In file included from include/uapi/linux/ethtool.h:19: > >> In file included from include/linux/if_ether.h:19: > >> include/linux/skbuff.h:3690:2: warning: unannotated fall-through between > >switch labels > >> case 24: diffs |= __it_diff(a, b, 64); > >> ^ > >>-- > >> ^ > >> __attribute__((fallthrough)); > >> include/linux/mm.h:166:2: note: insert 'break;' to avoid fall-through > >> case 56: > >> ^ > >> break; > >> In file included from kernel/printk/printk.c:36: > >> In file included from include/linux/syscalls.h:76: > >> include/linux/signal.h:147:1: warning: unannotated fall-through between > >switch labels [-Wimplicit-fallthrough] > >> _SIG_SET_BINOP(sigorsets, _sig_or) > >> ^ > >> include/linux/signal.h:133:2: note: expanded from macro '_SIG_SET_BINOP' > >> case 2: \ > >> ^ > >> include/linux/signal.h:147:1: warning: unannotated fall-through between > >switch labels [-Wimplicit-fallthrough] > >> include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' > >> case 1: \ > >> ^ > >> include/linux/signal.h:150:1: warning: unannotated fall-through between > >switch labels [-Wimplicit-fallthrough] > >> _SIG_SET_BINOP(sigandsets, _sig_and) > >> ^ > >> include/linux/signal.h:133:2: note: expanded from macro '_SIG_SET_BINOP' > >> case 2: \ > >> ^ > >> include/linux/signal.h:150:1: warning: unannotated fall-through between > >switch labels [-Wimplicit-fallthrough] > >> include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' > >> case 1: \ > >> ^ > >> include/linux/signal.h:153:1: warning: unannotated fall-through between > >switch labels [-Wimplicit-fallthrough] > >> _SIG_SET_BINOP(sigandnsets, _sig_andn) > >> ^ > >> include/linux/signal.h:133:2: note: expanded from macro '_SIG_SET_BINOP' > >> case 2: \ > >> ^ > >> include/linux/signal.h:153:1: warning: unannotated fall-through between > >switch labels [-Wimplicit-fallthrough] > >> include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' > >> case 1: \ > >> ^ > >> include/linux/signal.h:177:1: warning: unannotated fall-through between > >switch labels [-Wimplicit-fallthrough] > >> _SIG_SET_OP(signotset, _sig_not) > >> ^ > >> include/linux/signal.h:167:2: note: expanded from macro '_SIG_SET_OP' > >> case 2: set->sig[1] = op(set->sig[1]); \ > >> ^ > >> include/linux/signal.h:177:1: warning: unannotated fall-through between > >switch labels [-Wimplicit-fallthrough] > >> include/linux/signal.h:169:2: note: expanded from macro '_SIG_SET_OP' > >> case 1: set->sig[0] = op(set->sig[0]); \ > >> ^ > >> include/linux/signal.h:190:2: warning: unannotated fall-through between > >switch labels [-Wimplicit-fallthrough] > >> case 1: set->sig[0] = 0; > >> ^ > >> include/linux/signal.h:190:2: note: insert '__attribute__((fallthrough));' to > >silence this warning > >> case 1: set->sig[0] = 0; > >> ^ > >> __attribute__((fallthrough)); > >> include/linux/signal.h:190:2: note: insert 'break;' to avoid fall-through > >> case 1: set->sig[0] = 0; > >> ^ > >> break; > >> include/linux/signal.h:203:2: warning: unannotated fall-through between > >switch labels [-Wimplicit-fallthrough] > >> case 1: set->sig[0] = -1; > >> ^ > >> include/linux/signal.h:203:2: note: insert '__attribute__((fallthrough));' to > >silence this warning > >> case 1: set->sig[0] = -1; > >> ^ > >> __attribute__((fallthrough)); > >> include/linux/signal.h:203:2: note: insert 'break;' to avoid fall-through > >> case 1: set->sig[0] = -1; > >> ^ > >> break; > >> include/linux/signal.h:233:2: warning: unannotated fall-through between > >switch labels [-Wimplicit-fallthrough] > >> case 1: ; > >> ^ > >> include/linux/signal.h:233:2: note: insert '__attribute__((fallthrough));' to > >silence this warning > >> case 1: ; > >> ^ > >> __attribute__((fallthrough)); > >> include/linux/signal.h:233:2: note: insert 'break;' to avoid fall-through > >> case 1: ; > >> ^ > >> break; > >> include/linux/signal.h:245:2: warning: unannotated fall-through between > >switch labels [-Wimplicit-fallthrough] > >> case 1: ; > >> ^ > >> include/linux/signal.h:245:2: note: insert '__attribute__((fallthrough));' to > >silence this warning > >> case 1: ; > >> ^ > >> __attribute__((fallthrough)); > >> include/linux/signal.h:245:2: note: insert 'break;' to avoid fall-through > >> case 1: ; > >> ^ > >> break; > >> In file included from kernel/printk/printk.c:61: > >> kernel/printk/internal.h:54:20: warning: no previous prototype for function > >'vprintk_func' [-Wmissing-prototypes] > >> __printf(1, 0) int vprintk_func(const char *fmt, va_list args) { return 0; } > >> ^ > >> kernel/printk/internal.h:54:16: note: declare 'static' if the function is not > >intended to be used outside of this translation unit > >> __printf(1, 0) int vprintk_func(const char *fmt, va_list args) { return 0; } > >> ^ > >> static > >>>> kernel/printk/printk.c:165:5: warning: no previous prototype for > >>>> function 'devkmsg_sysctl_set_loglvl' [-Wmissing-prototypes] > >> int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, > >> ^ > >> kernel/printk/printk.c:165:1: note: declare 'static' if the function is not > >intended to be used outside of this translation unit > >> int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, > >> ^ > >> static > >> kernel/printk/printk.c:2406:10: warning: 'sprintf' will always overflow; > >destination buffer has size 0, but format string expands to at least 33 [-Wfortify- > >source] > >> len = sprintf(text, > >> ^ > >> 18 warnings generated. > >> > >>--- > >>0-DAY CI Kernel Test Service, Intel Corporation > >>https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org > > > > > > > >-- > >Wei Yang > >Help you, Help me > > -- > You received this message because you are subscribed to the Google Groups "Clang Built Linux" group. > To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/MN2PR11MB4064B0104312A3D22F1698F3E5670%40MN2PR11MB4064.namprd11.prod.outlook.com.
On Wed, Jul 08, 2020 at 11:20:26AM -0700, Nick Desaulniers wrote: > On Wed, Jul 8, 2020 at 12:23 AM Xia, Hui <hui.xia@intel.com> wrote: > > > > > > > > >-----Original Message----- > > >From: Wei Yang <richard.weiyang@linux.alibaba.com> > > >Sent: 2020年7月1日 19:58 > > >To: lkp <lkp@intel.com> > > >Cc: Wei Yang <richard.weiyang@linux.alibaba.com>; Williams, Dan J > > ><dan.j.williams@intel.com>; akpm@linux-foundation.org; kbuild-all@lists.01.org; > > >clang-built-linux@googlegroups.com; linux-mm@kvack.org; linux- > > >kernel@vger.kernel.org > > >Subject: Re: [PATCH] mm/sparse: only sub-section aligned range would be > > >populated > > > > > >On Wed, Jul 01, 2020 at 02:11:10AM +0800, kernel test robot wrote: > > >>Hi Wei, > > >> > > >>Thank you for the patch! Perhaps something to improve: > > >> > > >>[auto build test WARNING on mmotm/master] > > >> > > >>url: https://github.com/0day-ci/linux/commits/Wei-Yang/mm-sparse-only- > > >sub-section-aligned-range-would-be-populated/20200630-101713 > > >>base: git://git.cmpxchg.org/linux-mmotm.git master > > >>config: x86_64-allnoconfig (attached as .config) > > Another issue was that this was an allnoconfig x86_64 build with > Clang. While ARCH=x86_64 defconfigs set: > CONFIG_64BIT=y > CONFIG_X86_64=y > > allnoconfig turns those off, making it a 32b x86 build. We cannot yet > build an ARCH=i386 build yet with Clang, so that means this target is > not green to begin with. > > + Arnd > There might be a way for us to disable maybe CONFIG_X86_32 when > building with Clang? or make it so that randconfig can't dig this up? > > +Philip > I'm not sure if it's easy to disable `allnoconfig` x86 builds with yes, this is easy, we will disable the build w/ clang in this situation. > Clang? Also, I feel like we're asking for a bunch of special cases > while we work through all the issues. We would like to revert these > special cases once we're in better shape. Are you tracking a list of > exceptions, so that we can estimate the work to fix on our side, and > that we know to re-enable test coverage once fixed? It is not that formally tracked, though it is controlled in the code to know what is currently disabled. Currently we may not know when it can be opened, thus we check the ClangBuiltLinux sometimes to see progress of interested issues. > > > >>compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project > > >>cf1d04484344be52ada8178e41d18fd15a9b880c) > > >>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 x86_64 cross compiling tool for clang build > > >> # apt-get install binutils-x86-64-linux-gnu > > >> # save the attached .config to linux build tree > > >> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross > > >>ARCH=x86_64 > > >> > > >>If you fix the issue, kindly add following tag as appropriate > > >>Reported-by: kernel test robot <lkp@intel.com> > > >> > > > > > >Sorry, I don't follow up with this error report. > > > > > >It looks like a build error, while I just removes some check and the build pass from > > >my side. Confused with this error report. > > It is false positive. Please ignore. Sorry for inconvenience. > > The report complains about " warning: no previous prototype for function 'devkmsg_sysctl_set_loglvl'" which is not caused by commit in this report. We will investigate and fix in 0-day side. > > > > > > > >>All warnings (new ones prefixed by >>): > > >> > > >> include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' > > >> case 1: ^ > > >> include/linux/signal.h:177:1: warning: unannotated fall-through between > > >switch labels > > >> _SIG_SET_OP(signotset, _sig_not) > > >> ^ > > >> include/linux/signal.h:167:2: note: expanded from macro '_SIG_SET_OP' > > >> case 2: = ^ > > >> include/linux/signal.h:177:1: warning: unannotated fall-through between > > >switch labels > > >> include/linux/signal.h:169:2: note: expanded from macro '_SIG_SET_OP' > > >> case 1: = ^ > > >> include/linux/signal.h:190:2: warning: unannotated fall-through between > > >switch labels > > >> case 1: = 0; > > >> ^ > > >> include/linux/jhash.h:95:2: note: insert '__attribute__((fallthrough));' to silence > > >this warning > > >> case 6: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > > >> ^ > > >> __attribute__((fallthrough)); > > >> include/linux/jhash.h:95:2: note: insert 'break;' to avoid fall-through > > >> case 6: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > > >> ^ > > >> break; > > >> include/linux/jhash.h:96:2: warning: unannotated fall-through between switch > > >labels > > >> case 5: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > > >> ^ > > >> 15include/linux/signal.h:190:2: note: insert '__attribute__((fallthrough));' to > > >silence this warning > > >> case 1: = 0; > > >> ^ > > >> __attribute__((fallthrough)); > > >> include/linux/signal.h:190:2: note: insert 'break;' to avoid fall-through > > >> case 1: = 0; > > >> ^ > > >> break; > > >> include/linux/signal.h:203:2: warninginclude/linux/jhash.h:96:2: note: insert > > >'__attribute__((fallthrough));' to silence this warning > > >> case 5: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > > >> ^ > > >> __attribute__((fallthrough)); > > >> include/linux/jhash.h:96:2: note: insert 'break;' to avoid fall-through > > >> case 5: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > > >> ^ > > >> break; > > >> include/linux/jhash.h:97:2: warning: unannotated fall-through between switch > > >labels > > >> case 4: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > > >> ^ > > >> : unannotated fall-through between switch labels > > >> case 1: = -1; > > >> ^ > > >> warnings generated. > > >> include/linux/signal.h:203:2: note: insert '__attribute__((fallthrough));' to > > >silence this warning > > >> case 1: = -1; > > >> ^ > > >> __attribute__((fallthrough)); > > >> include/linux/signal.h:15203:2: note: insert 'break;' to avoid fall-through > > >> case 1: = -1; > > >> ^ > > >> break; > > >> include/linux/jhash.h:97:2: note: insert '__attribute__((fallthrough));' to silence > > >this warning > > >> case 4: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > > >> ^ > > >> __attribute__((fallthrough)); > > >> include/linux/jhash.h:97:2: note: insert 'break;' to avoid fall-through > > >> case 4: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > > >> ^ > > >> break; > > >> include/linux/jhash.h:98:2: warning: unannotated fall-through between switch > > >labels > > >> case 3: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > > >> ^ > > >> include/linux/signal.h:233:2: warning: unannotated fall-through between > > >switch labels > > >> case 1: ; > > >> ^ > > >> warnings generated. > > >> In file included from kernel/printk/printk.c:61: > > >> kernel/printk/internal.h:54:20: warninginclude/linux/jhash.h:98:2: note: insert > > >'__attribute__((fallthrough));' to silence this warning > > >> case 3: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > > >> ^ > > >> __attribute__((fallthrough)); > > >> include/linux/jhash.h:98:2: note: no previous prototype for function > > >'vprintk_func' > > >> __printf(1, 0) int vprintk_func(const char va_list args) { return 0; } > > >> ^ > > >> kernel/printk/internal.h: insert 'break;' to avoid fall-through > > >> case 3: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > > >> ^ > > >> break; > > >> include/linux/jhash.h:99:2: warning: unannotated fall-through between switch > > >labels > > >> case 2: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > > >> ^ > > >> :54:16: note: declare 'static' if the function is not intended to be used outside > > >of this translation unit > > >> __printf(1, 0) int vprintk_func(const char va_list args) { return 0; } > > >> ^ > > >> static > > >> kernel/printk/printk.cinclude/linux/signal.h:233:2: note: insert > > >'__attribute__((fallthrough));' to silence this warning > > >> case 1: ; > > >> ^ > > >> __attribute__((fallthrough)); > > >> include/linux/signal.h:233:2: note: insert 'break;' to avoid fall-through > > >> case 1: ; > > >> ^ > > >> break; > > >> include/linux/signal.h:245:2: warning: unannotated fall-through between > > >switch labels > > >> case 1: ; > > >> ^ > > >>>> :165:5: warning: no previous prototype for function > > >'devkmsg_sysctl_set_loglvl' > > >> int devkmsg_sysctl_set_loglvl(struct ctl_table int write, > > >> ^ > > >> kernel/printk/printk.c:165:1: note: declare 'static' if the function is not > > >intended to be used outside of this translation unit > > >> int devkmsg_sysctl_set_loglvl(struct ctl_table int write, > > >> ^ > > >> static > > >> include/linux/jhash.h:99:2: note: insert '__attribute__((fallthrough));' to silence > > >this warning > > >> case 2: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > > >> ^ > > >> __attribute__((fallthrough)); > > >> include/linux/jhash.h:99:2: note: insert 'break;' to avoid fall-through > > >> case 2: a += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > > >> ^ > > >> break; > > >> include/linux/jhash.h:100:2: warning: unannotated fall-through between > > >switch labels > > >> case 1: a += > > >> ^ > > >> include/linux/signal.h:245:2: note: insert '__attribute__((fallthrough));' to > > >silence this warning > > >> case 1: ; > > >> ^ > > >> __attribute__((fallthrough)); > > >> include/linux/signal.h:245:2: note: insert 'break;' to avoid fall-through > > >> case 1: ; > > >> ^ > > >> break; > > >> kernel/printk/printk.cinclude/linux/jhash.h:100:2: note: insert > > >'__attribute__((fallthrough));' to silence this warning > > >> case 1: a += > > >> ^ > > >> __attribute__((fallthrough)); > > >> include/linux/jhash.h:100:2: note: insert 'break;' to avoid fall-through > > >> case 1: a += > > >> ^ > > >> break; > > >> include/linux/jhash.h:102:2: warning: unannotated fall-through between > > >switch labels > > >> case 0: /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > > >/var Nothing left to add arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ > > >kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > > >> ^ > > >> include/linux/jhash.h:102:2: note: insert 'break;' to avoid fall-through > > >> case 0: /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > > >/var Nothing left to add arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ > > >kernel/ lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > > >> ^ > > >> break; > > >> :2406:10: warning: 'sprintf' will always overflow; destination buffer has size 0, > > >but format string expands to at least 33 > > >> len = sprintf(text, > > >> ^ > > >> include/linux/jhash.h:136:2: warning: unannotated fall-through between > > >switch labels > > >> case 2: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > > >> ^ > > >> include/linux/jhash.h:136:2: note: insert '__attribute__((fallthrough));' to > > >silence this warning > > >> case 2: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > > >> ^ > > >> __attribute__((fallthrough)); > > >> include/linux/jhash.h:136:2: note: insert 'break;' to avoid fall-through > > >> case 2: b += /Dockerfile /Gemfile /Gemfile.lock /bin /boot /c /cephfs /dev /etc > > >/home /htmldocs /include /kbuild /lib /lib32 /lib64 /libx32 /lkp-cloud /lkp-src > > >/media /mnt /opt /patch /pkg /proc /root /run /sbin /share /srv /sys /tmp /usr > > >/var fall through arch/ block/ certs/ crypto/ drivers/ fs/ include/ init/ ipc/ kernel/ > > >lib/ mm/ net/ scripts/ security/ sound/ source/ tools/ usr/ virt/ > > >> ^ > > >> break; > > >> include/linux/jhash.h:137:2: warning: unannotated fall-through between > > >switch labels > > >> case 1: a += > > >> ^ > > >> In file included from kernel/capability.c:13: > > >> In file included from include/linux/audit.h:13: > > >> In file included from include/linux/ptrace.h:7: > > >> In file included from include/linux/sched/signal.h:6: > > >> include/linux/signal.h:147:1: warning: unannotated fall-through between > > >switch labels > > >> _SIG_SET_BINOP(sigorsets, _sig_or) > > >> ^ > > >> include/linux/signal.h:133:2: note: expanded from macro '_SIG_SET_BINOP' > > >> case 2: ^ > > >> include/linux/signal.h:147:1: warning: unannotated fall-through between > > >switch labels > > >> include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' > > >> case 1: ^ > > >> include/linux/signal.h:150:1: warning: unannotated fall-through between > > >switch labels > > >> _SIG_SET_BINOP(sigandsets, _sig_and) > > >> ^ > > >> include/linux/signal.h:133:2:In file included from note: expanded from macro > > >'_SIG_SET_BINOP' > > >> case 2: ^ > > >> include/linux/signal.h:150:1: warning: unannotated fall-through between > > >switch labels > > >> include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' > > >> case 1: ^ > > >> include/linux/signal.h:153:1: warning: unannotated fall-through between > > >switch labels > > >> _SIG_SET_BINOP(sigandnsets, _sig_andn) > > >> ^ > > >> include/linux/signal.h:133:2: note: expanded from macro '_SIG_SET_BINOP' > > >> case 2: kernel/sysctl_binary.c:15: > > >> In file included from include/linux/netdevice.h:37: > > >> In file included from include/linux/ethtool.h:18: > > >> In file included from include/uapi/linux/ethtool.h:19: > > >> In file included from include/linux/if_ether.h:19: > > >> include/linux/skbuff.h:3690:2: warning: unannotated fall-through between > > >switch labels > > >> case 24: diffs |= __it_diff(a, b, 64); > > >> ^ > > >>-- > > >> ^ > > >> __attribute__((fallthrough)); > > >> include/linux/mm.h:166:2: note: insert 'break;' to avoid fall-through > > >> case 56: > > >> ^ > > >> break; > > >> In file included from kernel/printk/printk.c:36: > > >> In file included from include/linux/syscalls.h:76: > > >> include/linux/signal.h:147:1: warning: unannotated fall-through between > > >switch labels [-Wimplicit-fallthrough] > > >> _SIG_SET_BINOP(sigorsets, _sig_or) > > >> ^ > > >> include/linux/signal.h:133:2: note: expanded from macro '_SIG_SET_BINOP' > > >> case 2: \ > > >> ^ > > >> include/linux/signal.h:147:1: warning: unannotated fall-through between > > >switch labels [-Wimplicit-fallthrough] > > >> include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' > > >> case 1: \ > > >> ^ > > >> include/linux/signal.h:150:1: warning: unannotated fall-through between > > >switch labels [-Wimplicit-fallthrough] > > >> _SIG_SET_BINOP(sigandsets, _sig_and) > > >> ^ > > >> include/linux/signal.h:133:2: note: expanded from macro '_SIG_SET_BINOP' > > >> case 2: \ > > >> ^ > > >> include/linux/signal.h:150:1: warning: unannotated fall-through between > > >switch labels [-Wimplicit-fallthrough] > > >> include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' > > >> case 1: \ > > >> ^ > > >> include/linux/signal.h:153:1: warning: unannotated fall-through between > > >switch labels [-Wimplicit-fallthrough] > > >> _SIG_SET_BINOP(sigandnsets, _sig_andn) > > >> ^ > > >> include/linux/signal.h:133:2: note: expanded from macro '_SIG_SET_BINOP' > > >> case 2: \ > > >> ^ > > >> include/linux/signal.h:153:1: warning: unannotated fall-through between > > >switch labels [-Wimplicit-fallthrough] > > >> include/linux/signal.h:137:2: note: expanded from macro '_SIG_SET_BINOP' > > >> case 1: \ > > >> ^ > > >> include/linux/signal.h:177:1: warning: unannotated fall-through between > > >switch labels [-Wimplicit-fallthrough] > > >> _SIG_SET_OP(signotset, _sig_not) > > >> ^ > > >> include/linux/signal.h:167:2: note: expanded from macro '_SIG_SET_OP' > > >> case 2: set->sig[1] = op(set->sig[1]); \ > > >> ^ > > >> include/linux/signal.h:177:1: warning: unannotated fall-through between > > >switch labels [-Wimplicit-fallthrough] > > >> include/linux/signal.h:169:2: note: expanded from macro '_SIG_SET_OP' > > >> case 1: set->sig[0] = op(set->sig[0]); \ > > >> ^ > > >> include/linux/signal.h:190:2: warning: unannotated fall-through between > > >switch labels [-Wimplicit-fallthrough] > > >> case 1: set->sig[0] = 0; > > >> ^ > > >> include/linux/signal.h:190:2: note: insert '__attribute__((fallthrough));' to > > >silence this warning > > >> case 1: set->sig[0] = 0; > > >> ^ > > >> __attribute__((fallthrough)); > > >> include/linux/signal.h:190:2: note: insert 'break;' to avoid fall-through > > >> case 1: set->sig[0] = 0; > > >> ^ > > >> break; > > >> include/linux/signal.h:203:2: warning: unannotated fall-through between > > >switch labels [-Wimplicit-fallthrough] > > >> case 1: set->sig[0] = -1; > > >> ^ > > >> include/linux/signal.h:203:2: note: insert '__attribute__((fallthrough));' to > > >silence this warning > > >> case 1: set->sig[0] = -1; > > >> ^ > > >> __attribute__((fallthrough)); > > >> include/linux/signal.h:203:2: note: insert 'break;' to avoid fall-through > > >> case 1: set->sig[0] = -1; > > >> ^ > > >> break; > > >> include/linux/signal.h:233:2: warning: unannotated fall-through between > > >switch labels [-Wimplicit-fallthrough] > > >> case 1: ; > > >> ^ > > >> include/linux/signal.h:233:2: note: insert '__attribute__((fallthrough));' to > > >silence this warning > > >> case 1: ; > > >> ^ > > >> __attribute__((fallthrough)); > > >> include/linux/signal.h:233:2: note: insert 'break;' to avoid fall-through > > >> case 1: ; > > >> ^ > > >> break; > > >> include/linux/signal.h:245:2: warning: unannotated fall-through between > > >switch labels [-Wimplicit-fallthrough] > > >> case 1: ; > > >> ^ > > >> include/linux/signal.h:245:2: note: insert '__attribute__((fallthrough));' to > > >silence this warning > > >> case 1: ; > > >> ^ > > >> __attribute__((fallthrough)); > > >> include/linux/signal.h:245:2: note: insert 'break;' to avoid fall-through > > >> case 1: ; > > >> ^ > > >> break; > > >> In file included from kernel/printk/printk.c:61: > > >> kernel/printk/internal.h:54:20: warning: no previous prototype for function > > >'vprintk_func' [-Wmissing-prototypes] > > >> __printf(1, 0) int vprintk_func(const char *fmt, va_list args) { return 0; } > > >> ^ > > >> kernel/printk/internal.h:54:16: note: declare 'static' if the function is not > > >intended to be used outside of this translation unit > > >> __printf(1, 0) int vprintk_func(const char *fmt, va_list args) { return 0; } > > >> ^ > > >> static > > >>>> kernel/printk/printk.c:165:5: warning: no previous prototype for > > >>>> function 'devkmsg_sysctl_set_loglvl' [-Wmissing-prototypes] > > >> int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, > > >> ^ > > >> kernel/printk/printk.c:165:1: note: declare 'static' if the function is not > > >intended to be used outside of this translation unit > > >> int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, > > >> ^ > > >> static > > >> kernel/printk/printk.c:2406:10: warning: 'sprintf' will always overflow; > > >destination buffer has size 0, but format string expands to at least 33 [-Wfortify- > > >source] > > >> len = sprintf(text, > > >> ^ > > >> 18 warnings generated. > > >> > > >>--- > > >>0-DAY CI Kernel Test Service, Intel Corporation > > >>https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org > > > > > > > > > > > >-- > > >Wei Yang > > >Help you, Help me > > > > -- > > You received this message because you are subscribed to the Google Groups "Clang Built Linux" group. > > To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com. > > To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/MN2PR11MB4064B0104312A3D22F1698F3E5670%40MN2PR11MB4064.namprd11.prod.outlook.com. > > > > -- > Thanks, > ~Nick Desaulniers
diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c index 0db7738d76e9..24b01ebae111 100644 --- a/mm/sparse-vmemmap.c +++ b/mm/sparse-vmemmap.c @@ -247,20 +247,8 @@ int __meminit vmemmap_populate_basepages(unsigned long start, struct page * __meminit __populate_section_memmap(unsigned long pfn, unsigned long nr_pages, int nid, struct vmem_altmap *altmap) { - unsigned long start; - unsigned long end; - - /* - * The minimum granularity of memmap extensions is - * PAGES_PER_SUBSECTION as allocations are tracked in the - * 'subsection_map' bitmap of the section. - */ - end = ALIGN(pfn + nr_pages, PAGES_PER_SUBSECTION); - pfn &= PAGE_SUBSECTION_MASK; - nr_pages = end - pfn; - - start = (unsigned long) pfn_to_page(pfn); - end = start + nr_pages * sizeof(struct page); + unsigned long start = (unsigned long) pfn_to_page(pfn); + unsigned long end = start + nr_pages * sizeof(struct page); if (vmemmap_populate(start, end, nid, altmap)) return NULL;
There are two code path which invoke __populate_section_memmap() * sparse_init_nid() * sparse_add_section() For both case, we are sure the memory range is sub-section aligned. * we pass PAGES_PER_SECTION to sparse_init_nid() * we check range by check_pfn_span() before calling sparse_add_section() Also, the counterpart of __populate_section_memmap(), we don't do such calculation and check since the range is checked by check_pfn_span() in __remove_pages(). Clear the calculation and check to keep it simple and comply with its counterpart. Signed-off-by: Wei Yang <richard.weiyang@linux.alibaba.com> --- mm/sparse-vmemmap.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-)