[PATCH v8 5/5] selftests/ftrace: add fprobe test cases for VFS type "%pd" and "%pD"

2024-03-22 Thread Ye Bin
This patch adds fprobe test cases for new print format type "%pd/%pD".The test cases test the following items: 1. Test "%pd" type for dput(); 2. Test "%pD" type for vfs_read(); This test case require enable CONFIG_HAVE_FUNCTION_ARG_ACCESS_API configuration. Signed-o

[PATCH v8 3/5] Documentation: tracing: add new type '%pd' and '%pD' for kprobe

2024-03-22 Thread Ye Bin
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

[PATCH v8 1/5] tracing/probes: support '%pd' type for print struct dentry's name

2024-03-22 Thread Ye Bin
stprobe: (dput+0x4/0x30) name="enable" grep-15389 [003] . 16922.836103: testprobe: (dput+0x4/0x30) name="enable" bash-14844 [001] . 16931.820909: testprobe: (dput+0x4/0x30) name="enable" Note that this expects the given argument (e.g. $a

[PATCH v8 0/5] support '%pd' and '%pD' for print file name

2024-03-22 Thread Ye Bin
ff v2 vs v1: 1. Use "%pd/%pD" print format instead of "pd/pD" print format; 2. Add "%pd/%pD" in README; 3. Expand "%pd/%pD" argument before parameter parsing; 4. Add more detail information in ftrace documentation; 5. Add test cases for new print format in self

[PATCH v8 4/5] selftests/ftrace: add kprobe test cases for VFS type "%pd" and "%pD"

2024-03-22 Thread Ye Bin
ON_ARG_ACCESS_API configuration. Signed-off-by: Ye Bin --- .../ftrace/test.d/kprobe/kprobe_args_vfs.tc | 40 +++ 1 file changed, 40 insertions(+) create mode 100644 tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_vfs.tc diff --git a/tools/testing/selftests/ftrace/t

[PATCH v8 2/5] tracing/probes: support '%pD' type for print struct file's name

2024-03-22 Thread Ye Bin
d" trace | grep "enable" grep-15108 [003] . 5228.328609: testprobe: (vfs_read+0x4/0xbb0) name="enable" Note that this expects the given argument (e.g. $arg1) is an address of struct file. User must ensure it. Signed-off-by: Ye Bin --- kernel/trace/trace.c |

[PATCH v7 2/5] tracing/probes: support '%pD' type for print struct file's name

2024-03-20 Thread Ye Bin
Similar to '%pD' for printk, use '%pD' for print struct file's name. Signed-off-by: Ye Bin --- kernel/trace/trace.c | 2 +- kernel/trace/trace_probe.c | 57 +++--- 2 files changed, 36 insertions(+), 23 deletions(-) diff --git a/kernel/trace/trace.c b

[PATCH v7 4/5] selftests/ftrace: add kprobe test cases for VFS type "%pd" and "%pD"

2024-03-20 Thread Ye Bin
ON_ARG_ACCESS_API configuration. Signed-off-by: Ye Bin --- .../ftrace/test.d/kprobe/kprobe_args_vfs.tc | 40 +++ 1 file changed, 40 insertions(+) create mode 100644 tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_vfs.tc diff --git a/tools/testing/selftests/ftrace/t

[PATCH v7 5/5] selftests/ftrace: add fprobe test cases for VFS type "%pd" and "%pD"

2024-03-20 Thread Ye Bin
This patch adds fprobe test cases for new print format type "%pd/%pD".The test cases test the following items: 1. Test "%pd" type for dput(); 2. Test "%pD" type for vfs_read(); This test case require enable CONFIG_HAVE_FUNCTION_ARG_ACCESS_API configuration. Signed-o

[PATCH v7 3/5] Documentation: tracing: add new type '%pd' and '%pD' for kprobe

2024-03-20 Thread Ye Bin
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

[PATCH v7 0/5] support '%pd' and '%pD' for print file name

2024-03-20 Thread Ye Bin
stead of "pd/pD" print format; 2. Add "%pd/%pD" in README; 3. Expand "%pd/%pD" argument before parameter parsing; 4. Add more detail information in ftrace documentation; 5. Add test cases for new print format in selftests/ftrace; Ye Bin (5): tracing/probes: support '%pd'

[PATCH v7 1/5] tracing/probes: support '%pd' type for print struct dentry's name

2024-03-20 Thread Ye Bin
Support print type '%pd' for print dentry's name. Signed-off-by: Ye Bin --- kernel/trace/trace.c| 2 +- kernel/trace/trace_fprobe.c | 6 + kernel/trace/trace_kprobe.c | 6 + kernel/trace/trace_probe.c | 50 + kernel/trace/trace_probe.h

[PATCH v6 6/8] Documentation: tracing: add new type '%pd' and '%pD' for kprobe

2024-03-15 Thread Ye Bin
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

[PATCH v6 3/8] tracing/probes: support '%pd' type for fprobe

2024-03-15 Thread Ye Bin
Support print type '%pd' for print dentry's or file's name. Signed-off-by: Ye Bin --- kernel/trace/trace_fprobe.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/kernel/trace/trace_fprobe.c b/kernel/trace/trace_fprobe.c index 7d2ddbcfa377..988d68e906ad 100644 --- a/kernel/trace

[PATCH v6 7/8] selftests/ftrace: add kprobe test cases for VFS type "%pd" and "%pD"

2024-03-15 Thread Ye Bin
ON_ARG_ACCESS_API configuration. Signed-off-by: Ye Bin --- .../ftrace/test.d/kprobe/kprobe_args_vfs.tc | 43 +++ 1 file changed, 43 insertions(+) create mode 100644 tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_vfs.tc diff --git a/tools/testing/selftests/ftrace/t

[PATCH v6 8/8] selftests/ftrace: add fprobe test cases for VFS type "%pd" and "%pD"

2024-03-15 Thread Ye Bin
This patch adds fprobe test cases for new print format type "%pd/%pD".The test cases test the following items: 1. Test "%pd" type for dput(); 2. Test "%pD" type for vfs_read(); This test case require enable CONFIG_HAVE_FUNCTION_ARG_ACCESS_API configuration. Signed-o

[PATCH v6 5/8] tracing: add new type "%pd/%pD" in readme_msg[]

2024-03-15 Thread Ye Bin
Signed-off-by: Ye Bin --- kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index b12f8384a36a..831dfd0773a4 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -5510,7 +5510,7 @@ static const char

[PATCH v6 4/8] tracing/probes: support '%pD' type for print struct file's name

2024-03-15 Thread Ye Bin
Similar to '%pD' for printk, use '%pD' for print struct file's name. Signed-off-by: Ye Bin --- kernel/trace/trace_probe.c | 57 +++--- 1 file changed, 35 insertions(+), 22 deletions(-) diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c index

[PATCH v6 0/8] support '%pd' and '%pD' for print file name

2024-03-15 Thread Ye Bin
1: 1. Use "%pd/%pD" print format instead of "pd/pD" print format; 2. Add "%pd/%pD" in README; 3. Expand "%pd/%pD" argument before parameter parsing; 4. Add more detail information in ftrace documentation; 5. Add test cases for new print format in selftests/f

[PATCH v6 1/8] tracing/probes: add traceprobe_expand_dentry_args() helper

2024-03-15 Thread Ye Bin
Add traceprobe_expand_dentry_args() to expand dentry args. this API is prepare to support "%pd" print format for kprobe. Signed-off-by: Ye Bin --- kernel/trace/trace_probe.c | 50 ++ kernel/trace/trace_probe.h | 2 ++ 2 files changed, 52 insertion

[PATCH v6 2/8] tracing/probes: support '%pd' type for print struct dentry's name

2024-03-15 Thread Ye Bin
Similar to '%pd' for printk, use '%pd' for print struct dentry's name. Signed-off-by: Ye Bin --- kernel/trace/trace_kprobe.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c index c4c6e0e0068b..7cbb43740b4f 100644 --- a/kernel

[PATCH v5 8/8] selftests/ftrace: add fprobe test cases for VFS type "%pd" and "%pD"

2024-01-24 Thread Ye Bin
This patch adds fprobe test cases for new print format type "%pd/%pD".The test cases test the following items: 1. Test "%pd" type for dput(); 2. Test "%pD" type for vfs_read(); This test case require enable CONFIG_HAVE_FUNCTION_ARG_ACCESS_API configuration. Signed-o

[PATCH v5 7/8] selftests/ftrace: add kprobe test cases for VFS type "%pd" and "%pD"

2024-01-24 Thread Ye Bin
ON_ARG_ACCESS_API configuration. Signed-off-by: Ye Bin --- .../ftrace/test.d/kprobe/kprobe_args_vfs.tc | 43 +++ 1 file changed, 43 insertions(+) create mode 100644 tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_vfs.tc diff --git a/tools/testing/selftests/ftrace/t

[PATCH v5 6/8] Documentation: tracing: add new type '%pd' and '%pD' for kprobe

2024-01-24 Thread Ye Bin
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

[PATCH v5 5/8] tracing: add new type "%pd/%pD" in readme_msg[]

2024-01-24 Thread Ye Bin
Signed-off-by: Ye Bin --- kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 2a7c6fd934e9..13197d3b86bd 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -5745,7 +5745,7 @@ static const char

[PATCH v5 4/8] tracing/probes: support '%pd/%pD' type for fprobe

2024-01-24 Thread Ye Bin
Support print type '%pd/%pD' for print dentry's or file's name. Signed-off-by: Ye Bin --- kernel/trace/trace_fprobe.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/kernel/trace/trace_fprobe.c b/kernel/trace/trace_fprobe.c index 7d2ddbcfa377..988d68e906ad 100644 --- a/kernel/trace

[PATCH v5 2/8] tracing/probes: support '%pd' type for print struct dentry's name

2024-01-24 Thread Ye Bin
Similar to '%pd' for printk, use '%pd' for print struct dentry's name. Signed-off-by: Ye Bin --- kernel/trace/trace_kprobe.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c index c4c6e0e0068b..7cbb43740b4f 100644 --- a/kernel

[PATCH v5 3/8] tracing/probes: support '%pD' type for print struct file's name

2024-01-24 Thread Ye Bin
Similar to '%pD' for printk, use '%pD' for print struct file's name. Signed-off-by: Ye Bin --- kernel/trace/trace_probe.c | 57 +++--- 1 file changed, 35 insertions(+), 22 deletions(-) diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c index

[PATCH v5 1/8] tracing/probes: add traceprobe_expand_dentry_args() helper

2024-01-24 Thread Ye Bin
Add traceprobe_expand_dentry_args() to expand dentry args. this API is prepare to support "%pd" print format for kprobe. Signed-off-by: Ye Bin --- kernel/trace/trace_probe.c | 50 ++ kernel/trace/trace_probe.h | 2 ++ 2 files changed, 52 insertion

[PATCH v5 0/8] support '%pd' and '%pD' for print file name

2024-01-24 Thread Ye Bin
. Expand "%pd/%pD" argument before parameter parsing; 4. Add more detail information in ftrace documentation; 5. Add test cases for new print format in selftests/ftrace; Ye Bin (8): tracing/probes: add traceprobe_expand_dentry_args() helper tracing/probes: support '%pd' type for pri

[PATCH v4 7/7] selftests/ftrace: add test cases for VFS type "%pd" and "%pD"

2024-01-23 Thread Ye Bin
This patch adds test cases for new print format type "%pd/%pD".The test cases test the following items: 1. Test README if add "%pd/%pD" type; 2. Test "%pd" type for dput(); 3. Test "%pD" type for vfs_read(); Signed-off-by: Ye Bin --- .../ftrace

[PATCH v4 6/7] Documentation: tracing: add new type '%pd' and '%pD' for kprobe

2024-01-23 Thread Ye Bin
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 | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation

[PATCH v4 2/7] tracing/probes: add traceprobe_expand_dentry_args() helper

2024-01-23 Thread Ye Bin
Add traceprobe_expand_dentry_args() to expand dentry args. this API is prepare to support "%pd" print format for kprobe. Signed-off-by: Ye Bin --- kernel/trace/trace_probe.c | 36 kernel/trace/trace_probe.h | 2 ++ 2 files changed, 38 insertion

[PATCH v4 3/7] tracing/probes: support '%pd' type for print struct dentry's name

2024-01-23 Thread Ye Bin
Similar to '%pd' for printk, use '%pd' for print struct dentry's name. Signed-off-by: Ye Bin --- kernel/trace/trace_kprobe.c | 6 ++ kernel/trace/trace_probe.h | 1 + 2 files changed, 7 insertions(+) diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c index c4c6e0e0068b

[PATCH v4 4/7] tracing/probes: support '%pD' type for print struct file's name

2024-01-23 Thread Ye Bin
Similar to '%pD' for printk, use '%pD' for print struct file's name. Signed-off-by: Ye Bin --- kernel/trace/trace_probe.c | 41 -- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c index

[PATCH v4 1/7] string.h: add str_has_suffix() helper for test string ends with specify string

2024-01-23 Thread Ye Bin
str_has_suffix() is test string if ends with specify string, and also this API may return the index of where the suffix was found. Signed-off-by: Ye Bin --- include/linux/string.h | 28 1 file changed, 28 insertions(+) diff --git a/include/linux/string.h b/include

[PATCH v4 5/7] tracing: add new type "%pd/%pD" in readme_msg[]

2024-01-23 Thread Ye Bin
Signed-off-by: Ye Bin --- kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 2a7c6fd934e9..13197d3b86bd 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -5745,7 +5745,7 @@ static const char

[PATCH v4 0/7] support '%pd' and '%pD' for print file name

2024-01-23 Thread Ye Bin
/%pD" in README; 3. Expand "%pd/%pD" argument before parameter parsing; 4. Add more detail information in ftrace documentation; 5. Add test cases for new print format in selftests/ftrace; Ye Bin (7): string.h: add str_has_suffix() helper for test string ends with specif

[PATCH v3 7/7] selftests/ftrace: add test cases for VFS type "%pd" and "%pD"

2024-01-22 Thread Ye Bin
This patch adds test cases for new print format type "%pd/%pD".The test cases test the following items: 1. Test README if add "%pd/%pD" type; 2. Test "%pd" type for dput(); 3. Test "%pD" type for vfs_read(); Signed-off-by: Ye Bin --- .../ftrace

[PATCH v3 3/7] tracing/probes: support '%pd' type for print struct dentry's name

2024-01-22 Thread Ye Bin
Similar to '%pd' for printk, use '%pd' for print struct dentry's name. Signed-off-by: Ye Bin --- kernel/trace/trace_kprobe.c | 6 ++ kernel/trace/trace_probe.h | 1 + 2 files changed, 7 insertions(+) diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c index c4c6e0e0068b

[PATCH v3 4/7] tracing/probes: support '%pD' type for print struct file's name

2024-01-22 Thread Ye Bin
Similar to '%pD' for printk, use '%pD' for print struct file's name. Signed-off-by: Ye Bin --- kernel/trace/trace_probe.c | 41 -- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c index

[PATCH v3 0/7] support '%pd' and '%pD' for print file name

2024-01-22 Thread Ye Bin
cases for new print format in selftests/ftrace; Ye Bin (7): string.h: add str_has_suffix() helper for test string ends with specify string tracing/probes: add traceprobe_expand_dentry_args() helper tracing/probes: support '%pd' type for print struct dentry's name tracing/probes: support

[PATCH v3 2/7] tracing/probes: add traceprobe_expand_dentry_args() helper

2024-01-22 Thread Ye Bin
Add traceprobe_expand_dentry_args() to expand dentry args. this API is prepare to support "%pd" print format for kprobe. Signed-off-by: Ye Bin --- kernel/trace/trace_probe.c | 36 kernel/trace/trace_probe.h | 2 ++ 2 files changed, 38 insertion

[PATCH v3 6/7] Documentation: tracing: add new type '%pd' and '%pD' for kprobe

2024-01-22 Thread Ye Bin
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 | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation

[PATCH v3 1/7] string.h: add str_has_suffix() helper for test string ends with specify string

2024-01-22 Thread Ye Bin
str_has_suffix() is test string if ends with specify string, and also this API may return the index of where the suffix was found. Signed-off-by: Ye Bin --- include/linux/string.h | 28 1 file changed, 28 insertions(+) diff --git a/include/linux/string.h b/include

[PATCH v3 5/7] tracing: add new type "%pd/%pD" in readme_msg[]

2024-01-22 Thread Ye Bin
Signed-off-by: Ye Bin --- kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 2a7c6fd934e9..13197d3b86bd 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -5745,7 +5745,7 @@ static const char

[PATCH v2 5/7] tracing: add new type "%pd/%pD" in readme_msg[]

2024-01-21 Thread Ye Bin
Signed-off-by: Ye Bin --- kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 2a7c6fd934e9..13197d3b86bd 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -5745,7 +5745,7 @@ static const char

[PATCH v2 7/7] selftests/ftrace: add test cases for VFS type "%pd" and "%pD"

2024-01-21 Thread Ye Bin
This patch adds test cases for new print format type "%pd/%pD".The test cases test the following items: 1. Test README if add "%pd/%pD" type; 2. Test "%pd" type for dput(); 3. Test "%pD" type for vfs_read(); Signed-off-by: Ye Bin --- .../ftrace

[PATCH v2 4/7] tracing/probes: support '%pD' type for print struct file's name

2024-01-21 Thread Ye Bin
Similar to '%pD' for printk, use '%pD' for print struct file's name. Signed-off-by: Ye Bin --- kernel/trace/trace_probe.c | 41 -- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c index

[PATCH v2 6/7] Documentation: tracing: add new type '%pd' and '%pD' for kprobe

2024-01-21 Thread Ye Bin
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 | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation

[PATCH v2 3/7] tracing/probes: support '%pd' type for print struct dentry's name

2024-01-21 Thread Ye Bin
Similar to '%pd' for printk, use '%pd' for print struct dentry's name. Signed-off-by: Ye Bin --- kernel/trace/trace_kprobe.c | 6 ++ kernel/trace/trace_probe.h | 1 + 2 files changed, 7 insertions(+) diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c index c4c6e0e0068b

[PATCH v2 2/7] tracing/probes: add traceprobe_expand_dentry_args() helper

2024-01-21 Thread Ye Bin
Add traceprobe_expand_dentry_args() to expand dentry args. this API is prepare to support "%pd" print format for kprobe. Signed-off-by: Ye Bin --- kernel/trace/trace_probe.c | 34 ++ kernel/trace/trace_probe.h | 2 ++ 2 files changed, 36 insertion

[PATCH v2 0/7] support '%pd' and '%pD' for print file name

2024-01-21 Thread Ye Bin
at instead of "pd/pD" print format; 2. Add "%pd/%pD" in README; 3. Expand "%pd/%pD" argument before parameter parsing; 4. Add more detail information in ftrace documentation; 5. Add test cases for new print format in selftests/ftrace; Ye Bin (7): string.h: add str_

[PATCH v2 1/7] string.h: add str_has_suffix() helper for test string ends with specify string

2024-01-21 Thread Ye Bin
str_has_suffix() is test string if ends with specify string. Signed-off-by: Ye Bin --- include/linux/string.h | 20 1 file changed, 20 insertions(+) diff --git a/include/linux/string.h b/include/linux/string.h index 433c207a01da..e47e9597af27 100644 --- a/include/linux

[PATCH 2/3] tracing/probes: support '%pD' type for print struct file's name

2024-01-18 Thread Ye Bin
Similar to '%pD' for printk, use 'pD' for print struct file's name. Signed-off-by: Ye Bin --- kernel/trace/trace_probe.c | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c index 460f98b85b1c

[PATCH 3/3] Documentation: tracing: add new type 'pd' and 'pD' for kprobe

2024-01-18 Thread Ye Bin
Similar to printk() 'pd' is for print dentry's name, and 'pD' is for print file's name. Signed-off-by: Ye Bin --- Documentation/trace/kprobetrace.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/trace/kprobetrace.rst b/Documentation/trace/kprobetrace.rst

[PATCH 0/3] support '%pd' and '%pD' for print file name

2024-01-18 Thread Ye Bin
During fault locating, the file name needs to be printed based on the dentry/file address. The offset needs to be calculated each time, which is troublesome. Similar to printk, kprobe supports printing file names for dentry/file addresses. Ye Bin (3): tracing/probes: support '%pd' type

[PATCH 1/3] tracing/probes: support '%pd' type for print struct dentry's name

2024-01-18 Thread Ye Bin
Similar to '%pd' for printk, use 'pd' for print struct dentry's name. Signed-off-by: Ye Bin --- kernel/trace/trace_probe.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c index 4dc74d73fc1d

[PATCH v2] ext4: Fix bug on in ext4_es_cache_extent as ext4_split_extent_at failed

2021-04-20 Thread Ye Bin
it can be fixed by fsck later. Signed-off-by: Ye Bin --- fs/ext4/extents.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 77c84d6f1af6..6161db9c17c9 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -3245,8 +3245,

[PATCH -next] soc: fsl: qe: use DEFINE_SPINLOCK() for spinlock

2021-04-09 Thread Ye Bin
spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot Signed-off-by: Ye Bin --- drivers/soc/fsl/qe/qe_common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/soc/fsl/qe

[PATCH -next] dca: use DEFINE_SPINLOCK() for spinlock and DEFINE_IDR() for idr

2021-04-09 Thread Ye Bin
spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). idr can be initialized automatically with DEFINE_IDR() rather than explicitly calling idr_init(). Reported-by: Hulk Robot Signed-off-by: Ye Bin --- drivers/dca/dca-sysfs.c | 7

