Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp957750ybi; Wed, 3 Jul 2019 07:11:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqx9a9jWCqyvMMUhRNGOGwsyIeUpd+F05El5HQzksGAnzp5dbxZw0WyGhEWb57EgMsmGeZ+y X-Received: by 2002:a65:51c8:: with SMTP id i8mr13880843pgq.116.1562163114710; Wed, 03 Jul 2019 07:11:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562163114; cv=none; d=google.com; s=arc-20160816; b=koOigKSa/XNoZY8HDUCscb34xIFxbAH4fQonRvaZb6iYYxx612fajHJ3oeigedRpS2 p0s41N9V07tku+PgqkII32lMFyN+wLRERxbrko02FLsHCSrBsZXfIE5Ji07WUBQs2rxo MD5tW1yiuj+AqymI7SP04WVmwyt1j8qbkg6kzB5oW8DGfhwcrio9urk8xLcQcX+n4rq4 PTDelCt5YHZd/RSuKLnZqYPV40PtajyJdbNJAouFeaULcNRbp8iIZNl12Lnyi+KSse0a EZVPnt5Y2v+NAdhAz1jaOEmk99njng2sTc95qWOfYkQZakBWcTgPLDY0AEcWD1KKerMh DtqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=cwszHtW+mIPivSs6sbnbs4LhP5LT3yq9wBgQjqfg+UQ=; b=0buCMY0ZmeNS2AvbhPeoROQjnUdDK78uLMFTelfpg4ElVGld8CYfjuC96D1UHFwG+h hmWpbdI15QTLkZv7aghCYUgHHZ9p/LXONqSXn3rJ5loteBu9Tr0TKStUXMt4FN79DRfA 59Udw6Ix/Sy+jvBThT7RFqOqorKFxdjDzGzWJ17eTT/pXFOd1ijPGkTpbRN5IMrFFJ+S GecmN9K+/FSxVNxFk0yqpIcrisJVaGh82C2pQpL4raP7iYQU4FamSyKXzlIAI4A6dB1O aCBXgaYYiUlTq8nC7Pt/RAQvmeGMLgxm1zpjW8Z5+6PvVmyVpn45bFcKT/ZtYKpt4ITl nCkw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d184si2481328pga.551.2019.07.03.07.11.08; Wed, 03 Jul 2019 07:11:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726765AbfGCOKo (ORCPT + 99 others); Wed, 3 Jul 2019 10:10:44 -0400 Received: from foss.arm.com ([217.140.110.172]:48946 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725830AbfGCOKo (ORCPT ); Wed, 3 Jul 2019 10:10:44 -0400 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 9B3752B; Wed, 3 Jul 2019 07:10:43 -0700 (PDT) Received: from [10.162.42.95] (p8cg001049571a15.blr.arm.com [10.162.42.95]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 15DD03F718; Wed, 3 Jul 2019 07:10:41 -0700 (PDT) Subject: Re: [DRAFT] mm/kprobes: Add generic kprobe_fault_handler() fallback definition To: Guenter Roeck , linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: akpm@linux-foundation.org References: <78863cd0-8cb5-c4fd-ed06-b1136bdbb6ef@arm.com> <1561973757-5445-1-git-send-email-anshuman.khandual@arm.com> <8c6b9525-5dc5-7d17-cee1-b75d5a5121d6@roeck-us.net> <8a5eb5d5-32f0-01cd-b2fe-890ebb98395b@roeck-us.net> From: Anshuman Khandual Message-ID: Date: Wed, 3 Jul 2019 19:41:08 +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: <8a5eb5d5-32f0-01cd-b2fe-890ebb98395b@roeck-us.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/03/2019 06:29 PM, Guenter Roeck wrote: > On 7/2/19 10:35 PM, Anshuman Khandual wrote: >> >> >> On 07/01/2019 06:58 PM, Guenter Roeck wrote: >>> On 7/1/19 2:35 AM, Anshuman Khandual wrote: >>>> Architectures like parisc enable CONFIG_KROBES without having a definition >>>> for kprobe_fault_handler() which results in a build failure. Arch needs to >>>> provide kprobe_fault_handler() as it is platform specific and cannot have >>>> a generic working alternative. But in the event when platform lacks such a >>>> definition there needs to be a fallback. >>>> >>>> This adds a stub kprobe_fault_handler() definition which not only prevents >>>> a build failure but also makes sure that kprobe_page_fault() if called will >>>> always return negative in absence of a sane platform specific alternative. >>>> >>>> While here wrap kprobe_page_fault() in CONFIG_KPROBES. This enables stud >>>> definitions for generic kporbe_fault_handler() and kprobes_built_in() can >>>> just be dropped. Only on x86 it needs to be added back locally as it gets >>>> used in a !CONFIG_KPROBES function do_general_protection(). >>>> >>>> Signed-off-by: Anshuman Khandual >>>> --- >>>> I am planning to go with approach unless we just want to implement a stub >>>> definition for parisc to get around the build problem for now. >>>> >>>> Hello Guenter, >>>> >>>> Could you please test this in your parisc setup. Thank you. >>>> >>> >>> With this patch applied on top of next-20190628, parisc:allmodconfig builds >>> correctly. I scheduled a full build for tonight for all architectures. >> >> How did that come along ? Did this pass all build tests ? >> > > Let's say it didn't find any failures related to this patch. I built on top of > next-20190701 which was quite badly broken for other reasons. Unfortunately, > next-20190702 is much worse, so retesting would not add any value at this time. > I'd say go for it. > > Guenter > Sure thanks, will post it out soon.