Skip to content

Commit 02084ef

Browse files
committed
fix
Signed-off-by: Jiri Olsa <[email protected]>
1 parent 6432243 commit 02084ef

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bpf/process/pfilter.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,13 +329,14 @@ selector_match(__u32 *f, struct selector_filter *sel,
329329
res[i] = 1;
330330
}
331331

332+
asm volatile("%[len] &= 0x3;\n"
333+
: [len] "+r"(len));
334+
332335
/* Updating the number of iterations below, you should also
333336
* update the function namespaceSelectorValue() in kernel.go
334337
*/
335338
#ifdef __LARGE_BPF_PROG
336339
for (i = 0; i < len; i++) {
337-
if (i > (MAX_SELECTOR_VALUES - 1)) // we need to make the verifier happy
338-
break;
339340
res[i] = process_filter(sel, f, enter, &msg->ns, &msg->caps);
340341
index = next_pid_value(index, f, ty);
341342
sel->index = index;

0 commit comments

Comments
 (0)