Revert seccomp tests that allow it to be used on non-x86 architectures
PATCH 1/1 Revert seccomp tests that allow it to be used on non-x86 architectures
Unfortunately it turns out that libseccomp 2.2 still does not work correctly on non-x86 architectures; return to the previous configure setup of insisting on libseccomp 2.1 or better and i386/x86_64 and disabling seccomp support in all other situations.
This reverts the two commits:
* "seccomp: libseccomp version varying according to arch" (commit 896848f0d3e2393905845ef2b244bb2601f9df0c)
* "seccomp: update libseccomp version and remove arch restriction" (commit 8e27fc200457e3f2473d0069263774d4ba17bd85)
---
With QEMU 2.3 release so close this seems the safest approach.
configure | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
configure +2 -7
@@ -1848,19 +1848,14 @@ fi # libseccomp check if test "$seccomp" != "no" ; then - if $pkg_config --atleast-version=2.2.0 libseccomp || - (test "$cpu" = "i386" || test "$cpu" = "x86_64" && - $pkg_config --atleast-version=2.1.1 libseccomp); then + if test "$cpu" = "i386" || test "$cpu" = "x86_64" && + $pkg_config --atleast-version=2.1.1 libseccomp; then libs_softmmu="$libs_softmmu `$pkg_config --libs libseccomp`" QEMU_CFLAGS="$QEMU_CFLAGS `$pkg_config --cflags libseccomp`" seccomp="yes" else if test "$seccomp" = "yes"; then - if test "$cpu" = "i386" || test "$cpu" = "x86_64"; then feature_not_found "libseccomp" "Install libseccomp devel >= 2.1.1" - else - feature_not_found "libseccomp" "Install libseccomp devel >= 2.2.0" - fi fi seccomp="no" fi
Signature · 1 line
1.9.1
Quoted 49 lines · Peter Maydell
Unfortunately it turns out that libseccomp 2.2 still does not work correctly on non-x86 architectures; return to the previous configure setup of insisting on libseccomp 2.1 or better and i386/x86_64 and disabling seccomp support in all other situations.
This reverts the two commits:
* "seccomp: libseccomp version varying according to arch" (commit896848f0d3e2393905845ef2b244bb2601f9df0c)
* "seccomp: update libseccomp version and remove arch restriction" (commit8e27fc200457e3f2473d0069263774d4ba17bd85)Signed-off-by Peter Maydell <[email protected]>---
With QEMU 2.3 release so close this seems the safest approach.configure | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)configure +2
-7@@ -1848,19 +1848,14 @@ fi # libseccomp check if test "$seccomp" != "no" ; then - if $pkg_config --atleast-version=2.2.0 libseccomp || - (test "$cpu" = "i386" || test "$cpu" = "x86_64" && - $pkg_config --atleast-version=2.1.1 libseccomp); then + if test "$cpu" = "i386" || test "$cpu" = "x86_64" && + $pkg_config --atleast-version=2.1.1 libseccomp; then libs_softmmu="$libs_softmmu `$pkg_config --libs libseccomp`" QEMU_CFLAGS="$QEMU_CFLAGS `$pkg_config --cflags libseccomp`" seccomp="yes" else if test "$seccomp" = "yes"; then - if test "$cpu" = "i386" || test "$cpu" = "x86_64"; then feature_not_found "libseccomp" "Install libseccomp devel >= 2.1.1" - else - feature_not_found "libseccomp" "Install libseccomp devel >= 2.2.0" - fi fi seccomp="no" fiSignature · 1 line
1.9.1
Hi Peter,
Can we now revert this revert, along with bumping the non-x86 arch atleast-version to v2.2.1?
Thanks,
drew
Quoted 2 lines · Andrew Jones
Can we now revert this revert, along with bumping the non-x86 arch atleast-version to v2.2.1
Probably. I suggest you submit a patch and test it on the relevant architectures and seccomp versions.
thanks
-- PMM
Quoted 7 lines · Peter Maydell
Quoted 2 lines · Andrew Jones
Can we now revert this revert, along with bumping the non-x86 arch atleast-version to v2.2.1
Probably. I suggest you submit a patch and test it on the relevant architectures and seccomp versions.
I don't see any problems with the light testing (booting a guest) I've done on my mustang, but AArch64 worked with libseccomp 2.2.0 too. So I dusted off my Midway (updated to Fedora 21 that has libseccomp 2.2.1 packaged), and gave it a try, but unfortunately it still doesn't work...
I found that we needed to add another syscall to the whitelist; the arm-private 'cacheflush', as it's used by __builtin___clear_cache. And, from libseccomp's git history it appears that syscall is known
commit a710a2d246bdc73ba77e3ff5624e790688cc51fd
Author: Paul Moore <[email protected]> Date: Wed May 6 12:05:45 2015 -0400
arm: add some missing syscalls
Add the following syscalls to the ARM arch/ABI and update the syscall validation script.
* breakpoint()
* cacheflush()
* usr26()
* usr32()
* set_tls()
And also appears to be in 2.2.1
$ git describe a710a2d246bdc73ba77e3ff5624e790688cc51fd v2.2.0-10-ga710a2d246bdc
However the qemu thread that makes that syscall still dies, even with this patch
qemu-seccomp.c +0 -0
@@ -237,7 +237,8 @@ static const struct QemuSeccompSyscall
seccomp_whitelist[] = {
{ SCMP_SYS(fadvise64), 240 },
{ SCMP_SYS(inotify_init1), 240 },
{ SCMP_SYS(inotify_add_watch), 240 },
- { SCMP_SYS(mbind), 240 }
+ { SCMP_SYS(mbind), 240 },
+ { SCMP_SYS(cacheflush), 240 },};
int seccomp_start(void)
Paul, can you help me figure out what I'm missing?
Thanks,
drew
Quoted 61 lines · Andrew Jones
Quoted 6 lines · Peter Maydell
Quoted 2 lines · Andrew Jones
Can we now revert this revert, along with bumping the non-x86 arch atleast-version to v2.2.1
Probably. I suggest you submit a patch and test it on the relevant architectures and seccomp versions.
I don't see any problems with the light testing (booting a guest) I've done on my mustang, but AArch64 worked with libseccomp 2.2.0 too. So I dusted off my Midway (updated to Fedora 21 that has libseccomp 2.2.1 packaged), and gave it a try, but unfortunately it still doesn't work...
I found that we needed to add another syscall to the whitelist; the arm-private 'cacheflush', as it's used by
__builtin___clear_cache. And, from libseccomp's git history it appears that syscall is knowncommit
a710a2d246bdc73ba77e3ff5624e790688cc51fdAuthor: Paul Moore <[email protected]> Date: Wed May 6 12:05:45 2015 -0400arm: add some missing syscalls
Add the following syscalls to the ARM
arch/ABIand update the syscall validation script.*
breakpoint()
*cacheflush()
*usr26()
*usr32()
*set_tls()Reported-by Purcareata Bogdan <[email protected]>Signed-off-by Paul Moore <[email protected]>And also appears to be in 2.2.1
$ git describe a710a2d246bdc73ba77e3ff5624e790688cc51fd v2.2.0-10-ga710a2d246bdcHowever the qemu thread that makes that syscall still dies, even with this patch
qemu-seccomp.c +2
-1@@ -237,7 +237,8 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { {SCMP_SYS (fadvise64),240 }, {SCMP_SYS (inotify_init1),240 }, {SCMP_SYS (inotify_add_watch),240 }, - {SCMP_SYS (mbind),240 } + {SCMP_SYS (mbind),240 }, + {SCMP_SYS (cacheflush),240 }, };int
seccomp_start(void)
Quoted 1 line
Paul, can you help me figure out what I'm missing?
Perhaps a stupid question, but you did verify that it is cacheflush that is causing the problem? The seccomp filter code will emit a message to syslog or the audit log, depending on your configuration, with the syscall number.
#./tools/scmp_sys_resolver -a arm cacheflush
983042
#./tools/scmp_sys_resolver -a arm 983042
Signature · 2 lines
paul moore security @ redhat
Quoted 68 lines · Paul Moore
Quoted 61 lines · Andrew Jones
Quoted 6 lines · Peter Maydell
Quoted 2 lines · Andrew Jones
Can we now revert this revert, along with bumping the non-x86 arch atleast-version to v2.2.1
Probably. I suggest you submit a patch and test it on the relevant architectures and seccomp versions.
I don't see any problems with the light testing (booting a guest) I've done on my mustang, but AArch64 worked with libseccomp 2.2.0 too. So I dusted off my Midway (updated to Fedora 21 that has libseccomp 2.2.1 packaged), and gave it a try, but unfortunately it still doesn't work...
I found that we needed to add another syscall to the whitelist; the arm-private 'cacheflush', as it's used by
__builtin___clear_cache. And, from libseccomp's git history it appears that syscall is knowncommit
a710a2d246bdc73ba77e3ff5624e790688cc51fdAuthor: Paul Moore <[email protected]> Date: Wed May 6 12:05:45 2015 -0400arm: add some missing syscalls
Add the following syscalls to the ARM
arch/ABIand update the syscall validation script.*
breakpoint()
*cacheflush()
*usr26()
*usr32()
*set_tls()Reported-by Purcareata Bogdan <[email protected]>Signed-off-by Paul Moore <[email protected]>And also appears to be in 2.2.1
$ git describe a710a2d246bdc73ba77e3ff5624e790688cc51fd v2.2.0-10-ga710a2d246bdcHowever the qemu thread that makes that syscall still dies, even with this patch
qemu-seccomp.c +2
-1@@ -237,7 +237,8 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { {SCMP_SYS (fadvise64),240 }, {SCMP_SYS (inotify_init1),240 }, {SCMP_SYS (inotify_add_watch),240 }, - {SCMP_SYS (mbind),240 } + {SCMP_SYS (mbind),240 }, + {SCMP_SYS (cacheflush),240 }, };int
seccomp_start(void)Quoted 1 line
Paul, can you help me figure out what I'm missing?
Perhaps a stupid question, but you did verify that it is cacheflush that is causing the problem? The seccomp filter code will emit a message to syslog or the audit log, depending on your configuration, with the syscall number.
Quoted 3 lines
#./tools/scmp_sys_resolver -a arm cacheflush
983042
#./tools/scmp_sys_resolver -a arm 983042
I hadn't before (didn't know about the logging). I had determined the problem by running qemu in gdb. I just checked now though and confirmed it
type=SECCOMP msg=audit(1435563996.731:2032): auid=1001 uid=1001 gid=1001 ses=157 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=27059 comm="qemu-system-arm" exe="/home/drjones/code/qemu/arm-softmmu/qemu-system-arm" sig=31 arch=40000028 syscall=983042 compat=0 ip=0xb6b43164 code=0x0
This log was generated even with the above patch applied to qemu.
Thanks,
drew
Quoted 14 lines · Andrew Jones
Quoted 8 lines · Paul Moore
Perhaps a stupid question, but you did verify that it is cacheflush that is causing the problem? The seccomp filter code will emit a message to syslog or the audit log, depending on your configuration, with the syscall number.
#./tools/scmp_sys_resolver -a arm cacheflush
983042
#./tools/scmp_sys_resolver -a arm 983042I hadn't before (didn't know about the logging). I had determined the problem by running qemu in gdb. I just checked now though and confirmed it
Quoted 7 lines
type=SECCOMP msg=audit(1435563996.731:2032): auid=1001 uid=1001 gid=1001 ses=157 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=27059 comm="qemu-system-arm" exe="/home/drjones/code/qemu/arm-softmmu/qemu-system-arm" sig=31 arch=40000028 syscall=983042 compat=0 ip=0xb6b43164 code=0x0
This log was generated even with the above patch applied to qemu.
The only thing that comes to mind quickly is that the cacheflush() call is being done by a thread that was created before the seccomp filter was loaded into the kernel; although I believe you said you already checked that.
If you are using a recent kernel and libseccomp you can try enabling the SCMP_FLTATR_CTL_TSYNC attribute to apply the filter to all running threads in the process.
rc = seccomp_attr_set(ctx, SCMP_FLTATR_CTL_TSYNC, 1); if (rc) /* error */
... although that may have unintended consequences since threads which were never filtered are not getting caught up in the seccomp filter. Although, the current QEMU seccomp filter is so permissive it might not be a real concern.
Anyway, (double) check the thread creation and seccomp_load() ordering.
Signature · 2 lines
paul moore security @ redhat
Quoted 21 lines · Paul Moore
Quoted 20 lines · Andrew Jones
Quoted 8 lines · Paul Moore
Perhaps a stupid question, but you did verify that it is cacheflush that is causing the problem? The seccomp filter code will emit a message to syslog or the audit log, depending on your configuration, with the syscall number.
#./tools/scmp_sys_resolver -a arm cacheflush
983042
#./tools/scmp_sys_resolver -a arm 983042I hadn't before (didn't know about the logging). I had determined the problem by running qemu in gdb. I just checked now though and confirmed it
type=SECCOMP msg=audit(1435563996.731:2032): auid=1001 uid=1001 gid=1001 ses=157 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=27059 comm="qemu-system-arm" exe="/home/drjones/code/qemu/arm-softmmu/qemu-system-arm" sig=31 arch=40000028 syscall=983042 compat=0 ip=0xb6b43164 code=0x0
Quoted 5 lines
Quoted 1 line
This log was generated even with the above patch applied to qemu.
The only thing that comes to mind quickly is that the
cacheflush()call is being done by a thread that was created before the seccomp filter was loaded into the kernel; although I believe you said you already checked that.
Nope, I hadn't, but I have now. I went back to my friend gdb and set a couple breakpoints
Breakpoint 1, seccomp_start () at qemu-seccomp.c:246
246 int rc = 0;
(gdb) info threads
Id Target Id Frame
2 Thread 0xb6a81130 (LWP 11351) "qemu-system-arm" 0xb6beebe0 in nanosleep ()
at ../sysdeps/unix/syscall-template.S:81
* 1 Thread 0xb6a83000 (LWP 11348) "qemu-system-arm" seccomp_start () at qemu-seccomp.c:246
(gdb) c
Continuing.
Breakpoint 2, __clear_cache () at ../../../libgcc/config/arm/lib1funcs.S:1348
1348 movw r7, #2
(gdb) info threads
Id Target Id Frame
2 Thread 0xb6a81130 (LWP 11351) "qemu-system-arm" 0xb6beebe0 in nanosleep ()
at ../sysdeps/unix/syscall-template.S:81
* 1 Thread 0xb6a83000 (LWP 11348) "qemu-system-arm" __clear_cache ()
at ../../../libgcc/config/arm/lib1funcs.S:1348
(gdb) s
1349 movt r7, #0xf
(gdb)
1354 mov r2, #0
(gdb)
1355 swi 0
(gdb)
[Thread 0xb6a83000 (LWP 11348) exited]
No unwaited-for children left.
So we're calling __clear_cache from the same thread that called seccomp_start, and that thread dies the moment it calls the syscall. No other threads except id(2) at this time, which appears to be something created by __libc_start_main before main() runs.
Quoted 8 lines
If you are using a recent kernel and libseccomp you can try enabling the
SCMP_FLTATR_CTL_TSYNCattribute to apply the filter to all running threads in the process.rc = seccomp_attr_set(ctx, SCMP_FLTATR_CTL_TSYNC, 1); if (rc) /* error */
I tried this, but it error'ed out with rc == -95 (EOPNOTSUPP ?) My kernel version is 4.0.5-200.fc21.armv7hl+lpae
Thanks,
drew
Quoted 12 lines
... although that may have unintended consequences since threads which were never filtered are not getting caught up in the seccomp filter. Although, the current QEMU seccomp filter is so permissive it might not be a real concern.
Anyway, (double) check the thread creation and
seccomp_load()ordering.Signature · 2 lines
paul moore security @ redhat
Quoted 24 lines · Andrew Jones
Quoted 23 lines · Paul Moore
Quoted 22 lines · Andrew Jones
Quoted 10 lines · Paul Moore
Perhaps a stupid question, but you did verify that it is cacheflush that
is causing the problem? The seccomp filter code will emit a message to
syslog or the audit log, depending on your configuration, with the syscall number.#./tools/scmp_sys_resolver -a arm cacheflush
983042
#./tools/scmp_sys_resolver -a arm 983042I hadn't before (didn't know about the logging). I had determined the problem by running qemu in gdb. I just checked now though and confirmed it
type=SECCOMP msg=audit(1435563996.731:2032): auid=1001 uid=1001 gid=1001 ses=157 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=27059 comm="qemu-system-arm" exe="/home/drjones/code/qemu/arm-softmmu/qemu-system-arm" sig=31 arch=40000028 syscall=983042 compat=0 ip=0xb6b43164 code=0x0
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
This log was generated even with the above patch applied to qemu.
The only thing that comes to mind quickly is that the
cacheflush()call is being done by a thread that was created before the seccomp filter was loaded into the kernel; although I believe you said you already checked that.Nope, I hadn't, but I have now ...
Actually, never mind on that, I was being stupid. If it was a different thread it wouldn't be impacted by the seccomp filter at all ...
Quoted 4 lines
... So we're calling
__clear_cachefrom the same thread that calledseccomp_start, and that thread dies the moment it calls the syscall. No other threads except id(2) at this time, which appears to be something created by__libc_start_mainbeforemain()runs.
Hmm, so either the kernel is screwing up with the seccomp filter for this particular syscall (unlikely) or libseccomp is screwing up the filter creation (more likely). I don't have an ARM system handy at the moment, but could you use the seccomp_export_pfc() and seccomp_export_bpf() functions to dump the PFC/BPF filter code to a file and send it out?
Quoted 11 lines
Quoted 8 lines
If you are using a recent kernel and libseccomp you can try enabling the
SCMP_FLTATR_CTL_TSYNCattribute to apply the filter to all running threads in the process.rc = seccomp_attr_set(ctx, SCMP_FLTATR_CTL_TSYNC, 1); if (rc) /* error */I tried this, but it error'ed out with rc == -95 (EOPNOTSUPP ?) My kernel version is 4.0.5-200.fc21.armv7hl+lpae
That should be a recent enough kernel, but perhaps your version of libseccomp was built against an older version of the kernel that didn't have the necessary support (and it was disabled at compile time)?
Signature · 2 lines
paul moore security @ redhat
Quoted 42 lines · Paul Moore
Quoted 24 lines · Andrew Jones
Quoted 23 lines · Paul Moore
Quoted 22 lines · Andrew Jones
Quoted 10 lines · Paul Moore
Perhaps a stupid question, but you did verify that it is cacheflush that
is causing the problem? The seccomp filter code will emit a message to
syslog or the audit log, depending on your configuration, with the syscall number.#./tools/scmp_sys_resolver -a arm cacheflush
983042
#./tools/scmp_sys_resolver -a arm 983042I hadn't before (didn't know about the logging). I had determined the problem by running qemu in gdb. I just checked now though and confirmed it
type=SECCOMP msg=audit(1435563996.731:2032): auid=1001 uid=1001 gid=1001 ses=157 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=27059 comm="qemu-system-arm" exe="/home/drjones/code/qemu/arm-softmmu/qemu-system-arm" sig=31 arch=40000028 syscall=983042 compat=0 ip=0xb6b43164 code=0x0
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
This log was generated even with the above patch applied to qemu.
The only thing that comes to mind quickly is that the
cacheflush()call is being done by a thread that was created before the seccomp filter was loaded into the kernel; although I believe you said you already checked that.Nope, I hadn't, but I have now ...
Actually, never mind on that, I was being stupid. If it was a different thread it wouldn't be impacted by the seccomp filter at all ...
Quoted 4 lines
... So we're calling
__clear_cachefrom the same thread that calledseccomp_start, and that thread dies the moment it calls the syscall. No other threads except id(2) at this time, which appears to be something created by__libc_start_mainbeforemain()runs.
Quoted 5 lines
Hmm, so either the kernel is screwing up with the seccomp filter for this particular syscall (unlikely) or libseccomp is screwing up the filter creation (more likely). I don't have an ARM system handy at the moment, but could you use the
seccomp_export_pfc()andseccomp_export_bpf()functions to dump the PFC/BPF filter code to a file and send it out?
Attached
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
If you are using a recent kernel and libseccomp you can try enabling the
SCMP_FLTATR_CTL_TSYNCattribute to apply the filter to all running threads in the process.rc = seccomp_attr_set(ctx, SCMP_FLTATR_CTL_TSYNC, 1); if (rc)
Quoted 9 lines
Quoted 4 lines
Quoted 1 line
/* error */I tried this, but it error'ed out with rc == -95 (EOPNOTSUPP ?) My kernel version is 4.0.5-200.fc21.armv7hl+lpae
That should be a recent enough kernel, but perhaps your version of libseccomp was built against an older version of the kernel that didn't have the necessary support (and it was disabled at compile time)?
I looked at the pfc file and compared all the syscalls in it vs. the list in qemu-seccomp.c. The pfc file is missing cacheflush, and has an 'UNKNOWN' instead. Also, I think there may be another problem with the filter (or pfc) generation. Several of the syscalls have weird syscall numbers. For example, I would expect mmap to be 90, but instead it's -10181.
And, since there was something weird, and not related to cacheflush, in the arm32 pfc, I decided to check it on my mustang too. The output there gets "cacheflush" for the name instead of UNKNOWN, but has the same weird number (-10104) that the midway has. It also has several other weird numbers. The output from the mustang is in the attached tarball as well.
Thanks,
drew
Quoted 8 lines · Andrew Jones
Quoted 5 lines · Paul Moore
Hmm, so either the kernel is screwing up with the seccomp filter for this particular syscall (unlikely) or libseccomp is screwing up the filter creation (more likely). I don't have an ARM system handy at the moment, but could you use the
seccomp_export_pfc()andseccomp_export_bpf()functions to dump the PFC/BPF filter code to a file and send it out?Attached
Thanks.
Quoted 3 lines
I looked at the pfc file and compared all the syscalls in it vs. the list in
qemu-seccomp.c. The pfc file is missing cacheflush, and has an 'UNKNOWN' instead.
Yeah, the associated syscall number is showing -10104 which is the pseudo syscall number for architectures that don't support cacheflush(). That is obviously wrong
Quoted 3 lines
Also, I think there may be another problem with the filter (or pfc) generation. Several of the syscalls have weird syscall numbers. For example, I would expect mmap to be 90, but instead it's -10181.
That is intentional. According to the Linux kernel sources mmap() isn't defined for 32-bit ARM EABI so you are seeing libseccomp's pseudo syscall number for mmap().
Quoted 5 lines
And, since there was something weird, and not related to cacheflush, in the arm32 pfc, I decided to check it on my mustang too. The output there gets "cacheflush" for the name instead of UNKNOWN, but has the same weird number (-10104) that the midway has. It also has several other weird numbers. The output from the mustang is in the attached tarball as well.
I would expect aarch64 to have a pseudo syscall number for cacheflush() as that syscall isn't defined for 64-bit ARM. What I don't understand is why libseccomp doesn't recognize cacheflush() in this particular case.
I'm starting to wonder if the 32-bit ARM build system didn't have __NR_cacheflush defined in the system headers; that might explain some of the behavior. Could you check your system to see if it has __NR_cacheflush defined (try /usr/include/asm/unistd.h)? If it does, could you try rebuilding the libseccomp package on your system and seeing if it resolves the problem?
Signature · 2 lines
paul moore security @ redhat
Quoted 4 lines · Paul Moore
I'm starting to wonder if the 32-bit ARM build system didn't have
__NR_cacheflushdefined in the system headers; that might explain some of the behavior. Could you check your system to see if it has__NR_cacheflushdefined (try/usr/include/asm/unistd.h)?
The constant name is __ARM_NR_cacheflush, not __NR_cacheflush (all the ARM-specific syscalls are __ARM_NR_*). See
http://lxr.free-electrons.com/source/arch/arm/include/uapi/asm/unistd.h#L418
thanks
-- PMM
Quoted 9 lines · Peter Maydell
Quoted 4 lines · Paul Moore
I'm starting to wonder if the 32-bit ARM build system didn't have
__NR_cacheflushdefined in the system headers; that might explain some of the behavior. Could you check your system to see if it has__NR_cacheflushdefined (try/usr/include/asm/unistd.h)?The constant name is
__ARM_NR_cacheflush, not__NR_cacheflush(all the ARM-specific syscalls are __ARM_NR_*). See
http://lxr.free-electrons.com/source/arch/arm/include/uapi/asm/unistd.h#L418
/me smacks his forehead
Of course it is. We already work around that in arch-syscall-validate. D'oh!
Good news though, I think we just found the bug ;)
I'm currently trying to put out another fire in a different project; as soon as I've got that done I'll fix this. However, if somebody wants to play, I'm always happy to accept patches :)
Signature · 2 lines
paul moore security @ redhat
Quoted 13 lines · Paul Moore
Quoted 9 lines · Peter Maydell
Quoted 4 lines · Paul Moore
I'm starting to wonder if the 32-bit ARM build system didn't have
__NR_cacheflushdefined in the system headers; that might explain some of the behavior. Could you check your system to see if it has__NR_cacheflushdefined (try/usr/include/asm/unistd.h)?The constant name is
__ARM_NR_cacheflush, not__NR_cacheflush(all the ARM-specific syscalls are __ARM_NR_*). See
http://lxr.free-electrons.com/source/arch/arm/include/uapi/asm/unistd.h#L418/me smacks his forehead
Quoted 7 lines
Of course it is. We already work around that in arch-syscall-validate. D'oh!
Good news though, I think we just found the bug ;)
I'm currently trying to put out another fire in a different project; as soon as I've got that done I'll fix this. However, if somebody wants to play, I'm always happy to accept patches :)
Sent: https://groups.google.com/forum/#!topic/libseccomp/RD9RTmc2Lxo
I'll send the patch for qemu to add cacheflush to the whitelist shortly.
drew
Quoted 7 lines
Signature · 3 lines
-- paul moore security @ redhat
Paul Moore
AppliedQuoted 18 lines · Andrew Jones
Quoted 17 lines · Paul Moore
Quoted 11 lines · Peter Maydell
Quoted 5 lines · Paul Moore
I'm starting to wonder if the 32-bit ARM build system didn't have
__NR_cacheflushdefined in the system headers; that might explain some of
the behavior. Could you check your system to see if it has__NR_cacheflushdefined (try/usr/include/asm/unistd.h)?The constant name is
__ARM_NR_cacheflush, not__NR_cacheflush(all the ARM-specific syscalls are __ARM_NR_*). See
http://lxr.free-electrons.com/source/arch/arm/include/uapi/asm/unistd.h#
L418>/me smacks his forehead
Of course it is. We already work around that in arch-syscall-validate. D'oh!
Quoted 7 lines
Quoted 5 lines
Good news though, I think we just found the bug ;)
I'm currently trying to put out another fire in a different project; as soon as I've got that done I'll fix this. However, if somebody wants to play, I'm always happy to accept patches :)
Sent: https://groups.google.com/forum/#!topic/libseccomp/RD9RTmc2Lxo
Applied, thanks.
Quoted 1 line
I'll send the patch for qemu to add cacheflush to the whitelist shortly.
Signature · 2 lines
paul moore security @ redhat