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

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

Graham Perrin  changed:

   What|Removed |Added

   Assignee|f...@freebsd.org  |g...@freebsd.org
  Component|bin |kern
   Severity|Affects Only Me |Affects Some People
 CC||grahamper...@freebsd.org

--- Comment #6 from Graham Perrin  ---
^Triage, partly at the suggestion of RhodiumToad in IRC: 

* kern
* severity
* assignment to a list that's relevant to (GELI) encryption

Key phrase: data corruption

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


[Bug 271794] boot1.efi hangs on a system with gjournaled partitions

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

Graham Perrin  changed:

   What|Removed |Added

 Status|New |Open
   Assignee|b...@freebsd.org|g...@freebsd.org

-- 
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-03 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271766

--- Comment #7 from Michael Laß  ---
(In reply to Michael Laß from comment #3)
I was wondering why I could not reproduce this in 14 Current. The dumpfs issue
is hidden by changes between 1297a704d99110644af1ae32840cee1b9523cb56 (still
reproducible) and b21582ee03ec1394e08173e276df311979856e54 (not reproducible
anymore). Most likely it comes down to:

  bf24d17fda75cc89a92248715d52a73f23adc89c: Have dumpfs(8) ignore superblock
check-hash failures.

However, this seems to only hide the issue in dumpfs and I assume that the
actual data corruption issue in geli is still present in 14 Current. However,
I'm not sure how to verify that.

-- 
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-03 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271766

--- Comment #8 from Andrew "RhodiumToad" Gierth  
---
This just got much more serious: in trying to reproduce the bug more easily, I
found that it is possible to panic the system with it; if the alignment of the
user-provided buffer is not merely non-page-aligned, but also not word-aligned
(for some wordsize, I don't yet know what), then:

panic: general protection fault

KDB: stack backtrace:
[...]
#3 0x807b9467 at trap_fatal+0x387
#4 0x8079378e at calltrap+0x8
#5 0x80696c53 at swcr_encdec+0x653
#6 0x8069635a at swcr_process+0x3a
#7 0x806942bd at crypto_dispatch+0x15d
#8 0x8124bab8 at g_eli_crypto_run+0x158
#9 0x81244c88 at g_eli_worker+0x308

-- 
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-03 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271766

Graham Perrin  changed:

   What|Removed |Added

   Keywords||crash

-- 
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-03 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271766

--- Comment #9 from Andrew "RhodiumToad" Gierth  
---
(In reply to Andrew "RhodiumToad" Gierth from comment #8)

Correction: I can get crashes even for buffers with 16-byte alignment.

Seems to be related to crypto_cursor_segment? I will post more info shortly.

-- 
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-03 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271766

--- Comment #10 from Andrew "RhodiumToad" Gierth  
---
Created attachment 242577
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=242577&action=edit
Test program

I've attached the test program I'm using to reproduce. Usage:

md=$(mdconfig -s 1M -t swap)
geli onetime -s 4096 $md
# this will panic with software crypto, or if there are data discrepancies it
will report them:
./a.out /dev/$md 1

The code where it panics has changed in 14-current so it's quite possible that
the bug doesn't exist there. This program should make it easy to test.

-- 
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-03 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271766

--- Comment #11 from Andrew "RhodiumToad" Gierth  
---
(In reply to Andrew "RhodiumToad" Gierth from comment #10)

That should be

./a.out /dev/${md}.eli 1

of course.

-- 
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-03 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271766

--- Comment #12 from Michael Laß  ---
I tested your code on 14-current and while there it does not seem to cause
crashes, it still detects errors as soon as I specify strides smaller than 16.

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