[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <632eae55-92f5-1bfc-bfe4-24673558e1d8@arm.com>
Date: Mon, 10 Jun 2019 07:53:15 +0530
From: Anshuman Khandual <anshuman.khandual@....com>
To: Stephen Rothwell <sfr@...b.auug.org.au>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
linux-arm-kernel@...ts.infradead.org, linux-ia64@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, linux-s390@...r.kernel.org,
linux-sh@...r.kernel.org, sparclinux@...r.kernel.org,
x86@...nel.org, Andrew Morton <akpm@...ux-foundation.org>,
Michal Hocko <mhocko@...e.com>,
Matthew Wilcox <willy@...radead.org>,
Mark Rutland <mark.rutland@....com>,
Christophe Leroy <christophe.leroy@....fr>,
Andrey Konovalov <andreyknvl@...gle.com>,
Michael Ellerman <mpe@...erman.id.au>,
Paul Mackerras <paulus@...ba.org>,
Russell King <linux@...linux.org.uk>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
Tony Luck <tony.luck@...el.com>,
Fenghua Yu <fenghua.yu@...el.com>,
Martin Schwidefsky <schwidefsky@...ibm.com>,
Heiko Carstens <heiko.carstens@...ibm.com>,
Yoshinori Sato <ysato@...rs.sourceforge.jp>,
"David S. Miller" <davem@...emloft.net>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Andy Lutomirski <luto@...nel.org>,
Dave Hansen <dave.hansen@...ux.intel.com>
Subject: Re: [RFC V3] mm: Generalize and rename notify_page_fault() as
kprobe_page_fault()
On 06/07/2019 05:33 PM, Stephen Rothwell wrote:
> Hi Anshuman,
>
> On Fri, 7 Jun 2019 16:04:15 +0530 Anshuman Khandual <anshuman.khandual@....com> wrote:
>>
>> +static nokprobe_inline bool kprobe_page_fault(struct pt_regs *regs,
>> + unsigned int trap)
>> +{
>> + int ret = 0;
>> +
>> + /*
>> + * To be potentially processing a kprobe fault and to be allowed
>> + * to call kprobe_running(), we have to be non-preemptible.
>> + */
>> + if (kprobes_built_in() && !preemptible() && !user_mode(regs)) {
>> + if (kprobe_running() && kprobe_fault_handler(regs, trap))
>> + ret = 1;
>> + }
>> + return ret;
>> +}
>
> Since this is now declared as "bool" (thanks for that), you should make
> "ret" be bool and use true and false;
Sure, done.
Powered by blists - more mailing lists