linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Guo Ren <guoren@kernel.org>
To: "Patrick Stählin" <me@packi.ch>
Cc: Albert Ou <aou@eecs.berkeley.edu>,
	Anders Roxell <anders.roxell@linaro.org>,
	David Abdurachmanov <david.abdurachmanov@gmail.com>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Zong Li <zong.li@sifive.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Greentime Hu <greentime.hu@sifive.com>,
	linux-riscv <linux-riscv@lists.infradead.org>
Subject: Re: [RFC/RFT 2/2] RISC-V: kprobes/kretprobe support
Date: Wed, 17 Jun 2020 20:58:32 +0800	[thread overview]
Message-ID: <CAJF2gTTcj=bfK-KvE9U5EsLX0wFPEOw+PvZuTLN_rT5u_a5X1g@mail.gmail.com> (raw)
In-Reply-To: <CAEn-LTrm6__-v7FmCRtNq2zm8up7O18wNhZmBmGwASj-Oy87qA@mail.gmail.com>

Hi Patrick,

I'm the author of csky's kprobe & uprobe, please ref to kprobe [1], uprobe [2]

1: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/csky?h=v5.8-rc1&id=33e53ae1ce413a081254e686d9b27cc1b3585e2f
2: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/csky?h=v5.8-rc1&id=8f6bb793b2be82f1f73bfb416486f156f70b4314

May I continue your patches to finish the work? I'll keep the primary
author's name of you with the patches which you've done.

Most of the instructions' emulation codes will be deprecated, but the
rest is ok. Maybe you should finish executing out of the slot first
and then implement pc-related instructions' emulation.

