File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -4984,13 +4984,21 @@ statfunc int execute_failed_tail2(struct pt_regs *ctx)
4984
4984
if (!init_tailcall_program_data (& p , ctx ))
4985
4985
return -1 ;
4986
4986
4987
- syscall_data_t * sys = & p .task_info -> syscall_data ;
4988
- save_str_arr_to_buf (
4989
- & p .event -> args_buf , (const char * const * ) sys -> args .args [1 ], 10 ); // userspace argv
4987
+ long long argv , envp ;
4988
+ struct pt_regs * regs = get_current_task_pt_regs ();
4989
+
4990
+ if (p .event -> context .syscall == SYSCALL_EXECVE ) {
4991
+ argv = get_syscall_arg2 (p .event -> task , regs , false);
4992
+ envp = get_syscall_arg3 (p .event -> task , regs , false);
4993
+ } else {
4994
+ argv = get_syscall_arg3 (p .event -> task , regs , false);
4995
+ envp = get_syscall_arg4 (p .event -> task , regs , false);
4996
+ }
4997
+
4998
+ save_str_arr_to_buf (& p .event -> args_buf , (const char * const * ) argv , 10 ); // userspace argv
4990
4999
4991
5000
if (p .config -> options & OPT_EXEC_ENV ) {
4992
- save_str_arr_to_buf (
4993
- & p .event -> args_buf , (const char * const * ) sys -> args .args [2 ], 11 ); // userspace envp
5001
+ save_str_arr_to_buf (& p .event -> args_buf , (const char * const * ) envp , 11 ); // userspace envp
4994
5002
}
4995
5003
4996
5004
int ret = PT_REGS_RC (ctx ); // needs to be int
Original file line number Diff line number Diff line change @@ -12954,7 +12954,6 @@ var CoreEvents = map[ID]Definition{
12954
12954
probes : []Probe {
12955
12955
{handle : probes .ExecBinprm , required : false },
12956
12956
{handle : probes .ExecBinprmRet , required : false },
12957
- {handle : probes .SyscallEnter__Internal , required : true },
12958
12957
},
12959
12958
tailCalls : []TailCall {
12960
12959
{"prog_array" , "trace_execute_failed1" , []uint32 {TailProcessExecuteFailed1 }},
You can’t perform that action at this time.
0 commit comments