* Need help implementing text_patch for JUMP_LABEL
@ 2025-05-20 7:38 Miao Chen
2025-05-20 8:48 ` Sahil Siddiq
0 siblings, 1 reply; 2+ messages in thread
From: Miao Chen @ 2025-05-20 7:38 UTC (permalink / raw)
To: Sahil Siddiq; +Cc: Stafford Horne, Linux OpenRISC
Hi,
As part of my participation in GSOC, I am currently working on
implementing the jump_label mechanism for OpenRISC. I have already
implemented the basic functionality of jump_label, but when working on
the arch_jump_label_transform_queue function, I need to perform
instruction replacement and writing. In the implementations for the
ARM64 architecture [1] and RISC-V architecture [2], this is achieved
using text_patch [3].
By the way, ftrace also relies on this functionality for writing
instructions [4].
However, after reviewing the OpenRISC architecture code, I found that
the text_patch functionality is missing. Since you previously worked
on ftrace, I wanted to ask if you have already made progress on the
text_patch part? If not, I might start working on it myself.
Best regards,
Chen Miao
[1] https://github.com/torvalds/linux/blob/a5806cd506af5a7c19bcd596e4708b5c464bfd21/arch/arm64/kernel/jump_label.c#L28
[2] https://github.com/torvalds/linux/blob/a5806cd506af5a7c19bcd596e4708b5c464bfd21/arch/riscv/kernel/jump_label.c#L45
[3] https://github.com/torvalds/linux/blob/master/arch/riscv/include/asm/text-patching.h
[4] https://github.com/torvalds/linux/blob/a5806cd506af5a7c19bcd596e4708b5c464bfd21/arch/riscv/kernel/ftrace.c#L91
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Need help implementing text_patch for JUMP_LABEL
2025-05-20 7:38 Need help implementing text_patch for JUMP_LABEL Miao Chen
@ 2025-05-20 8:48 ` Sahil Siddiq
0 siblings, 0 replies; 2+ messages in thread
From: Sahil Siddiq @ 2025-05-20 8:48 UTC (permalink / raw)
To: Miao Chen; +Cc: Stafford Horne, Linux OpenRISC
Hi,
On 5/20/25 1:08 PM, Miao Chen wrote:
> As part of my participation in GSOC, I am currently working on
> implementing the jump_label mechanism for OpenRISC. I have already
> implemented the basic functionality of jump_label, but when working on
> the arch_jump_label_transform_queue function, I need to perform
> instruction replacement and writing. In the implementations for the
> ARM64 architecture [1] and RISC-V architecture [2], this is achieved
> using text_patch [3].
>
> By the way, ftrace also relies on this functionality for writing
> instructions [4].
>
> However, after reviewing the OpenRISC architecture code, I found that
> the text_patch functionality is missing. Since you previously worked
> on ftrace, I wanted to ask if you have already made progress on the
> text_patch part? If not, I might start working on it myself.
>
I haven't started implementing ftrace for OpenRISC. In my previous email
thread [1] with Stafford, we had decided to focus on implementing data
sources (e.g. kprobes, uprobes, etc.) first before moving to data consumers
such as ftrace.
Feel free to start working on implementing text_patch.
Thanks,
Sahil
[1] https://lore.kernel.org/openrisc/51b89c55-ee58-461d-a2a0-5c8dd8ba77e7@gmail.com/T/#m196b35b073dc133522a49a7a31caa5dd16cc0187
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-05-20 8:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-20 7:38 Need help implementing text_patch for JUMP_LABEL Miao Chen
2025-05-20 8:48 ` Sahil Siddiq
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 NNTP newsgroup(s).