From owner-freebsd-current@freebsd.org Thu Jun 2 02:31:57 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8913CB6255B for ; Thu, 2 Jun 2016 02:31:57 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-211-195.reflexion.net [208.70.211.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C6CC18B8 for ; Thu, 2 Jun 2016 02:31:57 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 3549 invoked from network); 2 Jun 2016 02:32:23 -0000 Received: from unknown (HELO rtc-sm-01.app.dca.reflexion.local) (10.81.150.1) by 0 (rfx-qmail) with SMTP; 2 Jun 2016 02:32:23 -0000 Received: by rtc-sm-01.app.dca.reflexion.local (Reflexion email security v7.90.3) with SMTP; Wed, 01 Jun 2016 22:31:55 -0400 (EDT) Received: (qmail 30399 invoked from network); 2 Jun 2016 02:31:55 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with SMTP; 2 Jun 2016 02:31:55 -0000 X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network Received: from [192.168.1.8] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 5521C1C43E6; Wed, 1 Jun 2016 19:31:44 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: [CFT] WITH_META_MODE: Working incremental build [only on i386 and amd64] [filemon fails to load on powerpc64] From: Mark Millard In-Reply-To: <5ae8e248-904e-2c33-b76c-566890406b8c@FreeBSD.org> Date: Wed, 1 Jun 2016 19:31:49 -0700 Cc: Nathan Whitehorn , FreeBSD Current , FreeBSD PowerPC ML Content-Transfer-Encoding: 7bit Message-Id: <4F433A9C-2F3E-4C4A-A303-91E24069C367@dsl-only.net> References: <7748cc71-3788-22ae-fcb2-699eae529310@FreeBSD.org> <9A1A624D-9286-4C0F-A435-D590E07C1149@dsl-only.net> <0165aee5-cf6f-8f01-1690-fc51995e2109@FreeBSD.org> <35AFB7AC-7AD4-41D5-AA8D-87C37EB52455@dsl-only.net> <5ae8e248-904e-2c33-b76c-566890406b8c@FreeBSD.org> To: Bryan Drewery X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jun 2016 02:31:57 -0000 On 2016-Jun-1, at 7:21 PM, Bryan Drewery wrote: > > The fix is easy, I am just wondering why there are 2 ABI formats > supported. If only one is normally used and the default then I'll only > support that one. > > Filemon hooks the syscall table. The only differences that I see are (_v1 then _v2 pairs): .sv_sigcode = sigcode64, .sv_szsigcode = &szsigcode64, .sv_name = "FreeBSD ELF64", vs. .sv_sigcode = sigcode64_elfv2, .sv_szsigcode = &szsigcode64_elfv2, .sv_name = "FreeBSD ELF64 V2", and: .sv_setregs = exec_setregs_funcdesc, vs. .sv_setregs = exec_setregs, Only for the _v1 case: .sv_trap = NULL, This appears to be two different ELF format versions. This is confirmed by: https://patchwork.ozlabs.org/patch/433747/ (from 2015-Jan-28) where Nathan wrote: Big-endian ELF64 ELF executables normally (the Linux kernel is an exception) have their entry point refer to a function descriptor instead of the first instruction. Distinguish between the Linux case and the function descriptor case, which is used for the FreeBSD kernel, by checking whether the entry point points into an executable section or not. This allows use of the FreeBSD kernel as a skiboot payload. === Mark Millard markmi at dsl-only.net Older material. . . On 6/1/2016 7:16 PM, Mark Millard wrote: > May be Nathan Whitehorn knows what is going on that prevents filemon.ko > from loading for powerpc64 based on how it is now built (added for more > than i386 and amd64 as of -r301130)? > > Nathan: See below if it sounds like something you might have a clue > about. As to why this comers up: Loading filemon.ko is required in order > for WITH_META_MODE=yes to work for incremental builds. > > === > Mark Millard > markmi at dsl-only.net > > On 2016-Jun-1, at 6:59 PM, Bryan Drewery > wrote: > >> On 6/1/2016 6:39 PM, Mark Millard wrote: >>> while filemon.ko now exists: >>>> # ls -l /boot/*/filemon* >>>> -r-xr-xr-x 1 root wheel 32064 Jun 1 17:59 /boot/kernel/filemon.ko >>> it does not load: >>>> # kldload -n filemon >>>> kldload: can't load filemon: No such file or directory >>>> # dmesg | grep link_elf >>>> link_elf: symbol elf64_freebsd_sysvec undefined >> >> There's 2 different ABI formats for powerpc64? >> >>> sys/powerpc/powerpc/elf64_machdep.c:INIT_SYSENTVEC(elf64_sysvec_v1, >>> &elf64_freebsd_sysvec_v1); >>> sys/powerpc/powerpc/elf64_machdep.c:INIT_SYSENTVEC(elf64_sysvec_v2, >>> &elf64_freebsd_sysvec_v2); >> >> What's up with that? >> >> -- >> Regards, >> Bryan Drewery > > -- Regards, Bryan Drewery