[PATCH -next] [POWERPC] Rename get_property to of_get_property: use DEFINE_SPINLOCK() for spinlock

2021-04-09 Thread Ye Bin
spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot Signed-off-by: Ye Bin --- drivers/macintosh/via-pmu-led.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/macintosh/via-pmu

[PATCH -next] macintosh/via-pmu: Use DEFINE_SPINLOCK() for spinlock

2021-04-09 Thread Ye Bin
spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot Signed-off-by: Ye Bin --- drivers/macintosh/via-pmu.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/macintosh/via-pmu.c b

[PATCH -next] platform/chrome: cros_ec_lpc: Use DEFINE_MUTEX() for mutex lock

2021-04-09 Thread Ye Bin
mutex lock can be initialized automatically with DEFINE_MUTEX() rather than explicitly calling mutex_init(). Reported-by: Hulk Robot Signed-off-by: Ye Bin --- drivers/platform/chrome/cros_ec_lpc_mec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/platform/chrome

[PATCH -next] dlm: use DEFINE_MUTEX() for mutex lock

2021-04-09 Thread Ye Bin
mutex lock can be initialized automatically with DEFINE_MUTEX() rather than explicitly calling mutex_init(). Reported-by: Hulk Robot Signed-off-by: Ye Bin --- fs/dlm/lockspace.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c index

