Bug 232595

Summary: geli(8) attach backward compatibility broken
Product: Base System Reporter: Xin LI <delphij>
Component: binAssignee: Xin LI <delphij>
Status: Closed FIXED    
Severity: Affects Some People CC: oshogbo, re
Priority: --- Flags: delphij: mfc-stable12+
Version: CURRENT   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 228911    

Description Xin LI freebsd_committer freebsd_triage 2018-10-24 06:45:25 UTC
Kernels newer than r332361 requires 'dryrun' and kernels newer than r333439 requires 'keyno' parameter when performing geli attach.  This would prevent newer kernel to work with old binary.

For normal upgrades, where kernel is updated, then reboot, then userland is updated, this may prevent the upgrade procedure from working, if the encrypted partition contained required data for upgrade.
Comment 1 Xin LI freebsd_committer freebsd_triage 2018-10-24 06:46:38 UTC
Proposed fix at: https://reviews.freebsd.org/D17680
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-10-27 03:37:43 UTC
A commit references this bug:

Author: delphij
Date: Sat Oct 27 03:37:15 UTC 2018
New revision: 339804
URL: https://svnweb.freebsd.org/changeset/base/339804

Log:
  Restore backward compatibility for "attach" verb.

  In r332361 and r333439, two new parameters were added to geli attach
  verb using gctl_get_paraml, which requires the value to be present.
  This would prevent old geli(8) binary from attaching geli(4) device
  as they have no knowledge about the new parameters.

  Restore backward compatibility by treating the absense of these two
  values as seeing the default value supplied by userland.

  PR:		232595
  Reviewed by:	oshogbo
  MFC after:	3 days
  Differential Revision:	https://reviews.freebsd.org/D17680

Changes:
  head/sys/geom/eli/g_eli_ctl.c
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-10-30 15:11:50 UTC
A commit references this bug:

Author: delphij
Date: Tue Oct 30 15:11:34 UTC 2018
New revision: 339918
URL: https://svnweb.freebsd.org/changeset/base/339918

Log:
  Restore backward compatibility for "attach" verb.

  In r332361 and r333439, two new parameters were added to geli attach
  verb using gctl_get_paraml, which requires the value to be present.
  This would prevent old geli(8) binary from attaching geli(4) device
  as they have no knowledge about the new parameters.

  Restore backward compatibility by treating the absense of these two
  values as seeing the default value supplied by userland.

  PR:		232595
  Reviewed by:	oshogbo
  Approved by:	re (rgrimes)

Changes:
_U  stable/12/
  stable/12/sys/geom/eli/g_eli_ctl.c