Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1020033ybl; Fri, 24 Jan 2020 13:58:03 -0800 (PST) X-Google-Smtp-Source: APXvYqwyiH2+xQ0nHL6IHBcEPNPHKEwj9OKNtnqFnWjtDCgTmtPOTJSVoCSRuzOxwapVTSK6tpxP X-Received: by 2002:a05:6830:1bda:: with SMTP id v26mr4193921ota.314.1579903083710; Fri, 24 Jan 2020 13:58:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579903083; cv=none; d=google.com; s=arc-20160816; b=HE4XRdLDXxX8Y5keRE6UBfArVQUOr2nVxOKF9eNQu9Q9PcY9YPmjNXvzVUPkM86azo g+YS00shXMMBSYFVVTj7u2D8A9c3T35vG+4P+XyH1FTrQutkTl0pBXl7ZiLTo9tFSdD1 nFE849FNbafViwIOZuolCXhJCwcrqSEy7CfkgTQ5FL7M3hbU4iFo+/HvL2tf1xi4oC3h sfjCZfmrQtV91M5q/+LF5CYVcmBpiSEOusyy3WqOozzbA9CQixm6qIdB55tVmZewVNEr /5FydLGY2mJUY/bMImDFs/B+9C9w2QUeiCVCGhYl3olqmmrRz85kdoZejhzPX1xGOdjO 7+WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=B0WCbE3DMcau6cMLI++Q+k5amXoBdNsk6aeCbns1s2Y=; b=wVip1e1CPwvTmfcIVX2+byMaD6+jB2wEXlHMwjlDPySrXERPwyICnPm0JVyhr/tDpn F17lBRvhMTLTmGzu93HR4u850Y4xw3cAaCMYC+HXHPV+DAmBzm1S0nMjseRLIWmWBwE3 hGl/ig6eZ6g0g29RvdQlePdZeoEXVXyV8iWxPdFXvQ5Rkx/Ga0Tj75/E1+antKed21pT M4HoXJLnmxwMDCmHz+RyXpyhuL9L4QzyIFdAajG+UjmKuUs1aGZ2m7mxxlfTwKYdbBSW 9iIt83YKQaj8XzqaWnBz9elljBjHpvK5AedSpt+Avy8ocxPFPLXW2kt7zFGxsxTe+S6v kniA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j16si405580oii.57.2020.01.24.13.57.51; Fri, 24 Jan 2020 13:58:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729186AbgAXVze (ORCPT + 99 others); Fri, 24 Jan 2020 16:55:34 -0500 Received: from namei.org ([65.99.196.166]:59698 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729152AbgAXVzc (ORCPT ); Fri, 24 Jan 2020 16:55:32 -0500 Received: from localhost (localhost [127.0.0.1]) by namei.org (8.14.4/8.14.4) with ESMTP id 00OLtNMn007070; Fri, 24 Jan 2020 21:55:23 GMT Date: Sat, 25 Jan 2020 08:55:23 +1100 (AEDT) From: James Morris To: KP Singh cc: Casey Schaufler , LKML , Linux Security Module list , bpf@vger.kernel.org Subject: Re: [PATCH bpf-next v3 04/10] bpf: lsm: Add mutable hooks list for the BPF LSM In-Reply-To: <20200124012501.GA8709@chromium.org> Message-ID: References: <20200123152440.28956-1-kpsingh@chromium.org> <20200123152440.28956-5-kpsingh@chromium.org> <29157a88-7049-906e-fe92-b7a1e2183c6b@schaufler-ca.com> <20200123175942.GA131348@google.com> <5004b3f4-ca5b-a546-4e87-b852cc248079@schaufler-ca.com> <20200123222436.GA1598@chromium.org> <20200124012501.GA8709@chromium.org> User-Agent: Alpine 2.21 (LRH 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 23 Jan 2020, KP Singh wrote: > > > If you want to put mutable hook handling in the infrastructure > > you need to make it general mutable hook handling as opposed to > > BPF hook handling. I don't know if that would be acceptable for > > all the reasons called out about dynamic module loading. > > We can have generic mutable hook handling and if an LSM doesn't --> provide a mutable security_hook_heads, it would not allow dynamic > hooks / dynamic module loading. > > So, in practice it will just be the BPF LSM that allows mutable hooks > and the other existing LSMs won't. I guess it will be cleaner than > calling the BPF hooks directly from the LSM code (i.e in security.c) I'm inclined to only have mutable hooks for KRSI, not for all LSMs. This is a special case and we don't need to provide this for anyone else. Btw, folks, PLEASE trim replies. -- James Morris