Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp731930rwb; Thu, 8 Dec 2022 02:08:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf5YOpMvYrHSY6jrhohg/xo5YdxQJH3QonFC5tWbtU0XOtRYoY66DFZHa4OTObewNYCzrjJN X-Received: by 2002:a17:902:db07:b0:189:9ee0:cca4 with SMTP id m7-20020a170902db0700b001899ee0cca4mr42755611plx.74.1670494116098; Thu, 08 Dec 2022 02:08:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670494116; cv=none; d=google.com; s=arc-20160816; b=cDFZpu5VIi1YpbwTtPhDSEtyesAy6HguQ0+OcTDK32RHKZVUg5ZqsHgQp/TW/GzDVI YQnZq+F+T2MGSttG6iT8CLsvmuJLRdf45IUNZBzwVA7GN58byxZnuwnNuqR2iZnDZGvQ OvgzURa33ZYPm3INm1WQnvzk5l4dSzzqsUVGHvfVEFBL0KKR5gbn8+OiuUq46CC/cz3o ciGiVVqvzdU7jG/BpD5vK3UM4+Xbt+vH6Ydkidp7kH7l06mMIiOQss0j0YtQRDdXaZgx srM4i4Dr04JBMh7+rBX9nzZ84JEseUjgUuahGpBuibhiCDgHyxVQJk91tnPZilWiUPwi eJkA== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=DjBKXDJz6sSp4RmaHeh2YePQqCUATcAHTq6g9N90F7Q=; b=N4Z71W5YCV83lt3Fl0XCGKQfCWJCb85+7bKX9YMj0G5IkXqYiM3xwUS1jJtt1NafC+ HM1Rvz8T4m4icCQs3KD9xXT5p0Ol4XnNSh5Zp9LGOycNOqMHM8PrTwgB7iafd+7zgLvM QtYymdQEDmOstNkiYUTFCdZTncvwYxlXVzlVkTbiKdAFFCeBVgcg98bZxXPSHXtRQb7E XT8VOIVat+O25wWq/gp2mdOz1jTFmbcDNVFEdE6IqtEa226JvQenHgR/y1/xErzogI4z dVWBDi8Ulgdi0cBZbQeabidyWe/5e/MxwHwWw7JxD1JBCPlvlXcPcs4uA5m8La1ZUm5Z S2Ow== ARC-Authentication-Results: i=1; mx.google.com; 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 b7-20020a056a00114700b005755037772fsi24366117pfm.74.2022.12.08.02.08.26; Thu, 08 Dec 2022 02:08:36 -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; 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 S229637AbiLHJ36 (ORCPT + 72 others); Thu, 8 Dec 2022 04:29:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229786AbiLHJ3v (ORCPT ); Thu, 8 Dec 2022 04:29:51 -0500 Received: from frasgout11.his.huawei.com (frasgout11.his.huawei.com [14.137.139.23]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCE3D1D306; Thu, 8 Dec 2022 01:29:49 -0800 (PST) Received: from mail02.huawei.com (unknown [172.18.147.229]) by frasgout11.his.huawei.com (SkyGuard) with ESMTP id 4NSTFp12fyz9xFPw; Thu, 8 Dec 2022 17:22:38 +0800 (CST) Received: from roberto-ThinkStation-P620 (unknown [10.204.63.22]) by APP2 (Coremail) with SMTP id GxC2BwCXfflzrpFj0QvMAA--.21566S2; Thu, 08 Dec 2022 10:29:31 +0100 (CET) Message-ID: Subject: Re: [PATCH v2 2/2] lsm: Add/fix return values in lsm_hooks.h and fix formatting From: Roberto Sassu To: Paul Moore Cc: David Howells , casey@schaufler-ca.com, omosnace@redhat.com, john.johansen@canonical.com, kpsingh@kernel.org, bpf@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, Roberto Sassu Date: Thu, 08 Dec 2022 10:29:20 +0100 In-Reply-To: References: <20221128144240.210110-1-roberto.sassu@huaweicloud.com> <20221128144240.210110-3-roberto.sassu@huaweicloud.com> <7225e76c09c7ff68937e37ee041fefdd6ccac1c8.camel@huaweicloud.com> <0682348d9601ca3847ce9ba035e4ab1b586cf712.camel@huaweicloud.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-CM-TRANSID: GxC2BwCXfflzrpFj0QvMAA--.21566S2 X-Coremail-Antispam: 1UD129KBjvdXoWrZFW8Jr45tryxJFW7XF4fKrg_yoWkuwbEkr Z8Ar48Jw45Crn7Cw12ka1F9r92g3srZw1rZ3WDXr1UWa48GrW5JF40kr93Xrs3CrW8Jrnr WFyDAFZ2kasIvjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb7xYFVCjjxCrM7AC8VAFwI0_Gr0_Xr1l1xkIjI8I6I8E6xAIw20E Y4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM28CjxkF64kEwV A0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWUJVWUCwA2z4x0Y4vE2Ix0cI8IcVCY1x02 67AKxVWUJVW8JwA2z4x0Y4vEx4A2jsIE14v26r4j6F4UM28EF7xvwVC2z280aVCY1x0267 AKxVW8JVW8Jr1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2 j2WlYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7x kEbVWUJVW8JwACjcxG0xvEwIxGrwACI402YVCY1x02628vn2kIc2xKxwCF04k20xvY0x0E wIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E74 80Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcVC0 I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04 k26cxKx2IYs7xG6rWUJVWrZr1UMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIE c7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x07UWE__UUUUU= X-CM-SenderInfo: purev21wro2thvvxqx5xdzvxpfor3voofrz/1tbiAQAABF1jj4ZsWgACsG X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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-12-07 at 14:34 -0500, Paul Moore wrote: > On Wed, Dec 7, 2022 at 4:18 AM Roberto Sassu > wrote: > > For this patch, I saw it is already in lsm/next. Paul, should I do an > > incremental patch or change the one in the repo and you force push it? > > I would just remove the three lines after the parameters description. > > Just send a patch against the current lsm/next branch to remove those > lines, and please do it ASAP as the merge window opens this > weekend/Monday. Ok, was about to send but I would need a clarification first. In mount_api.rst, there is for security_fs_context_parse_param(): The value pointed to by param may be modified (if a string) or stolen (provided the value pointer is NULL'd out). If it is stolen, 0 must be returned to prevent it being passed to the filesystem. Looking at security.c: hlist_for_each_entry(hp, &security_hook_heads.fs_context_parse_param, list) { trc = hp->hook.fs_context_parse_param(fc, param); if (trc == 0) rc = 0; else if (trc != -ENOPARAM) return trc; } If, as mount_api.rst says, the value is modified by an LSM or stolen, should it be passed to other LSMs too? Thanks Roberto