Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp68488rwi; Sun, 9 Oct 2022 18:40:02 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7tZXZHQAeaBdbGOyvYGhE6lg4F016yLmZ4wtOInH3IXYALtbeOf6Z2rL6emA88RYq5S5Ra X-Received: by 2002:a17:90b:4b88:b0:20a:cbb0:3c86 with SMTP id lr8-20020a17090b4b8800b0020acbb03c86mr27846274pjb.207.1665366002177; Sun, 09 Oct 2022 18:40:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665366002; cv=none; d=google.com; s=arc-20160816; b=TjAn8fOl8qV7AUq94aZ/rmm02Q67wNVMu4iDEAbLvDw3YaWV65oD92GfUFKo5siBBt BLtKsr+ixpRYVWcjUbhpG6w2a6B/V9IURj+zHBr3ZbyM30W6tAAmQs/g9Zn4mVl1MXl1 Qi6/zgcHMuloS3OChZn0Ax0qYym1BauSq6NuYu1Ja/OHWLyuXek5j+e/rXixkO9LZYWm Kxe5Wf4Zh/fGiNeyRjI7CKAtOHLPS26+exhv+44p7iHsRE5hdJMZf06ky6cs0+Nx/W2B wzCkga74Zw2Fx6dJrclqf/llxGenciPtNDi+esZEbWjhNmpDLeAKt4fDHLWTqaS3KxYt UKug== 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=XFBPHe4AaashySte3Lcv700PlqUjYbrOycSpJ0ryQsM=; b=ws25t4GL9aFMOQSGlxcJgcYfMhTXX0yiApAyoKg4DunvijIpH8/Nzg/s6TuQyFfHEP mWK+ZDY4zDOj9q2unRyq8dBc+hx6QXUzLG1CUVqei0uyUXbD8U5QtyuCQsjTC6Eak+1J AbXteS3NrjFGRjTLEkpjPQV0lRGA6WnTPKHg/v4LmMd6LeWZXHR+nW3x3MwZ/Ku8k0WT +y7oOT/kWQZfn/HFupQtc0fo+GTUkZ/zwO8GY6WNvH+CYfHkiyqejC/CD5fyRv+KTsSv r1Epp8do/JO2bs/+r/oJDusG5X7b0nko2j7TZvAVrQ8s4U4EIh8w7r+rqkrlkbcAJ6B4 Hh1w== 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; 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 i15-20020a63130f000000b0045fc63bf52csi8304286pgl.764.2022.10.09.18.39.49; Sun, 09 Oct 2022 18:40: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; 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230293AbiJJBST (ORCPT + 99 others); Sun, 9 Oct 2022 21:18:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230111AbiJJBSR (ORCPT ); Sun, 9 Oct 2022 21:18:17 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F78427DD5; Sun, 9 Oct 2022 18:18:16 -0700 (PDT) Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Mm1DV28X7zpVhw; Mon, 10 Oct 2022 09:15:06 +0800 (CST) Received: from kwepemm600015.china.huawei.com (7.193.23.52) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 10 Oct 2022 09:18:14 +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; Mon, 10 Oct 2022 09:18:13 +0800 Message-ID: Date: Mon, 10 Oct 2022 09:18:13 +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: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemm600015.china.huawei.com (7.193.23.52) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-8.1 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-kernel@vger.kernel.org Friendly ping... 在 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(-) >