Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp861107pxb; Fri, 22 Apr 2022 12:52:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSI2HkhIkOfY9BNNKmunm4XM4zhYK7fWHKDEuwa8us6ZN7K/6PY3wBeK01BPTp50ucCRwc X-Received: by 2002:a05:6a00:134b:b0:50a:7b46:4506 with SMTP id k11-20020a056a00134b00b0050a7b464506mr6461439pfu.45.1650657137510; Fri, 22 Apr 2022 12:52:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650657137; cv=none; d=google.com; s=arc-20160816; b=yGvuXxbokXZipQ//dLEfOR9kTt+Qo+5IW4+y/sPpXOcQZmGsVoIBDleP6RAizY+XAv Rm3K/YBZlorCCRq+vsH79Ocv4xEwJQFy5p+a/MT3Ep8Oh41xpCXiR8HEZLHJrg2pocnx Sm7UsVveiUBzWqMw525tUH+XRO6wH7+5AJLgZy9JVZCj+0mf1riDmG8SY76RHowuXK1l uLOedzDaE1uwiolbsoEV1Uvl8OzuagqSZBtClL3fh7BSUoQrHaN7JXE0Md/TqZPrXwMX mIaawbuZm3ewkcfmjF73+mgZVtN7O3wO8iwg0om0x66jCiBdM4OBnxXOkHtvl3NRr3oU wvEw== 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=BfTEp153fWrGaCJepdQKZ+n0s+PGj2bnofihA+uJby0=; b=iOhVidh2IBVlmfR8ttq1Qbn2+7HZcyI9H2IriFb1+hOzcjSq0uEalgpe/cR3X+OK0W RidiYZl65Eg6WjnIS9qA3DR2oPiDBDUF4ayvMkc/LqIn39nFwdYl2V37cb5l5H5J8XRo AJu90W/eyT6GoBbavd4TBqG+YOMshNxAyG44kHPfSxE3FBtQQsMJWlJnGAKtKZrhnhw9 cZLtkKurdNViFqLds72IqEGIaip7mRKpVE2wW+zb60WzWVuzCTjDHpWby2zOWKC6pgDN w8p0BPIQLM8xEe3ymEMNKFTLBwC4bgIo5s9jneeSwsy8Kp/OxiAK34jJJ1RHsn9CCfsS Uc/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=aDjnKyMM; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id z9-20020a63e549000000b003a28427bff3si8846259pgj.677.2022.04.22.12.52.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 12:52:17 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=aDjnKyMM; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 AC70C17DA25; Fri, 22 Apr 2022 11:53:45 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379355AbiDTOKT (ORCPT + 99 others); Wed, 20 Apr 2022 10:10:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379363AbiDTOKJ (ORCPT ); Wed, 20 Apr 2022 10:10:09 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30A1543ED0; Wed, 20 Apr 2022 07:07:14 -0700 (PDT) Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 23KCVH0K024554; Wed, 20 Apr 2022 14:06:45 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=BfTEp153fWrGaCJepdQKZ+n0s+PGj2bnofihA+uJby0=; b=aDjnKyMMGYGDna8FctEzNhKYArP/k+x3IFkg4953+h67FdvO9h5C6HWu7AhEaRkxO55X TKA/hgvl4oi39XFGIAy4EUOfo9TOHvqSO2W+NFKeQ5MlSZcgcZ19b4EOPlqOOXOtCWKo eKrSQGTV1dAPMdaXJqHllooptllcIGbvddNViZeJuYSnIBQ8PprNMPw16VwjZO53+GJG pf/jSpybreTujvR8xgj2pyVLml0tcApbPzJVvE1gWN/TGjkL9nJmcj4/LVPtZj6lV519 TT5KLTeB2mY6QFfNyrHobcoEa/E8pFLm9pss3GfvDWqvwG02wkD/7g8s+3/BWzgMLDA2 HQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fjff2wtme-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Apr 2022 14:06:45 +0000 Received: from m0098396.ppops.net (m0098396.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 23KDurvd020313; Wed, 20 Apr 2022 14:06:44 GMT Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fjff2wtkx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Apr 2022 14:06:44 +0000 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 23KE31ro020617; Wed, 20 Apr 2022 14:06:43 GMT Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by ppma02dal.us.ibm.com with ESMTP id 3ffneabv4r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Apr 2022 14:06:43 +0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 23KE6gud21758450 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 20 Apr 2022 14:06:42 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 24709AE060; Wed, 20 Apr 2022 14:06:42 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 05A41AE064; Wed, 20 Apr 2022 14:06:42 +0000 (GMT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 20 Apr 2022 14:06:41 +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, jpenumak@redhat.com, Stefan Berger Subject: [PATCH v12 09/26] ima: Move ima_lsm_policy_notifier into ima_namespace Date: Wed, 20 Apr 2022 10:06:16 -0400 Message-Id: <20220420140633.753772-10-stefanb@linux.ibm.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420140633.753772-1-stefanb@linux.ibm.com> References: <20220420140633.753772-1-stefanb@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: muvPtEq-rclwyL0rmeUgUcEcZ7Y9azCh X-Proofpoint-ORIG-GUID: ZieNZtwF-YBrEl-ldIe-SNhpnVFFAPM2 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-20_04,2022-04-20_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxlogscore=999 adultscore=0 clxscore=1015 lowpriorityscore=0 malwarescore=0 bulkscore=0 phishscore=0 suspectscore=0 priorityscore=1501 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204200081 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE 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 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