Messages in this thread | | | From | Björn Töpel <> | Subject | Re: [PATCH v6 06/13] riscv/kprobe: Add code to check if kprobe can be optimized | Date | Wed, 01 Feb 2023 14:30:01 +0100 |
| |
Chen Guokai <chenguokai17@mails.ucas.ac.cn> writes:
> From: Liao Chang <liaochang1@huawei.com> > > For the RVI and RVC hybrid encoding kernel, although AUIPC/JALR just > occupy 8 bytes space, the patched code is 10 bytes at the worst case > to ensure no RVI is truncated, so to check if kprobe satisfies the > requirement of jump optimization, it has to find out an instruction > window large enough to patch AUIPC/JALR(and padding C.NOP), and ensure > no instruction nearby jumps into the patching window. > > Besides that, this series does not support the simulation of pc-relative > instruction in optprobe handler yet, so the patching window should not > includes pc-relative instruction. > > Signed-off-by: Liao Chang <liaochang1@huawei.com> > Co-developed-by: Chen Guokai <chenguokai17@mails.ucas.ac.cn> > Signed-off-by: Chen Guokai <chenguokai17@mails.ucas.ac.cn>
Reviewed-by: Björn Töpel <bjorn@kernel.org>
| |