[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <574E6F7D.1040902@linaro.org>
Date: Wed, 1 Jun 2016 01:15:41 -0400
From: David Long <dave.long@...aro.org>
To: Huang Shijie <shijie.huang@....com>
Cc: Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
Sandeepa Prabhu <sandeepa.s.prabhu@...il.com>,
William Cohen <wcohen@...hat.com>,
Pratyush Anand <panand@...hat.com>,
Steve Capper <steve.capper@...aro.org>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Marc Zyngier <marc.zyngier@....com>,
Mark Rutland <mark.rutland@....com>,
Petr Mladek <pmladek@...e.com>,
Viresh Kumar <viresh.kumar@...aro.org>,
John Blackwood <john.blackwood@...r.com>,
Feng Kan <fkan@....com>, Zi Shen Lim <zlim.lnx@...il.com>,
Dave P Martin <Dave.Martin@....com>,
Yang Shi <yang.shi@...aro.org>,
Vladimir Murzin <Vladimir.Murzin@....com>,
Kees Cook <keescook@...omium.org>,
"Suzuki K. Poulose" <suzuki.poulose@....com>,
Mark Brown <broonie@...nel.org>,
Alex Bennée <alex.bennee@...aro.org>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Mark Salyzyn <salyzyn@...roid.com>,
James Morse <james.morse@....com>,
Christoffer Dall <christoffer.dall@...aro.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Robin Murphy <Robin.Murphy@....com>,
Jens Wiklander <jens.wiklander@...aro.org>,
Balamurugan Shanmugam <bshanmugam@....com>, nd@....com
Subject: Re: [PATCH v12 05/10] arm64: Kprobes with single stepping support
On 05/17/2016 05:10 AM, Huang Shijie wrote:
> On Wed, Apr 27, 2016 at 02:53:00PM -0400, David Long wrote:
>> From: Sandeepa Prabhu <sandeepa.s.prabhu@...il.com>
>> +
>> +static bool __kprobes aarch64_insn_is_steppable(u32 insn)
>
> Could we add more comment for this function? In the comment, we can tell
> that which type of instructions are steppable, which are not.
>
>> +{
>> + if (aarch64_get_insn_class(insn) == AARCH64_INSN_CLS_BR_SYS) {
>> + if (aarch64_insn_is_branch(insn) ||
>> + aarch64_insn_is_msr_imm(insn) ||
>> + aarch64_insn_is_msr_reg(insn) ||
>> + aarch64_insn_is_exception(insn))
>> + return false;
>> +
>> + if (aarch64_insn_is_mrs(insn))
>> + return aarch64_insn_extract_system_reg(insn)
>> + != AARCH64_INSN_SPCLREG_DAIF;
>> +
>> + if (aarch64_insn_is_hint(insn))
>> + return aarch64_insn_is_nop(insn);
>> +
>> + return true;
>> + }
>> +
>> + if (aarch64_insn_uses_literal(insn) ||
>> + aarch64_insn_is_exclusive(insn))
>> + return false;
>> +
>> + return true;
>
> Thanks
> Huang Shijie
>
I did add a comment to this for the next version of the patch.
-dl
Powered by blists - more mailing lists