Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7342941rwb; Wed, 23 Nov 2022 05:30:51 -0800 (PST) X-Google-Smtp-Source: AA0mqf6cFYXm0mpGfqioij4T6Ph03tykNjEjL5KAOrEslcgAgpndBHHYb7FVWuyuf1idYsgmuiiC X-Received: by 2002:a17:902:b40b:b0:188:ca57:ce0c with SMTP id x11-20020a170902b40b00b00188ca57ce0cmr13357915plr.57.1669210250989; Wed, 23 Nov 2022 05:30:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669210250; cv=none; d=google.com; s=arc-20160816; b=Uwjh9OvjAOeMWN3h8C39t/NrqSMnVko56lZBoJ3Sm+fMkJOEDxfMQb7rrnfqpI+yqs HVrUnf+vflQQtU7/7XIuiEyXHqAoRBmlDfqyPdUumlVF262qIXkHr2whT0UC05TDwWzb PkFpwuhUqDWzRvuNZafLKydBi+eDLW2CwIH6c5Y6mPFNg8GUY48R3x+W9hfI8KHQJDP3 hg/YqaHKoTjwW2csflI/ZwwT0tfmN3qAbAgoKzZRgYLTM5dOnGY3g5XQX6CnV9MaVXeI AGBWWZh8xhPuyl4UY+axfTEhLDDMmGYeadoY3RLhJgK9X+a/SkKOxyvQXHetnI/dKIAF mkyQ== 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=vDySJw+RE1dcnmUvFnvraOg2YS5K9nq98jTHqlpHG18=; b=JfQxNua5vzAGLrvp6a3oemIptuutOv+jSAw6BJmgYIXb49EeN7NP8MJ4+g57MY1TAd j2Q3GaA9O0oC1X/ADriy9QYC7BudeNacwMynojgmfy9uqVReLPp4tLUj6B+8aPBPxc+5 C30SmGapkOAvvGbdRkcrrwbOstlx+qRefoGs1+VPMsC01woqH7SrkFUpVfT0RlIo3yWJ DsfFjOa9oPqrEE4oytkjj95TiJqQbhXgiu/a/DhoX8+O8eQlLa0fys78WwrKHXxUE3rq 03QZU/DWMxpDhrAlGPBp2yzNIkix4FYGrcaApsacVgUcxhhpWqgx7juALvE99LO/KUlK Jtww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=RczVDxgd; 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=REJECT 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 16-20020a17090a0b9000b00218cf92fc62si1508365pjr.89.2022.11.23.05.30.38; Wed, 23 Nov 2022 05:30:50 -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=RczVDxgd; 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=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237586AbiKWN2q (ORCPT + 89 others); Wed, 23 Nov 2022 08:28:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236653AbiKWN2N (ORCPT ); Wed, 23 Nov 2022 08:28:13 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 161B9CE6; Wed, 23 Nov 2022 05:07:27 -0800 (PST) Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2ANBqfnO029536; Wed, 23 Nov 2022 13:06:44 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=vDySJw+RE1dcnmUvFnvraOg2YS5K9nq98jTHqlpHG18=; b=RczVDxgd1m7SeAvqgYnIhMYTied/i9m6YC+mlJUUMkN2R7PXui+VjLg8iYe06fhz515I OqGZrXAKGUKvZSfH4eRGeuL9BUr7vzUKvDPf7VLXmDGwxD/d7hDh8itl9rzs/V5VZBUY 6xndXZOIMDiLX5xtX3up8kNWqtPJoFtkXjdw2ck5REJ5p5h3ovFUqtpk2ik/XFUfUkOI MsIEVYv/GJt6L3qSw1l+n3/uUBOjfoVuO/0XfaMfeeHDQn2Ae02cvsL7J9l+gXubmes1 PrOli1HGa52SmNq7H4OIKo2oBqI62KMDF0OnwXbJSHjyoBP+Pa/i/kQUsabs8j8y5roN Pw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3m100sx5u9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 Nov 2022 13:06:43 +0000 Received: from m0098416.ppops.net (m0098416.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 2ANCMvBk019999; Wed, 23 Nov 2022 13:06:43 GMT Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3m100sx5tg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 Nov 2022 13:06:42 +0000 Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2AND55os006704; Wed, 23 Nov 2022 13:06:42 GMT Received: from b01cxnp22033.gho.pok.ibm.com (b01cxnp22033.gho.pok.ibm.com [9.57.198.23]) by ppma05wdc.us.ibm.com with ESMTP id 3kxpsaatrs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 Nov 2022 13:06:41 +0000 Received: from smtpav03.wdc07v.mail.ibm.com ([9.208.128.112]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2AND6e7462521762 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 23 Nov 2022 13:06:41 GMT Received: from smtpav03.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AEAAD5806A; Wed, 23 Nov 2022 13:06:40 +0000 (GMT) Received: from smtpav03.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CA81458068; Wed, 23 Nov 2022 13:06:38 +0000 (GMT) Received: from sig-9-77-136-225.ibm.com (unknown [9.77.136.225]) by smtpav03.wdc07v.mail.ibm.com (Postfix) with ESMTP; Wed, 23 Nov 2022 13:06:38 +0000 (GMT) Message-ID: Subject: Re: [PATCH v5 0/6] evm: Prepare for moving to the LSM infrastructure From: Mimi Zohar To: Roberto Sassu , mark@fasheh.com, jlbec@evilplan.org, joseph.qi@linux.alibaba.com, dmitry.kasatkin@gmail.com, paul@paul-moore.com, jmorris@namei.org, serge@hallyn.com, stephen.smalley.work@gmail.com, eparis@parisplace.org, casey@schaufler-ca.com Cc: ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, selinux@vger.kernel.org, linux-kernel@vger.kernel.org, keescook@chromium.org, nicolas.bouchinet@clip-os.org, Roberto Sassu Date: Wed, 23 Nov 2022 08:06:38 -0500 In-Reply-To: <22f47b9d2cade322f9037133b0940640423f9590.camel@huaweicloud.com> References: <20221123095202.599252-1-roberto.sassu@huaweicloud.com> <22f47b9d2cade322f9037133b0940640423f9590.camel@huaweicloud.com> Content-Type: text/plain; charset="ISO-8859-15" X-Mailer: Evolution 3.28.5 (3.28.5-18.el8) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: g8iVzqKvqnZweL4uK7PVONw5TCHSZocC X-Proofpoint-ORIG-GUID: ublx2DxYo-xcTO2ADIcDK12PkrS3VB67 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-23_06,2022-11-23_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 suspectscore=0 mlxlogscore=802 adultscore=0 lowpriorityscore=0 priorityscore=1501 impostorscore=0 spamscore=0 clxscore=1015 bulkscore=0 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211230097 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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 Wed, 2022-11-23 at 13:44 +0100, Roberto Sassu wrote: > On Wed, 2022-11-23 at 07:28 -0500, Mimi Zohar wrote: > > Hi Roberto, > > > > On Wed, 2022-11-23 at 10:51 +0100, Roberto Sassu wrote: > > > From: Roberto Sassu > > > > > > One of the challenges that must be tackled to move IMA and EVM to the LSM > > > infrastructure is to ensure that EVM is capable to correctly handle > > > multiple stacked LSMs providing an xattr at file creation. At the moment, > > > there are few issues that would prevent a correct integration. This patch > > > set aims at solving them. > > > > Let's take a step back and understand the purpose of this patch set. > > Regardless of whether IMA and EVM are moved to the "LSM > > infrastructure", EVM needs to support per LSM xattrs. A side affect is > > the removal of the security_old_inode_init_security hook. This patch > > set cover letter and patch descriptions should be limited to EVM > > support for per LSM (multiple) xattrs. The motivation, concerns, and > > problems of making IMA and EVM LSMs will be documented in the patch set > > that actual makes them LSMs. Please remove all references to "move IMA > > and EVM to the LSM infrastructure". > > Hi Mimi > > ok, will do. > > > When EVM was upstreamed, there were filesystem limitations on the > > number and size of the extended attributes. In addition there were > > performance concerns, which resulted in staging the LSM, IMA and EVM > > xattrs, before calling initxattrs to write them at the same time. With > > this patch set, not only are per LSM xattrs supported, but multiple per > > LSM xattrs are supported as well. Have the size limitation concerns > > been addressed by the different filesystems? If not, then at minimum > > this patch set needs to at least mention it and the possible > > ramifications. > > With your patch, 9d8f13ba3f483 ("security: new > security_inode_init_security API adds function callback") you made it > possible to set multiple xattrs at inode creation time. True, and even then there were concerns. > This patch set pushes further to the limits, as there could be more > xattrs to be added to the inode. I will mention that. Thanks > If there are too many xattrs, I guess the only solution would be to use > less LSMs, or a different filesystem. The per filesystem limit could be > increased separately case by case. Agreed, but unless it is documented somewhere, nobody but us will know there is a potential problem. At least document it here in the cover letter, which we'll include in the merge message. FYI, the xattr.7 man page contains a section "Filesystem differences". -- thanks, Mimi