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.7 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 40D2CC31E45 for ; Thu, 13 Jun 2019 20:04:28 +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 0116C2133D for ; Thu, 13 Jun 2019 20:04:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Dps/sP3F"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="N2gTptqw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0116C2133D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org 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:Mime-Version:References:In-Reply-To: Message-Id:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HsbRHZgq0knY80cnsL1Ja2PntglsJf1zrvHQYT0HTRM=; b=Dps/sP3FUuuxZi 3+aTJQCjvJITVYo8VQiZvlf2XZBu6UBUAjfWvr5NvZArhdFtvUSTQUsE6kftm+75Mcv3FeRMOVZjq 9AkPyNqDZZPSHJjFpq0O4aVHo+J2qQwzMq3f0C009pOlQxC2dVSOWvsfhmRE044niHF5fxVm6K6nU aoaax7mWuAtw43i6DVyBqTI937G2fa9HMwIFo0T8xXbNjBma6mnNYLqoAXftaNvtlmlY82d0Fd3/V xcMFr3M3LmKFmpjMXpR10MRftq8pR/8os2AiD19zD54aornxyvFV5oJgnDu8gwTsP+bwzD5oW576L MDaUUy9hxynUR8VtI7pw==; 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 1hbVxM-00077G-Ib; Thu, 13 Jun 2019 20:04:20 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hbVxH-00074b-Uk; Thu, 13 Jun 2019 20:04:18 +0000 Received: from akpm3.svl.corp.google.com (unknown [104.133.8.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1E84021537; Thu, 13 Jun 2019 20:04:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560456250; bh=STyJgmmKr944RjOkqQ8HWC3xeSyqe7HVqnGI2LWRsD8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=N2gTptqwNshky9t39zHrhF/tFwNwxgbkrbTJor+tak1vLqX97uKewRk8bUnzrn4Ko U5IaH0MfRPlK77bT7Yc/4PbSrlc3n6J8M0GsjcRBoXIwR5bmuZZez1tgkNHDFM277/ c+zGeW7mHjTeucDkGZEHLB7VbopRA5mQ7/vZdAH4= Date: Thu, 13 Jun 2019 13:04:08 -0700 From: Andrew Morton To: Anshuman Khandual Subject: Re: [PATCH] mm: Generalize and rename notify_page_fault() as kprobe_page_fault() Message-Id: <20190613130408.3091869d8e50d0524157523f@linux-foundation.org> In-Reply-To: <1560420444-25737-1-git-send-email-anshuman.khandual@arm.com> References: <1560420444-25737-1-git-send-email-anshuman.khandual@arm.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190613_130417_167998_8C09B122 X-CRM114-Status: GOOD ( 14.47 ) 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 , Will Deacon , linux-mips@vger.kernel.org, linux-mm@kvack.org, Paul Mackerras , sparclinux@vger.kernel.org, linux-s390@vger.kernel.org, Yoshinori Sato , Michael Ellerman , x86@kernel.org, Russell King , Matthew Wilcox , Ingo Molnar , James Hogan , linux-snps-arc@lists.infradead.org, Fenghua Yu , Stephen Rothwell , Andrey Konovalov , Andy Lutomirski , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Christophe Leroy , Tony Luck , Heiko Carstens , Vineet Gupta , linux-kernel@vger.kernel.org, Ralf Baechle , Paul Burton , Martin Schwidefsky , 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 Thu, 13 Jun 2019 15:37:24 +0530 Anshuman Khandual wrote: > Architectures which support kprobes have very similar boilerplate around > calling kprobe_fault_handler(). Use a helper function in kprobes.h to unify > them, based on the x86 code. > > This changes the behaviour for other architectures when preemption is > enabled. Previously, they would have disabled preemption while calling the > kprobe handler. However, preemption would be disabled if this fault was > due to a kprobe, so we know the fault was not due to a kprobe handler and > can simply return failure. > > This behaviour was introduced in the commit a980c0ef9f6d ("x86/kprobes: > Refactor kprobes_fault() like kprobe_exceptions_notify()") > > ... > > --- a/arch/arm/mm/fault.c > +++ b/arch/arm/mm/fault.c > @@ -30,28 +30,6 @@ > > #ifdef CONFIG_MMU > > -#ifdef CONFIG_KPROBES > -static inline int notify_page_fault(struct pt_regs *regs, unsigned int fsr) Some architectures make this `static inline'. Others make it `nokprobes_inline', others make it `static inline __kprobes'. The latter seems weird - why try to put an inline function into .kprobes.text? So.. what's the best thing to do here? You chose `static nokprobe_inline' - is that the best approach, if so why? Does kprobe_page_fault() actually need to be inlined? Also, some architectures had notify_page_fault returning int, others bool. You chose bool and that seems appropriate and all callers are OK with that. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel