Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp937717lqp; Thu, 21 Mar 2024 23:42:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWzLsiFdHxq0bd0zPO2uPTKStzEgBH7vlRareSfhbwSvXDeC3kv1SpeB9kT9mDw5WOeVAUW6v0YfUQvwhL0Tg5tyxv2tHmKUpllIUOBng== X-Google-Smtp-Source: AGHT+IFBmaMwQPhVk/PKhq/tiznpJB029V9E1JbvGQ8Po/59CIuOklm5WyaLSHcS6ETDctvfd5+h X-Received: by 2002:ae9:ee14:0:b0:789:e6e4:c91f with SMTP id i20-20020ae9ee14000000b00789e6e4c91fmr1324508qkg.20.1711089762546; Thu, 21 Mar 2024 23:42:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711089762; cv=pass; d=google.com; s=arc-20160816; b=bbdr8i13CBkKu/zON5Sj46b6mcoW+exTf2gtYcFIr5ekmpg9Xg7VIPnZ4//X0gqx2l qtK7mKyezsCeUdQBtBSqOXiDbPI4lpLa1HzNhvF07jYKpVUWqIOu5tyvq7l8yYcb2amE QFEQrDsynHcaC7cd+YEE4eZZb9KitmUvvG7JNIyC86YQDD+5I/sQp/a1dNYsJ1gmlVvP hU7k4CB+xHkguxPVLvllPe6YQdgBg/rYIUNTjVxMKBU4Xy2a/o0LcAPhZuovRL+grqNj I1esZifn3NYiJarbneMAUHZ4mldPD2Pmaw7YMgAWU9R+e8BNXS4olOmF3QRfX7ajX3Lk Qh/w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=Y1gaWXZItRDtMmmu8Y/0+zpSgKReEb0ObQqf6ng97x8=; fh=Us/DORbzHj5XmgnBeJW+VlCBdo2pSXKHAejHonylCvY=; b=MXpuiYuN96xOBi4Jp/TSF5PTebqhXQWgGM0jhh+hP0ZLyUZ0vuQ4feTC55EFuGGA7K +FIagIdCz/GFeIA66RsS5ABj/oh2cXbOi+t/7Q4mT2ExZSm9ylrMLTe5JcQake6iS/Fm zocVCh1D4ErFdtz/gi7uWSa0eYL6r1ELjU4J+ujaXKpF86SxOOp8F/C8C9aEOWLOMAYS W2c3AGrrpLn0W0c4s1VL9KBMtCF45d88/ps0v8YevF/vSEsgy90KMsDbYVr9K7oL92hw 5IUN87zBTJ3H4N6InUVoz8LjADaEophVOCzhGPHPzL9IA+uLOzG8qm9L/wF96M/nEYKu gMOQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-111014-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111014-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id br17-20020a05620a461100b0078a12f58136si1657832qkb.127.2024.03.21.23.42.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 23:42:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-111014-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-111014-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111014-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 472EF1C235EF for ; Fri, 22 Mar 2024 06:42:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D7B3B15AD9; Fri, 22 Mar 2024 06:42:07 +0000 (UTC) Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6FF7F12E51; Fri, 22 Mar 2024 06:42:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.32 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711089727; cv=none; b=J9ipZFui5HUDJ4LhQwckuSyPaMsoUIKzUkfdUo4UjPk1cSIj8s2CQe93Yw613AY5+Onk8fd3iwxxArzcqi23vcZ0y1KiW9invv/cwTAELsZUXd0iCf0/dCTHWC8EdgasKI/8Az0XxmOJYGbpBCPdZpuRYqaAe+7uWTt+F7H4uIc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711089727; c=relaxed/simple; bh=erOBzZetGQeOc5+oyau5RI5nfAQAu9VK/IeB1+EeIo4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=mBfwMk5fZtCE8uZyojHCJpNyvhWmG5nRZD8U7AgKU8fL+Qc6fAgz7vLjjwsRhOcRK7ZLfnEaQyBTP6qnnbg/m837YVVfrGhp3wU01sKXYlltNN8BF3kvDDM3nGkVFvGh7ldRM55qRnmv0Lza8FNro9Y0MezNVeiWBxaQSgtvZFE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.163]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4V1CQb0y90z1vwgl; Fri, 22 Mar 2024 14:41:11 +0800 (CST) Received: from canpemm500010.china.huawei.com (unknown [7.192.105.118]) by mail.maildlp.com (Postfix) with ESMTPS id 336AD18005F; Fri, 22 Mar 2024 14:41:58 +0800 (CST) Received: from huawei.com (10.175.127.227) by canpemm500010.china.huawei.com (7.192.105.118) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 22 Mar 2024 14:41:57 +0800 From: Ye Bin To: , , , CC: , Subject: [PATCH v8 3/5] Documentation: tracing: add new type '%pd' and '%pD' for kprobe Date: Fri, 22 Mar 2024 14:43:06 +0800 Message-ID: <20240322064308.284457-4-yebin10@huawei.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240322064308.284457-1-yebin10@huawei.com> References: <20240322064308.284457-1-yebin10@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To canpemm500010.china.huawei.com (7.192.105.118) Similar to printk() '%pd' is for fetch dentry's name from struct dentry's pointer, and '%pD' is for fetch file's name from struct file's pointer. Signed-off-by: Ye Bin --- Documentation/trace/kprobetrace.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Documentation/trace/kprobetrace.rst b/Documentation/trace/kprobetrace.rst index bf9cecb69fc9..f13f0fc11251 100644 --- a/Documentation/trace/kprobetrace.rst +++ b/Documentation/trace/kprobetrace.rst @@ -58,8 +58,9 @@ Synopsis of kprobe_events NAME=FETCHARG : Set NAME as the argument name of FETCHARG. FETCHARG:TYPE : Set TYPE as the type of FETCHARG. Currently, basic types (u8/u16/u32/u64/s8/s16/s32/s64), hexadecimal types - (x8/x16/x32/x64), "char", "string", "ustring", "symbol", "symstr" - and bitfield are supported. + (x8/x16/x32/x64), VFS layer common type(%pd/%pD), "char", + "string", "ustring", "symbol", "symstr" and bitfield are + supported. (\*1) only for the probe on function entry (offs == 0). Note, this argument access is best effort, because depending on the argument type, it may be passed on @@ -113,6 +114,9 @@ With 'symstr' type, you can filter the event with wildcard pattern of the symbols, and you don't need to solve symbol name by yourself. For $comm, the default type is "string"; any other type is invalid. +VFS layer common type(%pd/%pD) is a special type, which fetches dentry's or +file's name from struct dentry's address or struct file's address. + .. _user_mem_access: User Memory Access -- 2.31.1