From owner-svn-src-head@freebsd.org Tue Apr 10 19:18:20 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68D51F91A02; Tue, 10 Apr 2018 19:18:20 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 150CF830B1; Tue, 10 Apr 2018 19:18:20 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0FCEA11BC1; Tue, 10 Apr 2018 19:18:20 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3AJIJXs049220; Tue, 10 Apr 2018 19:18:19 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3AJIG62049183; Tue, 10 Apr 2018 19:18:16 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201804101918.w3AJIG62049183@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 10 Apr 2018 19:18:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332387 - in head/sys/geom: . bde cache concat eli gate journal label linux_lvm mirror mountver multipath nop part raid3 shsec stripe uzip vinum virstor zero X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/sys/geom: . bde cache concat eli gate journal label linux_lvm mirror mountver multipath nop part raid3 shsec stripe uzip vinum virstor zero X-SVN-Commit-Revision: 332387 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Apr 2018 19:18:20 -0000 Author: kevans Date: Tue Apr 10 19:18:16 2018 New Revision: 332387 URL: https://svnweb.freebsd.org/changeset/base/332387 Log: Annotate geom modules with MODULE_VERSION GEOM ELI may double ask the password during boot. Once at loader time, and once at init time. This happens due a module loading bug. By default GEOM ELI caches the password in the kernel, but without the MODULE_VERSION annotation, the kernel loads over the kernel module, even if the GEOM ELI was compiled into the kernel. In this case, the newly loaded module purges/invalidates/overwrites the GEOM ELI's password cache, which causes the double asking. MFC Note: There's a pc98 component to the original submission that is omitted here due to pc98 removal in head. This part will need to be revived upon MFC. Reviewed by: imp Submitted by: op Obtained from: opBSD MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D14992 Modified: head/sys/geom/bde/g_bde.c head/sys/geom/cache/g_cache.c head/sys/geom/concat/g_concat.c head/sys/geom/eli/g_eli.c head/sys/geom/gate/g_gate.c head/sys/geom/geom_bsd.c head/sys/geom/geom_ccd.c head/sys/geom/geom_fox.c head/sys/geom/geom_map.c head/sys/geom/geom_mbr.c head/sys/geom/geom_redboot.c head/sys/geom/geom_sunlabel.c head/sys/geom/geom_vol_ffs.c head/sys/geom/journal/g_journal_ufs.c head/sys/geom/label/g_label.c head/sys/geom/linux_lvm/g_linux_lvm.c head/sys/geom/mirror/g_mirror.c head/sys/geom/mountver/g_mountver.c head/sys/geom/multipath/g_multipath.c head/sys/geom/nop/g_nop.c head/sys/geom/part/g_part_apm.c head/sys/geom/part/g_part_bsd.c head/sys/geom/part/g_part_bsd64.c head/sys/geom/part/g_part_ebr.c head/sys/geom/part/g_part_gpt.c head/sys/geom/part/g_part_ldm.c head/sys/geom/part/g_part_mbr.c head/sys/geom/part/g_part_vtoc8.c head/sys/geom/raid3/g_raid3.c head/sys/geom/shsec/g_shsec.c head/sys/geom/stripe/g_stripe.c head/sys/geom/uzip/g_uzip.c head/sys/geom/vinum/geom_vinum.c head/sys/geom/virstor/g_virstor.c head/sys/geom/zero/g_zero.c Modified: head/sys/geom/bde/g_bde.c ============================================================================== --- head/sys/geom/bde/g_bde.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/bde/g_bde.c Tue Apr 10 19:18:16 2018 (r332387) @@ -292,3 +292,4 @@ static struct g_class g_bde_class = { }; DECLARE_GEOM_CLASS(g_bde_class, g_bde); +MODULE_VERSION(geom_bde, 0); Modified: head/sys/geom/cache/g_cache.c ============================================================================== --- head/sys/geom/cache/g_cache.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/cache/g_cache.c Tue Apr 10 19:18:16 2018 (r332387) @@ -1016,3 +1016,4 @@ g_cache_dumpconf(struct sbuf *sb, const char *indent, } DECLARE_GEOM_CLASS(g_cache_class, g_cache); +MODULE_VERSION(geom_cache, 0); Modified: head/sys/geom/concat/g_concat.c ============================================================================== --- head/sys/geom/concat/g_concat.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/concat/g_concat.c Tue Apr 10 19:18:16 2018 (r332387) @@ -993,3 +993,4 @@ g_concat_dumpconf(struct sbuf *sb, const char *indent, } DECLARE_GEOM_CLASS(g_concat_class, g_concat); +MODULE_VERSION(geom_concat, 0); Modified: head/sys/geom/eli/g_eli.c ============================================================================== --- head/sys/geom/eli/g_eli.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/eli/g_eli.c Tue Apr 10 19:18:16 2018 (r332387) @@ -1333,3 +1333,4 @@ g_eli_fini(struct g_class *mp) DECLARE_GEOM_CLASS(g_eli_class, g_eli); MODULE_DEPEND(g_eli, crypto, 1, 1, 1); +MODULE_VERSION(geom_eli, 0); Modified: head/sys/geom/gate/g_gate.c ============================================================================== --- head/sys/geom/gate/g_gate.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/gate/g_gate.c Tue Apr 10 19:18:16 2018 (r332387) @@ -964,3 +964,4 @@ static moduledata_t g_gate_module = { }; DECLARE_MODULE(geom_gate, g_gate_module, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); DECLARE_GEOM_CLASS(g_gate_class, g_gate); +MODULE_VERSION(geom_gate, 0); Modified: head/sys/geom/geom_bsd.c ============================================================================== --- head/sys/geom/geom_bsd.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/geom_bsd.c Tue Apr 10 19:18:16 2018 (r332387) @@ -614,3 +614,4 @@ static struct g_class g_bsd_class = { }; DECLARE_GEOM_CLASS(g_bsd_class, g_bsd); +MODULE_VERSION(geom_bsd, 0); Modified: head/sys/geom/geom_ccd.c ============================================================================== --- head/sys/geom/geom_ccd.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/geom_ccd.c Tue Apr 10 19:18:16 2018 (r332387) @@ -936,3 +936,4 @@ static struct g_class g_ccd_class = { }; DECLARE_GEOM_CLASS(g_ccd_class, g_ccd); +MODULE_VERSION(geom_ccd, 0); Modified: head/sys/geom/geom_fox.c ============================================================================== --- head/sys/geom/geom_fox.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/geom_fox.c Tue Apr 10 19:18:16 2018 (r332387) @@ -485,3 +485,4 @@ static struct g_class g_fox_class = { }; DECLARE_GEOM_CLASS(g_fox_class, g_fox); +MODULE_VERSION(geom_fox, 0); Modified: head/sys/geom/geom_map.c ============================================================================== --- head/sys/geom/geom_map.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/geom_map.c Tue Apr 10 19:18:16 2018 (r332387) @@ -407,3 +407,4 @@ static struct g_class g_map_class = { .ctlreq = g_map_config, }; DECLARE_GEOM_CLASS(g_map_class, g_map); +MODULE_VERSION(geom_map, 0); Modified: head/sys/geom/geom_mbr.c ============================================================================== --- head/sys/geom/geom_mbr.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/geom_mbr.c Tue Apr 10 19:18:16 2018 (r332387) @@ -528,3 +528,4 @@ static struct g_class g_mbrext_class = { }; DECLARE_GEOM_CLASS(g_mbrext_class, g_mbrext); +MODULE_VERSION(geom_mbr, 0); Modified: head/sys/geom/geom_redboot.c ============================================================================== --- head/sys/geom/geom_redboot.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/geom_redboot.c Tue Apr 10 19:18:16 2018 (r332387) @@ -357,3 +357,4 @@ static struct g_class g_redboot_class = { .ioctl = g_redboot_ioctl, }; DECLARE_GEOM_CLASS(g_redboot_class, g_redboot); +MODULE_VERSION(geom_redboot, 0); Modified: head/sys/geom/geom_sunlabel.c ============================================================================== --- head/sys/geom/geom_sunlabel.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/geom_sunlabel.c Tue Apr 10 19:18:16 2018 (r332387) @@ -334,3 +334,4 @@ static struct g_class g_sunlabel_class = { }; DECLARE_GEOM_CLASS(g_sunlabel_class, g_sunlabel); +MODULE_VERSION(geom_sunlabel, 0); Modified: head/sys/geom/geom_vol_ffs.c ============================================================================== --- head/sys/geom/geom_vol_ffs.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/geom_vol_ffs.c Tue Apr 10 19:18:16 2018 (r332387) @@ -164,3 +164,4 @@ static struct g_class g_vol_ffs_class = { }; DECLARE_GEOM_CLASS(g_vol_ffs_class, g_vol_ffs); +MODULE_VERSION(geom_vol_ffs, 0); Modified: head/sys/geom/journal/g_journal_ufs.c ============================================================================== --- head/sys/geom/journal/g_journal_ufs.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/journal/g_journal_ufs.c Tue Apr 10 19:18:16 2018 (r332387) @@ -101,3 +101,4 @@ const struct g_journal_desc g_journal_ufs = { }; MODULE_DEPEND(g_journal, ufs, 1, 1, 1); +MODULE_VERSION(geom_journal, 0); Modified: head/sys/geom/label/g_label.c ============================================================================== --- head/sys/geom/label/g_label.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/label/g_label.c Tue Apr 10 19:18:16 2018 (r332387) @@ -556,3 +556,4 @@ g_label_config(struct gctl_req *req, struct g_class *m } DECLARE_GEOM_CLASS(g_label_class, g_label); +MODULE_VERSION(geom_label, 0); Modified: head/sys/geom/linux_lvm/g_linux_lvm.c ============================================================================== --- head/sys/geom/linux_lvm/g_linux_lvm.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/linux_lvm/g_linux_lvm.c Tue Apr 10 19:18:16 2018 (r332387) @@ -1190,3 +1190,4 @@ static struct g_class g_llvm_class = { }; DECLARE_GEOM_CLASS(g_llvm_class, g_linux_lvm); +MODULE_VERSION(geom_linux_lvm, 0); Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/mirror/g_mirror.c Tue Apr 10 19:18:16 2018 (r332387) @@ -3492,3 +3492,4 @@ g_mirror_fini(struct g_class *mp) } DECLARE_GEOM_CLASS(g_mirror_class, g_mirror); +MODULE_VERSION(geom_mirror, 0); Modified: head/sys/geom/mountver/g_mountver.c ============================================================================== --- head/sys/geom/mountver/g_mountver.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/mountver/g_mountver.c Tue Apr 10 19:18:16 2018 (r332387) @@ -660,3 +660,4 @@ g_mountver_fini(struct g_class *mp) } DECLARE_GEOM_CLASS(g_mountver_class, g_mountver); +MODULE_VERSION(geom_mountver, 0); Modified: head/sys/geom/multipath/g_multipath.c ============================================================================== --- head/sys/geom/multipath/g_multipath.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/multipath/g_multipath.c Tue Apr 10 19:18:16 2018 (r332387) @@ -1532,3 +1532,4 @@ g_multipath_dumpconf(struct sbuf *sb, const char *inde } DECLARE_GEOM_CLASS(g_multipath_class, g_multipath); +MODULE_VERSION(geom_multipath, 0); Modified: head/sys/geom/nop/g_nop.c ============================================================================== --- head/sys/geom/nop/g_nop.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/nop/g_nop.c Tue Apr 10 19:18:16 2018 (r332387) @@ -717,3 +717,4 @@ g_nop_dumpconf(struct sbuf *sb, const char *indent, st } DECLARE_GEOM_CLASS(g_nop_class, g_nop); +MODULE_VERSION(geom_nop, 0); Modified: head/sys/geom/part/g_part_apm.c ============================================================================== --- head/sys/geom/part/g_part_apm.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/part/g_part_apm.c Tue Apr 10 19:18:16 2018 (r332387) @@ -107,6 +107,7 @@ static struct g_part_scheme g_part_apm_scheme = { .gps_maxent = 4096, }; G_PART_SCHEME_DECLARE(g_part_apm); +MODULE_VERSION(geom_part_apm, 0); static void swab(char *buf, size_t bufsz) Modified: head/sys/geom/part/g_part_bsd.c ============================================================================== --- head/sys/geom/part/g_part_bsd.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/part/g_part_bsd.c Tue Apr 10 19:18:16 2018 (r332387) @@ -113,6 +113,7 @@ static struct g_part_scheme g_part_bsd_scheme = { .gps_bootcodesz = BBSIZE, }; G_PART_SCHEME_DECLARE(g_part_bsd); +MODULE_VERSION(geom_part_bsd, 0); static struct g_part_bsd_alias { uint8_t type; Modified: head/sys/geom/part/g_part_bsd64.c ============================================================================== --- head/sys/geom/part/g_part_bsd64.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/part/g_part_bsd64.c Tue Apr 10 19:18:16 2018 (r332387) @@ -165,6 +165,7 @@ static struct g_part_scheme g_part_bsd64_scheme = { .gps_maxent = MAXPARTITIONS64 }; G_PART_SCHEME_DECLARE(g_part_bsd64); +MODULE_VERSION(geom_part_bsd64, 0); #define EQUUID(a, b) (memcmp(a, b, sizeof(struct uuid)) == 0) static struct uuid bsd64_uuid_unused = GPT_ENT_TYPE_UNUSED; Modified: head/sys/geom/part/g_part_ebr.c ============================================================================== --- head/sys/geom/part/g_part_ebr.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/part/g_part_ebr.c Tue Apr 10 19:18:16 2018 (r332387) @@ -128,6 +128,7 @@ static struct g_part_scheme g_part_ebr_scheme = { .gps_maxent = INT_MAX, }; G_PART_SCHEME_DECLARE(g_part_ebr); +MODULE_VERSION(geom_part_ebr, 0); static struct g_part_ebr_alias { u_char typ; Modified: head/sys/geom/part/g_part_gpt.c ============================================================================== --- head/sys/geom/part/g_part_gpt.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/part/g_part_gpt.c Tue Apr 10 19:18:16 2018 (r332387) @@ -146,6 +146,7 @@ static struct g_part_scheme g_part_gpt_scheme = { .gps_bootcodesz = MBRSIZE, }; G_PART_SCHEME_DECLARE(g_part_gpt); +MODULE_VERSION(geom_part_gpt, 0); static struct uuid gpt_uuid_apple_apfs = GPT_ENT_TYPE_APPLE_APFS; static struct uuid gpt_uuid_apple_boot = GPT_ENT_TYPE_APPLE_BOOT; Modified: head/sys/geom/part/g_part_ldm.c ============================================================================== --- head/sys/geom/part/g_part_ldm.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/part/g_part_ldm.c Tue Apr 10 19:18:16 2018 (r332387) @@ -363,6 +363,7 @@ static struct g_part_scheme g_part_ldm_scheme = { .gps_entrysz = sizeof(struct g_part_ldm_entry) }; G_PART_SCHEME_DECLARE(g_part_ldm); +MODULE_VERSION(geom_part_ldm, 0); static struct g_part_ldm_alias { u_char typ; Modified: head/sys/geom/part/g_part_mbr.c ============================================================================== --- head/sys/geom/part/g_part_mbr.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/part/g_part_mbr.c Tue Apr 10 19:18:16 2018 (r332387) @@ -121,6 +121,7 @@ static struct g_part_scheme g_part_mbr_scheme = { .gps_bootcodesz = MBRSIZE, }; G_PART_SCHEME_DECLARE(g_part_mbr); +MODULE_VERSION(geom_part_mbr, 0); static struct g_part_mbr_alias { u_char typ; Modified: head/sys/geom/part/g_part_vtoc8.c ============================================================================== --- head/sys/geom/part/g_part_vtoc8.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/part/g_part_vtoc8.c Tue Apr 10 19:18:16 2018 (r332387) @@ -101,6 +101,7 @@ static struct g_part_scheme g_part_vtoc8_scheme = { .gps_maxent = VTOC8_NPARTS, }; G_PART_SCHEME_DECLARE(g_part_vtoc8); +MODULE_VERSION(geom_part_vtoc8, 0); static int vtoc8_parse_type(const char *type, uint16_t *tag) Modified: head/sys/geom/raid3/g_raid3.c ============================================================================== --- head/sys/geom/raid3/g_raid3.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/raid3/g_raid3.c Tue Apr 10 19:18:16 2018 (r332387) @@ -3583,3 +3583,4 @@ g_raid3_fini(struct g_class *mp) } DECLARE_GEOM_CLASS(g_raid3_class, g_raid3); +MODULE_VERSION(geom_raid3, 0); Modified: head/sys/geom/shsec/g_shsec.c ============================================================================== --- head/sys/geom/shsec/g_shsec.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/shsec/g_shsec.c Tue Apr 10 19:18:16 2018 (r332387) @@ -836,3 +836,4 @@ g_shsec_dumpconf(struct sbuf *sb, const char *indent, } DECLARE_GEOM_CLASS(g_shsec_class, g_shsec); +MODULE_VERSION(geom_shsec, 0); Modified: head/sys/geom/stripe/g_stripe.c ============================================================================== --- head/sys/geom/stripe/g_stripe.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/stripe/g_stripe.c Tue Apr 10 19:18:16 2018 (r332387) @@ -1270,3 +1270,4 @@ g_stripe_dumpconf(struct sbuf *sb, const char *indent, } DECLARE_GEOM_CLASS(g_stripe_class, g_stripe); +MODULE_VERSION(geom_stripe, 0); Modified: head/sys/geom/uzip/g_uzip.c ============================================================================== --- head/sys/geom/uzip/g_uzip.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/uzip/g_uzip.c Tue Apr 10 19:18:16 2018 (r332387) @@ -922,3 +922,4 @@ static struct g_class g_uzip_class = { DECLARE_GEOM_CLASS(g_uzip_class, g_uzip); MODULE_DEPEND(g_uzip, zlib, 1, 1, 1); +MODULE_VERSION(geom_uzip, 0); Modified: head/sys/geom/vinum/geom_vinum.c ============================================================================== --- head/sys/geom/vinum/geom_vinum.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/vinum/geom_vinum.c Tue Apr 10 19:18:16 2018 (r332387) @@ -1048,3 +1048,4 @@ static struct g_class g_vinum_class = { }; DECLARE_GEOM_CLASS(g_vinum_class, g_vinum); +MODULE_VERSION(geom_vinum, 0); Modified: head/sys/geom/virstor/g_virstor.c ============================================================================== --- head/sys/geom/virstor/g_virstor.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/virstor/g_virstor.c Tue Apr 10 19:18:16 2018 (r332387) @@ -1891,3 +1891,4 @@ invalid_call(void) } DECLARE_GEOM_CLASS(g_virstor_class, g_virstor); /* Let there be light */ +MODULE_VERSION(geom_virstor, 0); Modified: head/sys/geom/zero/g_zero.c ============================================================================== --- head/sys/geom/zero/g_zero.c Tue Apr 10 18:39:20 2018 (r332386) +++ head/sys/geom/zero/g_zero.c Tue Apr 10 19:18:16 2018 (r332387) @@ -143,3 +143,4 @@ static struct g_class g_zero_class = { }; DECLARE_GEOM_CLASS(g_zero_class, g_zero); +MODULE_VERSION(geom_zero, 0);