[PATCH -next] dlm: use DEFINE_MUTEX() for mutex lock

2021-04-09 Thread Ye Bin
mutex lock can be initialized automatically with DEFINE_MUTEX() rather than explicitly calling mutex_init(). Reported-by: Hulk Robot Signed-off-by: Ye Bin --- fs/dlm/debug_fs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/dlm/debug_fs.c b/fs/dlm/debug_fs.c index

[PATCH -next] char: xilinx_hwicap: use DEFINE_MUTEX() for mutex lock

2021-04-09 Thread Ye Bin
mutex lock can be initialized automatically with DEFINE_MUTEX() rather than explicitly calling mutex_init(). Reported-by: Hulk Robot Signed-off-by: Ye Bin --- drivers/char/xilinx_hwicap/xilinx_hwicap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/char

[PATCH -next] ASoC: codecs: wsa881x: constify static struct snd_soc_dai_ops

2021-04-08 Thread Ye Bin
The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin --- sound/soc/codecs/wsa881x.c | 2 +- 1 file changed

[PATCH -next] ASoC: rt1019: constify static struct snd_soc_dai_ops

2021-04-08 Thread Ye Bin
The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin --- sound/soc/codecs/rt1019.c | 2 +- 1 file changed

[PATCH -next] ASoC: cx2072x: constify static struct snd_soc_dai_ops

