linux-stable/kernel/rcu
Johannes Berg 800d6acf40 rcu: tiny: Record kvfree_call_rcu() call stack for KASAN
When running KASAN with Tiny RCU (e.g. under ARCH=um, where
a working KASAN patch is now available), we don't get any
information on the original kfree_rcu() (or similar) caller
when a problem is reported, as Tiny RCU doesn't record this.

Add the recording, which required pulling kvfree_call_rcu()
out of line for the KASAN case since the recording function
(kasan_record_aux_stack_noalloc) is neither exported, nor
can we include kasan.h into rcutiny.h.

without KASAN, the patch has no size impact (ARCH=um kernel):
    text       data         bss         dec        hex    filename
 6151515    4423154    33148520    43723189    29b29b5    linux
 6151515    4423154    33148520    43723189    29b29b5    linux + patch

with KASAN, the impact on my build was minimal:
    text       data         bss         dec        hex    filename
13915539    7388050    33282304    54585893    340ea25    linux
13911266    7392114    33282304    54585684    340e954    linux + patch
   -4273      +4064         +-0        -209

Acked-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2022-07-19 11:40:00 -07:00
..
Kconfig Merge branch 'exp.2022.05.11a' into HEAD 2022-05-11 11:49:35 -07:00
Kconfig.debug rcu: Forbid RCU_STRICT_GRACE_PERIOD in TINY_RCU kernels 2022-07-19 11:39:59 -07:00
Makefile rcuperf: Change rcuperf to rcuscale 2020-08-24 18:39:24 -07:00
rcu.h sysctl changes for v5.19-rc1 2022-05-26 16:57:20 -07:00
rcu_segcblist.c rcu: Clarify fill-the-gap comment in rcu_segcblist_advance() 2022-04-11 17:28:48 -07:00
rcu_segcblist.h rcu: Mark writes to the rcu_segcblist structure's ->flags field 2022-02-14 10:36:58 -08:00
rcuscale.c rcuscale: Allow rcuscale without RCU Tasks Rude/Trace 2022-04-20 16:53:19 -07:00
rcutorture.c Merge branches 'docs.2022.04.20a', 'fixes.2022.04.20a', 'nocb.2022.04.11b', 'rcu-tasks.2022.04.11b', 'srcu.2022.05.03a', 'torture.2022.04.11b', 'torture-tasks.2022.04.20a' and 'torturescript.2022.04.20a' into HEAD 2022-05-03 10:21:40 -07:00
refscale.c refscale: Allow refscale without RCU Tasks Rude/Trace 2022-04-20 16:53:19 -07:00
srcutiny.c srcu: Prevent redundant __srcu_read_unlock() wakeup 2021-11-30 17:28:16 -08:00
srcutree.c srcu: Make expedited RCU grace periods block even less frequently 2022-07-19 11:39:59 -07:00
sync.c rcu_sync: Fix comment to properly reflect rcu_sync_exit() behavior 2022-04-20 16:51:11 -07:00
tasks.h rcu-tasks: Handle sparse cpu_possible_mask in rcu_tasks_invoke_cbs() 2022-04-11 17:06:43 -07:00
tiny.c rcu: tiny: Record kvfree_call_rcu() call stack for KASAN 2022-07-19 11:40:00 -07:00
tree.c rcu: Add rnp->cbovldmask check in rcutree_migrate_callbacks() 2022-07-19 11:39:59 -07:00
tree.h Merge branch 'exp.2022.05.11a' into HEAD 2022-05-11 11:49:35 -07:00
tree_exp.h rcu: Move expedited grace period (GP) work to RT kthread_worker 2022-05-11 11:47:10 -07:00
tree_nocb.h rcu/nocb: Initialize nocb kthreads only for boot CPU prior SMP initialization 2022-04-11 17:05:58 -07:00
tree_plugin.h rcu: Immediately boost preempted readers for strict grace periods 2022-07-19 11:39:59 -07:00
tree_stall.h printk changes for 5.19 2022-05-25 10:32:08 -07:00
update.c rcu: Introduce CONFIG_RCU_EXP_CPU_STALL_TIMEOUT 2022-05-11 11:38:50 -07:00