Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp4345705rwe; Mon, 17 Apr 2023 11:10:09 -0700 (PDT) X-Google-Smtp-Source: AKy350ZbpbZWwMXTIfmKQSEsXZxJmY+dDT4jLv5nA4E1j2YkpLJZ62252d7LR26RGhnbcHKjc8YR X-Received: by 2002:a17:902:e848:b0:1a1:97b5:c660 with SMTP id t8-20020a170902e84800b001a197b5c660mr15906278plg.20.1681755008866; Mon, 17 Apr 2023 11:10:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681755008; cv=none; d=google.com; s=arc-20160816; b=T5qTcnUAY8WLf3JC5yJbG03GB1LM2lixUmbom0a4Qt3OOk+rET+DhbdjNhX1v6lm3r ggrMqTi3+aYwGW4zL1WMZF+MKs4SMzdHsMUto5kaao+Ab0Rgnj23nagir2dXIHNzeNkA WCBk8aSlJ7sWQWj5+YxhOGJ+VXMCoCv9QkXCmtvMSdWfTNpyMZGCsH9c4R0PtScDsOEw lnkDgPiLCHaHNe+GjvZZNRCuc5AlROsYQOd7roGLCIrDCrixYr5M6aCQEPn4ptb3AvDh d5jpCcKhK4wrNQ6OTPF3FbZyzbRQKLq7BQ5h72r2x6NY1EhCqQXB9CRE0CpJkM8MDEjV VkjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=PjG74HOKXwe7va7p2A9jFByxA/BP+3mUkctDdGY/Zmw=; b=a6twiuSPu2rywSrxOd+QuNdtM/hTn2Kd8m4TubSQBlLISpwSfOcej7g50SH8FeCNjc 9Rfa+gT2ztU9QtQ8QCgFyMbktEHQlQMtr+pTEiuEYH7UyFoXnlHb6IVQqmYX+hIG7pOY ySJHokFD1qtnR0Dwf+8vDUaVrOj/5Y8AqPnFwYab246UkpHhC0VfkFdjhwImp5/QYZ+p e7XduvShvOmbWKcPtfEN97O5X+kP1bG2Mi6sd367w9O09sFNnXgfJgMiUwYW0zWjThDz yuoRYvGtveS9AZjA6e917OBCDTw5LFUO6AA0OFUbiJEyrRRaB92PCo0zLUGmkiZyYlDM r/zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=ipOJl4sH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u5-20020a170902e5c500b001a6933b3a67si11831546plf.531.2023.04.17.11.09.56; Mon, 17 Apr 2023 11:10:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=ipOJl4sH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229951AbjDQSG4 (ORCPT + 99 others); Mon, 17 Apr 2023 14:06:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229575AbjDQSG1 (ORCPT ); Mon, 17 Apr 2023 14:06:27 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2205FAF15; Mon, 17 Apr 2023 11:06:06 -0700 (PDT) Received: by linux.microsoft.com (Postfix, from userid 1052) id 627AA21C1E42; Mon, 17 Apr 2023 11:06:05 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 627AA21C1E42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1681754765; bh=PjG74HOKXwe7va7p2A9jFByxA/BP+3mUkctDdGY/Zmw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ipOJl4sHtP4MosUagWDfkLRxaakERXlkvVNtSL+yWRdW+u/MZwdek29UIuC+s2Olc iflWufz/4Z0zo7AOuyThvZFM1U7EPXcdfGops8XtfxDhvZsEXUt5hCBaejNJhNpHmD E5bXgrGu6xGy+ERVXHDwBp1XqaykYLwf0ng09oug= Date: Mon, 17 Apr 2023 11:06:05 -0700 From: Fan Wu To: Paul Moore Cc: corbet@lwn.net, zohar@linux.ibm.com, jmorris@namei.org, serge@hallyn.com, tytso@mit.edu, ebiggers@kernel.org, axboe@kernel.dk, agk@redhat.com, snitzer@kernel.org, eparis@redhat.com, linux-doc@vger.kernel.org, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-fscrypt@vger.kernel.org, linux-block@vger.kernel.org, dm-devel@redhat.com, linux-audit@redhat.com, roberto.sassu@huawei.com, linux-kernel@vger.kernel.org, Deven Bowers Subject: Re: [RFC PATCH v9 05/16] ipe: add userspace interface Message-ID: <20230417180605.GA402@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1675119451-23180-1-git-send-email-wufan@linux.microsoft.com> <1675119451-23180-6-git-send-email-wufan@linux.microsoft.com> <20230410191035.GB18827@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <20230412233606.GA16658@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-19.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 13, 2023 at 02:45:07PM -0400, Paul Moore wrote: > On Wed, Apr 12, 2023 at 7:36???PM Fan Wu wrote: > > On Tue, Apr 11, 2023 at 05:45:41PM -0400, Paul Moore wrote: > > > On Mon, Apr 10, 2023 at 3:10???PM Fan Wu wrote: > > > > On Thu, Mar 02, 2023 at 02:04:42PM -0500, Paul Moore wrote: > > > > > On Mon, Jan 30, 2023 at 5:58???PM Fan Wu wrote: > > ... > > > > I guess this does make me wonder about keeping a non-active policy > > > loaded in the kernel, what purpose does that serve? > > > > > > > The non-active policy doesn't serve anything unless it is activated. User can > > even delete a policy if that is no longer needed. Non-active is just the default > > state when a new policy is loaded. > > > > If IPE supports namespace, there is another use case where different containers > > can select different policies as the active policy from among multiple loaded > > policies. Deven has presented a demo of this during LSS 2021. But this goes > > beyond the scope of this version. > > Do you plan to add namespace support at some point in the > not-too-distant future? If so, I'm okay with keeping support for > multiple policies, but if you think you're only going to support one > active policy at a time, it might be better to remove support for > multiple (inactive) policies. > > -- > paul-moore.com Another benefit of having multiple policies is that it provides isolation between different policies. For instance, if we have two policies named "policy_a" and "policy_b," we can ensure that only team a can update "policy_a," and only team b can update "policy_b." This way, both teams can update their policy without affecting others. However, if there is only one policy in the system, both teams will have to operate on the same policy, making it less manageable. Besides, removing multiple (inactive) policies support will render the policy_name field meaningless, and we should only audit the policy hash. I am fine if we decide to go for the single policy option. -Fan