* [vbabka:slab-remove-slab-v1r0 7/14] mm/kasan/quarantine.c:145:23: warning: unused variable 'flags'
@ 2023-10-03 6:56 kernel test robot
2023-10-03 7:12 ` Vlastimil Babka
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2023-10-03 6:56 UTC (permalink / raw)
To: Vlastimil Babka; +Cc: oe-kbuild-all, linux-mm
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vbabka/linux.git slab-remove-slab-v1r0
head: 227c2d309e94ff014379c57ecadff7df03a1e349
commit: 175f421def9a7765457d1434f9df37303ff1ed9f [7/14] KASAN: remove code paths guarded by CONFIG_SLAB
config: x86_64-randconfig-006-20231003 (https://download.01.org/0day-ci/archive/20231003/202310031433.kyisgGOt-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231003/202310031433.kyisgGOt-lkp@intel.com/reproduce)
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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310031433.kyisgGOt-lkp@intel.com/
All warnings (new ones prefixed by >>):
mm/kasan/quarantine.c: In function 'qlink_free':
>> mm/kasan/quarantine.c:145:23: warning: unused variable 'flags' [-Wunused-variable]
145 | unsigned long flags;
| ^~~~~
vim +/flags +145 mm/kasan/quarantine.c
55834c59098d0c5 Alexander Potapenko 2016-05-20 140
55834c59098d0c5 Alexander Potapenko 2016-05-20 141 static void qlink_free(struct qlist_node *qlink, struct kmem_cache *cache)
55834c59098d0c5 Alexander Potapenko 2016-05-20 142 {
55834c59098d0c5 Alexander Potapenko 2016-05-20 143 void *object = qlink_to_object(qlink, cache);
26dca996ea7b1ac Andrey Konovalov 2022-01-14 144 struct kasan_free_meta *meta = kasan_get_free_meta(cache, object);
55834c59098d0c5 Alexander Potapenko 2016-05-20 @145 unsigned long flags;
55834c59098d0c5 Alexander Potapenko 2016-05-20 146
26dca996ea7b1ac Andrey Konovalov 2022-01-14 147 /*
26dca996ea7b1ac Andrey Konovalov 2022-01-14 148 * If init_on_free is enabled and KASAN's free metadata is stored in
26dca996ea7b1ac Andrey Konovalov 2022-01-14 149 * the object, zero the metadata. Otherwise, the object's memory will
26dca996ea7b1ac Andrey Konovalov 2022-01-14 150 * not be properly zeroed, as KASAN saves the metadata after the slab
26dca996ea7b1ac Andrey Konovalov 2022-01-14 151 * allocator zeroes the object.
26dca996ea7b1ac Andrey Konovalov 2022-01-14 152 */
26dca996ea7b1ac Andrey Konovalov 2022-01-14 153 if (slab_want_init_on_free(cache) &&
26dca996ea7b1ac Andrey Konovalov 2022-01-14 154 cache->kasan_info.free_meta_offset == 0)
26dca996ea7b1ac Andrey Konovalov 2022-01-14 155 memzero_explicit(meta, sizeof(*meta));
26dca996ea7b1ac Andrey Konovalov 2022-01-14 156
97593cad003c668 Andrey Konovalov 2020-12-22 157 /*
f0953a1bbaca71e Ingo Molnar 2021-05-06 158 * As the object now gets freed from the quarantine, assume that its
97593cad003c668 Andrey Konovalov 2020-12-22 159 * free track is no longer valid.
97593cad003c668 Andrey Konovalov 2020-12-22 160 */
06bc4cf6cdde690 Andrey Konovalov 2022-05-12 161 *(u8 *)kasan_mem_to_shadow(object) = KASAN_SLAB_FREE;
97593cad003c668 Andrey Konovalov 2020-12-22 162
55834c59098d0c5 Alexander Potapenko 2016-05-20 163 ___cache_free(cache, object, _THIS_IP_);
55834c59098d0c5 Alexander Potapenko 2016-05-20 164 }
55834c59098d0c5 Alexander Potapenko 2016-05-20 165
:::::: The code at line 145 was first introduced by commit
:::::: 55834c59098d0c5a97b0f3247e55832b67facdcf mm: kasan: initial memory quarantine implementation
:::::: TO: Alexander Potapenko <glider@google.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [vbabka:slab-remove-slab-v1r0 7/14] mm/kasan/quarantine.c:145:23: warning: unused variable 'flags'
2023-10-03 6:56 [vbabka:slab-remove-slab-v1r0 7/14] mm/kasan/quarantine.c:145:23: warning: unused variable 'flags' kernel test robot
@ 2023-10-03 7:12 ` Vlastimil Babka
2023-10-07 9:00 ` Liu, Yujie
0 siblings, 1 reply; 3+ messages in thread
From: Vlastimil Babka @ 2023-10-03 7:12 UTC (permalink / raw)
To: kernel test robot; +Cc: oe-kbuild-all, linux-mm
On 10/3/23 08:56, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/vbabka/linux.git slab-remove-slab-v1r0
Hi, appreciate the test! Can you please adjust the Cc list for the repo
vbabka/linux.git so linux-mm is not included, to reduce the volume. This
repo it's where I put my own development branches for review/testing.
For vbabka/slab.git it's ok to keep linux-mm as that's the official slab
subsystem tree where accepted patches are merged.
Thanks,
Vlastimil
> head: 227c2d309e94ff014379c57ecadff7df03a1e349
> commit: 175f421def9a7765457d1434f9df37303ff1ed9f [7/14] KASAN: remove code paths guarded by CONFIG_SLAB
> config: x86_64-randconfig-006-20231003 (https://download.01.org/0day-ci/archive/20231003/202310031433.kyisgGOt-lkp@intel.com/config)
> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231003/202310031433.kyisgGOt-lkp@intel.com/reproduce)
>
> 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>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202310031433.kyisgGOt-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
> mm/kasan/quarantine.c: In function 'qlink_free':
>>> mm/kasan/quarantine.c:145:23: warning: unused variable 'flags' [-Wunused-variable]
> 145 | unsigned long flags;
> | ^~~~~
>
>
> vim +/flags +145 mm/kasan/quarantine.c
>
> 55834c59098d0c5 Alexander Potapenko 2016-05-20 140
> 55834c59098d0c5 Alexander Potapenko 2016-05-20 141 static void qlink_free(struct qlist_node *qlink, struct kmem_cache *cache)
> 55834c59098d0c5 Alexander Potapenko 2016-05-20 142 {
> 55834c59098d0c5 Alexander Potapenko 2016-05-20 143 void *object = qlink_to_object(qlink, cache);
> 26dca996ea7b1ac Andrey Konovalov 2022-01-14 144 struct kasan_free_meta *meta = kasan_get_free_meta(cache, object);
> 55834c59098d0c5 Alexander Potapenko 2016-05-20 @145 unsigned long flags;
> 55834c59098d0c5 Alexander Potapenko 2016-05-20 146
> 26dca996ea7b1ac Andrey Konovalov 2022-01-14 147 /*
> 26dca996ea7b1ac Andrey Konovalov 2022-01-14 148 * If init_on_free is enabled and KASAN's free metadata is stored in
> 26dca996ea7b1ac Andrey Konovalov 2022-01-14 149 * the object, zero the metadata. Otherwise, the object's memory will
> 26dca996ea7b1ac Andrey Konovalov 2022-01-14 150 * not be properly zeroed, as KASAN saves the metadata after the slab
> 26dca996ea7b1ac Andrey Konovalov 2022-01-14 151 * allocator zeroes the object.
> 26dca996ea7b1ac Andrey Konovalov 2022-01-14 152 */
> 26dca996ea7b1ac Andrey Konovalov 2022-01-14 153 if (slab_want_init_on_free(cache) &&
> 26dca996ea7b1ac Andrey Konovalov 2022-01-14 154 cache->kasan_info.free_meta_offset == 0)
> 26dca996ea7b1ac Andrey Konovalov 2022-01-14 155 memzero_explicit(meta, sizeof(*meta));
> 26dca996ea7b1ac Andrey Konovalov 2022-01-14 156
> 97593cad003c668 Andrey Konovalov 2020-12-22 157 /*
> f0953a1bbaca71e Ingo Molnar 2021-05-06 158 * As the object now gets freed from the quarantine, assume that its
> 97593cad003c668 Andrey Konovalov 2020-12-22 159 * free track is no longer valid.
> 97593cad003c668 Andrey Konovalov 2020-12-22 160 */
> 06bc4cf6cdde690 Andrey Konovalov 2022-05-12 161 *(u8 *)kasan_mem_to_shadow(object) = KASAN_SLAB_FREE;
> 97593cad003c668 Andrey Konovalov 2020-12-22 162
> 55834c59098d0c5 Alexander Potapenko 2016-05-20 163 ___cache_free(cache, object, _THIS_IP_);
> 55834c59098d0c5 Alexander Potapenko 2016-05-20 164 }
> 55834c59098d0c5 Alexander Potapenko 2016-05-20 165
>
> :::::: The code at line 145 was first introduced by commit
> :::::: 55834c59098d0c5a97b0f3247e55832b67facdcf mm: kasan: initial memory quarantine implementation
>
> :::::: TO: Alexander Potapenko <glider@google.com>
> :::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [vbabka:slab-remove-slab-v1r0 7/14] mm/kasan/quarantine.c:145:23: warning: unused variable 'flags'
2023-10-03 7:12 ` Vlastimil Babka
@ 2023-10-07 9:00 ` Liu, Yujie
0 siblings, 0 replies; 3+ messages in thread
From: Liu, Yujie @ 2023-10-07 9:00 UTC (permalink / raw)
To: lkp, vbabka; +Cc: linux-mm, oe-kbuild-all
On Tue, 2023-10-03 at 09:12 +0200, Vlastimil Babka wrote:
> On 10/3/23 08:56, kernel test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/vbabka/linux.git slab-remove-slab-v1r0
>
> Hi, appreciate the test! Can you please adjust the Cc list for the repo
> vbabka/linux.git so linux-mm is not included, to reduce the volume. This
> repo it's where I put my own development branches for review/testing.
Hi Vlastimil, we've updated the email config of the bot to remove
linux-mm from the Cc list for this repo.
Best Regards,
Yujie
> For vbabka/slab.git it's ok to keep linux-mm as that's the official slab
> subsystem tree where accepted patches are merged.
>
> Thanks,
> Vlastimil
>
> > head: 227c2d309e94ff014379c57ecadff7df03a1e349
> > commit: 175f421def9a7765457d1434f9df37303ff1ed9f [7/14] KASAN: remove code paths guarded by CONFIG_SLAB
> > config: x86_64-randconfig-006-20231003 (https://download.01.org/0day-ci/archive/20231003/202310031433.kyisgGOt-lkp@intel.com/config)
> > compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231003/202310031433.kyisgGOt-lkp@intel.com/reproduce)
> >
> > 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>
> > > Closes: https://lore.kernel.org/oe-kbuild-all/202310031433.kyisgGOt-lkp@intel.com/
> >
> > All warnings (new ones prefixed by >>):
> >
> > mm/kasan/quarantine.c: In function 'qlink_free':
> > > > mm/kasan/quarantine.c:145:23: warning: unused variable 'flags' [-Wunused-variable]
> > 145 | unsigned long flags;
> > | ^~~~~
> >
> >
> > vim +/flags +145 mm/kasan/quarantine.c
> >
> > 55834c59098d0c5 Alexander Potapenko 2016-05-20 140
> > 55834c59098d0c5 Alexander Potapenko 2016-05-20 141 static void qlink_free(struct qlist_node *qlink, struct kmem_cache *cache)
> > 55834c59098d0c5 Alexander Potapenko 2016-05-20 142 {
> > 55834c59098d0c5 Alexander Potapenko 2016-05-20 143 void *object = qlink_to_object(qlink, cache);
> > 26dca996ea7b1ac Andrey Konovalov 2022-01-14 144 struct kasan_free_meta *meta = kasan_get_free_meta(cache, object);
> > 55834c59098d0c5 Alexander Potapenko 2016-05-20 @145 unsigned long flags;
> > 55834c59098d0c5 Alexander Potapenko 2016-05-20 146
> > 26dca996ea7b1ac Andrey Konovalov 2022-01-14 147 /*
> > 26dca996ea7b1ac Andrey Konovalov 2022-01-14 148 * If init_on_free is enabled and KASAN's free metadata is stored in
> > 26dca996ea7b1ac Andrey Konovalov 2022-01-14 149 * the object, zero the metadata. Otherwise, the object's memory will
> > 26dca996ea7b1ac Andrey Konovalov 2022-01-14 150 * not be properly zeroed, as KASAN saves the metadata after the slab
> > 26dca996ea7b1ac Andrey Konovalov 2022-01-14 151 * allocator zeroes the object.
> > 26dca996ea7b1ac Andrey Konovalov 2022-01-14 152 */
> > 26dca996ea7b1ac Andrey Konovalov 2022-01-14 153 if (slab_want_init_on_free(cache) &&
> > 26dca996ea7b1ac Andrey Konovalov 2022-01-14 154 cache->kasan_info.free_meta_offset == 0)
> > 26dca996ea7b1ac Andrey Konovalov 2022-01-14 155 memzero_explicit(meta, sizeof(*meta));
> > 26dca996ea7b1ac Andrey Konovalov 2022-01-14 156
> > 97593cad003c668 Andrey Konovalov 2020-12-22 157 /*
> > f0953a1bbaca71e Ingo Molnar 2021-05-06 158 * As the object now gets freed from the quarantine, assume that its
> > 97593cad003c668 Andrey Konovalov 2020-12-22 159 * free track is no longer valid.
> > 97593cad003c668 Andrey Konovalov 2020-12-22 160 */
> > 06bc4cf6cdde690 Andrey Konovalov 2022-05-12 161 *(u8 *)kasan_mem_to_shadow(object) = KASAN_SLAB_FREE;
> > 97593cad003c668 Andrey Konovalov 2020-12-22 162
> > 55834c59098d0c5 Alexander Potapenko 2016-05-20 163 ___cache_free(cache, object, _THIS_IP_);
> > 55834c59098d0c5 Alexander Potapenko 2016-05-20 164 }
> > 55834c59098d0c5 Alexander Potapenko 2016-05-20 165
> >
> > :::::: The code at line 145 was first introduced by commit
> > :::::: 55834c59098d0c5a97b0f3247e55832b67facdcf mm: kasan: initial memory quarantine implementation
> >
> > :::::: TO: Alexander Potapenko <glider@google.com>
> > :::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
> >
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-07 9:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-03 6:56 [vbabka:slab-remove-slab-v1r0 7/14] mm/kasan/quarantine.c:145:23: warning: unused variable 'flags' kernel test robot
2023-10-03 7:12 ` Vlastimil Babka
2023-10-07 9:00 ` Liu, Yujie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox