Skip to content

Commit 793616a

Browse files
committed
feat!: drop access enter evts gen, testing and parsing code
As the `access` exit events contain all the information needed, drop `access` enter events generation from all drivers, and all related testing and parsing code. BREAKING CHANGE: drop `access` enter evts gen and parsing Signed-off-by: Leonardo Di Giovanna <[email protected]>
1 parent 29367cc commit 793616a

File tree

7 files changed

+2
-86
lines changed

7 files changed

+2
-86
lines changed

driver/bpf/fillers.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,12 +1198,6 @@ FILLER(sys_fcntl_x, true) {
11981198
return bpf_push_u8_to_ring(data, fcntl_cmd_to_scap(cmd));
11991199
}
12001200

1201-
FILLER(sys_access_e, true) {
1202-
/* Parameter 1: mode (type: PT_UINT32) */
1203-
int mode = (int)bpf_syscall_get_argument(data, 1);
1204-
return bpf_push_u32_to_ring(data, (uint32_t)access_flags_to_scap(mode));
1205-
}
1206-
12071201
FILLER(sys_access_x, true) {
12081202
/* Parameter 1: res (type: PT_ERRNO) */
12091203
long retval = bpf_syscall_get_retval(data->ctx);

driver/fillers_table.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ const struct ppm_event_entry g_ppm_events[PPM_EVENT_MAX] = {
246246
{{AF_ID_RETVAL}, {0}, {1}, {2}}},
247247
[PPME_SYSCALL_SEMGET_E] = {FILLER_DISABLED},
248248
[PPME_SYSCALL_SEMGET_X] = {FILLER_REF(sys_semget_x)},
249-
[PPME_SYSCALL_ACCESS_E] = {FILLER_REF(sys_access_e)},
249+
[PPME_SYSCALL_ACCESS_E] = {FILLER_DISABLED},
250250
[PPME_SYSCALL_ACCESS_X] = {FILLER_REF(sys_access_x)},
251251
[PPME_SYSCALL_CHROOT_E] = {FILLER_REF(sys_empty)},
252252
[PPME_SYSCALL_CHROOT_X] = {FILLER_REF(sys_autofill), 2, APT_REG, {{AF_ID_RETVAL}, {0}}},

driver/modern_bpf/programs/tail_called/events/syscall_dispatched_events/access.bpf.c

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,6 @@
99
#include <helpers/interfaces/fixed_size_event.h>
1010
#include <helpers/interfaces/variable_size_event.h>
1111

12-
/*=============================== ENTER EVENT ===========================*/
13-
14-
SEC("tp_btf/sys_enter")
15-
int BPF_PROG(access_e, struct pt_regs *regs, long id) {
16-
struct ringbuf_struct ringbuf;
17-
if(!ringbuf__reserve_space(&ringbuf, ACCESS_E_SIZE, PPME_SYSCALL_ACCESS_E)) {
18-
return 0;
19-
}
20-
21-
ringbuf__store_event_header(&ringbuf);
22-
23-
/*=============================== COLLECT PARAMETERS ===========================*/
24-
25-
/* Parameter 1: mode (type: PT_UINT32) */
26-
int mode = (int)extract__syscall_argument(regs, 1);
27-
ringbuf__store_u32(&ringbuf, (uint32_t)access_flags_to_scap(mode));
28-
29-
/*=============================== COLLECT PARAMETERS ===========================*/
30-
31-
ringbuf__submit_event(&ringbuf);
32-
33-
return 0;
34-
}
35-
36-
/*=============================== ENTER EVENT ===========================*/
37-
3812
/*=============================== EXIT EVENT ===========================*/
3913

4014
SEC("tp_btf/sys_exit")

driver/ppm_fillers.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8057,18 +8057,6 @@ int f_sys_semctl_x(struct event_filler_arguments *args) {
80578057
return add_sentinel(args);
80588058
}
80598059

8060-
int f_sys_access_e(struct event_filler_arguments *args) {
8061-
unsigned long val;
8062-
int res;
8063-
8064-
/* Parameter 1: mode (type: PT_UINT32) */
8065-
syscall_get_arguments_deprecated(args, 1, 1, &val);
8066-
res = val_to_ring(args, access_flags_to_scap(val), 0, true, 0);
8067-
CHECK_RES(res);
8068-
8069-
return add_sentinel(args);
8070-
}
8071-
80728060
int f_sys_access_x(struct event_filler_arguments *args) {
80738061
int64_t retval;
80748062
int res;

driver/ppm_fillers.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ or GPL2.txt for full copies of the license.
111111
FN(sys_ppoll_x) \
112112
FN(sys_mount_e) \
113113
FN(sys_mount_x) \
114-
FN(sys_access_e) \
115114
FN(sys_access_x) \
116115
FN(sys_socket_x) \
117116
FN(sys_bpf_x) \

test/drivers/test_suites/syscall_enter_suite/access_e.cpp

Lines changed: 0 additions & 39 deletions
This file was deleted.

userspace/libpman/src/events_prog_table.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ event_prog_t event_prog_table[PPM_EVENT_MAX][MAX_FEATURE_CHECKS] = {
203203
[PPME_SYSCALL_EPOLL_CREATE_X] = {{false, "epoll_create_x", 0}},
204204
[PPME_SYSCALL_EPOLL_CREATE1_E] = {{false, "epoll_create1_e", 0}},
205205
[PPME_SYSCALL_EPOLL_CREATE1_X] = {{false, "epoll_create1_x", 0}},
206-
[PPME_SYSCALL_ACCESS_E] = {{false, "access_e", 0}},
206+
[PPME_SYSCALL_ACCESS_E] = {{true, NULL}},
207207
[PPME_SYSCALL_ACCESS_X] = {{false, "access_x", 0}},
208208
[PPME_SOCKET_GETSOCKOPT_E] = {{true, NULL}},
209209
[PPME_SOCKET_GETSOCKOPT_X] = {{false, "getsockopt_x", 0}},

0 commit comments

Comments
 (0)