Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp799781pxb; Thu, 17 Feb 2022 15:14:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJwZnSjGn9RLqsMYRtXBCYC1KJAahkQAZc1OwSPZD3FT7FhJidw2NpqbXBcDnNR3O+LYKF9j X-Received: by 2002:a17:902:b616:b0:14d:be7f:717e with SMTP id b22-20020a170902b61600b0014dbe7f717emr4825362pls.149.1645139676681; Thu, 17 Feb 2022 15:14:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645139676; cv=none; d=google.com; s=arc-20160816; b=LsaWAXhYq3rl9HOirVwJl82/1pJsG0lcr+IfKGxNT9l8e3gRZjz58pAudqUO7DFfxv e7pUqVT2vs8M210QcQ53BQMvKkUqVLt2aL9cl1qD9siI69+WdIr3fjD7ZQLH+zyfyM10 ZJI+dNqIzRePQO+Uc/7oIqjxxP1tp6lZUlsxEllPYqkBW4cRvgk5oZtc9NOS1rp2mkKj FjLHKTHcKQbE76n252zqO7RZrc8Uq/DVvdd5WwVh8wcmQdT8qAQWz4iB6miKeunxEyDW zSr4hCVvS5Zgq7mawJBpUOZAG4AURai23huOJHHC6ZJbjkanDn6AaExuqx0f7iGY6xA8 sCaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=sXxrg1nnA6V/+9tvPqjzYCuForvG+Pxuis9Zb8uZPVo=; b=zke0ppJnKfVeaNvMRpAJ8X+bEZ+aWQirCa9oXVWU+UcoaLsKyjzOoLe/lZTrCKRU0W xGkorU0hX5TBUePb+87V8B/FuDVZuIBE2T+jZHKxp9Vfrttxf5gVgeZ7qisrh1enFbUl HhfW5J3nONhmNwPnoO83i+/Fq5qTCQ73TymTfmUh6C2bWwmxcvumNoYlL2EONTld2wSs 6d3DBraCTFHpFGHrrBxT6BsUPYgJVOdW0opskugvJxyhh5PDnBiSUqTcg/B53+NwEqdM 9TB2LqLZtp79TsP6z84bvJibPaWQUuWM+68q0RXtbMJUgHJnfXmCXHN4nYBvYM+O0DyV 50KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=ROSu79jr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b4si10020430plg.142.2022.02.17.15.14.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 15:14:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=ROSu79jr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1627B2AF3C8; Thu, 17 Feb 2022 15:05:26 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243803AbiBQVAN (ORCPT + 99 others); Thu, 17 Feb 2022 16:00:13 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:55474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234111AbiBQVAM (ORCPT ); Thu, 17 Feb 2022 16:00:12 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A29143AC9; Thu, 17 Feb 2022 12:59:57 -0800 (PST) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 21HKlaip001166; Thu, 17 Feb 2022 20:59:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=sXxrg1nnA6V/+9tvPqjzYCuForvG+Pxuis9Zb8uZPVo=; b=ROSu79jrqHiAQu6G7CniKEMvVO4Q9XiiYhNZERcG7dOXH5CnJqsDzq1t+YfpHveWQd4q QoEL/uqS1scMoGv2OiCISofLG0HK+obQ+i/MjAGaC532mqhuDmewcvE08k7PBeiGUiZL 0ksu+ej5cOHLJpEaWs2ZwKk61fXV1s12Vzix1lkwPNEiUovEl1vLqwmJtKYtOce1XBik +u2wHLb7kDrwLTPwa1OtvpRJFpFtHptuO8WQ8Hiu4NdSYXbi10fT1TeqJ4fhbvLrTCQM gQUsaSMOk8cxKTO2YSTAcUQR14xBA9zU2LGpeViWU1gEIY8SPApweQuUfQB2yyBXAP8x Jg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3e9wq986b3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Feb 2022 20:59:38 +0000 Received: from m0098399.ppops.net (m0098399.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 21HKxcJj008044; Thu, 17 Feb 2022 20:59:38 GMT Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com with ESMTP id 3e9wq986ap-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Feb 2022 20:59:38 +0000 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 21HKwUnT012424; Thu, 17 Feb 2022 20:59:37 GMT Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by ppma03dal.us.ibm.com with ESMTP id 3e64hd9j5g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Feb 2022 20:59:37 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 21HKxYAP39321996 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 17 Feb 2022 20:59:34 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 540F278063; Thu, 17 Feb 2022 20:59:34 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A21497805E; Thu, 17 Feb 2022 20:59:31 +0000 (GMT) Received: from [9.47.158.152] (unknown [9.47.158.152]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 17 Feb 2022 20:59:31 +0000 (GMT) Message-ID: <95a9eb64-654b-8d34-12c7-1dd7666e3420@linux.ibm.com> Date: Thu, 17 Feb 2022 15:59:31 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v10 11/27] ima: Move ima_lsm_policy_notifier into ima_namespace Content-Language: en-US To: Mimi Zohar , linux-integrity@vger.kernel.org Cc: serge@hallyn.com, christian.brauner@ubuntu.com, containers@lists.linux.dev, dmitry.kasatkin@gmail.com, ebiederm@xmission.com, krzysztof.struczynski@huawei.com, roberto.sassu@huawei.com, mpeters@redhat.com, lhinds@redhat.com, lsturman@redhat.com, puiterwi@redhat.com, jejb@linux.ibm.com, jamjoom@us.ibm.com, linux-kernel@vger.kernel.org, paul@paul-moore.com, rgb@redhat.com, linux-security-module@vger.kernel.org, jmorris@namei.org References: <20220201203735.164593-1-stefanb@linux.ibm.com> <20220201203735.164593-12-stefanb@linux.ibm.com> <62f946ec160296b6b20bee98986b2bafb8427718.camel@linux.ibm.com> From: Stefan Berger In-Reply-To: <62f946ec160296b6b20bee98986b2bafb8427718.camel@linux.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: rZdlAmARqLRt4rmnC_GLL3UJ5QGadeEV X-Proofpoint-ORIG-GUID: oYsipj6pGyMGcY9bOtEd_CZzHrqr7wPh X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-02-17_08,2022-02-17_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 lowpriorityscore=0 bulkscore=0 phishscore=0 clxscore=1015 mlxlogscore=999 impostorscore=0 adultscore=0 spamscore=0 malwarescore=0 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2202170093 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 2/17/22 15:30, Mimi Zohar wrote: > On Tue, 2022-02-01 at 15:37 -0500, Stefan Berger wrote: > > The builtin IMA policy rules are broad and may be constrained by > loading a custom policy, which could be defined in terms of LSM labels. > When an LSM policy is loaded, existing LSM labels might be affected or > even removed. In either case, IMA policy rules based on LSM > labels, need to reflect these changes. If an LSM label is removed, > instead of deleting the IMA policy rule based on the LSM label, the IMA > policy rule is made inactive. Ok, so I take this paragraph for the patch description. > >> Move the ima_lsm_policy_notifier into the ima_namespace. Each IMA >> namespace can now register its own LSM policy change notifier callback. >> The policy change notifier for the init_ima_ns still remains in init_ima() >> and therefore handle the registration of the callback for all other >> namespaces in init_ima_namespace(). >> >> Suppress the kernel warning 'rule for LSM