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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, 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 B81B9C433E0 for ; Wed, 10 Feb 2021 19:10:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8050164E42 for ; Wed, 10 Feb 2021 19:10:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234495AbhBJTKV (ORCPT ); Wed, 10 Feb 2021 14:10:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234489AbhBJTKG (ORCPT ); Wed, 10 Feb 2021 14:10:06 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5038CC061574 for ; Wed, 10 Feb 2021 11:09:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=oU0lY//YSetaDAVE+2wXzJ+BNqTPO72o3WHUJoCasNk=; b=n6398qgjPSCbWDYTPC7AOLwIVu xzXJSyD24HAY8Po70+gVOO4L/qdxOS9rJaSixjyxcBxaQlMWTZbp2FnQT/FQbjlLCyVZ8yviwoFiM f7oG33x5EFeLCg/hTtUXBjW6tMjjXG4ZnBz6gmOEICWGnNj4IinsL/Llji+p4cm7iiMMlTRthKTgC WoHpUPCaDJ+WlQ3RmzKqkAjS9nPVRfXbwnHeLKU+0zfw6cmzA7Uo/KrHICUtYTHT7BkHyPnnhrlpN IIPmn6OEkO0nWY9F35+oABFVVYYPWpVlmJ+DebdVWVKZs5bdRZUSdWMGgJVwdhzIEXrCk/RCBVAyt C/448iNQ==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1l9urW-009GpQ-7V; Wed, 10 Feb 2021 19:09:18 +0000 Date: Wed, 10 Feb 2021 19:09:18 +0000 From: Christoph Hellwig To: Peter Zijlstra Cc: Andy Lutomirski , x86@kernel.org, LKML , Dave Hansen , Alexei Starovoitov , Daniel Borkmann , Yonghong Song , Masami Hiramatsu Subject: Re: [RFC][PATCH] kprobes: Remove kprobe::fault_handler Message-ID: <20210210190918.GA2208287@infradead.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 10, 2021 at 02:57:03PM +0100, Peter Zijlstra wrote: > > Somewhat related.. I had this pending. > > --- > Subject: kprobes: Remove kprobe::fault_handler > From: Peter Zijlstra > Date: Tue Feb 2 10:43:41 CET 2021 > > The reason for kprobe::fault_handler(), as given by their comment: > > * We come here because instructions in the pre/post > * handler caused the page_fault, this could happen > * if handler tries to access user space by > * copy_from_user(), get_user() etc. Let the > * user-specified handler try to fix it first. > > If just plain bad. Those other handlers are ran from non-preemptible > context and had better use _nofault() functions. Also, there is no > upstream usage of this. > > Signed-off-by: Peter Zijlstra (Intel) Looks good, Reviewed-by: Christoph Hellwig