From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [PATCH] mm: Generalize and rename notify_page_fault() as kprobe_page_fault() References: <1560420444-25737-1-git-send-email-anshuman.khandual@arm.com> From: Vineet Gupta Message-ID: Date: Thu, 13 Jun 2019 10:57:45 -0700 MIME-Version: 1.0 In-Reply-To: <1560420444-25737-1-git-send-email-anshuman.khandual@arm.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: To: Anshuman Khandual , linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Mark Rutland , Michal Hocko , linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, Peter Zijlstra , Catalin Marinas , Dave Hansen , Will Deacon , Paul Mackerras , sparclinux@vger.kernel.org, Stephen Rothwell , 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 , Andrey Konovalov , Andy Lutomirski , Thomas Gleixner , Masami Hiramatsu +CC Masami San On 6/13/19 3:07 AM, Anshuman Khandual wrote: > Questions: > > AFAICT there is no equivalent of erstwhile notify_page_fault() during page > fault handling in arc and mips archs which can call this generic function. > Please let me know if that is not the case. For ARC do_page_fault() is entered for MMU exceptions (TLB Miss, access violations r/w/x etc). kprobes uses a combination of UNIMP_S and TRAP_S instructions which don't funnel into do_page_fault(). UINMP_S leads to instr_service do_insterror_or_kprobe notify_die(DIE_IERR) kprobe_exceptions_notify arc_kprobe_handler TRAP_S 2 leads to EV_Trap do_non_swi_trap trap_is_kprobe notify_die(DIE_TRAP) kprobe_exceptions_notify arc_post_kprobe_handler But indeed we are *not* calling into kprobe_fault_handler() - from eithet of those paths and not sure if the existing arc*_kprobe_handler() combination does the equivalent in tandem. -Vineet