File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed
Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -72,6 +72,11 @@ struct trace_event_raw_sys_exit_rw__stub {
7272 long int ret ;
7373};
7474
75+ struct iov {
76+ char * buf ;
77+ __u64 size ;
78+ };
79+
7580static inline __attribute__((__always_inline__ ))
7681int trace_enter_write (__u64 fd , char * buf , __u64 size ) {
7782 __u64 id = bpf_get_current_pid_tgid ();
@@ -177,11 +182,11 @@ int trace_exit_read(struct trace_event_raw_sys_exit_rw__stub* ctx) {
177182
178183SEC ("tracepoint/syscalls/sys_enter_writev" )
179184int sys_enter_writev (struct trace_event_raw_sys_enter_rw__stub * ctx ) {
180- void * vec ;
181- if (bpf_probe_read (& vec , sizeof (void * ), (void * )ctx -> buf ) < 0 ) {
185+ struct iov iov0 = {} ;
186+ if (bpf_probe_read (& iov0 , sizeof (struct iov ), (void * )ctx -> buf ) < 0 ) {
182187 return 0 ;
183188 }
184- return trace_enter_write (ctx -> fd , vec , 0 );
189+ return trace_enter_write (ctx -> fd , iov0 . buf , iov0 . size );
185190}
186191
187192SEC ("tracepoint/syscalls/sys_enter_write" )
You can’t perform that action at this time.
0 commit comments