Re: [PATCH v5 09/10] Uprobes/sdt: Document about reference counter

From
Ravi Bangoria <hidden>
Date
2018-07-03 07:50:49
Also in
linux-arm-kernel, linux-mips, lkml
Reply to
Srikar Dronamraju, 2018-07-02
Hi Srikar,

On 07/02/2018 08:24 PM, Srikar Dronamraju wrote:
* Ravi Bangoria [off-list ref] [2018-06-28 10:52:08]:
quoted
Reference counter gate the invocation of probe. If present,
by default reference count is 0. Kernel needs to increment
it before tracing the probe and decrement it when done. This
is identical to semaphore in Userspace Statically Defined
Tracepoints (USDT).

Document usage of reference counter.

Signed-off-by: Ravi Bangoria <redacted>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Unlike perf, this mechanism cannot detect ref count and depends on the
users data. What happens if the user mistakenly provides a wrong location?
I guess he can corrupt some other data structures?
Yes, if user is giving wrong ref_ctr_offset, uprobe infrastructure will
corrupt some user data.
Hence I would think twice of advertising this mechanism. i.e keep this
as an undocumented feature.
I don't mind.

Thanks,
Ravi

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Thread (50 messages) 50 messages, 4 authors, last reply 2018-07-16
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help