Skip to content

Commit

Permalink
bpf: fix incorrect inline asm constraints
Browse files Browse the repository at this point in the history
You cannot use the '+' modifier constraint on inputs, and here size is
not written to.

Signed-off-by: Mahe Tardy <[email protected]>
  • Loading branch information
mtardy authored and jrfastab committed Aug 8, 2024
1 parent 6ff9e80 commit 2fc399f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bpf/process/types/basic.h
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ FUNC_INLINE long copy_path(char *args, const struct path *arg)
"r2 = *(u16 *)%[mode];\n"
"*(u16 *)(r1 + 4) = r2;\n"
:
: [pid] "m"(args), [flags] "m"(flags), [offset] "+m"(size), [mode] "m"(i_mode)
: [pid] "m"(args), [flags] "m"(flags), [offset] "m"(size), [mode] "m"(i_mode)
: "r0", "r1", "r2", "r7", "memory"
: a);
a:
Expand Down

0 comments on commit 2fc399f

Please sign in to comment.