* [PATCH] fixup! tlsf: move kasan_poison_shadow into tlsf_add_pool
@ 2025-10-15 8:30 Ahmad Fatoum
2025-10-20 10:59 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2025-10-15 8:30 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
tlsf: do not poison the control structure more than once
The control_t structure is only associated with a tlsf_t, not a merel
pool_t. Poisoning the control structure again in tlsf_pool thus served
no purpose.
Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
common/tlsf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/tlsf.c b/common/tlsf.c
index c4ba8259b261..3c72b41c0385 100644
--- a/common/tlsf.c
+++ b/common/tlsf.c
@@ -872,7 +872,6 @@ pool_t tlsf_add_pool(tlsf_t tlsf, void* mem, size_t bytes)
block_set_prev_free(next);
kasan_poison_shadow(mem, bytes, KASAN_TAG_INVALID);
- kasan_poison_shadow(control, sizeof(control), KASAN_TAG_INVALID);
return mem;
}
@@ -949,6 +948,7 @@ tlsf_t tlsf_create_with_pool(void* mem, size_t bytes)
{
tlsf_t tlsf = tlsf_create(mem);
tlsf_add_pool(tlsf, (char*)mem + tlsf_size(), bytes - tlsf_size());
+ kasan_poison_shadow(mem, tlsf_size(), KASAN_TAG_INVALID);
return tlsf;
}
--
2.47.3
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-20 12:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-15 8:30 [PATCH] fixup! tlsf: move kasan_poison_shadow into tlsf_add_pool Ahmad Fatoum
2025-10-20 10:59 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox