[PATCH] riscv: code patching only works on !XIP_KERNEL

Jisheng Zhang Jisheng.Zhang at synaptics.com
Tue May 11 03:10:33 PDT 2021


On Mon, 10 May 2021 20:19:30 +0200 Vitaly Wool <vitaly.wool at konsulko.com> wrote:


> 
> 
> On Mon, May 10, 2021 at 6:35 PM Jisheng Zhang <jszhang3 at mail.ustc.edu.cn> wrote:
> >
> > From: Jisheng Zhang <jszhang at kernel.org>
> >
> > Some features which need code patching such as KPROBES, DYNAMIC_FTRACE
> > KGDB can only work on !XIP_KERNEL. Add dependencies for these features
> > that rely on code patching.  
> 
> Since we can define extra RW sections to place some tiny code bits in

I knew this discussion on maillist recently, that's the
reason why ERRATA_ALTERNATIVE related part isn't touched

> RAM, I would suggest that you hold back this patch for a while.
> I am not going to support the idea of e. g. compiling KGDB support
> into a XIP kernel, but disabling the whole HAVE_ARCH_JUMP_LABEL is
> hardly the way to go.
> 

I'm not sure whether the solution "extra RW sections to place some tiny code
bits" can work for JUMP_LABEL or not. But obviously, in JUMP_LABEL users
such as static keys, the patching is taken on the .text section unless
patching the common implementation kernel/jump_label.c. IMHO it's impossible.

However, I can hold back this patch for a while as you suggested.

Thanks



More information about the linux-riscv mailing list