On 7/12/20 12:29 AM, 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 Technically one can enable checks with e.g. geli(8), but note that the geli(8) provider will not "prime" the HMAC data so attaching the device will immediately spam the system log with some authentication errors due to GEOM tasting (because the kernel would try to read locations that potentially contain metadata for other GEOM providers). For the case of swap, since the write is always page sized, it's probably optimal to implement something in the swap layer itself and store the expected checksums in memory. Cheers,
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:24 UTC