From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, T_DKIMWL_WL_HIGH autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DCB7C4321A for ; Tue, 11 Jun 2019 05:14:09 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 620162063F for ; Tue, 11 Jun 2019 05:14:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZnAQqdRS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 620162063F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=w67tyr0peLUkxB6VTimz5iIopg1G1oxZLqh9KowCylo=; b=ZnAQqdRSCJAtwS p9evBcIfpQlCU72nc8zU29AEtliUrO0NQ6jYDyFgudefgR8ATevRRl5hsGxK1zsAc4LD7UTi72TdW B0zOq1RMuBS6Ir6G7TG31Ft2KHdipFR0DLruLao2ZUrWnxZ1SrgWbPh/zP0xWYE3yeaIrzl9N0fXZ HE0QLtI47mqZw0E1p93wWZlj9ssJGGFVRkgLDI+INM9Wv2aCshqa8tRWJf/sDXVvLJcfYRxr95YWK swZSf5Ov24BBHBJ1HKKJbxM/jKB2Rc8Gl8OFPY/Tp2S3tGL7NfdmGwaNCWsMHoVbHIims+08cqINJ ZkLSCPode8AJ9RLKFOwQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1haZ6g-0008I4-9b; Tue, 11 Jun 2019 05:14:02 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1haZ6b-0008Fb-Bd for linux-arm-kernel@lists.infradead.org; Tue, 11 Jun 2019 05:13:59 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E9DC9344; Mon, 10 Jun 2019 22:13:49 -0700 (PDT) Received: from [10.162.43.135] (p8cg001049571a15.blr.arm.com [10.162.43.135]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F2A743F73C; Mon, 10 Jun 2019 22:13:41 -0700 (PDT) Subject: Re: [RFC V3] mm: Generalize and rename notify_page_fault() as kprobe_page_fault() To: Leonardo Bras , Christophe Leroy , linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <1559903655-5609-1-git-send-email-anshuman.khandual@arm.com> <97e9c9b3-89c8-d378-4730-841a900e6800@arm.com> <8dd6168592437378ff4a7c204e0f2962d002b44f.camel@linux.ibm.com> From: Anshuman Khandual Message-ID: <7b0a7afd-2776-0d95-19c5-3e15959744eb@arm.com> Date: Tue, 11 Jun 2019 10:44:00 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <8dd6168592437378ff4a7c204e0f2962d002b44f.camel@linux.ibm.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190610_221357_451242_710F688B X-CRM114-Status: GOOD ( 15.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Michal Hocko , linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, Peter Zijlstra , Catalin Marinas , Dave Hansen , Heiko Carstens , Paul Mackerras , sparclinux@vger.kernel.org, linux-s390@vger.kernel.org, Yoshinori Sato , x86@kernel.org, Russell King , Matthew Wilcox , Ingo Molnar , Andrey Konovalov , Fenghua Yu , Stephen Rothwell , Will Deacon , Andy Lutomirski , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Tony Luck , Martin Schwidefsky , Andrew Morton , linuxppc-dev@lists.ozlabs.org, "David S. Miller" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel