Received: by 2002:a05:7208:3003:b0:81:def:69cd with SMTP id f3csp4174993rba; Tue, 2 Apr 2024 09:21:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVzAmW6WDwsAwEju1mXkYeX8fcYsMJe5hC3jBEaDdfabmfVQZ3i9vJ+IzJpl1EN48fLQ/xHP9eXeDXwu+rgjHXzJUGhEA3I4+WRI26ntw== X-Google-Smtp-Source: AGHT+IGdw27kYmOfUxPQ5rNZFeOkHw2erOaLhPLnwtFfwhtN4sfa+HBBmylOaDWoAzHsw7J3Kvig X-Received: by 2002:a17:906:e202:b0:a48:56b2:d988 with SMTP id gf2-20020a170906e20200b00a4856b2d988mr7320154ejb.59.1712074907335; Tue, 02 Apr 2024 09:21:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712074907; cv=pass; d=google.com; s=arc-20160816; b=rq5oEZ9j1COoRIkRb3ah1TWHXB+8dkc1wCdXD3eP/BMhhW5jtOeER4t0t29RF8kdeq EvdC4XNCD3LEKJDU/7nE+GSfD8+Ni6QRtnrmQVWn5Kbn2917mNrZ/MTYjlS1ywp9Dosq gw2QKBn3L/9O50Lq5DQMtcWmSbft0BU9UcvSl7qfwTqv/I08GCctaVYlsfaJJqozF+TG bC5wSb01reyUZJtY2BkwhrW53L5g2xJwoipwxa+en3KYK5d19qsfdeY1DuYCTR6+Cox3 0aWZa3rfgHQSwlKoLTR9WFIF+Vf8gZ8W5XG0wtuWjw73H+JG59G3kY7mY1y8ubNyVtGf 11rQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=x5Nzy2/q23qrlyr0SuAObpcRnYE3MZof6+YbCc/4IBs=; fh=5dz0W9YXCTsGkug8/KjndgNFCQsw0bpoAXfdhonIUTA=; b=sOAb3sKUvIW0ZBOgSnzv//gneBKKrbHtqmlkhoRHqmddy5W49jpzxqi5pkL7DlLKNl 5U+0vR3zyglKpHI0x7V29I/CkHwweA48dqReMXmGo084lfmo0odgbakNc2lQa7nvX1Ex wTojtXIuBQ00M/Bn0OgjLQZHVJ6Ro1pdYhSdK0svLICV75gKOEZ5RIXi/5oUMp4ZjZpZ jbxfJWADOyRhm8fm5M4WJjGkaajXXQAy0cJtqQGKWVROCWbNo1NOGVkNbZkGf6oIOphw nLlFpwrF9llWUpu+PhJHX+bfPYSyyhZr3QOp85uiNm4/zE8G35VpSviNgolXthjue0D3 pCVA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bLzSbLbE; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-nfs+bounces-2602-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2602-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id jr4-20020a170906a98400b00a4e2d3cea8fsi4891037ejb.144.2024.04.02.09.21.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 09:21:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-2602-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bLzSbLbE; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-nfs+bounces-2602-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2602-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 1B8511F21EBE for ; Tue, 2 Apr 2024 16:21:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 02BC714B08B; Tue, 2 Apr 2024 16:20:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="bLzSbLbE" X-Original-To: linux-nfs@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 603BA14C5A3 for ; Tue, 2 Apr 2024 16:20:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712074847; cv=none; b=KUDeOhVbIE/9DjUQ+J6vX2Y4Fd68Dg/AA+o3yMLbzimKGWDMTwRUDdkkknbeX6X7ROhC6hxmK7ayHYlxbb7NXSsGJYcK1Le2V7A8pH18tMmFtiewB+qDJZqf9M9yFYZbm1dRtLJDBLYBTSuPJ52aTHKuunE+idvhBDCTCwG1LG4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712074847; c=relaxed/simple; bh=45vXkl/rcYv+94xcyIDIR6W02nIABWxNGfXAOetVs54=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=HwrqvFudZzEJFJ3kP8D8kW5Y9mOIRaak70t1ZnHpuE0qyaKODnzGa/3jeA9kqVP8UzC05aOYWTOTe3RtCu4WQIttb7YT492aaJsNXzlc0opraR6rWCNefTIf1RVAC9qB7ipgBHVgGOjtrhP2l+1Z7HnWkTsHYzA1+Nbnh4EdMwE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=bLzSbLbE; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712074845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=x5Nzy2/q23qrlyr0SuAObpcRnYE3MZof6+YbCc/4IBs=; b=bLzSbLbEJxy5A5zWaiSSQIoA+eeHiDnoDTA/HOSThIWjmHa4cgAxtIhWey8RIcUffg1nZ/ C5xgW0AAo2zW6kfStRjjpGJSvwW6HMKRtEdElA0TZ9uzaCKlcnIEljLIOqijuxAP218s6h 6YSSjB4LJS3Zn0yuJcHJUME/2FEaFlw= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-217-6zP_L9HfNCGMfk9TXGY9pQ-1; Tue, 02 Apr 2024 12:20:44 -0400 X-MC-Unique: 6zP_L9HfNCGMfk9TXGY9pQ-1 Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-78d346eeb02so5784885a.1 for ; Tue, 02 Apr 2024 09:20:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712074842; x=1712679642; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=x5Nzy2/q23qrlyr0SuAObpcRnYE3MZof6+YbCc/4IBs=; b=QI60ZZ2XmhmsFAikPDQYK5dwCDZFCi47SZor1V3DiLXKX+vPkbNTLEWchaHHM6aEee uj/lpRpEWdJtl6mfUojfEobacu+5Xzk381Q6puZVfZClClHXhIdky7nbB8wV9N3VEXAs gL97wGklDho6P0NjQ7YQeFMglP7D7dGrHYt7V1xEQS93egu8wc+y/htG1jNGsJS91OSN VDMP8lTksZHtXjwJBBoOmDTAHEScyFCVcsx4AZKjuWk0Tt+jTcNENa5R5g7ErgzOVal+ 46RRPBc4fYts3SzaElmdeMw2LfuNJGLNawK+XVw9Del61Uy1PZnQIvkFGB1SxC889D/V fPGw== X-Gm-Message-State: AOJu0YyLG+p1E5j7nEm9zfpwRX5SSsVWGY34VI//ZA1Hn1IR0y6ue+Kp NgvwKV1aEx9W22je1Lts/3EQ5PyNFWr4JfH2vxy/Ui8c/hXcaPxi/gX8ZY3rBiaMbg1UYBsh6du CGFUFwSU9MIG8gBiNavb8d4k/+RZgiACSNPI0rceZcllP/8/lpGXQIHD0prdnAOZIcA== X-Received: by 2002:a05:620a:1a87:b0:78d:3570:488d with SMTP id bl7-20020a05620a1a8700b0078d3570488dmr393317qkb.3.1712074841755; Tue, 02 Apr 2024 09:20:41 -0700 (PDT) X-Received: by 2002:a05:620a:1a87:b0:78d:3570:488d with SMTP id bl7-20020a05620a1a8700b0078d3570488dmr393308qkb.3.1712074841469; Tue, 02 Apr 2024 09:20:41 -0700 (PDT) Received: from [10.19.60.48] (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id q13-20020a05620a0c8d00b00789e800c204sm4415086qki.62.2024.04.02.09.20.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Apr 2024 09:20:40 -0700 (PDT) Message-ID: Date: Tue, 2 Apr 2024 12:20:39 -0400 Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [nfs-utils PATCH] mount: reject "namlen=" option for a NFSv4 mount To: Chen Hanxiao Cc: linux-nfs@vger.kernel.org References: <20240322103618.1270-1-chenhx.fnst@fujitsu.com> Content-Language: en-US From: Steve Dickson In-Reply-To: <20240322103618.1270-1-chenhx.fnst@fujitsu.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hello, On 3/22/24 6:36 AM, Chen Hanxiao wrote: > namlen is not a valid option for NFSv4. > Currently, we could pass a namlen=xxx in a NFSv4 mount, > the mount command succeed and namlen is ignored silently I'm not sure it makes senses to fail a mount for a parameter that is ignored. Maybe throw a warning that the par is being ignored... What problem did this patch solve for you? steved. > > # mount -o vers=4,namlen=100 192.168.122.19:/nfsroot /mnt/ -vvv > mount.nfs: timeout set for Fri Mar 22 14:22:18 2024 > mount.nfs: trying text-based options 'namlen=100,vers=4.2, > addr=192.168.122.19,clientaddr=192.168.122.15' > > This patch reject "namlen=" option in a NFSv4 mount. > > Signed-off-by: Chen Hanxiao > --- > utils/mount/stropts.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c > index dbdd11e7..028ff6a6 100644 > --- a/utils/mount/stropts.c > +++ b/utils/mount/stropts.c > @@ -780,6 +780,15 @@ static int nfs_do_mount_v4(struct nfsmount_info *mi, > goto out_fail; > } > > + if (po_contains(options, "namlen")) { > + if (verbose) { > + printf(_("%s: Unsupported nfs4 mount option(s) passed '%s'\n"), > + progname, *mi->extra_opts); > + } > + errno = EINVAL; > + goto out_fail; > + } > + > if (mi->version.v_mode != V_SPECIFIC) { > char *fmt; > switch (mi->version.minor) {