On Mon, Nov 09, 2015 at 04=47=53PM -0500, Andrew Jones wrote: > On Mon, Nov 02, 2015 at 11:53:26PM +0100, Andrew Jones wrote: > > cacheflush is an arm-specific syscall that qemu built for arm > > uses. Add it to the whitelist, but only if we're linking with > > a recent enough libseccomp. > > > > Signed-off-by: Andrew Jones <drjo...@redhat.com> > > --- > > v3: deal with major and minor version number bumps > > v2: only add cacheflush if libseccomp supports it > > > > qemu-seccomp.c | 13 ++++++++++++- > > 1 file changed, 12 insertions(+), 1 deletion(-) > > > > diff --git a/qemu-seccomp.c b/qemu-seccomp.c > > index 80d034a8d5190..c831fe83ad500 100644 > > --- a/qemu-seccomp.c > > +++ b/qemu-seccomp.c > > @@ -16,6 +16,14 @@ > > #include <seccomp.h> > > #include "sysemu/seccomp.h" > > > > +#if SCMP_VER_MAJOR >= 3 > > + #define HAVE_CACHEFLUSH > > +#elif SCMP_VER_MAJOR == 2 && SCMP_VER_MINOR >= 3 > > + #define HAVE_CACHEFLUSH > > +#elif SCMP_VER_MAJOR == 2 && SCMP_VER_MINOR == 2 && SCMP_VER_MICRO >= 3 > > + #define HAVE_CACHEFLUSH > > +#endif > > + > > struct QemuSeccompSyscall { > > int32_t num; > > uint8_t priority; > > @@ -238,7 +246,10 @@ static const struct QemuSeccompSyscall > > seccomp_whitelist[] = { > > { SCMP_SYS(inotify_init1), 240 }, > > { SCMP_SYS(inotify_add_watch), 240 }, > > { SCMP_SYS(mbind), 240 }, > > - { SCMP_SYS(memfd_create), 240 } > > + { SCMP_SYS(memfd_create), 240 }, > > +#ifdef HAVE_CACHEFLUSH > > + { SCMP_SYS(cacheflush), 240 }, > > +#endif
Acked-by: Eduardo Otubo <eduardo.ot...@profitbricks.com> > > }; > > > > int seccomp_start(void) > > -- > > 1.8.3.1 > > > > Eduardo, ping? Thanks for the ping. I was busy and forgot about these patches. Nothing special to be said, acked. I'll send a pull request as soon as possible. -- Eduardo Otubo ProfitBricks GmbH
signature.asc
Description: Digital signature