From owner-freebsd-hackers@freebsd.org Thu Sep 6 13:24:47 2018 Return-Path: Delivered-To: freebsd-hackers@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 58E8BFFB2AC for ; Thu, 6 Sep 2018 13:24:47 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward106p.mail.yandex.net (forward106p.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:109]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA5E876CB7 for ; Thu, 6 Sep 2018 13:24:46 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from mxback20j.mail.yandex.net (mxback20j.mail.yandex.net [IPv6:2a02:6b8:0:1619::114]) by forward106p.mail.yandex.net (Yandex) with ESMTP id 95AC32D8569A; Thu, 6 Sep 2018 16:24:36 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback20j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id fiouDiTWrk-OZSGdCT2; Thu, 06 Sep 2018 16:24:36 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1536240276; bh=lFWt8PTM0+6hJL0DwndEckYj3q1dB93orXYu1XF9ToE=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=dgW/AJbm64NBtYwChiLX00sJpbrOAeIMmRPbHQTX+qY+a4Yk6A7gQYwhr0ZZxo9p/ F5AaHlft9lipgfPmBK++hiHIKCBhV9aoxr5jTSdXkFXA/9FBbkr3CRfp9UerjMkSV/ D16Z3S2UKuTY93StU1rhPponrNzXGiSeuson+46I= Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id FH3qA0gQRO-OYDKTeSO; Thu, 06 Sep 2018 16:24:34 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1536240274; bh=lFWt8PTM0+6hJL0DwndEckYj3q1dB93orXYu1XF9ToE=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=PqpfinDY0twHapYQeuVBBhiPq9Vq9969ZpmohD1F7WpruUeCig4aYgqMCZnKGlp4C +GpCZa/YjIsOzxd39mdY2jzZC92F7934Xm9cbD5uxtYai64IdkFGmPoyo6A3BL/2Vs wG4ilSrSvgUYHhdbOm+jl6Sv77cf2QhseOkrB43U= Authentication-Results: smtp2o.mail.yandex.net; dkim=pass header.i=@yandex.ru Subject: Re: kernel module linking (general, ipfw table, netgraph) To: Eugene Grosbein , freeuser , freebsd-hackers@freebsd.org References: <5B91163D.9030905@grosbein.net> From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Autocrypt: addr=bu7cher@yandex.ru; prefer-encrypt=mutual; keydata= xsBNBEwBF1kBCADB9sXFhBEUy8qQ4X63Y8eBatYMHGEFWN9ypS5lI3RE6qQW2EYbxNk7qUC5 21YIIS1mMFVBEfvR7J9uc7yaYgFCEb6Sce1RSO4ULN2mRKGHP3/Sl0ijZEjWHV91hY1YTHEF ZW/0GYinDf56sYpDDehaBF5wkWIo1+QK5nmj3vl0DIDCMNd7QEiWpyLVwECgLX2eOAXByT8B bCqVhJGcG6iFP7/B9Ll6uX5gb8thM9LM+ibwErDBVDGiOgvfxqidab7fdkh893IBCXa82H9N CNwnEtcgzh+BSKK5BgvPohFMgRwjti37TSxwLu63QejRGbZWSz3OK3jMOoF63tCgn7FvABEB AAHNIkFuZHJleSBWLiBFbHN1a292IDxhZUBmcmVlYnNkLm9yZz7CwHsEEwECACUCGwMGCwkI BwMCBhUIAgk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O9 50IIZDOtNFeR0FGucjcLPdS9PiEqCoH7/waJxWp6ydJ+g4OYRBYNM0EmMgy1N85JJrV1mi5i Message-ID: <039ee1d8-c357-c7ae-4049-2aa4ca91a5c4@yandex.ru> Date: Thu, 6 Sep 2018 16:23:11 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <5B91163D.9030905@grosbein.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="LZ4z8fP2CeTx305vfvLdemme9niMyaotR" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Sep 2018 13:24:47 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --LZ4z8fP2CeTx305vfvLdemme9niMyaotR Content-Type: multipart/mixed; boundary="rN6r4RyS99lNruHGgoYYtIc9Vq3AM9fHu"; protected-headers="v1" From: "Andrey V. Elsukov" To: Eugene Grosbein , freeuser , freebsd-hackers@freebsd.org Message-ID: <039ee1d8-c357-c7ae-4049-2aa4ca91a5c4@yandex.ru> Subject: Re: kernel module linking (general, ipfw table, netgraph) References: <5B91163D.9030905@grosbein.net> In-Reply-To: <5B91163D.9030905@grosbein.net> --rN6r4RyS99lNruHGgoYYtIc9Vq3AM9fHu Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 06.09.2018 14:57, Eugene Grosbein wrote: >> I am building my module using /usr/src/sys/modules/netgraph/sample and= >> /usr/src/sys/netgraph/ng_sample.* as templates. On the other hand,=20 >> ng_socket >> uses kern_kldload, "sysctl -b kern.function_list | tr '\0' '\n' | grep= =20 >> kern_kldload" >> shows it and it works without any problems. >> >> Why is that? What have i not noticed that must be done? >=20 > Perhaps, this is KBI mismatch due to VIMAGE kernel option > that changes symbols like add_table_entry to V_add_table_entry > and your kernel module should be built WITH_VIMAGE defined too > to be loadable to such a kernel. I think VIMAGE only affects variables, but not functions. The problem is probably due to missing dependency. Look at ng_ipfw implementation. It depends from ipfw kernel module. Try add such dependency to your module. --=20 WBR, Andrey V. Elsukov --rN6r4RyS99lNruHGgoYYtIc9Vq3AM9fHu-- --LZ4z8fP2CeTx305vfvLdemme9niMyaotR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAluRKj8ACgkQAcXqBBDI oXpdVAf8Dv8Apl2LRIGKgYgZtrWRpXBjsGrlbUyS9FI5D/h4DVugLNo+PwBp101A XHyR0wcHa4a50rXOOaHl5dLm4gd3cWMyY46DoUCaD0ovaSX6qQP1LnpQXsX0S0SA FBgKH40xTv1QEbdrKwOq9AFwu4J66U8tmtcYrgxaypz6Y9llfBwtT61fNGpD5Kzl oXo/tw5mKW8sbUzmULWukHcu3DDpflfbgwnHP1gGgZCZxeWeT3DhnIJyoriC6Hs6 kuDFncfG+fsvr7t1olijTV5bD5nOO0kc0XlvWqkqWaFQwlqrpHfRaB6dNF5vGqdY vNsOKkZ3G5fSgzZ6uOKGdtf7hhWC+g== =K+Cs -----END PGP SIGNATURE----- --LZ4z8fP2CeTx305vfvLdemme9niMyaotR--