Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jan 2021 22:07:24 GMT
From:      Mitchell Horne <mhorne@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: d89e1db5a331 - main - if_wg: fix modules load on !x86
Message-ID:  <202101122207.10CM7OGe002296@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by mhorne:

URL: https://cgit.FreeBSD.org/src/commit/?id=d89e1db5a3319f4e3bc9403ed883c64638b67f71

commit d89e1db5a3319f4e3bc9403ed883c64638b67f71
Author:     Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2021-01-12 21:38:21 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2021-01-12 22:07:10 +0000

    if_wg: fix modules load on !x86
    
    Only x86 provides optimized implementations via the blake2 module. The
    software "reference" implementation is already included in the crypto(4)
    module, we can drop the extra MODULE_DEPEND for other platforms.
    
    Without this change, if_wg.ko could not be loaded due to the missing
    dependency.
    
    PR:             252156
    Reported by:    gbe
    Sponsored by:   The FreeBSD Foundation
---
 sys/dev/if_wg/module/module.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sys/dev/if_wg/module/module.c b/sys/dev/if_wg/module/module.c
index c7c71a1a0f72..76c7db01cba1 100644
--- a/sys/dev/if_wg/module/module.c
+++ b/sys/dev/if_wg/module/module.c
@@ -843,5 +843,8 @@ static moduledata_t wg_moduledata = {
 DECLARE_MODULE(wg, wg_moduledata, SI_SUB_PSEUDO, SI_ORDER_ANY);
 MODULE_VERSION(wg, 1);
 MODULE_DEPEND(wg, iflib, 1, 1, 1);
+#if defined(__amd64__) || defined(__i386__)
+/* Optimized blake2 implementations are only available on x86. */
 MODULE_DEPEND(wg, blake2, 1, 1, 1);
+#endif
 MODULE_DEPEND(wg, crypto, 1, 1, 1);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101122207.10CM7OGe002296>