From owner-freebsd-stable@FreeBSD.ORG Fri Mar 30 17:40:02 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 692B51065679 for ; Fri, 30 Mar 2012 17:40:02 +0000 (UTC) (envelope-from ryao@cs.stonybrook.edu) Received: from edge1.cs.stonybrook.edu (edge1.cs.stonybrook.edu [130.245.9.210]) by mx1.freebsd.org (Postfix) with ESMTP id 08E3B8FC1D for ; Fri, 30 Mar 2012 17:40:01 +0000 (UTC) Received: from HUBCAS1.cs.stonybrook.edu (130.245.9.206) by edge1.cs.stonybrook.edu (130.245.9.210) with Microsoft SMTP Server (TLS) id 14.1.355.2; Fri, 30 Mar 2012 13:39:56 -0400 Received: from [192.168.1.2] (72.89.250.133) by hubcas1.cs.stonybrook.edu (130.245.9.212) with Microsoft SMTP Server (TLS) id 14.1.323.3; Fri, 30 Mar 2012 13:40:00 -0400 Message-ID: <4F75EF86.6090909@cs.stonybrook.edu> Date: Fri, 30 Mar 2012 13:38:14 -0400 From: Richard Yao User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120301 Thunderbird/10.0.1 MIME-Version: 1.0 To: References: <4F75E404.8000104@cs.stonybrook.edu> In-Reply-To: <4F75E404.8000104@cs.stonybrook.edu> X-Enigmail-Version: 1.3.5 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig184EAF1AF49918C2F5CC19CF" X-Originating-IP: [72.89.250.133] Cc: Subject: 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 17:40:02 -0000 --------------enig184EAF1AF49918C2F5CC19CF Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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. 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: # readelf -d /boot/modules/virtio.ko 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 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= =2E I don't have a reference i386 install, but according to frogs in ##freebsd on freenode, his i386 FreeBSD also has text relocations. Is this a bug? Yours truly, Richard Yao 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= =2E > 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 a= s > 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 --------------enig184EAF1AF49918C2F5CC19CF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJPde+KAAoJELFAT5FmjZuENIIP/At2AdwgslMCfDneVx7oG5l1 2VYQAJA92Ca0osizn+t39FBSra9XXTCVcFlfTCdBZhiAaBJxva8hPsBhE/Z+uUPF b55moMncXYmIOgEYssJHk9nEonPI3R30pPVOxHobCLGILpKCpTpqT8rqxfTmAbwQ tQv5/8BVHvH2QDCAn9DhY4AQLOHW66L68x/sUHYWj4ivWQMGr8nQqlu8ssoDg733 5j1/FQwYdHPwvI0ob3Wb66NAQWuyNNYdXfKUdqTwWPKeSljDVYAK85f9W6S9kh2/ ywaruq2VfR69LjFBKNvfRgt3ANkv0/YMFboiwXC2Zn3DnIiYKTw/kAheJE6u4Fc8 6rhkZdV/299mWpdV4IEqSb+3zs0Vz71oWnzTBuCVGrFTd1PkpUPv6V+xwyCpp0hh Whw25Tm0QVqFh0mwvLTgvNhv8+/HVbwZ37npoDc9XZ9R0+UXJ5oz9R0BVZjVaysn r7hI2wjB9MtaKgw3jSbhUa1ZBNXP+xi2kgzYRBDTEICR66Mq2woDBhfxyoQKdryn MgeGycIFmOlrOO3nDZyrR06ZQWBT9F8+rXiL2VJSxMuxFURKMrAYdUvY7D5peM6n x5ojTCDB2l7Mb0w/ed/auNj8ZX6z82gQtkSjRUE1eJzLpFDAGkpp/Bj6kKh8Vwuj B5qMTuOOUkpwNED++g+/ =Wj1E -----END PGP SIGNATURE----- --------------enig184EAF1AF49918C2F5CC19CF--