Messages in this thread | | | Date | Fri, 30 Aug 2019 18:09:57 +0200 | From | Oleg Nesterov <> | Subject | Re: [BUG] Use of probe_kernel_address() in task_rcu_dereference() without checking return value |
| |
On 08/30, Linus Torvalds wrote: > > Side note: that code had better not be performance-critical, because > "probe_kernel_address()" is actually really really slow.
Yes, please see
[PATCH 2/3] introduce probe_slab_address() https://lore.kernel.org/lkml/20141027195425.GC11736@redhat.com/
I sent 5 years ago ;) Do you think
/* * Same as probe_kernel_address(), but @addr must be the valid pointer * to a slab object, potentially freed/reused/unmapped. */ #ifdef CONFIG_DEBUG_PAGEALLOC #define probe_slab_address(addr, retval) \ probe_kernel_address(addr, retval) #else #define probe_slab_address(addr, retval) \ ({ \ (retval) = *(typeof(retval) *)(addr); \ 0; \ }) #endif
can work?
Oleg.
| |