[Will attempt to add to -next, but this may need to wait
until there is a motivating usecase, like ARM, since x86
does the right thing already.]
On some arches, -ENOSYS is not set as the default system call
return value. This means that a skipped or invalid system call
does not yield this response. That behavior is not inline with
the stated ABI of seccomp filter. To that end, we ensure we set
that value here to avoid arch idiosyncrasies.
Signed-off-by: Will Drewry <wad@chromium.org>
TEST=tegra2_kaen; boot, strace works, seccomp testsuite trace tests pass
BUG=chromium-os:27878
Change-Id: I03a5e633d2fbb5d3d3cc33c067b2887068364c17
Reviewed-on: https://gerrit.chromium.org/gerrit/21337
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Will Drewry <wad@chromium.org>
Tested-by: Will Drewry <wad@chromium.org>
Signed-off-by: Sasha Levitskiy <sanek@google.com>
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>