The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Michal Simek <monstr@monstr.eu>
Subject: Re: [GIT PULL] ftrace: Fixes for v6.13
Date: Sun, 15 Dec 2024 04:48:43 +0000	[thread overview]
Message-ID: <20241215044843.GC1977892@ZenIV> (raw)
In-Reply-To: <20241214182138.4e7984a2@batman.local.home>

On Sat, Dec 14, 2024 at 06:21:38PM -0500, Steven Rostedt wrote:

>   The real fix would be to have microblaze implement the kernel_stack_pointer()
>   function. For now, just make microblaze use the old logic which prints the
>   function graph trampoline in the function tracer.

Correction: kernel_stack_pointer() implementation there would make it _compile_,
but it wouldn't work right.

What it needs is ftrace_regs_get_stack_pointer() *and* HAVE_ARCH_FTRACE_REGS
defined to suppress the use of defaults.

Background, one more time: kernel_stack_pointer() would give you the kernel
stack pointer by struct pt_regs (if that is possible in the first place).
ftrace_regs_get_stack_pointer() gives the kernel stack pointer by whatever
object _mcount() has set up.  *IF* that object is identical to struct pt_regs
and kernel_stack_pointer() exists, you could cast the pointer to a struct pt_regs *
value and feed that to kernel_stack_pointer().  For microblaze _mcount-created
object is *NOT* the same thing as struct pt_regs, so the default would've done
you no good even if kernel_stack_pointer() existed on microblaze.

See arch/microblaze/kernel/mcount.S SAVE_REGS and compare with their
definition of struct pt_regs in arch/microblaze/include/uapi/asm/ptrace.h

IOW, immediate fix is right, but the long-term fix suggested in pull request
is not.

  parent reply	other threads:[~2024-12-15  4:48 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-14 23:21 [GIT PULL] ftrace: Fixes for v6.13 Steven Rostedt
2024-12-15  0:37 ` Linus Torvalds
2024-12-15  3:04   ` Steven Rostedt
2024-12-15  3:12     ` Steven Rostedt
2024-12-15  4:06       ` Linus Torvalds
2024-12-15  4:11         ` Linus Torvalds
2024-12-15  4:38           ` Steven Rostedt
2024-12-15  5:19             ` Linus Torvalds
2024-12-15 10:05               ` Steven Rostedt
2024-12-15 10:25                 ` Steven Rostedt
2024-12-15 12:42                 ` Mathieu Desnoyers
2024-12-15 13:47                   ` Steven Rostedt
2024-12-15 14:39                     ` Mathieu Desnoyers
2024-12-15 13:51                 ` Steven Rostedt
2024-12-15 17:23                 ` Linus Torvalds
2024-12-15 21:40                   ` Theodore Ts'o
2024-12-16  1:09                     ` Steven Rostedt
2024-12-16  1:24                   ` Steven Rostedt
2024-12-16 13:33                     ` Steven Rostedt
2024-12-16 18:00                       ` Linus Torvalds
2024-12-16 17:59                     ` Linus Torvalds
2024-12-16 18:39                       ` Steven Rostedt
2024-12-15  4:00     ` Linus Torvalds
2024-12-15  4:23       ` Steven Rostedt
2024-12-15  4:37         ` Linus Torvalds
2024-12-15  4:53           ` Steven Rostedt
2024-12-15  5:20             ` Linus Torvalds
2024-12-15  4:48 ` Al Viro [this message]
2024-12-15  5:05   ` Steven Rostedt
2024-12-15  5:11     ` Steven Rostedt
  -- strict thread matches above, loose matches on Subject: below --
2024-12-17 16:39 Steven Rostedt
2024-12-17 17:25 ` pr-tracker-bot

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=20241215044843.GC1977892@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=monstr@monstr.eu \
    --cc=rostedt@goodmis.org \
    --cc=torvalds@linux-foundation.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