2021-04-08 Thread Ye Bin
The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin --- sound/soc/codecs/cx2072x.c | 2 +- 1 file changed

[PATCH -next] ASoC: amd: renoir: acp3x-pdm-dma: constify static struct snd_soc_dai_ops

2021-04-08 Thread Ye Bin
The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin --- sound/soc/amd/renoir/acp3x-pdm-dma.c | 2 +- 1

[PATCH -next] ASoC: rt715-sdca: Constify static struct snd_soc_dai_ops

2021-04-08 Thread Ye Bin
The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin --- sound/soc/codecs/rt715-sdca.c | 2 +- 1 file

[PATCH -next] ASoC: codecs: lpass-rx-macro: constify static struct snd_soc_dai_ops

2021-04-08 Thread Ye Bin
The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin --- sound/soc/codecs/lpass-rx-macro.c | 2 +- 1 file

[PATCH -next] ASoC: wcd934x: constify static struct snd_soc_dai_ops

2021-04-08 Thread Ye Bin
The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin --- sound/soc/codecs/wcd934x.c | 2 +- 1 file changed

[PATCH -next] ASoC: codecs: lpass-tx-macro: constify static struct snd_soc_dai_ops

2021-04-08 Thread Ye Bin
The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin --- sound/soc/codecs/lpass-tx-macro.c | 2 +- 1 file

