Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1516464lqt; Wed, 20 Mar 2024 06:31:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUPZ5Wd53vv5uOzdbWFlxZNffUcqcl3MXu5fixCSlPnAh8fYW7g1ERoVI789V1c7jx5mTDn0KmzZy345MscJCagmn9G67KKE2UPcO9QLg== X-Google-Smtp-Source: AGHT+IHCDIy6IUsqU9QjVPEys9Kn6QL65j5Des1dZY0+b6RxcjNB5yUPYaKM2+84AZHd7Fp81rTO X-Received: by 2002:a17:90a:a010:b0:29b:7f1f:c7e9 with SMTP id q16-20020a17090aa01000b0029b7f1fc7e9mr7956932pjp.0.1710941493375; Wed, 20 Mar 2024 06:31:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710941493; cv=pass; d=google.com; s=arc-20160816; b=cvtVragkN8GNa8Hup5Scf88SNF9lAJXqQNfa/G18HQqeHWwhcvWzwuuYglmOZrWmxD MSMsq/xTRtJkX8w5DgDb6CFg895JpiJ0u3TNW4A1Cl9/+5FlQROkT13kqVY5DJiIbej2 qIYCiSre/SP5g+Sk0U63IsCjYYey4/PmAKwBZAYeN7sniex1N9Dg2u2AHsXLrMVJvR6n BGgOZloAE74VkVmcuSfujHqrDi184vkF1J+wBVpjPG6pNBBnwkbynzxyHqWHYbbLZXS/ Ym3SD0Z5/Y8gd5nqSKaejvrBk7X48qD8s15ArIfYrCvQ7loR21dYK4At0OwMXQEYtRKY a6uA== 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=IXmywNctt5dlSPg1xzGMzgSDSKYA4p3DlCgRE4PKzxtlm6TCRNtx2YSm4L3NazBO+3 we44672Fzcl8vv1+sB7HKBdgOdTUYlrnkzIND+nubRmMcTAQ8HRW9fRpxhTELMVedTT8 SleeJ6EAkOJFFMa2udC7wXeQpcO3gowsPotWNK2Dlse0l1rOReDq+shvAwHNKrY769VU MjTD14bEjUMxgHXbeojVRtehiSI/P7It5z7UedURzj4/RJMf46zmiGddF5GjK+kuzQr7 RGM0vLI7NWdHQ1dR8VF98odqHsUYSAi+u66M1XqlZ3mxQ0NEDVcvvTsZBb7YjWUkP90o Tncg==; 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-108943-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-108943-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id e1-20020a656781000000b005d3adb65694si12098719pgr.757.2024.03.20.06.31.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 06:31:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-108943-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::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-108943-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-108943-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 090B4B243FF for ; Wed, 20 Mar 2024 13:28:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 430E942070; Wed, 20 Mar 2024 13:28:22 +0000 (UTC) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) (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 E05D140BE5; Wed, 20 Mar 2024 13:28:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.191 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710941301; cv=none; b=nJOzlSQgu2rp4GpUnTiJ03r9WgA/TBUYgVhRNaVoEUeMyJrMP50A4OIWfdAAnL6veYmbjxLJ0D67cOLXYzPGki+hP16az8djuC9HX8ktgNbdBJoCdELjgOizz8SwmitsVkZeYOSBhOuNU6OqEMnWb4PcyLcNgRcdYlrmhQ5RSzY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710941301; 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=egdv//vjTLv/Dnwgm5FCHtX9kgu/A4joSMg560AJ/lqf+L8Vkg7X4iraBjKnGhniEcDyY5FEBeuNKtIfCAcJQuMxVkVSdlq2s6nDg/9TxlsyyDxvNmXchwqO9tuVfIjyd+i7aKcERnxuWoOL3K4YTia164c1TQi/yRc4qdcw5JM= 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.191 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.163.17]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4V08VB5Qf9z1h2mb; Wed, 20 Mar 2024 21:25:38 +0800 (CST) Received: from canpemm500010.china.huawei.com (unknown [7.192.105.118]) by mail.maildlp.com (Postfix) with ESMTPS id 1AD731A0172; Wed, 20 Mar 2024 21:28:12 +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; Wed, 20 Mar 2024 21:28:11 +0800 From: Ye Bin To: , , , CC: , Subject: [PATCH v7 3/5] Documentation: tracing: add new type '%pd' and '%pD' for kprobe Date: Wed, 20 Mar 2024 21:29:22 +0800 Message-ID: <20240320132924.2802187-4-yebin10@huawei.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240320132924.2802187-1-yebin10@huawei.com> References: <20240320132924.2802187-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: dggems703-chm.china.huawei.com (10.3.19.180) 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