Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1181653rdg; Fri, 13 Oct 2023 12:46:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEElj1d7nYhToiXvxtjpqMW0qZuH0uPl6btmCSkXgvxJshFrZSy6HvkectZtF/JlCmXEhW8 X-Received: by 2002:a17:90a:c718:b0:27d:6b5:9e07 with SMTP id o24-20020a17090ac71800b0027d06b59e07mr8226360pjt.1.1697226380701; Fri, 13 Oct 2023 12:46:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697226380; cv=none; d=google.com; s=arc-20160816; b=qUHx/aeFYPiT+QRzdUVD+d32GpwMdn+jVN++C2h7e2qlRaAzx7a1+UQjRRtcXDTwWl 8qBsPxVq0qHE+DcSJEwS9EXh2E2qavek7om2lSAfOvQP8VUju0r7HaIm8e70O8+LZuby +lvbHKYk3kZF1Nh2BEFIRcQf0CmCjQiBur7YtS2VICQ9hnMaluYUheYfTIZmzb2mkJjc wbi1vsDcQQcw8cdMEfRXlsUbkK0Pl++Q9M16q+TfPdomhH8+kNdwYv565PACF4ODPXrq 4fm7C9yuxqwhxRf2MXGJptyFL85R4R7QSWwtvaEyz2rihXGCLER3SvwxNrTJzgZ7VJQt zrnw== 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:date:cc:to:from:subject:message-id :dkim-signature; bh=Pc0KhaMZjt1JJ8BTzzbAY2PLqOgVWSZXPMggq2UpqC4=; fh=CVtljkzPE7in8nCztZj7w25YiMp/PHaobZYNOHxwiSY=; b=gBfhdnpgMmIFALKU5eDbKFiX6891YdoHlhTNgvifyhMMG6titMOmy44PNxsYN/nF1p 1tILMJiGpx09K9GejQPc3qAdmUgC+aaHHcSHcxOPTl8tej3672HxfA9GdQkgtsU7Heyu VmUq5hdJPGpNRaf2ME5xfleb6NKZrA95T8OPNnBXuGNsBX+qZsATCUJkMScoQRTdw7Ab Dm32rLJ9ZisqJFIKGhJTJvUx8UT3Qw+YmF4SFL/Zt03cBfgJXszRcvZtrGBlPls78Tx6 ubSqokaISb8e41VlZUWRo2ab5SYwSTEtpTvjoYALFc60wAiWS1YulfTcjdAr2CcpKDdR ngjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=oNakhZdh; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id m8-20020a63ed48000000b005a0018ec785si5201705pgk.375.2023.10.13.12.46.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 12:46:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=oNakhZdh; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id CFAAF839D9E6; Fri, 13 Oct 2023 12:46:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229958AbjJMTqC (ORCPT + 99 others); Fri, 13 Oct 2023 15:46:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229830AbjJMTqB (ORCPT ); Fri, 13 Oct 2023 15:46:01 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24B8DAD; Fri, 13 Oct 2023 12:46:00 -0700 (PDT) Received: from pps.filterd (m0353726.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39DJgHCq011983; Fri, 13 Oct 2023 19:45:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : subject : from : to : cc : date : in-reply-to : references : content-type : mime-version : content-transfer-encoding; s=pp1; bh=Pc0KhaMZjt1JJ8BTzzbAY2PLqOgVWSZXPMggq2UpqC4=; b=oNakhZdhqyiBB1xeneH9eObxYi6grzwt2PDYW492vVwRxRHgvoQ4Syn9r9QPmjAYIaTP 6aKFPreFl3Yp9g31WJWZvNEcbbD4/UuZ238sO1vfk6vrhXcrc7ds24k3ugEI1rGJrgIZ KPrd7F0Vljj/fqcs80mDqn6AHRCyivlWACao6vOPeXQjaf8OXIoG3LlbGWw6i1nEDfVV 7tGi264DEu0LvW8MdjleOwBT44b+/tIluYg2nsH2wmZvDndITs0RoqvP9z+mK+rJD81O Y/Ww8GD1Twmteqk/oZTZ8T4kZFtlTRyhnJ6+naZx+yLRRvKo/g5SgJmy6fK3rOUAbsmF pg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3tqc9gr3q0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 13 Oct 2023 19:45:19 +0000 Received: from m0353726.ppops.net (m0353726.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 39DJhCV3014636; Fri, 13 Oct 2023 19:45:19 GMT Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3tqc9gr3ja-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 13 Oct 2023 19:45:18 +0000 Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 39DJHpjQ008837; Fri, 13 Oct 2023 19:45:13 GMT Received: from smtprelay02.wdc07v.mail.ibm.com ([172.16.1.69]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3tpt57p9ef-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 13 Oct 2023 19:45:13 +0000 Received: from smtpav01.dal12v.mail.ibm.com (smtpav01.dal12v.mail.ibm.com [10.241.53.100]) by smtprelay02.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 39DJjDH564029094 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 13 Oct 2023 19:45:13 GMT Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1013E58061; Fri, 13 Oct 2023 19:45:13 +0000 (GMT) Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5C56A58057; Fri, 13 Oct 2023 19:45:11 +0000 (GMT) Received: from li-f45666cc-3089-11b2-a85c-c57d1a57929f.ibm.com (unknown [9.61.129.99]) by smtpav01.dal12v.mail.ibm.com (Postfix) with ESMTP; Fri, 13 Oct 2023 19:45:11 +0000 (GMT) Message-ID: Subject: Re: [PATCH v3 00/25] security: Move IMA and EVM to the LSM infrastructure From: Mimi Zohar To: Roberto Sassu , viro@zeniv.linux.org.uk, brauner@kernel.org, chuck.lever@oracle.com, jlayton@kernel.org, neilb@suse.de, kolga@netapp.com, Dai.Ngo@oracle.com, tom@talpey.com, dmitry.kasatkin@gmail.com, paul@paul-moore.com, jmorris@namei.org, serge@hallyn.com, dhowells@redhat.com, jarkko@kernel.org, stephen.smalley.work@gmail.com, eparis@parisplace.org, casey@schaufler-ca.com Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, keyrings@vger.kernel.org, selinux@vger.kernel.org, Roberto Sassu Date: Fri, 13 Oct 2023 15:45:10 -0400 In-Reply-To: <20230904133415.1799503-1-roberto.sassu@huaweicloud.com> References: <20230904133415.1799503-1-roberto.sassu@huaweicloud.com> Content-Type: text/plain; charset="ISO-8859-15" X-Mailer: Evolution 3.28.5 (3.28.5-22.el8) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: vFTp2Ee0JeBQOP1vrgvHIBWFlp1Y_sdO X-Proofpoint-ORIG-GUID: iQnGzuzPyAealHWZ8tc09AvVLAvGFvSP X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-13_11,2023-10-12_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 malwarescore=0 spamscore=0 suspectscore=0 mlxlogscore=999 clxscore=1015 mlxscore=0 adultscore=0 priorityscore=1501 bulkscore=0 phishscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310130170 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 13 Oct 2023 12:46:14 -0700 (PDT) On Mon, 2023-09-04 at 15:33 +0200, Roberto Sassu wrote: > From: Roberto Sassu > > IMA and EVM are not effectively LSMs, especially due the fact that in the > past they could not provide a security blob while there is another LSM > active. > > That changed in the recent years, the LSM stacking feature now makes it > possible to stack together multiple LSMs, and allows them to provide a > security blob for most kernel objects. While the LSM stacking feature has > some limitations being worked out, it is already suitable to make IMA and > EVM as LSMs. > > In short, while this patch set is big, it does not make any functional > change to IMA and EVM. IMA and EVM functions are called by the LSM > infrastructure in the same places as before (except ima_post_path_mknod()), > rather being hardcoded calls, and the inode metadata pointer is directly > stored in the inode security blob rather than in a separate rbtree. > > More specifically, patches 1-11 make IMA and EVM functions suitable to > be registered to the LSM infrastructure, by aligning function parameters. > > Patches 12-20 add new LSM hooks in the same places where IMA and EVM > functions are called, if there is no LSM hook already. > > Patches 21-24 do the bulk of the work, remove hardcoded calls to IMA, EVM > and integrity functions, register those functions in the LSM > infrastructure, and let the latter call them. In addition, they also > reserve one slot for EVM to supply an xattr with the inode_init_security > hook. > > Finally, patch 25 removes the rbtree used to bind metadata to the inodes, > and instead reserves a space in the inode security blob to store the > pointer to metadata. This also brings performance improvements due to > retrieving metadata in constant time, as opposed to logarithmic. > > The patch set applies on top of lsm/next, commit 8e4672d6f902 ("lsm: > constify the 'file' parameter in security_binder_transfer_file()") Thanks, Roberto! There were just a few suggestions/changes, which though minor, will result in some patch churn. Other than that, there were some suggestions patch description suggestions. -- thanks, Mimi