Re: [RFC V3] mm: Generalize and rename notify_page_fault() as kprobe_page_fault()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Anshuman Khandual <anshuman.khandual@xxxxxxx>
- Subject: Re: [RFC V3] mm: Generalize and rename notify_page_fault() as kprobe_page_fault()
- From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
- Date: Fri, 7 Jun 2019 22:03:26 +1000
- Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>, Matthew Wilcox <willy@xxxxxxxxxxxxx>, Mark Rutland <mark.rutland@xxxxxxx>, Christophe Leroy <christophe.leroy@xxxxxx>, Andrey Konovalov <andreyknvl@xxxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Paul Mackerras <paulus@xxxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxx>, Catalin Marinas <catalin.marinas@xxxxxxx>, Will Deacon <will.deacon@xxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, Fenghua Yu <fenghua.yu@xxxxxxxxx>, Martin Schwidefsky <schwidefsky@xxxxxxxxxx>, Heiko Carstens <heiko.carstens@xxxxxxxxxx>, Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Andy Lutomirski <luto@xxxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
- In-reply-to: <1559903655-5609-1-git-send-email-anshuman.khandual@arm.com>
- References: <1559903655-5609-1-git-send-email-anshuman.khandual@arm.com>
Hi Anshuman,
On Fri, 7 Jun 2019 16:04:15 +0530 Anshuman Khandual <anshuman.khandual@xxxxxxx> 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;
--
Cheers,
Stephen Rothwell
Attachment:
pgpz1wK3TFsmc.pgp
Description: OpenPGP digital signature
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]