From: "wcohen at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug runtime/30777] Systemtap modules unable to run on systemtap supporting Intel CET IBT
Date: Thu, 24 Aug 2023 19:10:13 +0000 [thread overview]
Message-ID: <bug-30777-6586-pMMsAg0GNz@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-30777-6586@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=30777
--- Comment #3 from William Cohen <wcohen at redhat dot com> ---
Created attachment 15085
--> https://sourceware.org/bugzilla/attachment.cgi?id=15085&action=edit
Partial implementation for the kallsyms_* indirect calls in runtime/sym.c
This patch addresses the indirect calls in the runtime/sym.c. This is not
complete. Did a search for the runtime doing additional lookups and indirect
calls. Below is a list of the other variables used for indirect calls and
where the indirect calls are implemented.
kallsyms_copy_to_kernel_nofault
magic macro in runtime/linux/loc2c-runtime.h
kallsyms_task_user_regset_view
magic macro in runtime/linux/loc2c-runtime.h
kallsyms_uprobe_register
magic macro in linux/uprobes-inode.c
kallsyms_uprobe_unregister
magic macro in linux/uprobes-inode.c
kallsyms_uprobe_get_swbp_addr
magic macro in linux/uprobes-inode.c
kallsyms_get_mm_exe_file
task_finder_vma.c (looks workable)
kallsyms_task_work_add
magic macro stp_task_work.c
kallsyms_task_work_cancel
magic macro stp_task_work.c
kallsyms_udelay_simple
magic macro linux/runtime.h
stack_trace_save_regs_fn
stack.c
kallsyms_wake_up_state
magic macro stp_utrace.c
kallsyms_signal_wake_up_state
magic macro stp_utrace.c
kallsyms_signal_wake_up
magic macro stp_utrace.c
kallsyms___lock_task_sighand
magic macro stp_utrace.c
Some of these are implemented with a "magic macro" that just replaces the
function name with the indirect calls using the variable. They don't deal with
the function arguments. There might be changes in the arguments between
different versions of the kernel and this might simplify code generations. The
macros avoid those details by just changing the function name. However, if
doing the wrappers link this initial patch would need to include the arguments
and deal with any changes (like kallsysms_lookup_name) in the arguments.
Another concern is that the IBT wrapper is going to slow things down operation.
This might be noticeable for kallsyms_copy_to_kernel_nofault.
--
You are receiving this mail because:
You are the assignee for the bug.
next prev parent reply other threads:[~2023-08-24 19:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-17 15:37 [Bug runtime/30777] New: " wcohen at redhat dot com
2023-08-17 15:48 ` [Bug runtime/30777] " wcohen at redhat dot com
2023-08-22 15:26 ` wcohen at redhat dot com
2023-08-24 19:10 ` wcohen at redhat dot com [this message]
2023-08-27 23:40 ` wcohen at redhat dot com
2023-08-29 14:09 ` wcohen at redhat dot com
2023-08-29 15:53 ` wcohen at redhat dot com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-30777-6586-pMMsAg0GNz@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=systemtap@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).