[PATCH -next] ASoC: rt711-sdca: Constify static struct snd_soc_dai_ops

2021-04-08 Thread Ye Bin
The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin --- sound/soc/codecs/rt711-sdca.c | 2 +- 1 file

[PATCH -next] ASoC: tas2770: Constify static struct snd_soc_dai_ops

2021-04-08 Thread Ye Bin
The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin --- sound/soc/codecs/tas2770.c | 2 +- 1 file changed

[PATCH -next] ASoC: codecs: lpass-wsa-macro: constify static struct snd_soc_dai_ops

2021-04-08 Thread Ye Bin
The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin --- sound/soc/codecs/lpass-wsa-macro.c | 2 +- 1 file

[PATCH -next] ASoC: wcd9335: constify static struct snd_soc_dai_ops

2021-04-08 Thread Ye Bin
The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin --- sound/soc/codecs/wcd9335.c | 2 +- 1 file changed

[PATCH -next] ASoC: Intel: KMB: Constify static struct snd_soc_dai_ops

2021-04-08 Thread Ye Bin
The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin --- sound/soc/intel/keembay/kmb_platform.c | 2 +- 1

[PATCH -next] ASoC: amd: raven: acp3x-i2s: Constify static struct snd_soc_dai_ops

2021-04-08 Thread Ye Bin
The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin --- sound/soc/amd/raven/acp3x-i2s.c | 2 +- 1 file

