mainline inclusion from mainline-v6.10-rc1 commit 5e37460f5f9266bcd037137f1bd9eb24b9940faf category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IAMXDU
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?i...
--------------------------------
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.
Link: https://lore.kernel.org/all/20240322064308.284457-4-yebin10@huawei.com/
Signed-off-by: Ye Bin yebin10@huawei.com Acked-by: Masami Hiramatsu (Google) mhiramat@kernel.org Signed-off-by: Masami Hiramatsu (Google) mhiramat@kernel.org Conflicts: Documentation/trace/kprobetrace.rst [Fix context diff] Signed-off-by: Ye Bin yebin10@huawei.com --- Documentation/trace/kprobetrace.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/Documentation/trace/kprobetrace.rst b/Documentation/trace/kprobetrace.rst index b175d88f31eb..0f17078a18a5 100644 --- a/Documentation/trace/kprobetrace.rst +++ b/Documentation/trace/kprobetrace.rst @@ -58,8 +58,8 @@ 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), "string", "ustring" and bitfield - are supported. + (x8/x16/x32/x64), VFS layer common type(%pd/%pD), + "string", "ustring" and bitfield are supported.
(*1) only for the probe on function entry (offs == 0). (*2) only for return probe. @@ -98,6 +98,9 @@ Symbol type('symbol') is an alias of u32 or u64 type (depends on BITS_PER_LONG) which shows given pointer in "symbol+offset" style. 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