Fix: adding a user space probe fails on thumb functions
authorOlivier Dion <odion@efficios.com>
Wed, 22 Feb 2023 20:19:14 +0000 (15:19 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 16 Mar 2023 15:33:33 +0000 (11:33 -0400)
commit56a9a0b750db49640129cb9b13cf384e9e82284c
tree09a042dbb032514afa5f6c1d53e67b743a96888b
parent2a05e025c52eda43f8ebafdbe6f47dc0e80efa77
Fix: adding a user space probe fails on thumb functions

On some architectures, calling convention details are embedded in the
symbol addresses. Uprobe requires a "clean" symbol offset (or at least,
an address where an instruction boundary would be legal) to add
instrumentation. sanitize_uprobe_offset implements that sanitization
logic on a per-architecture basis.

The least significant bit is used when branching to switch to thumb ISA.
However, it's an invalid address for us; mask the least significant bit.

We were not masking the thumb bit, thus using the wrong address offset
by one.

Change-Id: Iaff8ccea3a319f9d9ad80501f1beccd74d1ef56d
Signed-off-by: Olivier Dion <odion@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/kernel.cpp
This page took 0.024611 seconds and 4 git commands to generate.