From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50507) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apwrb-0006X0-7n for qemu-devel@nongnu.org; Tue, 12 Apr 2016 07:52:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1apwrY-0007XS-Ji for qemu-devel@nongnu.org; Tue, 12 Apr 2016 07:52:11 -0400 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]:34414) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apwrY-0007XH-AN for qemu-devel@nongnu.org; Tue, 12 Apr 2016 07:52:08 -0400 Received: by mail-wm0-x232.google.com with SMTP id l6so184545933wml.1 for ; Tue, 12 Apr 2016 04:52:08 -0700 (PDT) Date: Tue, 12 Apr 2016 13:52:04 +0200 From: Eduardo Otubo Message-ID: <20160412115204.GB24071@vader> References: <1460121394-31975-1-git-send-email-james.hogan@imgtec.com> <1460121394-31975-2-git-send-email-james.hogan@imgtec.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WhfpMioaduB5tiZL" Content-Disposition: inline In-Reply-To: <1460121394-31975-2-git-send-email-james.hogan@imgtec.com> Subject: Re: [Qemu-devel] [PATCH v2 1/2] seccomp: Whitelist cacheflush since 2.2.0 not 2.2.3 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: James Hogan Cc: qemu-devel@nongnu.org, Andrew Jones , Aurelien Jarno --WhfpMioaduB5tiZL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 08, 2016 at 02=3D16=3D33PM +0100, James Hogan wrote: > The cacheflush system call (found on MIPS and ARM) has been included in > the libseccomp header since 2.2.0, so include it back to that version. > Previously it was only enabled since 2.2.3 since that is when it was > enabled properly for ARM. >=20 > This will allow seccomp support to be enabled for MIPS back to > libseccomp 2.2.0. >=20 > Signed-off-by: James Hogan > Reviewed-By: Andrew Jones > Cc: Eduardo Otubo > Cc: Aurelien Jarno > --- > Changes in v2: > - Added Peter's comment > --- > qemu-seccomp.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) >=20 > diff --git a/qemu-seccomp.c b/qemu-seccomp.c > index 2866e3c2a660..138ee022a8fe 100644 > --- a/qemu-seccomp.c > +++ b/qemu-seccomp.c > @@ -16,11 +16,13 @@ > #include > #include "sysemu/seccomp.h" > =20 > +/* For some architectures (notably ARM) cacheflush is not supported until > + * libseccomp 2.2.3, but configure enforces that we are using a more rec= ent > + * version on those hosts, so it is OK for this check to be less strict. > + */ > #if SCMP_VER_MAJOR >=3D 3 > #define HAVE_CACHEFLUSH > -#elif SCMP_VER_MAJOR =3D=3D 2 && SCMP_VER_MINOR >=3D 3 > - #define HAVE_CACHEFLUSH > -#elif SCMP_VER_MAJOR =3D=3D 2 && SCMP_VER_MINOR =3D=3D 2 && SCMP_VER_MIC= RO >=3D 3 > +#elif SCMP_VER_MAJOR =3D=3D 2 && SCMP_VER_MINOR >=3D 2 > #define HAVE_CACHEFLUSH > #endif > =20 > --=20 > 2.4.10 >=20 Acked-by: Eduardo Otubo (if nothing else comes up for the seccomp queue this week, I'll prepare a pull request by Friday. Thanks for the contribution) --=20 Eduardo Otubo ProfitBricks GmbH --WhfpMioaduB5tiZL Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJXDOFkAAoJEP0M/1sS+L0v1TMH/A/oMkuJmQW4bl6Ie7W31Obx iKdnWHVbT8itPljc1dAY954qI3ay9ndwOmtXYevK7JqnTHPldlJR3Jz4r/P4THFK vBJ5MQErVk98aT7j8zRJUiCU8Cz/FK1ayfjzCl+mmDrzCPWO4Ajhtniu18qIjQJQ 6eTJHIW0o2EJXsA8NpWDvrHOgscxm88cxyX6TMI9NzurCBN0LD/mNDeECSrggrye jnTeA2rgHyWz2psdN87Uk9+IzxkN5jgQdicIreQWzb861N9b7ul9rAb1aNPowFs4 aeo1XmOiEc9jJeCFkq3qbsTeXhG1roY3t3FEWcgyXd1lNIjq6A4APKQJDW74TFo= =fy4/ -----END PGP SIGNATURE----- --WhfpMioaduB5tiZL--