Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp68847rwb; Wed, 17 Aug 2022 23:02:14 -0700 (PDT) X-Google-Smtp-Source: AA6agR6eJ7/pBenG+Lk6SXlH2r+pWDAFKSBolmw3SYlVgnq+C90VpyJqXskoo27apSDNlUrsP7wR X-Received: by 2002:a17:907:b19:b0:730:b0d8:750 with SMTP id h25-20020a1709070b1900b00730b0d80750mr911170ejl.46.1660802534466; Wed, 17 Aug 2022 23:02:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660802534; cv=none; d=google.com; s=arc-20160816; b=JO2Lh8RnoLJakz4yPqqIgDZV60EsxPoboWqQ/+p0Xb6gdGRm5kxQuqJ+0as2wsC8Po tPMH1/kCuCW/n7yrzr7/ca4dTBS4Ymly4BQu48nqwv9piQNnOwNqbynNnVwvemhh33BY hCgwfhlArUGe88lrkgwoUOm1LEDdDUl5TS7myaIIulUt2GcqNJL5+ZR4k0JCFHnXmcyF 1oWTEy7z8rQXXossjOjOPffkpFZsZZwrHOMV28EsiCp/GLgeQnEkJGFqPh/2+p+lRawf ZxkgO1LEtAmxl/6cfPiS35/O4ogQW6UKaO5I8+Cy22+i0ZT0qLN68Nk2fWTiC2sd+/Lx 4qzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=wHd9CWU9QIiZV8Sx+rqONgV8dh72yazoE4zaORY3LdU=; b=Hp+pXwcX1n2B1HAG+JOHqTIOL5ssN/XQb1Ylme49z6C1cugbVlrP3mZEyE5Xmyco5B TAZt31pMZsQ23A8RZSxsX93w61nf72g+8+DC27AXieGYXnGGpO0RArc4GgqIiMQWuxVm VEQKrz2+H31rktjXxC0NkIRzu5ccxLjdY5RQx1pPnMkCQk6wz2DLlwia4zrdXdKTQ8gv AWPkQr7m1iGD3sY0r5T0I0r57UWD6d7E/+PVsONKdOheRvcJtRK1yLkzebV+FAkxDLLR rMVWkiY3NXyN4nsr90923Kn8SH0XMZwzK1aQs+HE/+CNMyAo1wA8ya0Ke9VRNmr6HDFF xUKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b="B1T/Q2Z+"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k19-20020a50ce53000000b0043dff638b33si633996edj.285.2022.08.17.23.01.39; Wed, 17 Aug 2022 23:02:14 -0700 (PDT) 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; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b="B1T/Q2Z+"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241244AbiHRFwS (ORCPT + 99 others); Thu, 18 Aug 2022 01:52:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240655AbiHRFwQ (ORCPT ); Thu, 18 Aug 2022 01:52:16 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 450048E463; Wed, 17 Aug 2022 22:52:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=wHd9CWU9QIiZV8Sx+rqONgV8dh72yazoE4zaORY3LdU=; b=B1T/Q2Z+54m1kgVGIb5BGgFn+B IMKPOgMcqPgJ0RGJxT8Iyo3+IoNxGxTBKgn8SIh8Jgq8rO93kYz89b36YfjI0Qwffmmr7cSAuhVDQ 1mP+boHgMr99PYvGv8cpHT+6w09JSP83XsEIMqcvdVvR7U3IF7cN1HExxIXyXqpgSl567pkM+OtSE w3fF8a66+wEmO8G0CMqQCzk6VzPXB72HtZjdswobV1A23eo7zwJzhJ6lhG2Chi2MPSRX4lTkPe2vj +T4Z6pzJnnssdUTpNQK76HeXo3O982udeo88SBTbDjfKD2bqZ85e7RPU1zspXku9OEtOxxbEHifTd 6jqjbcDg==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.95 #2 (Red Hat Linux)) id 1oOYRv-005csa-Tm; Thu, 18 Aug 2022 05:52:12 +0000 Date: Thu, 18 Aug 2022 06:52:11 +0100 From: Al Viro To: Amir Goldstein Cc: Olga Kornievskaia , linux-nfs , Olga Kornievskaia , linux-fsdevel Subject: Re: [RFC] problems with alloc_file_pseudo() use in __nfs42_ssc_open() Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 On Thu, Aug 18, 2022 at 08:19:54AM +0300, Amir Goldstein wrote: > NFS spec does not guarantee the safety of the server. > It's like saying that the Law makes Crime impossible. > The law needs to be enforced, so if server gets a request > to COPY from/to an fhandle that resolves as a non-regular file > (from a rogue or buggy NFS client) the server should return an > error and not continue to alloc_file_pseudo(). FWIW, my preference would be to have alloc_file_pseudo() reject directory inodes if it ever gets such. I'm still not sure that my (and yours, apparently) interpretation of what Olga said is correct, though.