From owner-freebsd-stable@FreeBSD.ORG Fri Mar 30 19:07:30 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA14A106566C for ; Fri, 30 Mar 2012 19:07:30 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 3E19A8FC1B for ; Fri, 30 Mar 2012 19:07:29 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q2UJ7Epu051651; Fri, 30 Mar 2012 22:07:14 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q2UJ7E9N026127; Fri, 30 Mar 2012 22:07:14 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q2UJ7DJT026126; Fri, 30 Mar 2012 22:07:13 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 30 Mar 2012 22:07:13 +0300 From: Konstantin Belousov To: Richard Yao Message-ID: <20120330190713.GG2358@deviant.kiev.zoral.com.ua> References: <4F75E404.8000104@cs.stonybrook.edu> <4F75EF86.6090909@cs.stonybrook.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Aym+Xj7/WQ8n9Mht" Content-Disposition: inline In-Reply-To: <4F75EF86.6090909@cs.stonybrook.edu> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-stable@freebsd.org Subject: Re: Text relocations in kernel modules X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2012 19:07:30 -0000 --Aym+Xj7/WQ8n9Mht Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 30, 2012 at 01:38:14PM -0400, Richard Yao wrote: > As a disclaimer, I would like to clarify that Gentoo/FreeBSD uses a > FreeBSD userland and that Gentoo/FreeBSD has nothing to do with Debian > GNU/kFreeBSD. People seem to think Gentoo/FreeBSD is related to Debian > GNU/kFreeBSD, which has made collaboration difficult. >=20 > With that said, Gentoo Portage is warning about text relocations in > kernel modules. This is in a Gentoo/FreeBSD port of > emulators/freebsd-kmod that I wrote. For instance, I see: >=20 > # readelf -d /boot/modules/virtio.ko >=20 > Dynamic section at offset 0x2f6c contains 13 entries: > Tag Type Name/Value > 0x00000004 (HASH) 0xd4 > 0x6ffffef5 (GNU_HASH) 0x238 > 0x00000005 (STRTAB) 0x4a8 > 0x00000006 (SYMTAB) 0x298 > 0x0000000a (STRSZ) 397 (bytes) > 0x0000000b (SYMENT) 16 (bytes) > 0x00000011 (REL) 0x638 > 0x00000012 (RELSZ) 1568 (bytes) > 0x00000013 (RELENT) 8 (bytes) > 0x00000016 (TEXTREL) 0x0 > 0x0000001e (FLAGS) TEXTREL > 0x6ffffffa (RELCOUNT) 108 > 0x00000000 (NULL) 0x0 >=20 > Checking /boot/kernel, it seems that all modules have text relocations. > My Gentoo/FreeBSD install is a 32-bit chroot on a ZFS Guru install of > amd64 FreeBSD. amd64 FreeBSD does not appear to have any text relocations. >=20 > I don't have a reference i386 install, but according to frogs in > ##freebsd on freenode, his i386 FreeBSD also has text relocations. >=20 > Is this a bug? No. This is by design. Why do you consider this a bug ? >=20 > Yours truly, > Richard Yao >=20 > On 03/30/12 12:49, Richard Yao wrote: > > Dear Ports Maintainers and kuriyama, > >=20 > > emulators/freebsd-kmod has a typo in pkg-descr, where it says "lodable" > > instead of "loadable". > >=20 > > In addition, I have done the work necessary to port > > emulators/freebsd-kmod to Gentoo/FreeBSD. > >=20 > > https://bugs.gentoo.org/show_bug.cgi?id=3D410199 > >=20 > > The ebuild contains a few improvements on the original FreeBSD port > > where we copy only the parts of SYSDIR that we need to build the module. > > We also do hardlinks instead of copies when Gentoo Portage builds with > > user privileges. > >=20 > > The NEEDSUBDIRS part of the ebuild was written by naota AT gentoo.org as > > part of Gentoo's review process. I have permission from him to upstream > > the improvements we made on the port. Feel free to adopt any > > improvements in the attachments in that bug report. > >=20 > > Lastly, I have sent an email to gentoo-dev AT lists.gentoo.org and > > gentoo-bsd AT lists.gentoo.org requesting that the FreeBSD specific > > parts of the portage tree be relicensed under terms of the BSD-2 > > license. With a little luck, it will be possible to upstream > > improvements made in Gentoo/FreeBSD without any hassle in the future. > >=20 > > Yours truly, > > Richard Yao > >=20 >=20 >=20 --Aym+Xj7/WQ8n9Mht Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk92BGEACgkQC3+MBN1Mb4gVEQCg4qgh2gjzAM5PG8mMuia0nlYb 66sAn0FF2iPH6jCHyW0EhePYqnGMvRHv =g0l2 -----END PGP SIGNATURE----- --Aym+Xj7/WQ8n9Mht--