lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aSVNOhcK3PvdlSET@infradead.org>
Date: Mon, 24 Nov 2025 22:31:22 -0800
From: Christoph Hellwig <hch@...radead.org>
To: "Darrick J. Wong" <djwong@...nel.org>
Cc: Raphael Pinsonneault-Thibeault <rpthibeault@...il.com>, cem@...nel.org,
	chandanbabu@...nel.org, bfoster@...hat.com, david@...morbit.com,
	hch@...radead.org, linux-xfs@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-kernel-mentees@...ts.linux.dev,
	syzbot+9f6d080dece587cfdd4c@...kaller.appspotmail.com
Subject: Re: [PATCH v5] xfs: validate log record version against superblock
 log version

> Hrmm maybe we ought to reserve XLOG_VERSION==0x3 so that whenever we do
> log v3 we don't accidentally write logs with bits that won't be
> validated quite right on old kernels?

Why do we need to reserve that?  The code checks for either 1 or 2
right now based on the log feature flag.  If we add a v3 log we'll
have to ammend this, but reservations won't help with that.

> > +	if (xfs_has_logv2(mp)) {
> > +		if (XFS_IS_CORRUPT(mp, h_version != XLOG_VERSION_2))
> 
> Being pedantic here, but the kernel cpu_to_be32 wrappers are magic in
> that they compile to byteswapped constants so you can avoid the runtime
> overhead of byteswapping rhead->h_version by doing:
> 
> 	if (XFS_IS_CORRUPT(mp,
> 	    rhead->h_version != cpu_to_be32(XLOG_VERSION_2)))
> 		return -EFSCORRUPTED;
> 
> But seeing as this is log validation for recovery, I think the
> performance implications are vanishingly small.

Yes.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