Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp674493pxm; Wed, 2 Mar 2022 06:23:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJxk0wpnLVMUtvRAvSGDPycKnwrFehj+Cm3f38eQKv1si3r0Gg3lY/L3lwBlPOahnNd9BzdV X-Received: by 2002:a17:90a:4f0b:b0:1be:e31f:bd38 with SMTP id p11-20020a17090a4f0b00b001bee31fbd38mr41025pjh.76.1646230984220; Wed, 02 Mar 2022 06:23:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646230984; cv=none; d=google.com; s=arc-20160816; b=MvNUx522No7cApxtJfsiK7JcWqIDHZRClegiRDl5Fs3K3Fuy6nNZbts0QDxbGCFi+K P2FObOMgi/HFyFOnGa5DJ1KMqa2Y6m2p4VEVl/NSHwQU1qEwhiIhvnFSWhKZSPll4Mxm 97IJuYysDitEExNxhL9kAIlsUIaOU3n9jIlC1heVMyeTFK9/o81PoPPlvzTBYa9aL3zG 0rAzKcN720V/BREIll+qSTKuMuC3JlhorAYt9zUuc2ijGHeH0do45SJ1TiLGOYprvNzY bx/nP1ybsmOTobuOaq2a2GjNjHjR3+fdCBKE4PGRYZlVoxbJsVe3fnK9jXGj7du3/89X s4Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Ok/ZVa0Zn5afwWWIsvo0VeyoQjq4ZT6PHqYNBt3roYQ=; b=It1A+UJ6p5HZ+kgIW4rYeiGgXp4DgBSntsMg9QjyF65f3QyHS7PEH3hAb7NcUigp/Z Ztb2uTzmKfGe5IM1SI/tqmpsfcQBItiZSRSjJHYkjgSX0KTdJBCcuaKj61oq2ZqwN2Cx IwausKSEyOc2+6W36y8Joly4IgK7NKxvgjqW6WqJVoLiq9VJa+AGwgTIceO+yoCtecSX oHWTjmG5cY14nz9oj9kDVcTTL3pY+eAAUApiSv8B6UpmhFIBAsapfgntiD14bLuygLnv VN+jKw4H8lKWG5hpFK4/6nWoZpkDUKM+lMmMUyEoid8W9CdJAs6+hdm/GOTQQ4AaHteO JyUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=sXrgqyRn; 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=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d20-20020a17090abf9400b001bc77834506si5498789pjs.144.2022.03.02.06.22.45; Wed, 02 Mar 2022 06:23:04 -0800 (PST) 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=@ibm.com header.s=pp1 header.b=sXrgqyRn; 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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242419AbiCBNvZ (ORCPT + 99 others); Wed, 2 Mar 2022 08:51:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242370AbiCBNvH (ORCPT ); Wed, 2 Mar 2022 08:51:07 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C489171CB8; Wed, 2 Mar 2022 05:50:23 -0800 (PST) Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 222Cs5pR032064; Wed, 2 Mar 2022 13:50:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=Ok/ZVa0Zn5afwWWIsvo0VeyoQjq4ZT6PHqYNBt3roYQ=; b=sXrgqyRnA1KvmUdegCMZgJm6+uV9wLoRRN8Ar9VANWhw52T76uc0E2dhQOUM4swGB1uA TO18Zy7yFwBwuXp4OE3fxX1sBUDLbvh0EfMVf5d7z7biRZhPbhJYiXpMYnCEjyUINaeS sqxmwDX6hV+ZxG9HAcmkPU01hkI51uHTiIkcrTW/K8DTm1IoB+c6jR31I0e/hcwMtOF0 gQjljWxzmBIC9RX5Dnz10vCfhmLwKzizkIp2mI2//d+snEXhxPXwn0dCiehqCZvQePQY DU/S7RPVDBVjmF0R06iCnyYcW82saRgqWmxm6XLIOB+FFgA7C0naVpCdiJVL32tSzXNk uw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3ej90as4jn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Mar 2022 13:50:01 +0000 Received: from m0098416.ppops.net (m0098416.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 222CuaLT003443; Wed, 2 Mar 2022 13:50:00 GMT Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0b-001b2d01.pphosted.com with ESMTP id 3ej90as4j6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Mar 2022 13:50:00 +0000 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 222DnGCt031344; Wed, 2 Mar 2022 13:49:59 GMT Received: from b01cxnp22034.gho.pok.ibm.com (b01cxnp22034.gho.pok.ibm.com [9.57.198.24]) by ppma03wdc.us.ibm.com with ESMTP id 3efbua4v0e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 02 Mar 2022 13:49:59 +0000 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 222DnwFK56295756 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 2 Mar 2022 13:49:58 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 668B711206F; Wed, 2 Mar 2022 13:49:58 +0000 (GMT) Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 49B56112070; Wed, 2 Mar 2022 13:49:58 +0000 (GMT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 2 Mar 2022 13:49:58 +0000 (GMT) From: Stefan Berger To: linux-integrity@vger.kernel.org Cc: zohar@linux.ibm.com, 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, Stefan Berger Subject: [PATCH v11 10/27] ima: Move ima_lsm_policy_notifier into ima_namespace Date: Wed, 2 Mar 2022 08:46:45 -0500 Message-Id: <20220302134703.1273041-11-stefanb@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220302134703.1273041-1-stefanb@linux.ibm.com> References: <20220302134703.1273041-1-stefanb@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: b1rdC8jV0YIc0ivEo2Jpf59fbbf7oVf7 X-Proofpoint-GUID: kAFxuh3WexSBomtopmDRi4RNR16JVJcI X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-03-02_06,2022-02-26_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 priorityscore=1501 phishscore=0 clxscore=1015 mlxlogscore=999 lowpriorityscore=0 spamscore=0 adultscore=0 bulkscore=0 suspectscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2203020057 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 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(). Rate-limit the kernel warning 'rule for LSM