From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 198C93858C53; Thu, 24 Aug 2023 19:10:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 198C93858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1692904216; bh=Xb65LrTFZypuc0fqVGQKvlFDEGFzIONeF2ROaNcqzKM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=B1SDdp/7joAvlzZbJE60DaHFy9DVIpbG66+BSrEdApEIDOXnpr6hlpieLnBLLG+MY z+SgzBbIieSEOThBfB6dlqcacZwpuXN5ACJ1GRnPakw+xrwpMbwIrRo4DTNVGjx09R lstm8AAvmrYgoGDN9KaOsvKdElcbJ7cs8e0TLEUg= From: "wcohen at redhat dot com" 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 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: runtime X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: wcohen at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30777 --- Comment #3 from William Cohen --- Created attachment 15085 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D15085&action=3Ded= it 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 indire= ct 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 argume= nts 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 operat= ion. This might be noticeable for kallsyms_copy_to_kernel_nofault. --=20 You are receiving this mail because: You are the assignee for the bug.=