From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762306AbcINS3z (ORCPT ); Wed, 14 Sep 2016 14:29:55 -0400 Received: from mail-yw0-f174.google.com ([209.85.161.174]:35270 "EHLO mail-yw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761813AbcINS3u (ORCPT ); Wed, 14 Sep 2016 14:29:50 -0400 MIME-Version: 1.0 In-Reply-To: <20160914072415.26021-20-mic@digikod.net> References: <20160914072415.26021-1-mic@digikod.net> <20160914072415.26021-20-mic@digikod.net> From: Andy Lutomirski Date: Wed, 14 Sep 2016 11:29:28 -0700 Message-ID: Subject: Re: [RFC v3 19/22] landlock: Add interrupted origin To: =?UTF-8?B?TWlja2HDq2wgU2FsYcO8bg==?= 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 , Kees Cook , 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)" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id u8EITxQI032493 On Wed, Sep 14, 2016 at 12:24 AM, Mickaël Salaün wrote: > This third origin of hook call should cover all possible trigger paths > (e.g. page fault). Landlock eBPF programs can then take decisions > accordingly. > > Signed-off-by: Mickaël Salaün > 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? --Andy