Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Jul 2020 14:46:32 -0700
From:      John-Mark Gurney <jmg@funkthat.com>
To:        bob prohaska <fbsd@www.zefox.net>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Is there any error checking on swap?
Message-ID:  <20200712214632.GH4213@funkthat.com>
In-Reply-To: <20200712153751.GA64898@www.zefox.net>
References:  <20200712033332.GA63411@www.zefox.net> <20200712072911.GG4213@funkthat.com> <20200712153751.GA64898@www.zefox.net>

next in thread | previous in thread | raw e-mail | index | archive | help
bob prohaska wrote this message on Sun, Jul 12, 2020 at 08:37 -0700:
> On Sun, Jul 12, 2020 at 12:29:12AM -0700, John-Mark Gurney wrote:
> > bob prohaska wrote this message on Sat, Jul 11, 2020 at 20:33 -0700:
> > > Is there any error checking on swap traffic, along the lines of
> > > a checksum or parity test? 
> > > 
> > > Just curious what happens if a page written out is corrupted  when
> > > it comes back.
> > 
> > Looks like it doesn't:
> > https://svnweb.freebsd.org/base/head/sys/vm/swap_pager.c?annotate=361965#l1389
> > 
> 
> Certainly nothing about parity or checksums in the comments.
> All faith in the hardware, I guess....
> 
> Thanks for writing!

It probably wouldn't be too hard to add the feature...  Just expand the
page entry to store a fletcher checksum or the like...

Another option would be to try to use swap on ZFS, and use ZFS's builtin
checksum feature:
https://wiki.freebsd.org/RootOnZFS#ZFS_Swap_Volume

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200712214632.GH4213>