public inbox for
 help / color / mirror / Atom feed
From: "wcohen at redhat dot com" <>
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: <> (raw)
In-Reply-To: <>

--- Comment #3 from William Cohen <wcohen at redhat dot com> ---
Created attachment 15085
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.

    magic macro in runtime/linux/loc2c-runtime.h
    magic macro in runtime/linux/loc2c-runtime.h
    magic macro in linux/uprobes-inode.c
    magic macro in linux/uprobes-inode.c
    magic macro in linux/uprobes-inode.c
    task_finder_vma.c (looks workable)
    magic macro stp_task_work.c
    magic macro stp_task_work.c
    magic macro linux/runtime.h
    magic macro stp_utrace.c
    magic macro stp_utrace.c
    magic macro stp_utrace.c
    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.

  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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* 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).