You can use ptrace(PTRACE_SECCOMP_GET_FILTER, pid, (void *)i, data) where i is the index of the filter with the must recently installed being 0, and data is an array of struct sock_filter or NULL to read the size. The return value is the number of instructions in the filter.
You can use
ptrace(PTRACE_SECCOMP_GET_FILTER, pid, (void *)i, data)whereiis the index of the filter with the must recently installed being 0, anddatais an array ofstruct sock_filterorNULLto read the size. The return value is the number of instructions in the filter.