All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: linux-nfs@vger.kernel.org, Trond Myklebust <trondmy@kernel.org>,
	Anna Schumaker <anna@kernel.org>,
	Jeff Layton <jlayton@kernel.org>, Neil Brown <neilb@suse.de>,
	Olga Kornievskaia <okorniev@redhat.com>,
	Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
	Ard Biesheuvel <ardb@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] nfs: add missing selections of CONFIG_CRC32
Date: Tue, 8 Apr 2025 20:45:14 +0000	[thread overview]
Message-ID: <20250408204514.GA3142638@google.com> (raw)
In-Reply-To: <20250402162940.GB1235@sol.localdomain>

On Wed, Apr 02, 2025 at 09:29:41AM -0700, Eric Biggers wrote:
> On Wed, Apr 02, 2025 at 09:51:05AM -0400, Chuck Lever wrote:
> > On 4/1/25 6:02 PM, Eric Biggers wrote:
> > > From: Eric Biggers <ebiggers@google.com>
> > > 
> > > nfs.ko, nfsd.ko, and lockd.ko all use crc32_le(), which is available
> > > only when CONFIG_CRC32 is enabled.  But the only NFS kconfig option that
> > > selected CONFIG_CRC32 was CONFIG_NFS_DEBUG, which is client-specific and
> > > did not actually guard the use of crc32_le() even on the client.
> > > 
> > > The code worked around this bug by only actually calling crc32_le() when
> > > CONFIG_CRC32 is built-in, instead hard-coding '0' in other cases.  This
> > > avoided randconfig build errors, and in real kernels the fallback code
> > > was unlikely to be reached since CONFIG_CRC32 is 'default y'.  But, this
> > > really needs to just be done properly, especially now that I'm planning
> > > to update CONFIG_CRC32 to not be 'default y'.
> > 
> > It's interesting that no-one has noticed this before. dprintk is not the
> > only consumer of the FH hash function: NFS/NFSD trace points also use
> > it.
> > 
> > Eric, assuming you would like to carry this patch forward instead of us
> > taking it through one of the NFS client or server trees:
> > 
> > Acked-by: Chuck Lever <chuck.lever@oracle.com>
> > 
> > for the hunks related to nfsd and lockd.
> 
> Please go ahead and take it through one of the NFS trees.  Thanks!
> 

I ended up sending in the removal of 'default y' from CONFIG_CRC32 for 6.15.  So
I recommend that you send this NFS patch in for 6.15 as well, as it's now
slightly more likely that people can end up with CONFIG_CRC32 disabled (though
many other parts of the kernel select it anyway, so it still tends to be
enabled).

- Eric

  reply	other threads:[~2025-04-08 20:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-01 22:02 [PATCH] nfs: add missing selections of CONFIG_CRC32 Eric Biggers
2025-04-02 13:51 ` Chuck Lever
2025-04-02 16:29   ` Eric Biggers
2025-04-08 20:45     ` Eric Biggers [this message]
2025-04-09 13:39       ` Chuck Lever
2025-04-02 18:36 ` Anna Schumaker
2025-04-02 19:56 ` cel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250408204514.GA3142638@google.com \
    --to=ebiggers@kernel.org \
    --cc=Dai.Ngo@oracle.com \
    --cc=anna@kernel.org \
    --cc=ardb@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=jlayton@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=okorniev@redhat.com \
    --cc=tom@talpey.com \
    --cc=trondmy@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.