lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7b0a7afd-2776-0d95-19c5-3e15959744eb@arm.com>
Date:   Tue, 11 Jun 2019 10:44:00 +0530
From:   Anshuman Khandual <anshuman.khandual@....com>
To:     Leonardo Bras <leonardo@...ux.ibm.com>,
        Christophe Leroy <christophe.leroy@....fr>,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org
Cc:     Mark Rutland <mark.rutland@....com>,
        Michal Hocko <mhocko@...e.com>, linux-ia64@...r.kernel.org,
        linux-sh@...r.kernel.org, Peter Zijlstra <peterz@...radead.org>,
        Catalin Marinas <catalin.marinas@....com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Heiko Carstens <heiko.carstens@...ibm.com>,
        Paul Mackerras <paulus@...ba.org>,
        Matthew Wilcox <willy@...radead.org>,
        sparclinux@...r.kernel.org, linux-s390@...r.kernel.org,
        Yoshinori Sato <ysato@...rs.sourceforge.jp>, x86@...nel.org,
        Russell King <linux@...linux.org.uk>,
        Will Deacon <will.deacon@....com>,
        Ingo Molnar <mingo@...hat.com>,
        Fenghua Yu <fenghua.yu@...el.com>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        Andrey Konovalov <andreyknvl@...gle.com>,
        Andy Lutomirski <luto@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        linux-arm-kernel@...ts.infradead.org,
        Tony Luck <tony.luck@...el.com>,
        Martin Schwidefsky <schwidefsky@...ibm.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        linuxppc-dev@...ts.ozlabs.org,
        "David S. Miller" <davem@...emloft.net>
Subject: Re: [RFC V3] mm: Generalize and rename notify_page_fault() as
 kprobe_page_fault()



On 06/10/2019 08:57 PM, Leonardo Bras wrote:
> 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 ); 

Got it. But as Dave and Matthew had pointed out earlier, the current x86
implementation has better readability. Hence will probably stick with it.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