Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1158354rwr; Thu, 20 Apr 2023 10:42:02 -0700 (PDT) X-Google-Smtp-Source: AKy350ZlCB+AqaJslLj6q+1djTcnOgyOr1Wk9QwtFE+EsPLyqHYcxYDqzkXGQwJ4MtrYH3xbTqfJ X-Received: by 2002:a17:902:e5cd:b0:1a6:5487:3f97 with SMTP id u13-20020a170902e5cd00b001a654873f97mr2907215plf.64.1682012522188; Thu, 20 Apr 2023 10:42:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682012522; cv=none; d=google.com; s=arc-20160816; b=KaqlNkVvY4FtYyss1M3W/M6V5R/8DvoVMZCfquSBNmzlHpxDIPIGRb7IYjVM4/fiPy iQ9+DKH1pO4udLF47QNtW0ovEBcTOFkp2w9RgVe9uFVEJpQn2FKIXLvYjaUYvEkkz4k7 /i5JM/Yy8oR2KTANV8SCOiBHIg9oTlGRasX5dwc8CH+qF0WW46l7t2wk5VENWzYWgEif 7eGQo1lzfeG1FBd9op7obEBJZNughy666+4YMOI+qiJzDt5/yuCfmeDrauQ490DSTmqa wd3OJa84KAUOp4cVgreb9QHwF++OcF7aMeOm+kZmxraZgWAph73qK/HR1q/632RJMTDq 9atQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=0V1IHtDploqU4rN1LQrE+lnXRAhQ4IwNwn85iUrL44E=; b=aaUst7yvZ3v5mqBB+Mn35nRcU8bp/1jHtSe9hEpRSKF/21A9+kIzrtT2O93MMzpWvP d6HeUPZQ7+vGQfn5Gy+nqvdOLG1tMYBlld3Ox/LmSffDjmZMXcbX7LitrLMX2xCQQsYP CBwHZG/ejvogNWDF5+/XR65DJCQz2/BJHUYeBdwEgxWjIiUjENRAT1vYUJM4Wpg5c7bn ubX03nWJhbZPqi/5/MH3eFDVriBpPn8enUpyIaggSp0uRbBhWW76QFL57y8h42a6KdXi ZSP5ai48+glmX7CzmPfqHRkBkbFfrOwMMPy1TuvZgln6gJkAWrjEriZmkCCHODZAC5Qm qFuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@digikod.net header.s=20191114 header.b="Ww1/qKoH"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o5-20020a17090ac70500b0024b5a028e7asi767986pjt.47.2023.04.20.10.41.50; Thu, 20 Apr 2023 10:42:02 -0700 (PDT) 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=@digikod.net header.s=20191114 header.b="Ww1/qKoH"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231598AbjDTRk5 (ORCPT + 99 others); Thu, 20 Apr 2023 13:40:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231567AbjDTRkz (ORCPT ); Thu, 20 Apr 2023 13:40:55 -0400 Received: from smtp-bc0d.mail.infomaniak.ch (smtp-bc0d.mail.infomaniak.ch [IPv6:2001:1600:3:17::bc0d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A303133 for ; Thu, 20 Apr 2023 10:40:51 -0700 (PDT) Received: from smtp-3-0001.mail.infomaniak.ch (unknown [10.4.36.108]) by smtp-2-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4Q2Q1C69WSzMqQVD; Thu, 20 Apr 2023 19:40:47 +0200 (CEST) Received: from unknown by smtp-3-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4Q2Q196HmLzMppF8; Thu, 20 Apr 2023 19:40:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=digikod.net; s=20191114; t=1682012447; bh=C42CG0yEhZ3//t6vNF4EAp/UK1VoZRlM/xbyZMTq9sw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Ww1/qKoHdAKBnghB3zJAndSHHtlhWFME+1v84JiiUfZsB7CaOOqVsLbd0uITMgTCt VvjQ/4XR7CHTonbqvGTXfTB8WETF74lCX0tx9l329juYD85bDx6iqcoL0DbZoes+0b o+4McyPqybIf2i8Shqgmo4gSkoEP6pUNjKaAPGJU= Message-ID: Date: Thu, 20 Apr 2023 19:40:44 +0200 MIME-Version: 1.0 User-Agent: Subject: Re: [PATCH -next v2 0/6] landlock: add chmod and chown support Content-Language: en-US To: xiujianfeng , paul@paul-moore.com, jmorris@namei.org, serge@hallyn.com, shuah@kernel.org, corbet@lwn.net Cc: linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org, roberto.sassu@huawei.com, Konstantin Meskhidze References: <20220827111215.131442-1-xiujianfeng@huawei.com> From: =?UTF-8?Q?Micka=c3=abl_Sala=c3=bcn?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Infomaniak-Routing: alpha X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 18/04/2023 12:53, xiujianfeng wrote: > Hi Mickael, > > Sorry about the long silence on this work, As we known this work depends > on another work about changing argument from struct dentry to struct > path for some attr/xattr related lsm hooks, I'm stuck with this thing, > because IMA/EVM is a special security module which is not LSM-based > currently, and severely coupled with the file system. so I am waiting > for Roberto Sassu' work (Move IMA and EVM to the LSM infrastructure) to > be ready, I think it can make my work more easy. you can find > Roberto'work here, > https://lwn.net/ml/linux-kernel/20230303181842.1087717-1-roberto.sassu@huaweicloud.com/ > > Any good idea are welcome, thanks. Thanks for the update Xiu. Which part would be needed from Roberto's patch series? > > > On 2022/8/27 19:12, Xiu Jianfeng wrote: >> v2: >> * abstract walk_to_visible_parent() helper >> * chmod and chown rights only take affect on directory's context >> * add testcase for fchmodat/lchown/fchownat >> * fix other review issues >> >> Xiu Jianfeng (6): >> landlock: expand access_mask_t to u32 type >> landlock: abstract walk_to_visible_parent() helper >> landlock: add chmod and chown support >> landlock/selftests: add selftests for chmod and chown >> landlock/samples: add chmod and chown support >> landlock: update chmod and chown support in document >> >> Documentation/userspace-api/landlock.rst | 9 +- >> include/uapi/linux/landlock.h | 10 +- >> samples/landlock/sandboxer.c | 13 +- >> security/landlock/fs.c | 110 ++++++-- >> security/landlock/limits.h | 2 +- >> security/landlock/ruleset.h | 2 +- >> security/landlock/syscalls.c | 2 +- >> tools/testing/selftests/landlock/base_test.c | 2 +- >> tools/testing/selftests/landlock/fs_test.c | 267 ++++++++++++++++++- >> 9 files changed, 386 insertions(+), 31 deletions(-) >>