Bug 232595 - geli(8) attach backward compatibility broken
Summary: geli(8) attach backward compatibility broken
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Xin LI
URL:
Keywords:
Depends on:
Blocks: 228911
  Show dependency treegraph
 
Reported: 2018-10-24 06:45 UTC by Xin LI
Modified: 2018-10-30 15:13 UTC (History)
2 users (show)

See Also:
delphij: mfc-stable12+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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