From nobody Tue Dec 14 11:07:26 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B458C18DDB57; Tue, 14 Dec 2021 11:07:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JCwZQ2VlFz3P3Q; Tue, 14 Dec 2021 11:07:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 345F72701D; Tue, 14 Dec 2021 11:07:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BEB7QGD040324; Tue, 14 Dec 2021 11:07:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BEB7Q1w040323; Tue, 14 Dec 2021 11:07:26 GMT (envelope-from git) Date: Tue, 14 Dec 2021 11:07:26 GMT Message-Id: <202112141107.1BEB7Q1w040323@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: d7d55d9f7546 - stable/13 - Move KHELP_DECLARE_MOD_UMA later in the boot List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d7d55d9f7546675c8a79042a94eee89125019648 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639480048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3SUPOn5thUuvlNJo0XNNLC2PR4dVK5OnjGSrNCFXvqQ=; b=uJFAErGK/9K+xeDzvhQd2YDqcw0laDyEUYU8Aj60srncYV2cdo6mQRiRYU1IFVR2Ssvc4r p1JuVZp6yaRx+R3rvEo/jyYfvlS2HTSH+rVo5Sjd7/ToHoYNiPzRmn+fXdfFveM6MtWJbv RBVnVWZfgX4ggn/unxQX7wh8qzIYQDmwZW7hOBlZyQxOXR5mSTWKW3oHGzwghpAmPOR/Wq wXcYPRL66dqasOKPHt7aw9B01zn8cViIHcaKxmZ9J9L28KdWHRQdymhk+GNDRq/5Q9Zzsp boPV4A81UaIvJxXqU76J9gKJLw193oAo5QZCLS6J7LD77vasMxYfqp4yaVEQFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639480048; a=rsa-sha256; cv=none; b=S/RLSeGp89v4i7JTiBA/SdJXV85q2WqRQcSFhnj3SERhhq8dQVvDu0jbXe8E7AY7nMSraF KdkMCvCtd6NE0Vtk/0p/6RsD/aQHS1t4Z2hKYk7KhEF+yQbZdjAlo7v0aOVq6kxIbBT3nN FAQiQTUxU4ruaqgoM4Vzz0AzAFsR4vc2FTKZRWoiNwn1ALKTBVgq0bxILMGLYPT1eUG4d+ sleqgIxEjaEcjpkTN+5M0arrlHO7IiiOZYVe+wgfadJWqGsAoBoE9pxHlpTwHAxDdrK1KS dfpD5+sDKYwq4avfTNcMuXDANM4f+Jv6DZThbtXOGwm2hdp5igV0oWqxN6gMgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=d7d55d9f7546675c8a79042a94eee89125019648 commit d7d55d9f7546675c8a79042a94eee89125019648 Author: Andrew Turner AuthorDate: 2021-11-12 18:28:18 +0000 Commit: Andrew Turner CommitDate: 2021-12-14 10:58:01 +0000 Move KHELP_DECLARE_MOD_UMA later in the boot Both KHELP_DECLARE_MOD_UMA and the kernel linker SYSINIT to find in-kernel modules run at SI_SUB_KLD, SI_ORDER_ANY. As the former depends on the latter running first move it later in the boot, to the new SI_SUB_KHELP. This ensures KHELP_DECLARE_MOD_UMA module SYSINIT functions will be after the kernel linker. Previously we may have received a panic similar to the following if the order was incorrect: panic: module_register_init: module named ertt not found Reported by: bob prohaska Discussed with: imp, jhb Sponsored by: The FreeBSD Foundation (cherry picked from commit ae062ff2695f61e43e23e144db62cb251b2cf599) --- sys/sys/kernel.h | 1 + sys/sys/module_khelp.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/sys/kernel.h b/sys/sys/kernel.h index 3e48a57e0f83..38e4ac5847b5 100644 --- a/sys/sys/kernel.h +++ b/sys/sys/kernel.h @@ -105,6 +105,7 @@ enum sysinit_sub_id { SI_SUB_EVENTHANDLER = 0x1C00000, /* eventhandler init */ SI_SUB_VNET_PRELINK = 0x1E00000, /* vnet init before modules */ SI_SUB_KLD = 0x2000000, /* KLD and module setup */ + SI_SUB_KHELP = 0x2080000, /* khelp modules */ SI_SUB_CPU = 0x2100000, /* CPU resource(s)*/ SI_SUB_RACCT = 0x2110000, /* resource accounting */ SI_SUB_KDTRACE = 0x2140000, /* Kernel dtrace hooks */ diff --git a/sys/sys/module_khelp.h b/sys/sys/module_khelp.h index a66440277a41..bab33e487497 100644 --- a/sys/sys/module_khelp.h +++ b/sys/sys/module_khelp.h @@ -87,7 +87,7 @@ struct khelp_modevent_data { .evhand = khelp_modevent, \ .priv = &kmd_##hname \ }; \ - DECLARE_MODULE(hname, h_##hname, SI_SUB_KLD, SI_ORDER_ANY); \ + DECLARE_MODULE(hname, h_##hname, SI_SUB_KHELP, SI_ORDER_ANY); \ MODULE_VERSION(hname, version) #define KHELP_DECLARE_MOD(hname, hdata, hhooks, version) \