* mm/kasan/report_tags.c:63 kasan_complete_mode_report_info() error: we previously assumed 'info->cache' could be null (see line 37)
@ 2024-09-27 17:19 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2024-09-27 17:19 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Andrey Konovalov <andreyknvl@google.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
CC: Alexander Potapenko <glider@google.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 075dbe9f6e3c21596c5245826a4ee1f1c1676eb8
commit: 7d88e4f768b0fdb85b68f0e4679bb10fdb05c808 kasan: check object_size in kasan_complete_mode_report_info
date: 10 months ago
:::::: branch date: 22 hours ago
:::::: commit date: 10 months ago
config: arm64-randconfig-r071-20240923 (https://download.01.org/0day-ci/archive/20240928/202409280119.7gzM9E4h-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 8663a75fa2f31299ab8d1d90288d9df92aadee88)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202409280119.7gzM9E4h-lkp@intel.com/
smatch warnings:
mm/kasan/report_tags.c:63 kasan_complete_mode_report_info() error: we previously assumed 'info->cache' could be null (see line 37)
vim +63 mm/kasan/report_tags.c
b89933e9a54d3e Andrey Konovalov 2022-09-05 29
59e6e098d1c156 Andrey Konovalov 2022-09-05 30 void kasan_complete_mode_report_info(struct kasan_report_info *info)
b89933e9a54d3e Andrey Konovalov 2022-09-05 31 {
7bc0584e5d2a68 Andrey Konovalov 2022-09-05 32 unsigned long flags;
7bc0584e5d2a68 Andrey Konovalov 2022-09-05 33 u64 pos;
7bc0584e5d2a68 Andrey Konovalov 2022-09-05 34 struct kasan_stack_ring_entry *entry;
7bc0584e5d2a68 Andrey Konovalov 2022-09-05 35 bool alloc_found = false, free_found = false;
7bc0584e5d2a68 Andrey Konovalov 2022-09-05 36
dcc579663f6073 Andrey Konovalov 2022-09-11 @37 if ((!info->cache || !info->object) && !info->bug_type) {
1f538e1f2d294c Andrey Konovalov 2022-09-05 38 info->bug_type = get_common_bug_type(info);
7bc0584e5d2a68 Andrey Konovalov 2022-09-05 39 return;
7bc0584e5d2a68 Andrey Konovalov 2022-09-05 40 }
7bc0584e5d2a68 Andrey Konovalov 2022-09-05 41
7bc0584e5d2a68 Andrey Konovalov 2022-09-05 42 write_lock_irqsave(&stack_ring.lock, flags);
7bc0584e5d2a68 Andrey Konovalov 2022-09-05 43
7bc0584e5d2a68 Andrey Konovalov 2022-09-05 44 pos = atomic64_read(&stack_ring.pos);
7bc0584e5d2a68 Andrey Konovalov 2022-09-05 45
7bc0584e5d2a68 Andrey Konovalov 2022-09-05 46 /*
7bc0584e5d2a68 Andrey Konovalov 2022-09-05 47 * The loop below tries to find stack ring entries relevant to the
7bc0584e5d2a68 Andrey Konovalov 2022-09-05 48 * buggy object. This is a best-effort process.
7bc0584e5d2a68 Andrey Konovalov 2022-09-05 49 *
7bc0584e5d2a68 Andrey Konovalov 2022-09-05 50 * First, another object with the same tag can be allocated in place of
7bc0584e5d2a68 Andrey Konovalov 2022-09-05 51 * the buggy object. Also, since the number of entries is limited, the
7bc0584e5d2a68 Andrey Konovalov 2022-09-05 52 * entries relevant to the buggy object can be overwritten.
7bc0584e5d2a68 Andrey Konovalov 2022-09-05 53 */
7bc0584e5d2a68 Andrey Konovalov 2022-09-05 54
80b92bfe3bb75a Andrey Konovalov 2022-09-05 55 for (u64 i = pos - 1; i != pos - 1 - stack_ring.size; i--) {
7bc0584e5d2a68 Andrey Konovalov 2022-09-05 56 if (alloc_found && free_found)
7bc0584e5d2a68 Andrey Konovalov 2022-09-05 57 break;
7bc0584e5d2a68 Andrey Konovalov 2022-09-05 58
80b92bfe3bb75a Andrey Konovalov 2022-09-05 59 entry = &stack_ring.entries[i % stack_ring.size];
7bc0584e5d2a68 Andrey Konovalov 2022-09-05 60
f3b59798629940 Andrey Konovalov 2023-11-20 61 if (kasan_reset_tag(entry->ptr) != info->object ||
7d88e4f768b0fd Andrey Konovalov 2023-11-20 62 get_tag(entry->ptr) != get_tag(info->access_addr) ||
7d88e4f768b0fd Andrey Konovalov 2023-11-20 @63 info->cache->object_size != entry->size)
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* mm/kasan/report_tags.c:63 kasan_complete_mode_report_info() error: we previously assumed 'info->cache' could be null (see line 37)
@ 2024-12-12 0:43 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2024-12-12 0:43 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Andrey Konovalov <andreyknvl@google.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
CC: Alexander Potapenko <glider@google.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f92f4749861b06fed908d336b4dee1326003291b
commit: 7d88e4f768b0fdb85b68f0e4679bb10fdb05c808 kasan: check object_size in kasan_complete_mode_report_info
date: 1 year ago
:::::: branch date: 22 hours ago
:::::: commit date: 1 year ago
config: arm64-randconfig-r072-20241210 (https://download.01.org/0day-ci/archive/20241212/202412120809.Tiq6Vag9-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202412120809.Tiq6Vag9-lkp@intel.com/
smatch warnings:
mm/kasan/report_tags.c:63 kasan_complete_mode_report_info() error: we previously assumed 'info->cache' could be null (see line 37)
vim +63 mm/kasan/report_tags.c
b89933e9a54d3e7 Andrey Konovalov 2022-09-05 29
59e6e098d1c156f Andrey Konovalov 2022-09-05 30 void kasan_complete_mode_report_info(struct kasan_report_info *info)
b89933e9a54d3e7 Andrey Konovalov 2022-09-05 31 {
7bc0584e5d2a687 Andrey Konovalov 2022-09-05 32 unsigned long flags;
7bc0584e5d2a687 Andrey Konovalov 2022-09-05 33 u64 pos;
7bc0584e5d2a687 Andrey Konovalov 2022-09-05 34 struct kasan_stack_ring_entry *entry;
7bc0584e5d2a687 Andrey Konovalov 2022-09-05 35 bool alloc_found = false, free_found = false;
7bc0584e5d2a687 Andrey Konovalov 2022-09-05 36
dcc579663f60739 Andrey Konovalov 2022-09-11 @37 if ((!info->cache || !info->object) && !info->bug_type) {
1f538e1f2d294cf Andrey Konovalov 2022-09-05 38 info->bug_type = get_common_bug_type(info);
7bc0584e5d2a687 Andrey Konovalov 2022-09-05 39 return;
7bc0584e5d2a687 Andrey Konovalov 2022-09-05 40 }
7bc0584e5d2a687 Andrey Konovalov 2022-09-05 41
7bc0584e5d2a687 Andrey Konovalov 2022-09-05 42 write_lock_irqsave(&stack_ring.lock, flags);
7bc0584e5d2a687 Andrey Konovalov 2022-09-05 43
7bc0584e5d2a687 Andrey Konovalov 2022-09-05 44 pos = atomic64_read(&stack_ring.pos);
7bc0584e5d2a687 Andrey Konovalov 2022-09-05 45
7bc0584e5d2a687 Andrey Konovalov 2022-09-05 46 /*
7bc0584e5d2a687 Andrey Konovalov 2022-09-05 47 * The loop below tries to find stack ring entries relevant to the
7bc0584e5d2a687 Andrey Konovalov 2022-09-05 48 * buggy object. This is a best-effort process.
7bc0584e5d2a687 Andrey Konovalov 2022-09-05 49 *
7bc0584e5d2a687 Andrey Konovalov 2022-09-05 50 * First, another object with the same tag can be allocated in place of
7bc0584e5d2a687 Andrey Konovalov 2022-09-05 51 * the buggy object. Also, since the number of entries is limited, the
7bc0584e5d2a687 Andrey Konovalov 2022-09-05 52 * entries relevant to the buggy object can be overwritten.
7bc0584e5d2a687 Andrey Konovalov 2022-09-05 53 */
7bc0584e5d2a687 Andrey Konovalov 2022-09-05 54
80b92bfe3bb75aa Andrey Konovalov 2022-09-05 55 for (u64 i = pos - 1; i != pos - 1 - stack_ring.size; i--) {
7bc0584e5d2a687 Andrey Konovalov 2022-09-05 56 if (alloc_found && free_found)
7bc0584e5d2a687 Andrey Konovalov 2022-09-05 57 break;
7bc0584e5d2a687 Andrey Konovalov 2022-09-05 58
80b92bfe3bb75aa Andrey Konovalov 2022-09-05 59 entry = &stack_ring.entries[i % stack_ring.size];
7bc0584e5d2a687 Andrey Konovalov 2022-09-05 60
f3b597986299408 Andrey Konovalov 2023-11-20 61 if (kasan_reset_tag(entry->ptr) != info->object ||
7d88e4f768b0fdb Andrey Konovalov 2023-11-20 62 get_tag(entry->ptr) != get_tag(info->access_addr) ||
7d88e4f768b0fdb Andrey Konovalov 2023-11-20 @63 info->cache->object_size != entry->size)
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-12-12 0:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-12 0:43 mm/kasan/report_tags.c:63 kasan_complete_mode_report_info() error: we previously assumed 'info->cache' could be null (see line 37) kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2024-09-27 17:19 kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.