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>
Tue, 6 Jun 2023 18:47:12 +0000 (14:47 -0400)
commitfd44f4931371da6a4a995f1d0298030d65d3aeb6
treeed989dc0f98b98e20383fe921ceba10a3f118f2a
parentfe1c64c5d431a7944bd68fb7b0e7e4e86058baa0
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.c
This page took 0.024736 seconds and 4 git commands to generate.