Commit c3bea2c
committed
seccomp: Separate conditions for personality syscall into single rule
Separate each syscall condition (argument) for personality syscall into
a single rule because the libseccomp can only compare each condition once
in a single rule. Otherwise, the adding returns EINVAL on failure.
In order to address the failure, general OCI runtimes such as runc add each
condition as a separate rule if two or more conditions have the same conditions,
but this is a way for keeping compatibility (old behavior). Hence, it will lead
wrong behavior because the conditions for the rules will be logical-OR instead of
logical-AND.
In case of the OCI tests for personality syscall, we should explicitly separate
the conditions into a single rule as logical-OR for container runtimes that do not
support the above old behavior.
Ref. https://man7.org/linux/man-pages/man3/seccomp_rule_add.3.html
Signed-off-by: Manabu Sugimoto <[email protected]>1 parent 17b3287 commit c3bea2c
1 file changed
+12
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
357 | 363 | | |
358 | 364 | | |
359 | 365 | | |
360 | 366 | | |
361 | 367 | | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
362 | 374 | | |
363 | 375 | | |
364 | 376 | | |
| |||
0 commit comments