Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp19760rdb; Wed, 7 Feb 2024 19:23:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVBk+ZIcO1NEahpoL01CXROtFZ6tKqTIHq0oOpq6bnPdiXpFPna/Eu0OZWV8NCPk9p/2gn90Icvk5TVtLx95KGtuCjrUgxvawBubAp6uA== X-Google-Smtp-Source: AGHT+IFeI6RsVPxJpSaw6NcNd5xll3p73VbUVZjj/jrUbpTtjGsbYfjq5rhMOaCfAp9H3xyDRZTL X-Received: by 2002:a05:6358:24aa:b0:178:7ac7:a0df with SMTP id m42-20020a05635824aa00b001787ac7a0dfmr4432919rwc.29.1707362592468; Wed, 07 Feb 2024 19:23:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707362592; cv=pass; d=google.com; s=arc-20160816; b=XyMMigcWB4iS8m/itRLR/vTjsIN2V7rIURqv3NoyM82ftvEIFRrsYrTEiSDpxTPLhw kIf3zDvOFWEhaaj/z+vYcbMEi+1wfqqn9hsctND6ZAaOAmH+Uq/G1oVpX/q/4k9tvvBh JWdGbXAL6HLq4eD/+s+NPQC76GWPfHPHiaBWMTQmZV3gAIccgcA2WZk2f9l+WsiyatU6 ZYBIeOAicw0I0HxIKOoImn45y0TaytYMRo0GPCCoKVC45UjhFe9ajlDmiZgu2YUe82Ne qEUbSfXwYnkGEksP4ehD4QWMT5WpIJkJXlRA5CvKjX0NR4oke5QepJ4Bpinp3zXQv2lo yByw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:references:subject:cc:to:from:content-transfer-encoding :content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:date:dkim-signature; bh=SzomLHNvmfRLTVJXPSTY/24nqK1tA5o0ol6Vicf7etQ=; fh=HCHarIU8sUBVN25ltuLuaRiKM7xDNxJoI912d118EiA=; b=Co5hNMIe+ptz7oAQXY8LNig1pTw1PNOeIhWwZUEPlrbJizT45YVpb+yB/1sxXf9s7+ X05XGgE1tiUHcozddlxKnQEQ2Q782pfxSvzzqp8IWpFlXNVLqJaot9Z0v8/lKCmfUUs7 n0920+dB8ZxKzzEWO4wDFsbyf2FOgeSKXS8Wz8xFex8UZSjGEUXeWL5qafo8Bv6WLDoe XQWVyQtj9TpvnmjTx+gexjFKTxwxyz9ScQnEzgHFzkGCQgoB7r3Xks9aQ4BtxXQvyfll lFejfj7LFIOLfxRNUZtGcw6sbRmq2nFo8o8AlbcIm8jj7RzLfh1E+zBxrY9VuZC1ZubL 3/Mw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@paul-moore.com header.s=google header.b=St8QShq1; arc=pass (i=1 spf=pass spfdomain=paul-moore.com dkim=pass dkdomain=paul-moore.com dmarc=pass fromdomain=paul-moore.com); spf=pass (google.com: domain of linux-nfs+bounces-1846-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-nfs+bounces-1846-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=paul-moore.com X-Forwarded-Encrypted: i=2; AJvYcCWwzomVx9gZp495o0ftZv+Xwzn12+Xf1citF/Vt4NQEu2mM+r6U0DGbKX4szlYRZlQqserYAo6D07m4oZCoGvvuPs4vk5FVBvnSo615gg== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id cn6-20020a056a020a8600b005dbf4efa1f8si3081717pgb.852.2024.02.07.19.23.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 19:23:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-1846-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@paul-moore.com header.s=google header.b=St8QShq1; arc=pass (i=1 spf=pass spfdomain=paul-moore.com dkim=pass dkdomain=paul-moore.com dmarc=pass fromdomain=paul-moore.com); spf=pass (google.com: domain of linux-nfs+bounces-1846-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-nfs+bounces-1846-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=paul-moore.com 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 1F78628707F for ; Thu, 8 Feb 2024 03:23:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 333BB374F9; Thu, 8 Feb 2024 03:18:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=paul-moore.com header.i=@paul-moore.com header.b="St8QShq1" X-Original-To: linux-nfs@vger.kernel.org Received: from mail-vk1-f171.google.com (mail-vk1-f171.google.com [209.85.221.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 22AB7364C6 for ; Thu, 8 Feb 2024 03:18:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707362333; cv=none; b=ZwBza5YtxSs+3VL/8u6ouXCJdTRJEyuqazETY3Tg9o73+ptSoKRhS5lIc9ttTPN6ISXjn2vTt9YofCmzAg4bFPMWhbA3L2OwdEVLo5D1xIdSh3uSDb47OTDEFIAIsd92y+BHHOsvJVd0lkDPu4Lrem0L1aNv4nVVAmRxwpQj6wM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707362333; c=relaxed/simple; bh=Cff+Wiecc2cHcyyI8nwMBx5je+HqeBudB8XmvaexVqo=; h=Date:Message-ID:MIME-Version:Content-Type:Content-Disposition: From:To:Cc:Subject:References:In-Reply-To; b=oj389V0SoNtZ4fcFfraiy/pcvvpcMJYkT+jhCvlbF+1HuBBSoWEkImvQHwCJrka1xtwMEFjmwF/5+D9ZyIDkVvFC1SZ7Dx0JaFw8E5smF5HIFRYU/3NsZ98EulF0gR+6ENZj6f7UiY2EXxcfdsqd/09gPlQc5k3l5wNLEv48Uog= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=paul-moore.com; spf=pass smtp.mailfrom=paul-moore.com; dkim=pass (2048-bit key) header.d=paul-moore.com header.i=@paul-moore.com header.b=St8QShq1; arc=none smtp.client-ip=209.85.221.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=paul-moore.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=paul-moore.com Received: by mail-vk1-f171.google.com with SMTP id 71dfb90a1353d-4c02a92d563so280373e0c.3 for ; Wed, 07 Feb 2024 19:18:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore.com; s=google; t=1707362328; x=1707967128; darn=vger.kernel.org; h=in-reply-to:references:subject:cc:to:from:content-transfer-encoding :content-disposition:mime-version:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=SzomLHNvmfRLTVJXPSTY/24nqK1tA5o0ol6Vicf7etQ=; b=St8QShq1YhmoHL0MKGrlWOqJZuci9nKvHaC03ZQS86JaVixPZVHTXUsXyTfScuJBEf dKLNt71NyhxMb1Xuk8VMR0l5z1xFeGgv0laL9A6kz3MPRBeiVC7ukEuME4ByQLp8dGRl X+sApsJ3HecIV5NN8C5DZetnUE8EAl1GowHvh6A4VS+VJysf+fOyoWq77Zo97khdeXDS Hs3Cpn3jt365txjlEvFttlSMbjRab7RWvfoCbsWjqMMol3/mNq0WY/JSyUzaVhgEhETC zFIU5v0xtywFxQQeieq+gGkytctgK3DRPGmDaU6upEJkMmiVeK+IwFQQLpYhecUx712e LybA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707362328; x=1707967128; h=in-reply-to:references:subject:cc:to:from:content-transfer-encoding :content-disposition:mime-version:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=SzomLHNvmfRLTVJXPSTY/24nqK1tA5o0ol6Vicf7etQ=; b=aUQxJjDEG5OXcw+2CksOxLiVbMa9VKEvVqdrPkFDXjyieBAy8rwLJCxuIwLX8P2nxD r0EiUWmONYg0STQk+6rcbFPT6PbzMK2Vv3Eprw6vWAogvPtfayyAD9ei7vfMqVJiGG4B rPdVgg+6fjjpMvsUcA0yw8R7AIWGRNLtAKISA6VXEYyDSEA2YRkA6C9hc0QIhO+8Su+z bPz0lNGG/xPkZPudoldN+0vt9IdjUb/SscAuej0Q0J7VmMVDjh3H3tuIWnDohbSimihH fqAwh9bi2q0OCBJI9xXjZs8Jmh6yeQanA4HpQl/ZGtKrJTZEep1RbWh8KXcMdP4WBG8d nNcg== X-Forwarded-Encrypted: i=1; AJvYcCUsIJIENDHTJLulx0jwafTZCYEF/BMvU1W4rc4Eyk1V9U9CPTZCAjJ4wdVD9ksaAXYlcUoSTd4+A6Ho+mI2d8BuOWBoBHrRBjmN X-Gm-Message-State: AOJu0YyFOtMDji3a7OrAwVGZ/YAW+SKydchY/80fRRnSwDRZJZTXeyl0 NQ+h8LKDibSoUi+ehC7mcBGihElDgXoMwVoNo+xjy86XZjHaKrh2W2Zw//ttEg== X-Received: by 2002:a05:6122:4b0a:b0:4b6:d63c:ca8f with SMTP id fc10-20020a0561224b0a00b004b6d63cca8fmr4083957vkb.16.1707362328329; Wed, 07 Feb 2024 19:18:48 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVpyqK0RogBYaBMcS4e9J8dBLmERGQfZODiiwNRZAcDf7dZipTH660AKkFCMPBp+dLZ5ZUF1L8NJZkuE+Dh1qNkVHO6jzYqZ1P8sQxbNXgXia3UonV2GKKmWbmtyeztpcVOIIXth64kQ9zSVJddnsyrBKm989pDxaxTNROY1pJ00PbyD1GhGOzVQxzuU4wovNdyFBo5DxPXd+7DhgKx5wFrfXEZsUd9z9EMnBPkzSEKGoFqLc7FA4xjbH14JlXQ5J9ytQyXQU4IqEhs/qA9/chnZGYkl32hyXVGrUEVgbWLCKo0WlpXijEgFzYr98Ury5wq7vFPFTqzV7DzUhs1uZ1/5hM/iJkCDZEConDJ9CnmTBngp3tY/Jb1UnwDHWBSpPMKg9QEw2/XSOlDeXdUseAoplcnomoaJ5Jk4tekkpQMVJTpz5iiTX30ycYSiYTwXBqia9ZgCfhPBQU7OYeQAPizww2/ZlMC/spwrFkLKNaB49Gh0XpCy1EiWYps2c/SRxml7h0qWoIjuJot1J+/csUXzlJyp3wHDaDSCEc6nWrdi2dKQyvBz4dr23+1WyjoMBtH/WPiSwUsONkjN961iGqdWOhm2AFiAAc0dTlbB2yBTxmAaODQBlT3JCaZDam0OWZgkY5K5iDjJhg1nbfioqJUTDRb2FF1dtl4gNqoQoaIvezpZran8J3uqj4PYfSVKtMWYtaHhslZIR2lVEtpdTDmR2p/K2knaVLCvymrS5IAZFTSRUuCsy1nq7qoy17JMtBMtFnuZBogeEmfY5UOo1lLLIwYBUgmGMNJhGu4xBKP7fu4YQrgl2QW846Bvg6fRVWNuJEAsqCY7VH9SV5FgzCQzN5n+Cy0vLaU+VNhi1IaHT8tUD81sqczpbr5DCz509puMuFIh/bFiWwjYI2RhQv3782cp191T2M2zVeINpOS0dMhvUlXIidRBOboLtFQlRYQE2 k5UmWW6loGyms= Received: from localhost ([70.22.175.108]) by smtp.gmail.com with ESMTPSA id bp38-20020a05620a45a600b00783fb14c67bsm1071312qkb.48.2024.02.07.19.18.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 19:18:47 -0800 (PST) Date: Wed, 07 Feb 2024 22:18:47 -0500 Message-ID: <923041f758925191b6cfc90fe5f95e9a@paul-moore.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 Content-Transfer-Encoding: 8bit From: Paul Moore 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, 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 Cc: 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 References: <20240115181809.885385-17-roberto.sassu@huaweicloud.com> In-Reply-To: <20240115181809.885385-17-roberto.sassu@huaweicloud.com> On Jan 15, 2024 Roberto Sassu wrote: > > 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 + > include/linux/lsm_hook_defs.h | 2 ++ > include/linux/security.h | 7 +++++++ > security/security.c | 17 +++++++++++++++++ > 4 files changed, 27 insertions(+) Acked-by: Paul Moore -- paul-moore.com