kcsan: Start stack trace with explicit location if provided
authorMarco Elver <elver@google.com>
Mon, 9 Aug 2021 11:25:14 +0000 (13:25 +0200)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 13 Sep 2021 23:41:19 +0000 (16:41 -0700)
commit6c65eb75686fc2068c926a73c9c3631b5f0e4c9c
tree1567b7b2f2259b039298e75630eb7a6ba8606dba
parentf4c87dbbef2638f6da6e29b5e998e3b1dcdb08ee
kcsan: Start stack trace with explicit location if provided

If an explicit access address is set, as is done for scoped accesses,
always start the stack trace from that location. get_stack_skipnr() is
changed into sanitize_stack_entries(), which if given an address, scans
the stack trace for a matching function and then replaces that entry
with the explicitly provided address.

The previous reports for scoped accesses were all over the place, which
could be quite confusing. We now always point at the start of the scope.

Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/kcsan/kcsan_test.c
kernel/kcsan/report.c