On Fri, Jun 12, 2020 at 1:58 PM David Abdurachmanov
<david.abdurachmanov@gmail.com> wrote:
>
> On Tue, Mar 31, 2020 at 5:45 AM Zong Li <zong.li@sifive.com> wrote:
> >
> > On Thu, Dec 19, 2019 at 5:28 PM Zong Li <zong.li@sifive.com> wrote:
> > >
> > > On Wed, Dec 18, 2019 at 9:10 PM Patrick Stählin <me@packi.ch> wrote:
> > > >
> > > > Hi all
> > > >
> > > > On 18.12.19 10:14, Zong Li wrote:
> > > > > On Wed, Dec 18, 2019 at 5:09 PM Zong Li <zong.li@sifive.com> wrote:
> > > > >>
> > > > >> From: mhiramat@kernel.org (Masami Hiramatsu)
> > > > >>
> > > > >> On Wed, 14 Nov 2018 21:52:57 +0100
> > > > >> Patrick Staehlin <me@packi.ch> wrote:
> > > > >>
> > > > >>> Yeah, I think it's simpler.
> > > > >>>
> > > > >>> And I found that the kprobe_breakpoint_handler() was called without
> > > > >>> checking !user_mode(regs). In that case, you should add the check in
> > > > >>> front of kprobe_breakpoint_handler() call.
> > > > >>>
> > > > >>> Thank you,
> > > > >>
> > > > >> Hi all,
> > > > >>
> > > > >> Is there any update? I was wondering if this patch are keep going? If
> > > > >> not, I think I could pick it up to go head
> > > >
> > > > I am still working on it, albeit slowly, holiday season coming up here
> > > > in Switzerland may accelerate that a bit. All the feedback I got from
> > > > Masami has been implemented.
> > >
> > > As Masami's suggestion, I don't see stop_machine in your implementation [1],
> > > are there some concerns to use it on SMP?
> >
> > Hi all,
> > I introduced the patching code framework. Maybe it is helpful for
> > self-modify code here. (Please see:
> > https://lkml.org/lkml/2020/3/9/679)
> > This patch series is reviewing, maybe we could apply the
> > implementation after it was merged.
> >
> >
> > >
> > > > Additionally I added instruction simulation for everything except memory
> > > > accesses. I am currently working on getting compressed instructions
> > > > decoded properly into regular instructions but that is very tedious work.
> > > > I guess I am two or three full days of work away from getting a RFC/RFT
> > > > v2 series ready I guess that will happen in early January.
> > >
> > > Thanks for the efforts.
> > >
> > > >
> > > > What I currently have is at [1], that is mostly untested as of now
> > > > (beware I will rebase/squash that branch regularly). What I could use
> > > > help with in the future (as in for v2), is somebody testing it on real
> > > > hardware, as I've never gotten any testing feedback on my original
> > > > patch-series (that would not have worked properly because of the lacking
> > > > cache-flush).
> > >
> > > I give some quick tests by using kprobe sanity test and simple LKM on
> > > Hifive Unleashed board,
> > > it seems to work normally. I could help to test your next version patch as well.
>
> Hi Patrick,
>
> I have noticed that "riscv: introduce interfaces to patch kernel code"
> (mentioned by Zong above) has been merged in 5.7 kernel.
>
> I was wondering if you plan to submit a new revision of the patchset?
>
> Thanks,
> david
>
> > >
> > > >
> > > > [1] https://github.com/packi/linux/tree/kprobes-riscv
> > > >
> > > > Patrick
> >
>

-- 
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/


  reply	other threads:[~2020-06-17 12:58 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-13 19:58 [RFC/RFT 0/2] RISC-V: kprobes/kretprobe support Patrick Stählin
2018-11-13 19:58 ` Patrick Stählin
2018-11-13 19:58 ` [RFC/RFT 1/2] RISC-V: Implement ptrace regs and stack API Patrick Stählin
2018-11-13 19:58   ` Patrick Stählin
2019-11-21 22:34   ` Paul Walmsley
2018-11-13 19:58 ` [RFC/RFT 2/2] RISC-V: kprobes/kretprobe support Patrick Stählin
2018-11-13 19:58   ` Patrick Stählin
2018-11-14  8:37   ` Masami Hiramatsu
2018-11-14  8:37     ` Masami Hiramatsu
2018-11-14 15:49     ` Masami Hiramatsu
2018-11-14 15:49       ` Masami Hiramatsu
2018-11-14 21:10       ` Patrick Staehlin
2018-11-14 21:10         ` Patrick Staehlin
2018-11-15  7:50         ` Masami Hiramatsu
2018-11-15  7:50           ` Masami Hiramatsu
2019-12-20 11:14         ` Paul Walmsley
2019-12-20 22:46           ` Paul Walmsley
2018-11-14 20:52     ` Patrick Staehlin
2018-11-14 20:52       ` Patrick Staehlin
2018-11-15  8:41       ` Masami Hiramatsu
2018-11-15  8:41         ` Masami Hiramatsu
     [not found]         ` <CANXhq0qWwKRrz80Q3LSeQu-cH19otCF1my6dDGDxH0Q5j1RYYw@mail.gmail.com>
     [not found]           ` <9cdd84b5-6c81-9bfa-5d35-6645f542f71e@packi.ch>
2019-12-19  9:28             ` Zong Li
2020-03-31  2:45               ` Zong Li
2020-06-12  5:57                 ` David Abdurachmanov
2020-06-17 12:58                   ` Guo Ren [this message]
2020-06-17 14:54                     ` Masami Hiramatsu
2020-06-18 16:14                       ` Guo Ren
2020-07-05 14:57                       ` Guo Ren

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='CAJF2gTTcj=bfK-KvE9U5EsLX0wFPEOw+PvZuTLN_rT5u_a5X1g@mail.gmail.com' \
    --to=guoren@kernel.org \
    --cc=anders.roxell@linaro.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=david.abdurachmanov@gmail.com \
    --cc=greentime.hu@sifive.com \
    --cc=linux-riscv@lists.infradead.org \
    --cc=me@packi.ch \
    --cc=mhiramat@kernel.org \
    --cc=paul.walmsley@sifive.com \
    --cc=zong.li@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).