Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp204102ybm; Wed, 22 May 2019 01:33:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqzKSFNbsMXjd0z28dsrw3cD/pLHiVUWbv3Kt4K07waDM9RkaLGUvoSjNbBXThbyF82jsnJc X-Received: by 2002:a17:902:12d:: with SMTP id 42mr81626889plb.4.1558514033111; Wed, 22 May 2019 01:33:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558514033; cv=none; d=google.com; s=arc-20160816; b=tiX9TqwxKAEOz58NbfvXnNB453nBfcy1xIkQQfJdx5BgQsLCdZp9MtMs7S24lrThLq MKaCXcBxGSJT/n5ihUiz8qFNqM7BEa/QbNVeYoQefBaI51NuiDxFwOqh3kC1HWe2+Ugu zzTi24zZoBetZauEHMPo57V/pAu9bfC4cEXG6j7yzU7zsr6uJcJUFB3c89SvvVO/vLZb dWQ/E+v7fkv5dr+tHjw9xuTy/PTwNzDa0Hs6dNyE7TRCvQRoAUpWlA9Z26tn4XN3vbhV VZi5FRt0/8uQp66UveXWwqaqykKFHf5ez/BBH/VsNB33eMqmxxf+VKpukpZGrsd89Ahx hXrA== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=5g7xDLzM5CmlPXD6Dt3BgVGrrdCB/oLn2x+3SXxwMLM=; b=gR05c4jdAl6XyTJf7Qs5MNbmKDY3MQ6U2jyWjqBsJ0d8XAc2WSgGLsKtYBtS4kI4ld 5l5cDZBsRuibUYxHdFeaotAIy1QXybAT7OY5PE3So5pF9uwdU9QsAdI1R+Ny8bmso2ab EoTTIJS2O2IraDHaO+3UF8ZebA1oaAIOhVUCAeeHwl/l9dMZKFzQAbniVl3S1L0grW5G mweIDm0F1phK8hY8oD7q1+4kOJg00IfJm1qRdurzT5pmY8meuN0I8nJXvrS2Ew+v2pOs pbyT5njp+fxMFbj9tYrJ980FpecStSE2+WhgCsfkhFdSKw/yoenj3rSqkxJ7vm+sSjy8 Ya+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fY1Z2KvI; 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 l17si27147736pfd.202.2019.05.22.01.33.36; Wed, 22 May 2019 01:33:53 -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=fY1Z2KvI; 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 S1728764AbfEVIcW (ORCPT + 99 others); Wed, 22 May 2019 04:32:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:51156 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728502AbfEVIcW (ORCPT ); Wed, 22 May 2019 04:32:22 -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 14948204EC; Wed, 22 May 2019 08:32:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558513942; bh=mT1FPfvdr/dGkIr4pBgWEXh274KkM+Hil9nvHfQ4kkY=; h=From:To:Cc:Subject:Date:From; b=fY1Z2KvIe+a82afaN9oe4kqH1gG6/zYIZva5MJHULmVbLBw6WFIZw6bd0jaZpWFyT FAviYyzJQpe7Wi1fZVy/U1PWK3kiBCiwy3b6xDsY5OxQixyCOAuXJTUWriJ3Jncuem muRo3b0ZpXlpS65VVE/pqebhTugD3hFx4S4CPDJ8= 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 0/2] Enable new kprobe event at boot Date: Wed, 22 May 2019 17:32:18 +0900 Message-Id: <155851393823.15728.9489409117921369593.stgit@devnote2> X-Mailer: git-send-email 2.17.1 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 Hi, This v2 series adds a kernel parameter, 'kprobe_event=' to add and enable new kprobe events at boot time. In this version, I changed to use postcore_initcall() instead of subsys_initcall() for kprobes initialization. Currently ftrace can enable some existing trace events at boot time. This also allows admin/developer to add new kprobe-events at boot time to debug device drivers etc. The syntax is similar to tracing/kprobe_events interface, but uses ',' and ';' instead of ' ' and '\n' respectively. e.g. kprobe_event=p,func1,$arg1,$arg2;p,func2,$arg1 will add probes on func1 with the 1st and the 2nd arguments and on func2 with the 1st argument. Note that 'trace_event=' option enables trace event at very early timing, but the events added by 'kprobe_event=' are enabled right before enabling device drivers at this point. It is enough for tracing device driver initialization etc. Thank you, --- Masami Hiramatsu (2): kprobes: Initialize kprobes at postcore_initcall tracing/kprobe: Add kprobe_event= boot parameter Documentation/admin-guide/kernel-parameters.txt | 13 ++++++ Documentation/trace/kprobetrace.rst | 14 ++++++ kernel/kprobes.c | 3 - kernel/trace/trace_kprobe.c | 54 +++++++++++++++++++++++ 4 files changed, 82 insertions(+), 2 deletions(-) -- Masami Hiramatsu (Linaro)