Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1600286lqp; Mon, 15 Apr 2024 11:01:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWEmEDc+IoNjTYFqtmI1e1QojAGtWywpgMAOaig24JQ5eFbt7wVvMJqSjH72fnRp9A3d4vTS4RwONlQW6y3995y6Ee795j8jMAuvYIvPQ== X-Google-Smtp-Source: AGHT+IEynuE/t112mzeC9YnJl1Vc+DEs4i4E8KlJT1eCYbdVeyDVeu/m6uLWUJdawHR7BocNGacv X-Received: by 2002:ad4:4e54:0:b0:69b:64d4:4b11 with SMTP id eb20-20020ad44e54000000b0069b64d44b11mr7252765qvb.22.1713204071987; Mon, 15 Apr 2024 11:01:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713204071; cv=pass; d=google.com; s=arc-20160816; b=FfpWsepFF0m6pnKHfdSz3tFhVLD3Ga0xAsrksr9tfOC5IxoQ16eVn3jYt/uNd9HxRq 3OR7Ou6gmmzC0EC/iyd19Er4OTHWVTR6UWHjAON6wK0b3Zhc9jQS4jTl3bykUV6r1bC5 zOvlT+1Gd1RPJBb8ceTWTik6eBj93Oav8KNyqZmgIA1BqZ/6gtlwaetl9Cw5eS67WKDQ 9tHDFFQV0Iiee+nDQAxXNH3NRXdYxJuRtkhgN1Fx0Y6fi+eW9x/jCagaefViLMGUHDa/ rg0r94TbK2vmyyEFHB1X1jz9vY8O9xXU2o88WcgzXqp/O+wLn+2mttgYEo9Kcptnz1NG wMCA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:reply-to:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature:dkim-signature:dkim-signature; bh=DVPzuRztccGar0a2zidEjL9tL6GgmvUZi2+GCTZyfxg=; fh=l1SbuhZu5Geyi7/Rvfq7LpbhxmOH4gJMlkYQI+0KCQM=; b=RGT2evkD/GT/1kJTNsrU1+JWcWTolNp7YL5ty9BIOLMDtjXO5Mr3+WvJO1wrUrDXXv RX/SPxsWOgLKo26wVc2exRbaCkYrKoLYe45VRirz18YRyBcvLqKB8g9m0VRLTPG0nBeo F6hVfXelqw8uHKUX43q0F6rP/VrCf7ZTL6UsSVS/9hcsrVxkv70GSlSvU8lGUK2C4YA0 XYmZ2o7cWxTtgxFIgU2olh23HIfCJFtLCN1QFm/ckTPUFsSCKnKo/j1+m1cO/C/WJFEH nDaXjQAen1bhx9M5MVSZ5IZpUYW0ixJBc3VOo0tEiZOPd0REE6r5UWrdsYqVbbMLSF80 RN5Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=AuTufYMy; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=xqQGUWUC; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-nfs+bounces-2818-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2818-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id o10-20020a0cfa8a000000b0069b5eb73abfsi7095967qvn.306.2024.04.15.11.01.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 11:01:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-2818-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=AuTufYMy; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=xqQGUWUC; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-nfs+bounces-2818-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2818-linux.lists.archive=gmail.com@vger.kernel.org" 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 8AFA51C20CC8 for ; Mon, 15 Apr 2024 18:01:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F273771B50; Mon, 15 Apr 2024 18:01:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="AuTufYMy"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="gn9MgtQh"; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="xqQGUWUC"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="Vn8eUG2/" X-Original-To: linux-nfs@vger.kernel.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19AD41E877 for ; Mon, 15 Apr 2024 18:01:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713204069; cv=none; b=KHqXnMT28DpTMLSL57E2OJ1QybCKjuML+8EzSMFc1StQICMRXrDL09ThkYkjRdXRCyFiML1/LDvF4XmuflcYRlcL766FDsPkBL168pFsh8P5xVi1bkdcRX2Ylo+OHn3QYIp5aTMeFb6SaF939NBJCqQoTQGeYiVQKF9dUxb36Ew= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713204069; c=relaxed/simple; bh=Z9WugXJImLppZ3OEnt0ZPklHp/2egkW6bqQvDMyrcYo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NXRgkx9W39Aw32ulbC6RzxMVNq84yIUW51JFGpIADG1oYh5noFwx54SXOtf3oeZlEHjhPFU889J7wQd4iBjTDqYMKxXd3xqqysHpGQ+YX09CR1zdSiT7rsFqNFQPLnRQpyqgKLkda2emeA7rFJk9id850qHrLCuNmUbwrEbA7ek= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=AuTufYMy; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=gn9MgtQh; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=xqQGUWUC; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=Vn8eUG2/; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id EBC8637366; Mon, 15 Apr 2024 18:01:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1713204066; h=from:from:reply-to:reply-to: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=DVPzuRztccGar0a2zidEjL9tL6GgmvUZi2+GCTZyfxg=; b=AuTufYMydkQsuiuIuRfbcR+lRR/LDyE8LJeIf56A/Pfb0P+vCYTBc1pCELpbxjSrP1os8X Qh+ubnhPfvbEOntNN426lRB9usrAdsYTkngr3IFzFvXS5wm7xH/7hak3DXB9/fZ9W/S0xv 88esEDXBsSmNgHWHRDzEqRZ31z9QVAg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1713204066; h=from:from:reply-to:reply-to: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=DVPzuRztccGar0a2zidEjL9tL6GgmvUZi2+GCTZyfxg=; b=gn9MgtQhFkKfV8vKLwwRpJPpx1hpDAHjnoUcAoRUpxmk3ELpmAuRJ/pXscf/1SvPSR+PY4 5VO5L6DSqqILJWCQ== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1713204064; h=from:from:reply-to:reply-to: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=DVPzuRztccGar0a2zidEjL9tL6GgmvUZi2+GCTZyfxg=; b=xqQGUWUCfzS3bb/hILwYesdedKVo8HNVJYXxJ++woFoSUNDapIX9wwDxVd2AP9v0jOCl5H 22IaHtCS6vJurcSjxnuSYrmbKhsiWUP9Pa3MwywBToTmZlKog9M0ZFaTBM0SdwUhx6yAf/ qIFFKH1rRswe44PI2kEpGqaoVHT6LuU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1713204064; h=from:from:reply-to:reply-to: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=DVPzuRztccGar0a2zidEjL9tL6GgmvUZi2+GCTZyfxg=; b=Vn8eUG2/rKRY+bxUzDQIeV6wCNbEkWJ9zBV/xBWaeAu469MPsHK/6PRj1d39I32WzNjkYy u3H1PRMytqQE7FBA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 9126A1386E; Mon, 15 Apr 2024 18:01:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap1.dmz-prg2.suse.org with ESMTPSA id 7FyLIWBrHWarawAAD6G6ig (envelope-from ); Mon, 15 Apr 2024 18:01:04 +0000 Date: Mon, 15 Apr 2024 20:00:55 +0200 From: Petr Vorel To: Jeff Layton Cc: Chuck Lever III , "ltp@lists.linux.it" , Neil Brown , Cyril Hrubis , Linux NFS Mailing List Subject: Re: [PATCH 1/1] proc01: Whitelist /proc/fs/nfsd/nfsv4recoverydir Message-ID: <20240415180055.GA557009@pevik> Reply-To: Petr Vorel References: <20240415172133.553441-1-pvorel@suse.cz> <7A48C70E-BAAB-4A1C-A41B-ABC30287D8B7@oracle.com> <6820832A-9F38-4DE7-8EE4-7AAC8CF06FD4@oracle.com> <5052616ca4c2789ffcc51a27cbff060e2fbdb7b4.camel@kernel.org> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5052616ca4c2789ffcc51a27cbff060e2fbdb7b4.camel@kernel.org> X-Spam-Level: X-Spamd-Result: default: False [-3.50 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_RHS_NOT_FQDN(0.50)[]; HAS_REPLYTO(0.30)[pvorel@suse.cz]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; MISSING_XM_UA(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; RCPT_COUNT_FIVE(0.00)[6]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.cz:replyto,suse.cz:email]; REPLYTO_EQ_FROM(0.00)[] X-Spam-Score: -3.50 X-Spam-Flag: NO > On Mon, 2024-04-15 at 17:37 +0000, Chuck Lever III wrote: > > > On Apr 15, 2024, at 1:35 PM, Jeff Layton wrote: > > > On Mon, 2024-04-15 at 17:27 +0000, Chuck Lever III wrote: > > > > > On Apr 15, 2024, at 1:21 PM, Petr Vorel wrote: > > > > > /proc/fs/nfsd/nfsv4recoverydir started from kernel 6.8 report EINVAL. > > > > > Signed-off-by: Petr Vorel > > > > > --- > > > > > Hi, > > > > > @ Jeff, Chuck, Neil, NFS devs: The patch itself whitelist reading > > > > > /proc/fs/nfsd/nfsv4recoverydir in LTP test. I suspect reading failed > > > > > with EINVAL in 6.8 was a deliberate change and expected behavior when > > > > > CONFIG_NFSD_LEGACY_CLIENT_TRACKING is not set: > > > > I'm not sure it was deliberate. This seems like a behavior > > > > regression. Jeff? > > > I don't think I intended to make it return -EINVAL. I guess that's what > > > happens when there is no entry for it in the write_op array. > > > With CONFIG_NFSD_LEGACY_CLIENT_TRACKING disabled, that file has no > > > meaning or value at all anymore. Maybe we should just remove the dentry > > > altogether when CONFIG_NFSD_LEGACY_CLIENT_TRACKING is disabled? > > My understanding of the rules about modifying this part of > > the kernel-user interface is that the file has to stay, even > > though it's now a no-op. First, thanks a lot for handling this. > Does it? Where are these rules written? I wonder myself as well. > What should we have it do now when read and written? Maybe EOPNOTSUPP > would be better, if we can make it just return an error? FYI current exceptions on /proc files in whole kernel have various errnos, e.g. EINVAL, EOPNOTSUPP: https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/fs/proc/proc01.c#L81 Kind regards, Petr > We could also make it just discard written data, and present a blank > string when read. What do the rules say we are required to do here?