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>, Christophe Leroy <christophe.leroy@xxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx
- Subject: Re: [RFC V3] mm: Generalize and rename notify_page_fault() as kprobe_page_fault()
- From: Leonardo Bras <leonardo@xxxxxxxxxxxxx>
- Date: Mon, 10 Jun 2019 12:27:02 -0300
- Cc: Mark Rutland <mark.rutland@xxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>, linux-ia64@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Catalin Marinas <catalin.marinas@xxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, Heiko Carstens <heiko.carstens@xxxxxxxxxx>, Paul Mackerras <paulus@xxxxxxxxx>, Matthew Wilcox <willy@xxxxxxxxxxxxx>, sparclinux@xxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>, x86@xxxxxxxxxx, Russell King <linux@xxxxxxxxxxxxxxx>, Will Deacon <will.deacon@xxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Fenghua Yu <fenghua.yu@xxxxxxxxx>, Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>, Andrey Konovalov <andreyknvl@xxxxxxxxxx>, Andy Lutomirski <luto@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, Tony Luck <tony.luck@xxxxxxxxx>, Martin Schwidefsky <schwidefsky@xxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, linuxppc-dev@xxxxxxxxxxxxxxxx, "David S. Miller" <davem@xxxxxxxxxxxxx>
- In-reply-to: <97e9c9b3-89c8-d378-4730-841a900e6800@arm.com>
- References: <1559903655-5609-1-git-send-email-anshuman.khandual@arm.com> <ec764ff4-f68a-fce5-ac1e-a4664e1123c7@c-s.fr> <97e9c9b3-89c8-d378-4730-841a900e6800@arm.com>
- User-agent: Evolution 3.30.5 (3.30.5-1.fc29)
On Mon, 2019-06-10 at 08:09 +0530, Anshuman Khandual wrote:
> > > + /*
> > > + * 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))
> >
> > don't need an 'if A if B', can do 'if A && B'
>
> Which will make it a very lengthy condition check.
Well, is there any problem line-breaking the if condition?
if (A && B && C &&
D && E )
Also, if it's used only to decide the return value, maybe would be fine
to do somethink like that:
return (A && B && C &&
D && E );
Regards,
Attachment:
signature.asc
Description: This is a digitally signed message part
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]