[PATCH -next] ASoC: tas2764: constify static struct snd_soc_dai_ops

2021-04-08 Thread Ye Bin
The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin --- sound/soc/codecs/tas2764.c | 2 +- 1 file changed

[PATCH -next] ASoC: codecs: lpass-va-macro: constify static struct snd_soc_dai_ops

2021-04-07 Thread Ye Bin
The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin --- sound/soc/codecs/lpass-va-macro.c | 2 +- 1 file

[PATCH v3] ext4: Fix ext4_error_err save negative errno into superblock

2021-04-05 Thread Ye Bin
As write_mmp_block return 1 when buffer isn't uptodate, return -EIO is more appropriate. Fixes: 54d3adbc29f0 ("ext4: save all error info in save_error_info() and drop ext4_set_errno()") Reported-by: Liu Zhi Qiang Signed-off-by: Ye Bin Reviewed-by: Andreas Dilger --- fs/ext4/mmp.c

[RFC] ext4: Fix fs can't panic when abort by user

2021-04-01 Thread Ye Bin
error()") Signed-off-by: Ye Bin --- fs/ext4/super.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index b9693680463a..acb75dc396f8 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -667,9 +667,6 @@ static void ext4_handle_er

[PATCH v2] ext4: Fix ext4_error_err save negative errno into superblock

