Commit 1a967e9
tracing: Remove "__attribute__()" from the type field of event format
With CONFIG_DEBUG_INFO_BTF=y and PAHOLE_HAS_BTF_TAG=y, `__user` is
converted to `__attribute__((btf_type_tag("user")))`. In this case,
some syscall events have it for __user data, like below;
/sys/kernel/tracing # cat events/syscalls/sys_enter_openat/format
name: sys_enter_openat
ID: 720
format:
field:unsigned short common_type; offset:0; size:2; signed:0;
field:unsigned char common_flags; offset:2; size:1; signed:0;
field:unsigned char common_preempt_count; offset:3; size:1; signed:0;
field:int common_pid; offset:4; size:4; signed:1;
field:int __syscall_nr; offset:8; size:4; signed:1;
field:int dfd; offset:16; size:8; signed:0;
field:const char __attribute__((btf_type_tag("user"))) * filename; offset:24; size:8; signed:0;
field:int flags; offset:32; size:8; signed:0;
field:umode_t mode; offset:40; size:8; signed:0;
Then the trace event filter fails to set the string acceptable flag
(FILTER_PTR_STRING) to the field and rejects setting string filter;
# echo 'filename.ustring ~ "*ftracetest-dir.wbx24v*"' \
>> events/syscalls/sys_enter_openat/filter
sh: write error: Invalid argument
# cat error_log
[ 723.743637] event filter parse error: error: Expecting numeric field
Command: filename.ustring ~ "*ftracetest-dir.wbx24v*"
Since this __attribute__ makes format parsing complicated and not
needed, remove the __attribute__(.*) from the type string.
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lore.kernel.org/175376583493.1688759.12333973498014733551.stgit@mhiramat.tok.corp.google.com
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>1 parent 9ba817f commit 1a967e9
3 files changed
Lines changed: 127 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5930 | 5930 | | |
5931 | 5931 | | |
5932 | 5932 | | |
5933 | | - | |
5934 | | - | |
| 5933 | + | |
| 5934 | + | |
| 5935 | + | |
| 5936 | + | |
5935 | 5937 | | |
5936 | 5938 | | |
5937 | 5939 | | |
5938 | | - | |
5939 | | - | |
| 5940 | + | |
| 5941 | + | |
| 5942 | + | |
| 5943 | + | |
| 5944 | + | |
| 5945 | + | |
| 5946 | + | |
5940 | 5947 | | |
5941 | 5948 | | |
5942 | 5949 | | |
5943 | | - | |
| 5950 | + | |
| 5951 | + | |
| 5952 | + | |
| 5953 | + | |
5944 | 5954 | | |
5945 | 5955 | | |
5946 | 5956 | | |
| |||
10334 | 10344 | | |
10335 | 10345 | | |
10336 | 10346 | | |
10337 | | - | |
| 10347 | + | |
10338 | 10348 | | |
10339 | 10349 | | |
10340 | 10350 | | |
| |||
10387 | 10397 | | |
10388 | 10398 | | |
10389 | 10399 | | |
10390 | | - | |
10391 | | - | |
10392 | | - | |
10393 | 10400 | | |
10394 | 10401 | | |
10395 | 10402 | | |
10396 | 10403 | | |
10397 | 10404 | | |
10398 | 10405 | | |
10399 | 10406 | | |
10400 | | - | |
| 10407 | + | |
| 10408 | + | |
10401 | 10409 | | |
10402 | 10410 | | |
10403 | 10411 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2125 | 2125 | | |
2126 | 2126 | | |
2127 | 2127 | | |
2128 | | - | |
| 2128 | + | |
2129 | 2129 | | |
2130 | 2130 | | |
2131 | 2131 | | |
2132 | 2132 | | |
2133 | 2133 | | |
2134 | | - | |
| 2134 | + | |
2135 | 2135 | | |
2136 | 2136 | | |
2137 | 2137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3264 | 3264 | | |
3265 | 3265 | | |
3266 | 3266 | | |
| 3267 | + | |
| 3268 | + | |
| 3269 | + | |
| 3270 | + | |
| 3271 | + | |
| 3272 | + | |
| 3273 | + | |
| 3274 | + | |
| 3275 | + | |
| 3276 | + | |
| 3277 | + | |
| 3278 | + | |
| 3279 | + | |
| 3280 | + | |
| 3281 | + | |
| 3282 | + | |
| 3283 | + | |
| 3284 | + | |
| 3285 | + | |
| 3286 | + | |
| 3287 | + | |
| 3288 | + | |
| 3289 | + | |
| 3290 | + | |
| 3291 | + | |
| 3292 | + | |
| 3293 | + | |
| 3294 | + | |
| 3295 | + | |
| 3296 | + | |
| 3297 | + | |
| 3298 | + | |
| 3299 | + | |
| 3300 | + | |
| 3301 | + | |
| 3302 | + | |
| 3303 | + | |
| 3304 | + | |
| 3305 | + | |
| 3306 | + | |
| 3307 | + | |
| 3308 | + | |
| 3309 | + | |
| 3310 | + | |
| 3311 | + | |
| 3312 | + | |
| 3313 | + | |
| 3314 | + | |
| 3315 | + | |
| 3316 | + | |
| 3317 | + | |
| 3318 | + | |
| 3319 | + | |
| 3320 | + | |
| 3321 | + | |
| 3322 | + | |
| 3323 | + | |
| 3324 | + | |
| 3325 | + | |
| 3326 | + | |
| 3327 | + | |
| 3328 | + | |
| 3329 | + | |
| 3330 | + | |
| 3331 | + | |
| 3332 | + | |
| 3333 | + | |
| 3334 | + | |
| 3335 | + | |
| 3336 | + | |
3267 | 3337 | | |
3268 | 3338 | | |
3269 | 3339 | | |
3270 | 3340 | | |
| 3341 | + | |
3271 | 3342 | | |
| 3343 | + | |
3272 | 3344 | | |
3273 | 3345 | | |
3274 | | - | |
3275 | 3346 | | |
3276 | 3347 | | |
3277 | | - | |
| 3348 | + | |
3278 | 3349 | | |
3279 | 3350 | | |
| 3351 | + | |
| 3352 | + | |
| 3353 | + | |
| 3354 | + | |
| 3355 | + | |
3280 | 3356 | | |
3281 | 3357 | | |
3282 | | - | |
3283 | | - | |
3284 | | - | |
3285 | | - | |
3286 | | - | |
3287 | | - | |
3288 | | - | |
| 3358 | + | |
| 3359 | + | |
| 3360 | + | |
3289 | 3361 | | |
3290 | | - | |
3291 | | - | |
| 3362 | + | |
| 3363 | + | |
| 3364 | + | |
| 3365 | + | |
| 3366 | + | |
| 3367 | + | |
| 3368 | + | |
| 3369 | + | |
3292 | 3370 | | |
3293 | | - | |
3294 | | - | |
3295 | | - | |
3296 | | - | |
3297 | | - | |
3298 | | - | |
3299 | | - | |
3300 | | - | |
3301 | | - | |
| 3371 | + | |
| 3372 | + | |
| 3373 | + | |
| 3374 | + | |
| 3375 | + | |
| 3376 | + | |
3302 | 3377 | | |
3303 | 3378 | | |
| 3379 | + | |
| 3380 | + | |
3304 | 3381 | | |
3305 | 3382 | | |
3306 | 3383 | | |
| |||
3310 | 3387 | | |
3311 | 3388 | | |
3312 | 3389 | | |
| 3390 | + | |
| 3391 | + | |
3313 | 3392 | | |
3314 | 3393 | | |
3315 | 3394 | | |
3316 | | - | |
| 3395 | + | |
| 3396 | + | |
3317 | 3397 | | |
3318 | 3398 | | |
3319 | 3399 | | |
3320 | 3400 | | |
| 3401 | + | |
3321 | 3402 | | |
3322 | 3403 | | |
3323 | 3404 | | |
| |||
3330 | 3411 | | |
3331 | 3412 | | |
3332 | 3413 | | |
| 3414 | + | |
3333 | 3415 | | |
3334 | 3416 | | |
3335 | 3417 | | |
| |||
3349 | 3431 | | |
3350 | 3432 | | |
3351 | 3433 | | |
| 3434 | + | |
3352 | 3435 | | |
3353 | 3436 | | |
| 3437 | + | |
| 3438 | + | |
| 3439 | + | |
3354 | 3440 | | |
3355 | 3441 | | |
3356 | 3442 | | |
| |||
0 commit comments