Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp815782rdb; Fri, 9 Feb 2024 01:51:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IEJO8BAjIV/zpUm9YpQqf4yxjHRPZ3sIMdJWSUyG38OvWFSZRWuWUD3r6HIl1hx/nWJggjW X-Received: by 2002:a05:6870:e0cc:b0:219:462e:a017 with SMTP id a12-20020a056870e0cc00b00219462ea017mr1039446oab.56.1707472314507; Fri, 09 Feb 2024 01:51:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707472314; cv=pass; d=google.com; s=arc-20160816; b=C3zWuTEhheL2iLpN7KsMPG1rRVt41KPhP/tQ+n/e3rpr8LPcvffPKPN7HTVt6XjxQI z8UJtpm/4gNQLXDBXbUd4xppuwNiGs4XhmlBNyElA8ouuCZ5JtxpgPRh5aPYHAPkCBpO bQBdApQWGZtsyILvhomoUFINwLy7ci1Q0yVp446lM+o4U8zFSXO2PRMWDC+Ad8M2OkJu huT8roZ6VgWNUMlASnsp430PaisabWPEQitzbbZXZ+z6KhegJx+/zm6N31MkVzXcblgo pKXhY1PXVyyu/A2bZyjvteWhRVuS2uNKdMmMnKh5Z9tBh8AFBEhWCabA0vcoE/o3msEf 2zvQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=e+hSs5OL1LhhDKc/JmQOguh9qo9BVQ2McCzxFsfwcM4=; fh=xFqlJvHSy2COSFiaydUOM2gG9ujjnVgVxp4AfXhmWDc=; b=K62zTy1elvP6IN1exXLs16XZy33uEdAG9OGTkhyqksoMPumvs6X3PX6EDl6SNVKhIM GvydliS1Nd659Fpon7EnkwiMl6qUaN7siR9vnk7rJADzoYED/u242hcpuKqiNayBiV1s MtrZBKebjEmFdujAg5R3a1UgqShI5mn0kxObq/fbMYHDSHHOAKhkSjBfP2CS6h1AWWDl +nHPacGsYe00ba4/3ilOSXhhxl+WMUJUtnfLEYP8BQ9qQUkKVNSIIgGsxPFI6d0PXKW3 8uvrezoN7cU2hScWC3L6E43/4ndr6X+y8VJy8x1LM8bkKVb8T/I+qPB2QS6G5t7P6Eas AbdA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fPzvnhbm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-1875-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-1875-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCWMoUVBzdqbc9OpMZ6MsULzQ5Yt+pYAaEh7G9jzV/Y3IUzYwKq9Boi4c05Vd3a2YccLWVJcfwZky/gUcK7JLN2VsQ3ojGp3wjmDShT4+w== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id f20-20020a633814000000b005dc528cd2fcsi1140012pga.673.2024.02.09.01.51.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 01:51:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-1875-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fPzvnhbm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-1875-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-1875-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 07D2628C785 for ; Fri, 9 Feb 2024 09:51:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6EDD367C7D; Fri, 9 Feb 2024 09:51:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fPzvnhbm" X-Original-To: linux-nfs@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25E962B9B2; Fri, 9 Feb 2024 09:51:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707472283; cv=none; b=DXqZXhhSAj48VScZyMti6yuwJY6YR9mQiYzHyJh0l4jWhxYTdAv9mbDNmJnU9RiJcAGlsIAsQA56pYVVgL99dZspjMsocNl3qdYijngalkoHzazK7mt3NPCovEJRZFa7qkh6PxHGUHyEFVPZNohcGbZ10OZhEQQisuaBAZkzPvE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707472283; c=relaxed/simple; bh=IKT4vcVGbiuP9eIaxYr/R4Z9ogqjELnGdDu9VgtEPuY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CxHk6XSx0+Mq+Jdud2YRiZqZQIt+FSazjac4CkpZaKTO3u3/HMHhCrtD0uLUTjrAK3DsW7f51ssaTNPtulL3EgG8cHnMvFQy32y6ThPvkAk58bYUAqtTU7rsna2ZPbuJLLdW1lJYROvCBgNlVyqzIXEChaz+awjeH4bDZsYCvIg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fPzvnhbm; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9624FC43601; Fri, 9 Feb 2024 09:51:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707472282; bh=IKT4vcVGbiuP9eIaxYr/R4Z9ogqjELnGdDu9VgtEPuY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fPzvnhbm+JjsqdOQ8N0VWPKTLxtR0NoF8jHzXPrVd28z09XKjPd+x8bIQ11Eh8bT+ 5WGPW3i572Cu8Z2kSFXqJNkj6K5f4zQYoPA7VC5xqq56BNiV75PR9vAyetwjPsd0Bt LLcKwrp0XymIZiDUtAo9QiwNNWIzwcbIMISRk/H+KV0M4OeBSucfOqc+4qf6d4u+/Y G5413FIAtfGbiS3i7+5lIPctw4LbwdoWptBvCKcMtyl2Anxox39eKo6DFFksExdvYp fQBzTzOPcUoad7+knXOHgv65MEOziESQDAH9E52bLMcJmVZqSC5CnlSrpHcTiMb0fS XT8AYNquOLgaw== Date: Fri, 9 Feb 2024 10:51:12 +0100 From: Christian Brauner To: Roberto Sassu Cc: viro@zeniv.linux.org.uk, chuck.lever@oracle.com, jlayton@kernel.org, neilb@suse.de, kolga@netapp.com, Dai.Ngo@oracle.com, tom@talpey.com, paul@paul-moore.com, jmorris@namei.org, serge@hallyn.com, zohar@linux.ibm.com, dmitry.kasatkin@gmail.com, eric.snowberg@oracle.com, dhowells@redhat.com, jarkko@kernel.org, stephen.smalley.work@gmail.com, eparis@parisplace.org, casey@schaufler-ca.com, shuah@kernel.org, mic@digikod.net, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-security-module@vger.kernel.org, linux-integrity@vger.kernel.org, keyrings@vger.kernel.org, selinux@vger.kernel.org, linux-kselftest@vger.kernel.org, Roberto Sassu , Stefan Berger Subject: Re: [PATCH v9 16/25] security: Introduce inode_post_set_acl hook Message-ID: <20240209-computer-wusste-614af0faffcf@brauner> References: <20240115181809.885385-1-roberto.sassu@huaweicloud.com> <20240115181809.885385-17-roberto.sassu@huaweicloud.com> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20240115181809.885385-17-roberto.sassu@huaweicloud.com> On Mon, Jan 15, 2024 at 07:18:00PM +0100, Roberto Sassu wrote: > From: Roberto Sassu > > In preparation for moving IMA and EVM to the LSM infrastructure, introduce > the inode_post_set_acl hook. > > At inode_set_acl hook, EVM verifies the file's existing HMAC value. At > inode_post_set_acl, EVM re-calculates the file's HMAC based on the modified > POSIX ACL and other file metadata. > > Other LSMs could similarly take some action after successful POSIX ACL > change. > > The new hook cannot return an error and cannot cause the operation to be > reverted. > > Signed-off-by: Roberto Sassu > Reviewed-by: Stefan Berger > Acked-by: Casey Schaufler > Reviewed-by: Mimi Zohar > --- > fs/posix_acl.c | 1 + Acked-by: Christian Brauner