From: Wangbinglei <wang.binglei@h3c.com>
To: Conor Dooley <conor.dooley@microchip.com>
Cc: "paul.walmsley@sifive.com" <paul.walmsley@sifive.com>,
"palmer@dabbelt.com" <palmer@dabbelt.com>,
"aou@eecs.berkeley.edu" <aou@eecs.berkeley.edu>,
"linux-riscv@lists.infradead.org"
<linux-riscv@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"l3b2w1@gmail.com" <l3b2w1@gmail.com>
Subject: Re: [PATCH] rethook: add riscv rethook implementation.
Date: Thu, 22 Sep 2022 06:32:16 +0000 [thread overview]
Message-ID: <e7fc6ce7cb7849558a0e33e4fd90485b@h3c.com> (raw)
Thanks for your tips, I resended modified patch using another mail addr(l3b2w1@gmail.com).
-----邮件原件-----
发件人: Conor Dooley [mailto:conor.dooley@microchip.com]
发送时间: 2022年9月20日 18:32
收件人: wangbinglei (RD) <wang.binglei@h3c.com>
抄送: paul.walmsley@sifive.com; palmer@dabbelt.com; aou@eecs.berkeley.edu; linux-riscv@lists.infradead.org; linux-kernel@vger.kernel.org; l3b2w1@gmail.com
主题: Re: [PATCH] rethook: add riscv rethook implementation.
On Tue, Sep 20, 2022 at 05:36:30PM +0800, Binglei Wang wrote:
> From: "wang.binglei" <wang.binglei@h3c.com>
>
> Most of the code copied from
> arch/riscv/kernel/probes/kprobes_trampoline.S
Hey Wang Binglei,
Please use the commit log to explain the reasons behind the change you
are making:
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes
>
> Signed-off-by: wang.binglei <wang.binglei@h3c.com>
Unfortunately I don't know much about Asian naming, but I assume that
the . is not part of your name?
> diff --git a/arch/riscv/kernel/probes/kprobes.c b/arch/riscv/kernel/probes/kprobes.c
> index e6e950b7c..2c1847921 100644
> --- a/arch/riscv/kernel/probes/kprobes.c
> +++ b/arch/riscv/kernel/probes/kprobes.c
> @@ -345,6 +345,7 @@ int __init arch_populate_kprobe_blacklist(void)
> return ret;
> }
>
> +#ifndef CONFIG_KRETPROBE_ON_RETHOOK
This seems quite unusual, other archs don't seem to have ifdef-ery
using CONFIG_KRETPROBE_ON_RETHOOK in their arch code so why should
RISC-V?
> void __kprobes __used *trampoline_probe_handler(struct pt_regs *regs)
> {
> return (void *)kretprobe_trampoline_handler(regs, NULL);
> @@ -357,6 +358,12 @@ void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri,
> ri->fp = NULL;
> regs->ra = (unsigned long) &__kretprobe_trampoline;
> }
> +#else
> +void __kprobes *trampoline_probe_handler(struct pt_regs *regs)
> +{
> + return NULL;
> +}
> +#endif
> diff --git a/arch/riscv/kernel/probes/rethook_trampoline.S b/arch/riscv/kernel/probes/rethook_trampoline.S
> new file mode 100644
> index 000000000..aa79630ac
> --- /dev/null
> +++ b/arch/riscv/kernel/probes/rethook_trampoline.S
> @@ -0,0 +1,94 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * rethook trampoline.
> + * Copied from arch/riscv/kernel/probes/kprobes_trampoline.S
Is this a 1:1 copy? If so, could the code be shared?
> This e-mail and its attachments contain confidential information from New H3C, which is
> intended only for the person or entity whose address is listed above. Any use of the
> information contained herein in any way (including, but not limited to, total or partial
> disclosure, reproduction, or dissemination) by persons other than the intended
> recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
> by phone or email immediately and delete it!
Uh-oh! You'll have to work with your IT to get this removed before your
patches can be accepted:
https://lore.kernel.org/all/YgEnxmD9ZE4jVhP5@kroah.com/
The patch does not apply to -next for me either..
Thanks,
Conor.
-------------------------------------------------------------------------------------------------------------------------------------
本邮件及其附件含有新华三集团的保密信息,仅限于发送给上面地址中列出
的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、
或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本
邮件!
This e-mail and its attachments contain confidential information from New H3C, which is
intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
by phone or email immediately and delete it!
next reply other threads:[~2022-09-22 6:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-22 6:32 Wangbinglei [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-09-22 4:04 [PATCH] rethook: add riscv rethook implementation Binglei Wang
2022-09-22 8:40 ` kernel test robot
2022-09-22 10:23 ` kernel test robot
2022-09-22 11:19 ` Binglei Wang
2022-09-22 11:28 ` Conor Dooley
2022-09-20 9:36 Binglei Wang
2022-09-20 10:32 ` Conor Dooley
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=e7fc6ce7cb7849558a0e33e4fd90485b@h3c.com \
--to=wang.binglei@h3c.com \
--cc=aou@eecs.berkeley.edu \
--cc=conor.dooley@microchip.com \
--cc=l3b2w1@gmail.com \
--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