2021-04-01 Thread Ye Bin
As read_mmp_block return 1 when failed. read_mmp_block return -EIO when buffer isn't uptodate. Fixes: 54d3adbc29f0 ("ext4: save all error info in save_error_info() and drop ext4_set_errno()") Reported-by: Liu Zhi Qiang Signed-off-by: Ye Bin --- fs/ext4/mmp.c | 2 +- 1 file changed, 1

[PATCH] ext4: Fix ext4_error_err save negative errno into superblock

2021-04-01 Thread Ye Bin
As read_mmp_block return 1 when failed, so just pass retval to save_error_info. Fixes: 54d3adbc29f0 ("ext4: save all error info in save_error_info() and drop ext4_set_errno()") Reported-by: Liu Zhi Qiang Signed-off-by: Ye Bin --- fs/ext4/mmp.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH] ext4: Fix bug on in ext4_es_cache_extent as ext4_split_extent_at failed

2021-03-24 Thread Ye Bin
, we just update "ex->ee_len = orig_ex.ee_len", this will lead to extent overlap, then cause bug on when cache extent. If call ext4_ext_insert_extent failed don't update ex->ee_len with old value. Maybe there will lead to block leak, but it can be fixed by fsck later. Signed-off-by:

[PATCH] usb: typec: remove unused variable ‘ret’ in typec_partner_set_pd_revision

2021-02-03 Thread Ye Bin
Fix follow warning: drivers/usb/typec/class.c:763:6: warning: unused variable ‘ret’ [-Wunused-variable] int ret; ^~~ Reported-by: Hulk Robot Signed-off-by: Ye Bin --- drivers/usb/typec/class.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/typec/class.c b/drivers/usb

[PATCH] Bluetooth: btusb: remove set but not used variable in btusb_mtk_setup_firmware_79xx

2021-02-03 Thread Ye Bin
btmtk_patch_header *patchhdr = NULL; ^~~~ Reported-by: Hulk Robot Signed-off-by: Ye Bin --- drivers/bluetooth/btusb.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index eeafb8432c0f..9609b6cbf20f 100644

[PATCH] drm/nouveau: remove set but not used variable ‘pdev’ in nouveau_bios_init

