From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755151AbcJEVCD (ORCPT ); Wed, 5 Oct 2016 17:02:03 -0400 Received: from smtp-sh.infomaniak.ch ([128.65.195.4]:51797 "EHLO smtp-sh.infomaniak.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754826AbcJEVB6 (ORCPT ); Wed, 5 Oct 2016 17:01:58 -0400 Subject: Re: [RFC v3 19/22] landlock: Add interrupted origin To: Kees Cook , Andy Lutomirski References: <20160914072415.26021-1-mic@digikod.net> <20160914072415.26021-20-mic@digikod.net> <57D9CBD3.7030100@digikod.net> Cc: "linux-kernel@vger.kernel.org" , Alexei Starovoitov , Arnd Bergmann , Casey Schaufler , Daniel Borkmann , Daniel Mack , David Drysdale , "David S . Miller" , Elena Reshetova , "Eric W . Biederman" , James Morris , Paul Moore , Sargun Dhillon , "Serge E . Hallyn" , Tejun Heo , Will Drewry , "kernel-hardening@lists.openwall.com" , Linux API , LSM List , Network Development , "open list:CONTROL GROUP (CGROUP)" From: =?UTF-8?Q?Micka=c3=abl_Sala=c3=bcn?= Message-ID: <57F56A11.109@digikod.net> Date: Wed, 5 Oct 2016 23:01:05 +0200 User-Agent: MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="QbGjVHmkCgd1kuhloFi7UJuXFM8iwtEQ2" X-Antivirus: Dr.Web (R) for Unix mail servers drweb plugin ver.6.0.2.8 X-Antivirus-Code: 0x100000 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) --QbGjVHmkCgd1kuhloFi7UJuXFM8iwtEQ2 Content-Type: multipart/mixed; boundary="GiHS6QJR9LRPB4Bvkv4J9dmBwf6CL0c24"; protected-headers="v1" From: =?UTF-8?Q?Micka=c3=abl_Sala=c3=bcn?= To: Kees Cook , Andy Lutomirski Cc: "linux-kernel@vger.kernel.org" , Alexei Starovoitov , Arnd Bergmann , Casey Schaufler , Daniel Borkmann , Daniel Mack , David Drysdale , "David S . Miller" , Elena Reshetova , "Eric W . Biederman" , James Morris , Paul Moore , Sargun Dhillon , "Serge E . Hallyn" , Tejun Heo , Will Drewry , "kernel-hardening@lists.openwall.com" , Linux API , LSM List , Network Development , "open list:CONTROL GROUP (CGROUP)" Message-ID: <57F56A11.109@digikod.net> Subject: Re: [RFC v3 19/22] landlock: Add interrupted origin References: <20160914072415.26021-1-mic@digikod.net> <20160914072415.26021-20-mic@digikod.net> <57D9CBD3.7030100@digikod.net> In-Reply-To: --GiHS6QJR9LRPB4Bvkv4J9dmBwf6CL0c24 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 04/10/2016 01:46, Kees Cook wrote: > On Wed, Sep 14, 2016 at 6:19 PM, Andy Lutomirski = wrote: >> On Wed, Sep 14, 2016 at 3:14 PM, Micka=C3=ABl Sala=C3=BCn wrote: >>> >>> On 14/09/2016 20:29, Andy Lutomirski wrote: >>>> On Wed, Sep 14, 2016 at 12:24 AM, Micka=C3=ABl Sala=C3=BCn wrote: >>>>> This third origin of hook call should cover all possible trigger pa= ths >>>>> (e.g. page fault). Landlock eBPF programs can then take decisions >>>>> accordingly. >>>>> >>>>> Signed-off-by: Micka=C3=ABl Sala=C3=BCn >>>>> Cc: Alexei Starovoitov >>>>> Cc: Andy Lutomirski >>>>> Cc: Daniel Borkmann >>>>> Cc: Kees Cook >>>>> --- >>>> >>>> >>>>> >>>>> + if (unlikely(in_interrupt())) { >>>> >>>> IMO security hooks have no business being called from interrupts. >>>> Aren't they all synchronous things done by tasks? Interrupts are >>>> driver things. >>>> >>>> Are you trying to check for page faults and such? >>> >>> Yes, that was the idea you did put in my mind. Not sure how to deal w= ith >>> this. >>> >> >> It's not so easy, unfortunately. The easiest reliable way might be to= >> set a TS_ flag on all syscall entries when TIF_SECCOMP or similar is >> set. >=20 > For making this series smaller, let's leave the idea idea of interrupt > hooks out -- the intention is for stricter syscall filtering, yes? >=20 > Once things are more well established and there's a use-case for this, > it can be added back in. Right, I'm no more convinced it's worth it. --GiHS6QJR9LRPB4Bvkv4J9dmBwf6CL0c24-- --QbGjVHmkCgd1kuhloFi7UJuXFM8iwtEQ2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCgAGBQJX9WoRAAoJECLe/t9zvWqVEpcH/R44TEGL3LzKZz/gRIm8rV4x qXfaPm6oyWOUI7per3s30OcNulV8Jub0ik3Ce+UHLXgGndXhVRLqkthrrWewP8hv 8o1lYVMWib0FbnLzAm2tyRnb52UK3MQv8Ina+QCwLSI1WX85kzJroHNVTX3J+3PT zbQm+ZfuVXrUUPpHqyraDwC5qQPmkmpmHSTl7Wyy+XCGR2OI8lt5+iLJUNYIcyXj mGKLaNpAsXOQG6OymgJo5e5nSjDPTQBvAiQjGt/vHGNnnLm6he1ErhvT4J61O5bX WQCKOlJCCU3Wvd0D+yHK7ukRP5XnYkA9HlhjFpF8Hi2cWehM2/HP0qBTi15QLEg= =oIPw -----END PGP SIGNATURE----- --QbGjVHmkCgd1kuhloFi7UJuXFM8iwtEQ2--