Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp204273ybm; Wed, 22 May 2019 01:34:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzylJ/YWJcoBRMNfGQU/WiG7yh/xWFOWcI7DMIyEVjEQkQuzjZQXGKxdL1OgLUXTHmsX7lT X-Received: by 2002:a17:902:e213:: with SMTP id ce19mr90867899plb.30.1558514045436; Wed, 22 May 2019 01:34:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558514045; cv=none; d=google.com; s=arc-20160816; b=FEWVTjYH4dtjVUWtOdlgz6yzsmfESiejd8rdB2NghoM8pPCan9Hxdzt1mZvA7t0Wl4 QRmf9Xqni48kgv91B/YA2PLSWNep6yKGkqcGA5B1Tx8FAbPV6tjyac8CH9Aft3VenA5p sKfNS2jWpsTdzfuX6Aau1zf5Md28ejL7E8okizjVw4ApaTdvcpPq6gmE+oWNNgXBIJTK ZYw/iFPd+dfhigukh2ETvAzXGo6mHS1L9VaVtq+/9t6rwY5zUm5zaTWJ2+gpOGbUPs27 3UXixjm75FLQ2VoJPKk0pRv7z6DzrExTRwKeLxdGi6GtykjHwBW0qDuSjQT0WDkspYei c38g== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PPOh37QCHDLoyqGezd8pp5xlMRiA9e1vWNj3lxBurG8=; b=sDNuZWVjFLseyVPZ1p+AC7q873ar1vXX3kXQ5UvtdPlqqC21FpV2a//WSkyfvR0d4a EeHq26mkZGZbzdnDH3fQbDoz04HPW5ZfaoFboCMgcdVntNqayzSkG/5dz0hxAvSwC2Iw hCNeSptgbrcFw29dDIn/NqIUad8G+0La3l+BUU+der1GU6xm9XeJs9N1XsTzqL+gdVmI 89/RkQIkr8ruuxy2XLnKbaMZwXCApnu1/ZwqNj5+wWZTnBvXNBW6d/ZWge5qjxDbUjHC RgK2y7WSuTc9BcnK8sdqBSBeVlHBhg/coeOnV6nwx5tBNCQH++TGVstQHVtLkkEey44F KLhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f8mm01EH; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l133si21086551pga.556.2019.05.22.01.33.48; Wed, 22 May 2019 01:34:05 -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; dkim=pass header.i=@kernel.org header.s=default header.b=f8mm01EH; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728832AbfEVIca (ORCPT + 99 others); Wed, 22 May 2019 04:32:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:51262 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728784AbfEVIca (ORCPT ); Wed, 22 May 2019 04:32:30 -0400 Received: from devnote2.wi2.ne.jp (unknown [103.5.140.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C41F820644; Wed, 22 May 2019 08:32:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558513949; bh=xi0hd/CIk0ze4lSsjiKkjqQbHpgNdAFL9Zy8BVEz4tE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f8mm01EHRelbD9H5x89TMsnt3zJWAa36eQtDYcDr3fbMfkLWMWdty96+Iiqg6YFrA RW19pP9hDZyBTsY6ptCEVNwWJwUuVjPaEdft6/aeMKhzVUlFO60UItkN64Jn2mxuGn 48Kk742n4E8aZ+sn95oaaha4s5k6IdqiQfA/VDCI= From: Masami Hiramatsu To: Steven Rostedt Cc: Ingo Molnar , "Naveen N . Rao" , Anil S Keshavamurthy , "David S . Miller" , Masami Hiramatsu , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH v2 1/2] kprobes: Initialize kprobes at postcore_initcall Date: Wed, 22 May 2019 17:32:27 +0900 Message-Id: <155851394736.15728.13626739508905120098.stgit@devnote2> X-Mailer: git-send-email 2.17.1 In-Reply-To: <155851393823.15728.9489409117921369593.stgit@devnote2> References: <155851393823.15728.9489409117921369593.stgit@devnote2> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Initialize kprobes at postcore_initcall level instead of module_init since kprobes is not a module, and it depends on only subsystems initialized in core_initcall. This will allow ftrace kprobe event to add new events when it is initializing because ftrace kprobe event is initialized at later initcall level. Signed-off-by: Masami Hiramatsu --- Changes in v2 - use postcore_initcall instead of subsys_initcall --- kernel/kprobes.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/kprobes.c b/kernel/kprobes.c index c83e54727131..5d51dd84b1a2 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -2291,6 +2291,7 @@ static int __init init_kprobes(void) init_test_probes(); return err; } +postcore_initcall(init_kprobes); #ifdef CONFIG_DEBUG_FS static void report_probe(struct seq_file *pi, struct kprobe *p, @@ -2616,5 +2617,3 @@ static int __init debugfs_kprobe_init(void) late_initcall(debugfs_kprobe_init); #endif /* CONFIG_DEBUG_FS */ - -module_init(init_kprobes);