2021-01-22 Thread Ye Bin
Fix follow warning: drivers/gpu/drm/nouveau/nouveau_bios.c:2086:18: warning: variable ‘pdev’ set but not used [-Wunused-but-set-variable] struct pci_dev *pdev; ^~~~ Reported-by: Hulk Robot Signed-off-by: Ye Bin --- drivers/gpu/drm/nouveau/nouveau_bios.c | 2 -- 1 file

[PATCH] init/version.c: remove unused including

2021-01-22 Thread Ye Bin
Fix follow warning: init/version.c:16:1: unused including Reported-by: Hulk Robot Signed-off-by: Ye Bin --- init/version.c | 1 - 1 file changed, 1 deletion(-) diff --git a/init/version.c b/init/version.c index 92afc782b043..b1329f16c6b6 100644 --- a/init/version.c +++ b/init/version.c

[PATCH] PCI: endpoint: remove set but not used parameter in pci-epf-ntb.c

2021-01-22 Thread Ye Bin
/pci-epf-ntb.c:972:17: warning: variable ‘peer_barno’ set but not used [-Wunused-but-set-variable] 972 | enum pci_barno peer_barno, barno; Reported-by: Hulk Robot Signed-off-by: Ye Bin --- drivers/pci/endpoint/functions/pci-epf-ntb.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions

[PATH v2] scsi: scsi_dh_rdac: Avoid crash during rdac_bus_attach

2021-01-12 Thread Ye Bin
alue after add list, this may lead to reference NULL ptr. Signed-off-by: Ye Bin --- drivers/scsi/device_handler/scsi_dh_rdac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/device_handler/scsi_dh_rdac.c b/drivers/scsi/device_handler/scsi_dh_rdac.c index

[PATCH] scsi: scsi_dh_rdac: Avoid crash during rdac_bus_attach

2021-01-11 Thread Ye Bin
t;sdev = NULL; There is race runing rdac_bus_attach concurrently, maybe we access rdac_dh_data but h->sdev has not been set. Signed-off-by: Ye Bin --- drivers/scsi/device_handler/scsi_dh_rdac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/device_handler/scsi_d

[PATCH] ACPI: PM: s2idle: Remove useless variable ‘obj_new’ in lpi_device_get_constraints_amd

2021-01-05 Thread Ye Bin
Fix warning: drivers/acpi/x86/s2idle.c:138:25: warning: variable ‘obj_new’ set but not used [-Wunused-but-set-variable] union acpi_object *obj_new; ^~~ Reported-by: Hulk Robot Signed-off-by: Ye Bin --- drivers/acpi/x86/s2idle.c | 2 -- 1 file changed, 2

[PATCH] pinctrl: nomadik: remove unused variable ‘wake’ in nmk_gpio_dbg_show_one

2021-01-05 Thread Ye Bin
Fix follow warning: drivers/pinctrl/nomadik/pinctrl-nomadik.c:952:8: warning: unused variable ‘wake’ [-Wunused-variable] bool wake; ^~~~ Reported-by: Hulk Robot Signed-off-by: Ye Bin --- drivers/pinctrl/nomadik/pinctrl-nomadik.c | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCH] io_uring: Delete useless variable ‘id’ in io_prep_async_work

2021-01-05 Thread Ye Bin
Fix follow warning: fs/io_uring.c:1523:22: warning: variable ‘id’ set but not used [-Wunused-but-set-variable] struct io_identity *id; ^~ Reported-by: Hulk Robot Signed-off-by: Ye Bin --- fs/io_uring.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/io_uring.c

[PATCH] crypto: testmgr - Fix format argument warning

2020-10-09 Thread Ye Bin
Fix follow warning: [crypto/testmgr.c:2317]: (warning) %d in format string (no. 5) requires 'int' but the argument type is 'unsigned int'. Reported-by: Hulk Robot Signed-off-by: Ye Bin --- crypto/testmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/testmgr.c b

[PATCH] ext4: Fix WARN_ON_ONCE in __ext4_handle_dirty_metadata()

2020-10-09 Thread Ye Bin
and the buffer up-to-date flag is cleared. If that happens mark_buffer_dirty() can end up throwing a WARN_ON_ONCE. To Fix this warning, lock buffer when call mark_buffer_dirty in function __ext4_handle_dirty_metadate. Signed-off-by: Ye Bin --- fs/ext4/ext4_jbd2.c | 2 ++ 1 file changed, 2 insertions

  1   2   >