Bug 1152773 - seccomp error if running containers with podman on armv7
seccomp error if running containers with podman on armv7
Status: RESOLVED FIXED
: 1174170 (view as bug list)
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Kernel
Current
Other Other
: P5 - None : Normal (vote)
: ---
Assigned To: openSUSE Kernel Bugs
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-10-02 11:44 UTC by Thorsten Kukuk
Modified: 2021-05-03 16:37 UTC (History)
5 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thorsten Kukuk 2019-10-02 11:44:36 UTC
Calling "podman run --rm -it registry.opensuse.org/opensuse/busybox" on a Raspberry Pi2 stops with the following error:

Error: container_linux.go:345: starting container process caused "error loading seccomp filter into kernel: invalid argument": OCI runtime error
Comment 1 Guillaume GARDET 2019-10-11 11:41:47 UTC
armv7 has no seccomp filter since HAVE_ARCH_SECCOMP_FILTER is not selected by armv7. Only arm64 selects HAVE_ARCH_SECCOMP_FILTER.

In 2012 some patches were sent to add this support to armv7, but never ended in the kernel: 
  http://lkml.iu.edu/hypermail/linux/kernel/1210.3/03963.html
Comment 2 Fabian Vogt 2020-07-16 07:29:28 UTC
*** Bug 1174170 has been marked as a duplicate of this bug. ***
Comment 3 Guillaume GARDET 2020-07-20 07:00:50 UTC
(In reply to Guillaume GARDET from comment #1)
> armv7 has no seccomp filter since HAVE_ARCH_SECCOMP_FILTER is not selected
> by armv7. Only arm64 selects HAVE_ARCH_SECCOMP_FILTER.
> 
> In 2012 some patches were sent to add this support to armv7, but never ended
> in the kernel: 
>   http://lkml.iu.edu/hypermail/linux/kernel/1210.3/03963.html

CONFIG_HAVE_ARCH_SECCOMP_FILTER is enabled since https://github.com/openSUSE/kernel-source/commit/e9e55d07c18023edb983e14bacdc2ff2542671c7

So, it should be fine now, but it is still broken.
Comment 4 Fabian Vogt 2021-04-27 11:59:30 UTC
(In reply to Guillaume GARDET from comment #3)
> (In reply to Guillaume GARDET from comment #1)
> > armv7 has no seccomp filter since HAVE_ARCH_SECCOMP_FILTER is not selected
> > by armv7. Only arm64 selects HAVE_ARCH_SECCOMP_FILTER.
> > 
> > In 2012 some patches were sent to add this support to armv7, but never ended
> > in the kernel: 
> >   http://lkml.iu.edu/hypermail/linux/kernel/1210.3/03963.html
> 
> CONFIG_HAVE_ARCH_SECCOMP_FILTER is enabled since
> https://github.com/openSUSE/kernel-source/commit/
> e9e55d07c18023edb983e14bacdc2ff2542671c7
> 
> So, it should be fine now, but it is still broken.

It might work using kernel-default meanwhile, but kernel-lpae (and kernel-obs-build, same binary) are missing:

CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
CONFIG_SECCOMP_FILTER=y

Reassigning to kernel.
Comment 5 Takashi Iwai 2021-04-29 11:28:53 UTC
SECCOMP_FILTER is available only when CONFIG_OABI_COMPAT=n.  It's explicitly limited via commit 9170217510cd280c704966738e7c1660c8fa5cbd
    ARM: 7888/1: seccomp: not compatible with ARM OABI

And kernel-lpae defines this, so CONFIG_SECCOMP_FILTER isn't available there.
Comment 6 Fabian Vogt 2021-04-29 12:42:57 UTC
(In reply to Takashi Iwai from comment #5)
> SECCOMP_FILTER is available only when CONFIG_OABI_COMPAT=n.  It's explicitly
> limited via commit 9170217510cd280c704966738e7c1660c8fa5cbd
>     ARM: 7888/1: seccomp: not compatible with ARM OABI
> 
> And kernel-lpae defines this, so CONFIG_SECCOMP_FILTER isn't available there.

Sounds like that should be changed. For default it was part of your commit:

Update config files: disable CONFIG_OABI_COMPAT for 32bit Arm (bsc#1165462)

That didn't touch lpae though, it's out of sync.

I don't think much of the diff between default and lpae is intentional, maybe it should be rebased on default again.
Comment 7 Takashi Iwai 2021-04-29 12:45:45 UTC
A good point, it must be an oversight, then.  I'm going to push the correction.
Comment 8 Takashi Iwai 2021-05-03 16:37:38 UTC
The fix got merged to master and stable branches.