From: kernel test robot <lkp@intel.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>,
Russell King <rmk+kernel@armlinux.org.uk>,
Ard Biesheuvel <ardb@kernel.org>,
Abbott Liu <liuwenliang@huawei.com>,
Florian Fainelli <f.fainelli@gmail.com>
Subject: [linux-next:master 1570/2472] mm/kasan/init.c:318:9: warning: variable 'pud' set but not used
Date: Mon, 2 Nov 2020 07:31:55 +0800 [thread overview]
Message-ID: <202011020749.5XQ3Hfzc-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 7786 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 4e78c578cb987725eef1cec7d11b6437109e9a49
commit: 421015713b306e47af95d4d61cdfbd96d462e4cb [1570/2472] ARM: 9017/2: Enable KASan for ARM
config: arm-randconfig-r025-20201030 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=421015713b306e47af95d4d61cdfbd96d462e4cb
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 421015713b306e47af95d4d61cdfbd96d462e4cb
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
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 >>):
mm/kasan/init.c: In function 'kasan_free_pud':
>> mm/kasan/init.c:318:9: warning: variable 'pud' set but not used [-Wunused-but-set-variable]
318 | pud_t *pud;
| ^~~
--
In file included from include/trace/define_trace.h:103,
from include/trace/events/rcu.h:785,
from kernel/rcu/rcu.h:13,
from kernel/rcu/update.c:49:
include/trace/events/rcu.h: In function 'perf_trace_rcu_torture_read':
>> include/trace/events/rcu.h:724:3: warning: 'strncpy' specified bound 8 equals destination size [-Wstringop-truncation]
724 | strncpy(__entry->rcutorturename, rcutorturename,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
725 | RCUTORTURENAME_LEN);
| ~~~~~~~~~~~~~~~~~~~
include/trace/perf.h:66:4: note: in definition of macro 'DECLARE_EVENT_CLASS'
66 | { assign; } \
| ^~~~~~
include/trace/trace_events.h:79:9: note: in expansion of macro 'PARAMS'
79 | PARAMS(assign), \
| ^~~~~~
include/trace/events/rcu.h:11:25: note: in expansion of macro 'TRACE_EVENT'
11 | #define TRACE_EVENT_RCU TRACE_EVENT
| ^~~~~~~~~~~
include/trace/events/rcu.h:723:2: note: in expansion of macro 'TP_fast_assign'
723 | TP_fast_assign(
| ^~~~~~~~~~~~~~
In file included from include/trace/define_trace.h:102,
from include/trace/events/rcu.h:785,
from kernel/rcu/rcu.h:13,
from kernel/rcu/update.c:49:
include/trace/events/rcu.h: In function 'trace_event_raw_event_rcu_torture_read':
>> include/trace/events/rcu.h:724:3: warning: 'strncpy' specified bound 8 equals destination size [-Wstringop-truncation]
724 | strncpy(__entry->rcutorturename, rcutorturename,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
725 | RCUTORTURENAME_LEN);
| ~~~~~~~~~~~~~~~~~~~
include/trace/trace_events.h:695:4: note: in definition of macro 'DECLARE_EVENT_CLASS'
695 | { assign; } \
| ^~~~~~
include/trace/trace_events.h:79:9: note: in expansion of macro 'PARAMS'
79 | PARAMS(assign), \
| ^~~~~~
include/trace/events/rcu.h:11:25: note: in expansion of macro 'TRACE_EVENT'
11 | #define TRACE_EVENT_RCU TRACE_EVENT
| ^~~~~~~~~~~
include/trace/events/rcu.h:723:2: note: in expansion of macro 'TP_fast_assign'
723 | TP_fast_assign(
| ^~~~~~~~~~~~~~
--
In file included from include/trace/define_trace.h:103,
from include/trace/events/fscache.h:533,
from fs/fscache/internal.h:28,
from fs/fscache/main.c:16:
include/trace/events/fscache.h: In function 'perf_trace_fscache_netfs':
>> include/trace/events/fscache.h:208:7: warning: 'strncpy' specified bound 8 equals destination size [-Wstringop-truncation]
208 | strncpy(__entry->name, netfs->name, 8);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/trace/perf.h:66:4: note: in definition of macro 'DECLARE_EVENT_CLASS'
66 | { assign; } \
| ^~~~~~
include/trace/trace_events.h:79:9: note: in expansion of macro 'PARAMS'
79 | PARAMS(assign), \
| ^~~~~~
include/trace/events/fscache.h:196:1: note: in expansion of macro 'TRACE_EVENT'
196 | TRACE_EVENT(fscache_netfs,
| ^~~~~~~~~~~
include/trace/events/fscache.h:206:6: note: in expansion of macro 'TP_fast_assign'
206 | TP_fast_assign(
| ^~~~~~~~~~~~~~
In file included from include/trace/define_trace.h:102,
from include/trace/events/fscache.h:533,
from fs/fscache/internal.h:28,
from fs/fscache/main.c:16:
include/trace/events/fscache.h: In function 'trace_event_raw_event_fscache_netfs':
>> include/trace/events/fscache.h:208:7: warning: 'strncpy' specified bound 8 equals destination size [-Wstringop-truncation]
208 | strncpy(__entry->name, netfs->name, 8);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/trace/trace_events.h:695:4: note: in definition of macro 'DECLARE_EVENT_CLASS'
695 | { assign; } \
| ^~~~~~
include/trace/trace_events.h:79:9: note: in expansion of macro 'PARAMS'
79 | PARAMS(assign), \
| ^~~~~~
include/trace/events/fscache.h:196:1: note: in expansion of macro 'TRACE_EVENT'
196 | TRACE_EVENT(fscache_netfs,
| ^~~~~~~~~~~
include/trace/events/fscache.h:206:6: note: in expansion of macro 'TP_fast_assign'
206 | TP_fast_assign(
| ^~~~~~~~~~~~~~
vim +/pud +318 mm/kasan/init.c
0207df4fa1a8692 mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 315
0207df4fa1a8692 mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 316 static void kasan_free_pud(pud_t *pud_start, p4d_t *p4d)
0207df4fa1a8692 mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 317 {
0207df4fa1a8692 mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 @318 pud_t *pud;
0207df4fa1a8692 mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 319 int i;
0207df4fa1a8692 mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 320
0207df4fa1a8692 mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 321 for (i = 0; i < PTRS_PER_PUD; i++) {
0207df4fa1a8692 mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 322 pud = pud_start + i;
0207df4fa1a8692 mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 323 if (!pud_none(*pud))
0207df4fa1a8692 mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 324 return;
0207df4fa1a8692 mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 325 }
0207df4fa1a8692 mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 326
0207df4fa1a8692 mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 327 pud_free(&init_mm, (pud_t *)page_to_virt(p4d_page(*p4d)));
0207df4fa1a8692 mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 328 p4d_clear(p4d);
0207df4fa1a8692 mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 329 }
0207df4fa1a8692 mm/kasan/kasan_init.c Andrey Ryabinin 2018-08-17 330
:::::: The code at line 318 was first introduced by commit
:::::: 0207df4fa1a869281ddbf72db6203dbf036b3e1a kernel/memremap, kasan: make ZONE_DEVICE with work with KASAN
:::::: TO: Andrey Ryabinin <aryabinin@virtuozzo.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35198 bytes --]
next reply other threads:[~2020-11-01 23:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-01 23:31 kernel test robot [this message]
2020-11-03 0:17 ` Linus Walleij
2020-11-03 8:22 ` Ard Biesheuvel
2020-11-06 8:53 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202011020749.5XQ3Hfzc-lkp@intel.com \
--to=lkp@intel.com \
--cc=ardb@kernel.org \
--cc=f.fainelli@gmail.com \
--cc=kbuild-all@lists.01.org \
--cc=linus.walleij@linaro.org \
--cc=linux-mm@kvack.org \
--cc=liuwenliang@huawei.com \
--cc=rmk+kernel@armlinux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox