Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp985782lqt; Tue, 19 Mar 2024 09:24:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXfq4wkIo2Tlp4qpbw/RSNBM0jNnKgBjunTTjN0jhCfvZV/fY61CajmvOXKbEZMKddbDDv+PD5hfZgIAUhPeND65gcQD1BftsPa9Xyyuw== X-Google-Smtp-Source: AGHT+IHFLbaDQYItDr/67btLzy1DaLLqk83gA8yYOWEBEr1kJHKX81x3klyqQgj964EjftMJ4rNe X-Received: by 2002:a17:906:b354:b0:a46:a49f:fa8f with SMTP id cd20-20020a170906b35400b00a46a49ffa8fmr6770216ejb.16.1710865481612; Tue, 19 Mar 2024 09:24:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710865481; cv=pass; d=google.com; s=arc-20160816; b=cClJ7JmT5LZb+XXbo/ASMR3o625rZBkQuFaXNGBd6NP5DcR9vNBSqawABehfT+7G5n BxNnsbVRnqO5ZaZ64NFit34ndFN0JMj4wwM//IQqKuVh7+v4Zp806SdGz3KmBtl4RHTY 2XvTK8uYtlLa/Yk8uI+naZX4Asokt4hEwSbH4u2iizOehppOGama8/R4cWOuzwD4OyAf oqGY6EDLxpPDqb18E32p+ek6N+7J7cLEmnTe9Kk1zamZOvIAKWtfrcIeNolIKoDeS0OW XMAk+0SffeSfGKyxPeL6SU4OKBVX/63FBqOk9YOCN0JI17KgDRnKt9HMUYJBob8g0Dow gjeA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=ftA3eI/dQBLsv9dIeQz8Rt+LCLqo77Zdg1c8dhKOXRI=; fh=k/ntoYyfhVXlJ6dO7vhvqOSVlhGJ2dvIyOJFv53VJIU=; b=P1PTTT4siTv1jJVhofyWt4IbeqY/3PO6WsG7qyfDFXYr+Qtfk0+nNKnsX+jRDlfTjL +g3qwFfKy9MXeXavq6U75TgPvHUTH4b/JutXjgTi2EM0cNe22oF9st7gt6LdHYSoIbqv VUpRlVTkixr2vF1jIJggj70cnMOqDQ0fdSZ6XXAVId4nZV3HaRixqiKoBM81unGCFhyl OmupRxmPYxM6TUgrig52vsXUISKGja21vZBtcoDfpHK5GITTjN/nW0oL3MDD5kIdya/E 0aXcPD3kdDKhD+ThyaATfgdK4kkoFNMNw/EiLg8c9rWFwtXZ6JnSq5kW7IZsKQXfDT6z e0RA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-107820-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107820-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id g23-20020a1709063b1700b00a465f7d5729si5409970ejf.554.2024.03.19.09.24.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 09:24:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-107820-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-107820-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107820-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 59D631F248BC for ; Tue, 19 Mar 2024 16:24:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C71FE83CA5; Tue, 19 Mar 2024 16:17:01 +0000 (UTC) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) (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 4453783A0E for ; Tue, 19 Mar 2024 16:16:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.191 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710865021; cv=none; b=kMS7Y+l5R0TNSDZQ3qO5DXjCWmXNNHUJiQQE4oYKAWrT0oiTX9Hu0gm6auhzigAMLpD8T9np0eShEsX+Z2tAHVNZ53r2GGbGYff01+vdLFGSTli0hKptwdF7UBEzkgFgMqnFECYoOpkMtqcTWQw4mEoRUT4GuK1yYBeCsyhJ+NE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710865021; c=relaxed/simple; bh=YMQ8U69QsWfZvDlD8KiOq8prLPpCkh50zePjz2CKXO4=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=PIoV5unOjqh89zFFQ9+7+6AO1bPWEYy9QhsmT9TZWRbi60iRt9ZIYvWyGIoAG2EMQui4wRO4vcfGJLulvekSO5OK4kGU4hPpaRHs9VkBlLFNXlm6QVVPYmHBc8dsYz9aPUDOavMo1Fch0l9xjSnyXkkk9OBTRsW8XE+YLz39SE4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.191 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.163]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4TzcKr6RmDz1HBj3; Wed, 20 Mar 2024 00:16:32 +0800 (CST) Received: from kwepemd500012.china.huawei.com (unknown [7.221.188.25]) by mail.maildlp.com (Postfix) with ESMTPS id 5324D18001A; Wed, 20 Mar 2024 00:16:55 +0800 (CST) Received: from huawei.com (10.90.53.73) by kwepemd500012.china.huawei.com (7.221.188.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Wed, 20 Mar 2024 00:16:54 +0800 From: Li Zetao To: , CC: , , Subject: [RFC PATCH 0/5] ubifs: Support POSIX Access Control Lists (ACLs) Date: Wed, 20 Mar 2024 00:16:41 +0800 Message-ID: <20240319161646.2153867-1-lizetao1@huawei.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemd500012.china.huawei.com (7.221.188.25) Hi, This patchset is base on [1] and [2], adding implementation of ACLs for ubifs. Implement ACLs features based on POSIX to solve some difficulties that require fine-grained access control. At the same time, it is also to facilitate cross-file system migration. In order to simplify the implementation, only v2 version POSIX ACLs are implemented, eliminating the need for in-memory and on-flash format conversion. And no need to implement security xattr handler in ubifs. Some testcases have been tested and passed: * generic testcases (modified version) for acl group in xfstest[3], they are generic/026/053/077/099/105/237/307/318/319/375/389/444/449/529/697. * tacl_xattr.sh (modified version) in LTP[4]. [1]: https://lore.kernel.org/linux-mtd/1441962597-13543-1-git-send-email-shengyong1@huawei.com/ [2]: https://lore.kernel.org/linux-mtd/1476046382-19185-1-git-send-email-pascal.eberhard@gmail.com/ [3]: https://kernel.googlesource.com/pub/scm/fs/xfs/xfstests-dev/+/refs/heads/master/tests/generic/ [4]: https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/fs/acl/tacl_xattr.sh Li Zetao (5): ubifs: Implement POSIX Access Control Lists (ACLs) ubifs: Initialize or update ACLs for inode ubifs: Support accessing ACLs through inode_operations ubifs: Introduce ACLs mount options ubifs: Add ACLs config option fs/ubifs/Kconfig | 14 +++++ fs/ubifs/Makefile | 1 + fs/ubifs/acl.c | 140 ++++++++++++++++++++++++++++++++++++++++++++++ fs/ubifs/dir.c | 18 ++++++ fs/ubifs/file.c | 6 ++ fs/ubifs/super.c | 40 +++++++++++++ fs/ubifs/ubifs.h | 15 +++++ fs/ubifs/xattr.c | 1 - 8 files changed, 234 insertions(+), 1 deletion(-) create mode 100644 fs/ubifs/acl.c -- 2.34.1