linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vitaly Wool <vitaly.wool@konsulko.com>
To: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Jisheng Zhang <jszhang3@mail.ustc.edu.cn>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	linux-riscv <linux-riscv@lists.infradead.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] riscv: code patching only works on !XIP_KERNEL
Date: Mon, 24 May 2021 21:32:38 +0200	[thread overview]
Message-ID: <CAM4kBBK1BJSE-LeDiEJL-z+tgZMi6Zcb+6AnnQiB8ceaU98k0w@mail.gmail.com> (raw)
In-Reply-To: <mhng-1c10179a-d96b-4cf1-860a-03f0313ac980@palmerdabbelt-glaptop>

On Sat, May 22, 2021 at 7:15 PM Palmer Dabbelt <palmer@dabbelt.com> wrote:
>
> On Mon, 10 May 2021 11:19:30 PDT (-0700), vitaly.wool@konsulko.com wrote:
> > On Mon, May 10, 2021 at 6:35 PM Jisheng Zhang <jszhang3@mail.ustc.edu.cn> wrote:
> >>
> >> From: Jisheng Zhang <jszhang@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
> > 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.
>
> Do you have any updates on this?  The SOC_SIFIVE disable thread floated
> back to the top of my inbox and I didn't see anything there.  I'd prefer
> to avoid chasing around Kconfig disables for a bunch of stuff that we're
> just going to fix soon, but if this is going to be a big change then
> it's likely for next cycle anyway so in that case I'll start picking up
> these compile disable patches.

Sorry, was caught up in fixing other stuff but now I'm on it so expect
some updates soon.

Best regards,
   Vitaly

> Not trying to rush any thing here, just don't want to have a bunch of
> broken configs.
>
> >
> > Best regards,
> >    Vitaly
> >
> >> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> >> ---
> >> Hi,
> >>
> >> Currently, the RISCV_ERRATA_ALTERNATIVE also only works on !XIP_KERNEL
> >> but from the maillist it seem there's effort to make the co-exist, so
> >> I drop RISCV_ERRATA_ALTERNATIVE dependency on !XIP_KERNEL.
> >>
> >> Thanks
> >>
> >>  arch/riscv/Kconfig | 18 +++++++++---------
> >>  1 file changed, 9 insertions(+), 9 deletions(-)
> >>
> >> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> >> index a8ad8eb76120..61320b94ef97 100644
> >> --- a/arch/riscv/Kconfig
> >> +++ b/arch/riscv/Kconfig
> >> @@ -60,11 +60,11 @@ config RISCV
> >>         select GENERIC_TIME_VSYSCALL if MMU && 64BIT
> >>         select HANDLE_DOMAIN_IRQ
> >>         select HAVE_ARCH_AUDITSYSCALL
> >> -       select HAVE_ARCH_JUMP_LABEL
> >> -       select HAVE_ARCH_JUMP_LABEL_RELATIVE
> >> +       select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL
> >> +       select HAVE_ARCH_JUMP_LABEL_RELATIVE if !XIP_KERNEL
> >>         select HAVE_ARCH_KASAN if MMU && 64BIT
> >>         select HAVE_ARCH_KASAN_VMALLOC if MMU && 64BIT
> >> -       select HAVE_ARCH_KGDB
> >> +       select HAVE_ARCH_KGDB if !XIP_KERNEL
> >>         select HAVE_ARCH_KGDB_QXFER_PKT
> >>         select HAVE_ARCH_MMAP_RND_BITS if MMU
> >>         select HAVE_ARCH_SECCOMP_FILTER
> >> @@ -79,9 +79,9 @@ config RISCV
> >>         select HAVE_GCC_PLUGINS
> >>         select HAVE_GENERIC_VDSO if MMU && 64BIT
> >>         select HAVE_IRQ_TIME_ACCOUNTING
> >> -       select HAVE_KPROBES
> >> -       select HAVE_KPROBES_ON_FTRACE
> >> -       select HAVE_KRETPROBES
> >> +       select HAVE_KPROBES if !XIP_KERNEL
> >> +       select HAVE_KPROBES_ON_FTRACE if !XIP_KERNEL
> >> +       select HAVE_KRETPROBES if !XIP_KERNEL
> >>         select HAVE_PCI
> >>         select HAVE_PERF_EVENTS
> >>         select HAVE_PERF_REGS
> >> @@ -230,11 +230,11 @@ config ARCH_RV64I
> >>         bool "RV64I"
> >>         select 64BIT
> >>         select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 && GCC_VERSION >= 50000
> >> -       select HAVE_DYNAMIC_FTRACE if MMU && $(cc-option,-fpatchable-function-entry=8)
> >> +       select HAVE_DYNAMIC_FTRACE if !XIP_KERNEL && MMU && $(cc-option,-fpatchable-function-entry=8)
> >>         select HAVE_DYNAMIC_FTRACE_WITH_REGS if HAVE_DYNAMIC_FTRACE
> >> -       select HAVE_FTRACE_MCOUNT_RECORD
> >> +       select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL
> >>         select HAVE_FUNCTION_GRAPH_TRACER
> >> -       select HAVE_FUNCTION_TRACER
> >> +       select HAVE_FUNCTION_TRACER if !XIP_KERNEL
> >>         select SWIOTLB if MMU
> >>
> >>  endchoice
> >> --
> >> 2.31.0
> >>
> >>
> >>
> >> _______________________________________________
> >> linux-riscv mailing list
> >> linux-riscv@lists.infradead.org
> >> http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2021-05-24 19:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-10 16:28 [PATCH] riscv: code patching only works on !XIP_KERNEL Jisheng Zhang
2021-05-10 18:19 ` Vitaly Wool
2021-05-11 10:10   ` Jisheng Zhang
2021-05-22 17:15   ` Palmer Dabbelt
2021-05-24 19:32     ` Vitaly Wool [this message]
2021-06-08  7:24       ` Jisheng Zhang
2021-06-08  7:50         ` Vitaly Wool
2021-06-08  8:14           ` Jisheng Zhang
2021-06-11  0:51             ` Palmer Dabbelt

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=CAM4kBBK1BJSE-LeDiEJL-z+tgZMi6Zcb+6AnnQiB8ceaU98k0w@mail.gmail.com \
    --to=vitaly.wool@konsulko.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=jszhang3@mail.ustc.edu.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    /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;
as well as URLs for NNTP newsgroup(s).