[Bug 271766] dumpfs fails on geli devices: cylinder group checks failed

2023-06-07 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271766

--- Comment #16 from Mark Johnston  ---
Created attachment 242665
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=242665&action=edit
address the corruption

This fixes the verification failures as well as the originally reported problem
with dumpfs.

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 271766] dumpfs fails on geli devices: cylinder group checks failed

2023-06-07 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271766

--- Comment #17 from Michael Laß  ---
(In reply to Mark Johnston from comment #16)
Great! That patch looks good to me, considering that src is computed from
*cc->cc_vmpage and cc->cc_offset and hence the manual advance needs to be done
for dst.

It looks like the code causing the panic was introduced in FreeBSD 13.0
(9c0e3d3a534c3e3e7f6bfce0a150ed2a0841685a and
a017868e281874261a560ba1e3069b4e14b7483e) and the code causing the data
corruption was introduced in 13.0 as well
(e6f6d0c9bcbf7942c390f65062054ec4784ce5b8). So I guess both patches would need
to be applied to main and stable/13? I tested both reproducers (dumpfs and
Andrew's code) on 12.4 and indeed there were no crashes and no errors reported.

One question remains for me: Is there a chance that a mounted file system
inside a GELI-encrypted block device would be affected from this and hence be
corrupted or is this code path only triggered by dumpfs?

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 271766] dumpfs fails on geli devices: cylinder group checks failed

2023-06-07 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271766

Mark Johnston  changed:

   What|Removed |Added

 Status|Open|In Progress
   Assignee|g...@freebsd.org|ma...@freebsd.org

--- Comment #18 from Mark Johnston  ---
(In reply to Michael Laß from comment #17)
Right.  The patches will be committed to main and MFCed to stable/13.

As Andrew's test case demonstrates, there may be other programs which are
affected.  It depends on the alignment of the buffer used to read or write to a
GELI block device.  Data read or written through a filesystem is unlikely to be
affected, as filesystems will generally align their buffers.  Note also that
the bug is not triggered if aesni(4) is loaded (default in main, enabled
automatically by bsdinstall for ZFS-on-GELI).

-- 
You are receiving this mail because:
You are the assignee for the bug.