From: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/kprobes: Pass ppc_inst as a pointer to emulate_step() on ppc32
Date: Fri, 21 May 2021 12:31:54 +0530 [thread overview]
Message-ID: <1621580436.oscey0zhvn.naveen@linux.ibm.com> (raw)
In-Reply-To: <cb7d49dc-3980-2d2b-ee4e-480b89a04b0a@csgroup.eu>
Christophe Leroy wrote:
>
>
> Le 20/05/2021 à 12:54, Naveen N. Rao a écrit :
>> Christophe Leroy wrote:
>>>
>>>
>>> Le 20/05/2021 à 09:29, Naveen N. Rao a écrit :
>>>> diff --git a/arch/powerpc/kernel/optprobes.c
>>>> b/arch/powerpc/kernel/optprobes.c
>>>> index cdf87086fa33a0..2bc53fa48a1b33 100644
>>>> --- a/arch/powerpc/kernel/optprobes.c
>>>> +++ b/arch/powerpc/kernel/optprobes.c
>>>> @@ -281,8 +281,12 @@ int arch_prepare_optimized_kprobe(struct optimized_kprobe *op, struct kprobe
>>>> *p)
>>>> /*
>>>> * 3. load instruction to be emulated into relevant register, and
>>>> */
>>>> - temp = ppc_inst_read((struct ppc_inst *)p->ainsn.insn);
>>>> - patch_imm_load_insns(ppc_inst_as_ulong(temp), 4, buff + TMPL_INSN_IDX);
>>>> + if (IS_ENABLED(CONFIG_PPC64)) {
>>>> + temp = ppc_inst_read((struct ppc_inst *)p->ainsn.insn);
>>>> + patch_imm_load_insns(ppc_inst_as_ulong(temp), 4, buff + TMPL_INSN_IDX);
>>>> + } else {
>>>> + patch_imm_load_insns((unsigned long)p->ainsn.insn, 4, buff + TMPL_INSN_IDX);
>>>> + }
>>>
>>> It means commit https://github.com/linuxppc/linux/commit/693557ebf407a85ea400a0b501bb97687d8f4856
>>> was not necessary and may be reverted.
>>
>> Indeed, I will send a revert for it.
>>
>
> I'm not completely sure it is worth reverting, on an other hand it is pointless anyway to have
> something to convert to a u64 something that cannot be more than 32 bits on a PPC32, so now that we
> have ppc_inst_as_ulong() it is as good I think.
Sure. If necessary, the revert can go in separately as part of your
other cleanup series.
- Naveen
next prev parent reply other threads:[~2021-05-21 7:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-20 7:29 [PATCH] powerpc/kprobes: Pass ppc_inst as a pointer to emulate_step() on ppc32 Naveen N. Rao
2021-05-20 10:17 ` Christophe Leroy
2021-05-20 10:54 ` Naveen N. Rao
2021-05-20 12:55 ` Christophe Leroy
2021-05-21 7:01 ` Naveen N. Rao [this message]
2021-06-07 11:34 ` Naveen N. Rao
2021-06-07 14:31 ` Christophe Leroy
2021-06-07 17:36 ` Christophe Leroy
2021-06-08 4:58 ` Christophe Leroy
2021-06-08 11:34 ` Naveen N. Rao
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=1621580436.oscey0zhvn.naveen@linux.ibm.com \
--to=naveen.n.rao@linux.vnet.ibm.com \
--cc=christophe.leroy@csgroup.eu \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
/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).