mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1504] build failure on some architectures #1004
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#1004
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @reinerh on GitHub (Aug 30, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1504
It looks like the mmap2 syscall is not available on every architecture.
Because of this some builds are failing, as SYS_mmap2 is used in src/fseccomp/seccomp.c.
See also: Debian buildd state.
@topimiettinen commented on GitHub (Aug 30, 2017):
@netblue30 has already committed a fix.
But all of the failing builds also include this warning:
I'm not sure if it is meaningful even to build the fseccomp tool or any seccomp related code on a platform if support for seccomp is not complete for the platform. For example, near this warning ARCH_NR is defined as 0 for unsupported platforms, breaking VALIDATE_ARCHITECTURE bpf.
@netblue30 commented on GitHub (Aug 30, 2017):
Potential fix here:
a93f00cc8eThe second problem is #warning "Platform does not support seccomp filter yet". The code in src/include/seccomp.h looks like this:
We have seccomp support only for amd64, i386 and arm (32bit). It is possible some platforms don't have seccomp support in Linux kernel. We can easily add all platforms here, but we cannot test them.
@topimiettinen commented on GitHub (Aug 30, 2017):
@reinerh: I pushed
a3e73427which should improve the build on several platforms, please test.@reinerh commented on GitHub (Aug 30, 2017):
@topimiettinen thank you for the fix!
It is currently building, but unfortunately it failed already on arm64: https://buildd.debian.org/status/package.php?p=firejail&suite=experimental
Though this error seems to be a completely different one now.
Edit: permalink for the new revision.
@reinerh commented on GitHub (Aug 30, 2017):
I guess a default value of
""should fix this issue?@topimiettinen commented on GitHub (Sep 1, 2017):
Yes, it seems none of the syscalls in that list are available. I'll prepare a fix.
@topimiettinen commented on GitHub (Sep 1, 2017):
It does not work, empty syscall lists are not allowed, but I took a different approach with
9252c4c1.@reinerh commented on GitHub (Sep 1, 2017):
@topimiettinen Thanks.
Shouldn't the same workaround also be applied to the other SyscallGroupList items in the list?
The compiler already complains at line 86, which is the item before the one you fixed...
@topimiettinen commented on GitHub (Sep 1, 2017):
Yes in theory, but luckily the other groups don't seem to have the problem, there's always at least one syscall known. Unless I fixed the wrong one... We'll see what happens when you rebuild it.
@reinerh commented on GitHub (Sep 1, 2017):
@topimiettinen I just confirmed that in arm64 libc the syscalls mentioned in the @cpu-emulation are all not available. So this group would still fail.
(checked syscall.h in this .deb)
@topimiettinen commented on GitHub (Sep 2, 2017):
I pushed a workaround
f883155bfor @cpu-emulation and removed the wrong one.@reinerh commented on GitHub (Sep 7, 2017):
@topimiettinen Thanks, it helped for some architectures.
But I noticed that also all syscalls from the @obsolete and @raw-io group are not available on some architectures (e.g. arm64).
Would it make sense to add the dummy syscall to all groups?
@reinerh commented on GitHub (Sep 10, 2017):
Here are the build results for 0.9.50.
@topimiettinen commented on GitHub (Sep 10, 2017):
Thanks, please test
c3acf2d2.I think other groups shouldn't need any workarounds, they all contain enough common syscalls.
Maybe there are better approaches to solve the build problems. If an architecture does not have seccomp support in Firejail yet, we should disable HAVE_SECCOMP (even if a header file exists) and stop building fseccomp (or build a dummy executable). An empty syscall list could be accepted in some cases, like only for internal use but not in lists given by the user.
@reinerh commented on GitHub (Sep 14, 2017):
Thank @topimiettinen!
The fix was helping (build state (the sh4 error is something unrelated)). I've also cherry-picked it into the 0.9.50-bugfixes branch.