From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751856AbdBKAPL (ORCPT ); Fri, 10 Feb 2017 19:15:11 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:48481 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751229AbdBKAPK (ORCPT ); Fri, 10 Feb 2017 19:15:10 -0500 Subject: Re: [PATCH v2 3/4] seccomp: Create an action to log before allowing To: Kees Cook References: <1486100262-32391-1-git-send-email-tyhicks@canonical.com> <1486100262-32391-4-git-send-email-tyhicks@canonical.com> Cc: Paul Moore , Eric Paris , Andy Lutomirski , Will Drewry , linux-audit@redhat.com, LKML From: Tyler Hicks Message-ID: <3c240412-361b-3ac2-aec6-3266a7a977d6@canonical.com> Date: Fri, 10 Feb 2017 18:15:02 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="5VqVMoeov0WIWaNgXSmgtEWj5bBomterV" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --5VqVMoeov0WIWaNgXSmgtEWj5bBomterV Content-Type: multipart/mixed; boundary="LC38mDBrnGlvASFCUciV5N4aEOT46C5Kl"; protected-headers="v1" From: Tyler Hicks To: Kees Cook Cc: Paul Moore , Eric Paris , Andy Lutomirski , Will Drewry , linux-audit@redhat.com, LKML Message-ID: <3c240412-361b-3ac2-aec6-3266a7a977d6@canonical.com> Subject: Re: [PATCH v2 3/4] seccomp: Create an action to log before allowing References: <1486100262-32391-1-git-send-email-tyhicks@canonical.com> <1486100262-32391-4-git-send-email-tyhicks@canonical.com> In-Reply-To: --LC38mDBrnGlvASFCUciV5N4aEOT46C5Kl Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/10/2017 06:08 PM, Kees Cook wrote: > On Fri, Feb 10, 2017 at 4:01 PM, Tyler Hicks wr= ote: >> On 02/07/2017 06:33 PM, Kees Cook wrote: >>> This adds to UAPI, so it'd be good to think for a moment about how >>> this would work on older kernels: right now, if someone tried to use >>> this RET_LOG on an old kernel, it'll get treated like RET_KILL. Is >>> this sane? >> >> It is not sane for userspace code to blindly attempt to use a new >> feature on an old kernel. One of the main motivations of the >> actions_avail sysctl is to allow userspace to be smart about what the >> current kernel supports. >=20 > Yeah, agreed. I mean, userspace could also build a little test > program, toss in RET_LOG, run it and see if it get SIGSYS. But that's > so much more pain that checking in /proc. >=20 >> I'll be adding logic (requested by Paul) to libseccomp that checks thi= s >> sysctl when SECOMP_RET_LOG is attempted to be used. Programs that don'= t >> use libseccomp will have to do something similar. >=20 > Excellent, I had been meaning to ask if you'd chatted with Paul at > all, since this is an API addition for libseccomp. We talked through some of it after the initial PR that I submitted to libseccomp: https://github.com/seccomp/libseccomp/pull/64 I'll be updating that as we get closer to a land-able set of kernel patch= es. > Speaking of which, can you CC linux-api@ on the next version too? Yes, good idea! Tyler --LC38mDBrnGlvASFCUciV5N4aEOT46C5Kl-- --5VqVMoeov0WIWaNgXSmgtEWj5bBomterV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJYnleGAAoJENaSAD2qAscKBRYQALo6USUH3tr+dx0LIUVyN15F gGFsVQEnjqP4ppbhrXuk4MzdFOwor5PaQLZbQR16NcA5mSk9s2NjO50m2oghPvkn eZlGadIPkw868s54nhUUeMN86gTbk0CxCaLqDmDUXs6LSd9AMUkv4SPmMnlcpWc5 vi42KPy2rA4shFVlShPwT6T5wZBq4OQEOcbTeXMR5CUhdyw+hIhylJe/5Im+VF7Y EhIaud1FmRkYz+52QJvuaM/Yh7MDJGuoODrAGkeGyvIN5+MpuBKyAOMBQroBt3Qk 8Yzsh39vWHnT3cbU9jaw//ShyIXbqlPpYjA2Zp/Zh4vB2+IjuSw7xtMw5NrqWoF7 Qqi4hzMGLE3TFzoqdZ9QmQJcLx+MIfdP99rW8zkRb2uufaLId/udXAUZQyT9CJnH vmpHNDZF+j07imsB8luahRsHgCVyea/+f0d0mXeX3T8OYbeaCIuQt6WzRLOmzDmI DDyM1jUyqvK79bBFtW9MVvpN7SVWAib8ntnVYrOIi04SH2SOnIyqsniuvuKCygVX 8pB1KtjlKIdEgdno2bQA+Z3ESYxWEYZKY40tfh1rCe9zcpB3V9gZzV2kmSKb+q6l 5pxQAgTtO+5Elb7JI1OZiGlT3C5evUoznjGUdR6pFsrbqfauIJrmSIgT5NcRtxwd xFHPLraA53Z/iq1ml4hx =6Gc8 -----END PGP SIGNATURE----- --5VqVMoeov0WIWaNgXSmgtEWj5bBomterV--