From owner-freebsd-ppc@freebsd.org Mon Apr 1 20:29:21 2019 Return-Path: Delivered-To: freebsd-ppc@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 618E4156E12E for ; Mon, 1 Apr 2019 20:29:21 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic307-9.consmr.mail.ne1.yahoo.com (sonic307-9.consmr.mail.ne1.yahoo.com [66.163.190.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 571D187D79 for ; Mon, 1 Apr 2019 20:29:20 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: YybEYKAVM1lTdpeEKTR6IZ8lqwxMCG4qH15yGEuY1GaQjneycQ8BSplRX0GAlJy NFoXwadzhdeQ2aShdbQdxBf2QgbxrlhFkAZuXcwpq5LQbGCCCcBc4wPrcIMFs53kYzt_x4Y55VPu pZB4wd9xkA9q3A1R5gNsQUJ74ioMYjlMYVyXdDG2AgKOg9l7X7kNoL66fCzjN7swM_GFlGtZQurB Z0VgyepIGbbKOUhXAWlftSxyREBdXjrtw71yP881H2zoWNHRcrgH.iwNw9D.qRMPcp0bBY6SCBDm N3hw53Y58.GVkEpyanVC6InuBlBWwxDNRBIsx96cMkk91dzeBHFSm3vNY0Yte9I2.PfSkl_YqA0v YfWnN1RgtvzG.Ym1Xn1eQCn2Bp2LwKoK7tc0IAGQDaTYF_yRtvDoPkh5D88E8ncsXZaUanoxyJW6 uzlNjKUX70i0BEmiD1Rxggtespcjfke0KpDhtK69kukFdynifFkOX14_LQ1XC0u5qUWpOZjFH2fm Mr2LCUGiuJqzxKDh7XI0F9oLYXudV0sghPwsyZaPD1uNDMlWhLMwMKN0BHu9xjEdzmPB.KMTGToT CXPu9PVhJoQsWfS1jqERWV0bnExwxmI2FuQhtHUC3n4N2WZM_2rQyBOMEBdD4pzq5ady709SNy7p r.EF9Vtgz3eXiJHlWgJK9OSSn8hhoWtEH4mdYDuHdFgpQ4ycOJz5UWizQtidaDeFdefhWqCC_KfB ZroPasduSss1aylFos2EIMvLH7Kf55MH9TEUCropxw9nyIcU5gOmVin0khys978dgatH0SgTXAkv X2kQUYp8XN8yMR7X7.R2ZkhB3BCCk2fn5Q0Bkx39YPNNQ9m9Havjuw1HPHlW1D9VmeFauv3E8Lu4 _zNY9JKDDrG5r3Wmy7WGe0Gje2kaXMD6HOB4rQlHKGqH33Xadion_Z.DbwqaGwm3IvrAj8k0jIlh h8z_uj3wQAFwGpqwOH6KsHV4Wse_lH1OH2PeUqy8ausbMq9Uq7kg6er3MhEAeRT9AKyFVX0cYLDY GeObJN.tvKYoAsOZGC2vF9lhzYerM4NKbArUBtIOjNGVgkJssKo7yfvnfI2fFB3n.4OaxmUpC3w- - Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ne1.yahoo.com with HTTP; Mon, 1 Apr 2019 20:29:18 +0000 Received: from c-67-170-167-181.hsd1.or.comcast.net (EHLO [192.168.1.113]) ([67.170.167.181]) by smtp424.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 385fe7fa83865ad0447fee378a99f3bf; Mon, 01 Apr 2019 20:29:16 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Subject: Re: power9: "Successfully booted an LLVM compiled kernel": Can kernel modules (.ko) be dynamically loaded? Date: Mon, 1 Apr 2019 13:29:14 -0700 References: <53D45B7C-E7F0-4DC9-B09D-D3EFD56122E9@yahoo.com> To: FreeBSD PowerPC ML , Justin Hibbits In-Reply-To: <53D45B7C-E7F0-4DC9-B09D-D3EFD56122E9@yahoo.com> Message-Id: <3BF85ED4-FB88-4660-8D32-C86F06AE8470@yahoo.com> X-Mailer: Apple Mail (2.3445.104.8) X-Rspamd-Queue-Id: 571D187D79 X-Spamd-Bar: ++++ X-Spamd-Result: default: False [4.24 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MV_CASE(0.50)[]; FREEMAIL_FROM(0.00)[yahoo.com]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; MX_GOOD(-0.01)[cached: mta6.am0.yahoodns.net]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(1.56)[ip: (5.24), ipnet: 66.163.184.0/21(1.47), asn: 36646(1.17), country: US(-0.06)]; SUBJECT_ENDS_QUESTION(1.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36646, ipnet:66.163.184.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.89)[0.892,0]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; NEURAL_SPAM_MEDIUM(0.53)[0.528,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.77)[0.769,0]; RCVD_IN_DNSWL_NONE(0.00)[32.190.163.66.list.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(0.00)[] X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Apr 2019 20:29:21 -0000 On 2019-Mar-23, at 12:13, Mark Millard wrote: > As of when clang 5 (and later) became system clang, > I've found that .ko files started using R_PPC64_JMP_SLOT > r_types in .rela.plt sections. (My context, then and > now is still ELFv1 ABI and based on svn's head > materials.) >=20 > Last I checked, FreeBSD did not support R_PPC64_JMP_SLOT > and crashed during a dynamic-load of any(?) .ko that had > such. >=20 > So I've been building the modules that I want to use into > the kernel itself for when I experiment with clang-based > powerpc64 system builds. >=20 > (I've no clue if the R_PPC64_JMP_SLOT use is considered > "KBI" compliant or not vs. if FreeBSD is/was just > incomplete in its coverage of the "KBI" for pwoerpc64: > so which side should change.) >=20 > I recognize that power9 likely is based on the ELFv2 > ABI. Ignore the question: I've tested head -r345758 and clang is producing R_PPC64_JMP_SLOT in .ko files but the dynamic loads are working. I no longer need to build modules into the kernel for this issue. # uname -apKU FreeBSD FBSDG5L 13.0-CURRENT FreeBSD 13.0-CURRENT #8 r345758M: Sun Mar = 31 19:43:35 PDT 2019 = markmi@FBSDFSSD:/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64= /usr/src/powerpc.powerpc64/sys/GENERIC64vtsc-NODBG powerpc powerpc64 = 1300017 1300017 amd64->powerpc64 cross-built with system-clang and = devel/powerpc64-binutils using WITH_LLVM_LIBUNWIND=3D (patched) and WITHOUT_LIB32=3D . Various other = patches/workarounds for other issues are present, unrelated to R_PPC64_JMP_SLOT use in .ko = files. (I exierment with using more modern tool-chains to build for powerpc64 and = powerpc.) The system is an old PowerMac G5 (2 sockets, 2 cores per). I was able to comment out my prior inclusion of filemon and mac_ntpd in the kernel, so I now have: # kldstat Id Refs Address Size Name 1 6 0xc000000000100000 1927578 kernel 2 1 0xe00000008fcd2000 12000 mac_ntpd.ko 3 1 0xe00000008efda000 15000 filemon.ko I've no clue just when the status changed. I have closed bugzilla 224561 as overcome by events. (For other reasons I have to build in epair to allow kyua runs to not crash the system. I've updated bugzilla 232387 with recent information as well.) =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)