Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp495596rwb; Wed, 16 Nov 2022 03:55:27 -0800 (PST) X-Google-Smtp-Source: AA0mqf7l/rsIBsV3azgGLdz8S4eGenOjcdRXVDN1ITXOCwp7yPRkZ38dyJjfH75pEl0x00BTYK3d X-Received: by 2002:a05:6402:4498:b0:461:b754:ac3c with SMTP id er24-20020a056402449800b00461b754ac3cmr18450415edb.241.1668599726782; Wed, 16 Nov 2022 03:55:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668599726; cv=none; d=google.com; s=arc-20160816; b=MtKsq5c/d26bThiqq4kRoBLtJ8PpWKqMTZrxMggWL8janQJs9yFAnCh0LBxf1uY/M1 LPs540iF3ezwLVTtgzM+GxFjXEFy43N5XTodkl2SW1qwJ4uDCWYTMHOY1bSaAgOC68Jn dDJu68O4PJ2Cc8gLgSMQNGtGDpmGYNPxjon+XZI04CDLTUvZfwZcu09MiVWgBtzfm/JY yPJEzIisJGuoA/NSJsRQOsIkolX6+p+xZCHj1roXIxNkcKTIKNlAvdrEbjlWgcXsdTkE Tk2P+TtH8q0HsrXFseC0YC6L2JrCX+1Qk9Fv7TU/l7h3xizYJyZIjGeh2Qw9gNw5jKs3 0y5A== 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:subject:user-agent:mime-version:date:message-id; bh=8kp0TpxvKIETokakGTR4E2csHOeNVIzP0PMhEk4XDi0=; b=VqlEplf7o16nVX+mwXoRhCR6eTFBprOnYHff+QH3dpt0HjubKwacT7Tt+HiLiKTf7J DCJGqFN/NCtzsQA+MAG208G5OZWs5+uvamU9o3BTJS94VEj+dYJBkbK4fC0yks4ieT9z +c2o8+ol75cByturb2ie0JJnG6B/i8sm7yd69YNhKSABeUSJ27ubQi1aS41seM5Bhqt+ 7gJkviK/3xE9mHVTuAF0NM48mpqbHDuttmrOVTSMCW4ULeZZM1zGYvrdaxc7veiZyymk KUsUVJDTzyfsnNz2RESsWNfS2cWnEpwYHO++KCy4mbR6i+kYQGBceazwtWUZ6+aJEsIT BLjw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dc26-20020a170906c7da00b0077b6ecac099si10406057ejb.287.2022.11.16.03.54.54; Wed, 16 Nov 2022 03:55:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-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-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233440AbiKPLyM (ORCPT + 99 others); Wed, 16 Nov 2022 06:54:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233471AbiKPLxt (ORCPT ); Wed, 16 Nov 2022 06:53:49 -0500 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DDB612D07; Wed, 16 Nov 2022 03:45:06 -0800 (PST) Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.53]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4NC1Rv07ZDz15Md6; Wed, 16 Nov 2022 19:44:43 +0800 (CST) Received: from kwepemm600015.china.huawei.com (7.193.23.52) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 16 Nov 2022 19:45:04 +0800 Received: from [10.174.176.52] (10.174.176.52) by kwepemm600015.china.huawei.com (7.193.23.52) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 16 Nov 2022 19:45:03 +0800 Message-ID: Date: Wed, 16 Nov 2022 19:45:02 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Subject: Re: [PATCH v3 0/2] NFS: check FMODE_EXEC from open context mode To: CC: , , , , References: <20220923054015.2890271-1-chenxiaosong2@huawei.com> From: ChenXiaoSong In-Reply-To: <20220923054015.2890271-1-chenxiaosong2@huawei.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.176.52] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm600015.china.huawei.com (7.193.23.52) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,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-nfs@vger.kernel.org Hi Trond: Do you have any suggestions for this patchset ? 在 2022/9/23 13:40, ChenXiaoSong 写道: > Currently, we check FMODE_EXEC from file f_flags, and check FMODE_READ or > FMODE_WRITE from open context mode. > > After converting file f_flags to open context mode by flags_to_mode(), > we can check all mode from open context mode. > > ChenXiaoSong (2): > NFS: make sure open context mode have FMODE_EXEC when file open for > exec > NFSv4: check FMODE_EXEC from open context mode in > nfs4_opendata_access() > > fs/nfs/inode.c | 3 ++- > fs/nfs/nfs4file.c | 12 ++++-------- > fs/nfs/nfs4proc.c | 16 +++++----------- > 3 files changed, 11 insertions(+), 20 deletions(-) >