From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 858BAC433FE for ; Thu, 17 Nov 2022 21:12:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240756AbiKQVMn convert rfc822-to-8bit (ORCPT ); Thu, 17 Nov 2022 16:12:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240812AbiKQVMe (ORCPT ); Thu, 17 Nov 2022 16:12:34 -0500 Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2117382229; Thu, 17 Nov 2022 13:12:21 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 8CA4761989E3; Thu, 17 Nov 2022 22:12:19 +0100 (CET) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id d-zAxFCwh7Pk; Thu, 17 Nov 2022 22:12:19 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 2887261989E9; Thu, 17 Nov 2022 22:12:19 +0100 (CET) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id hR5BjxVRxsZc; Thu, 17 Nov 2022 22:12:19 +0100 (CET) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id F18F461989E3; Thu, 17 Nov 2022 22:12:18 +0100 (CET) Date: Thu, 17 Nov 2022 22:12:18 +0100 (CET) From: Richard Weinberger To: Jeff Layton Cc: linux-nfs , linux-kernel , linux-fsdevel , chuck lever , anna@kernel.org, trond myklebust , Al Viro , raven@themaw.net, chris chilvers , david young , luis turcitu , david Message-ID: <1805608101.252119.1668719538854.JavaMail.zimbra@nod.at> In-Reply-To: References: <20221117191151.14262-1-richard@nod.at> <20221117191151.14262-3-richard@nod.at> Subject: Re: [PATCH 2/3] fs: namei: Allow follow_down() to uncover auto mounts MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Originating-IP: [195.201.40.130] X-Mailer: Zimbra 8.8.12_GA_3807 (ZimbraWebClient - FF97 (Linux)/8.8.12_GA_3809) Thread-Topic: namei: Allow follow_down() to uncover auto mounts Thread-Index: aBlkW2rl/QPMsRC8nFnJYOSn+cSNFg== Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org ----- Ursprüngliche Mail ----- > Von: "Jeff Layton" > What happens when CROSSMOUNT isn't enabled and someone tries to stroll > into an automount point? I'm guessing the automount happens but the > export is denied? Exactly. On the other hand, why should knfsd not trigger automounts? Almost any userspace interaction would also do so. > It seems like LOOKUP_AUTOMOUNT ought to be conditional > on the parent export having CROSSMOUNT set. > > There's also another caller of follow_down too, the UNIX98 pty code. > This may be harmless for it, but it'd be best not to perturb that if we > can help it. > > Maybe follow_down can grow a lookupflags argument? So, in nfsd_cross_mnt() the follow_down() helper should use LOOKUP_AUTOMOUNT only if exp->ex_flags & NFSEXP_CROSSMOUNT is true? Sounds sane, thanks for the pointer. Thanks, //richard