From nobody Sat Oct 29 16:19:57 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4N04Pt0MCzz4gCw1; Sat, 29 Oct 2022 16:20:02 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta002.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4N04Ps0XHkz3xx7; Sat, 29 Oct 2022 16:20:00 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from shw-obgw-4002a.ext.cloudfilter.net ([10.228.9.250]) by cmsmtp with ESMTP id omuoouKOvSp39ooYyoljLb; Sat, 29 Oct 2022 16:20:00 +0000 Received: from spqr.komquats.com ([70.66.148.124]) by cmsmtp with ESMTPA id ooYwoMxvPzeTTooYxoBBYR; Sat, 29 Oct 2022 16:20:00 +0000 X-Authority-Analysis: v=2.4 cv=EY/b/dqC c=1 sm=1 tr=0 ts=635d52b0 a=Cwc3rblV8FOMdVN/wOAqyQ==:117 a=Cwc3rblV8FOMdVN/wOAqyQ==:17 a=8nJEP1OIZ-IA:10 a=Qawa6l4ZSaYA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=77D-opjnjL-whL_rT90A:9 a=wPNLvfGTeEIA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 3B445214; Sat, 29 Oct 2022 09:19:58 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 03882CE; Sat, 29 Oct 2022 09:19:57 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Mitchell Horne cc: Cy Schubert , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 1da65dcb1c57 - main - linux: populate sv_syscallnames in each sysentvec In-reply-to: <000aa27d-b115-5106-1870-78474e911336@freebsd.org> References: <202210282133.29SLXqfq064166@gitrepo.freebsd.org> <20221029150145.6BD6713@slippy.cwsent.com> <87ba6e9b-fa69-d131-0941-6688d58ae029@freebsd.org> <000aa27d-b115-5106-1870-78474e911336@freebsd.org> Comments: In-reply-to Mitchell Horne message dated "Sat, 29 Oct 2022 13:14:18 -0300." List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Sat, 29 Oct 2022 09:19:57 -0700 Message-Id: <20221029161958.03882CE@slippy.cwsent.com> X-CMAE-Envelope: MS4xfCFmUM4TNKQdC3S26efnyJSgSUSr9PkrcZoto9MfyCpAVyW5X6/qoACyE+KxXG6vQjtIu8kDQbuMUtx0B43yM4YFQe2K66pMRoKo1J289105VTKTxork Mk85MlrAO67K65F/JnCSxpx1ksvL0wnovDuvdNPMkdHMYuhFeVHC7ZxX0DnFJAzeMcFA3J7h3rqPuzIaIbra+UxYn0cF2EhZu0KCk2mpRfRyp1WIxrUAjN+B LiXUG4W6vb3CRcSlDvO8Br9ER8QH4wFnoVZK49nEUEPVcQLmQgKiFYJFNWenAsPoNCmNzzcTult1bO6b3TpW8QloxB9zqMcACfaGsljORZ0= X-Rspamd-Queue-Id: 4N04Ps0XHkz3xx7 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 3.97.99.33) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-0.02 / 15.00]; R_MIXED_CHARSET(1.56)[]; AUTH_NA(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-0.99)[-0.993]; NEURAL_HAM_SHORT(-0.98)[-0.982]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org,dev-commits-src-all@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[3.97.99.33:from]; R_DKIM_NA(0.00)[]; R_SPF_NA(0.00)[no SPF record]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_TLS_LAST(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; DMARC_NA(0.00)[cschubert.com: no valid DMARC record]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com] X-ThisMailContainsUnwantedMimeParts: N In message <000aa27d-b115-5106-1870-78474e911336@freebsd.org>, Mitchell Horne w rites: > On 10/29/22 12:21, Mitchell Horne wrote: > > On 10/29/22 12:01, Cy Schubert wrote: > >> In message <202210282133.29SLXqfq064166@gitrepo.freebsd.org>, Mitchell > >> Horne wr > >> ites: > >>> The branch main has been updated by mhorne: > >>> > >>> URL: > >>> https://cgit.FreeBSD.org/src/commit/?id=1da65dcb1c57fae7be75ddf1bd300ddf > >>> 19ced850 > >>> > >>> commit 1da65dcb1c57fae7be75ddf1bd300ddf19ced850 > >>> Author:     Mitchell Horne > >>> AuthorDate: 2022-10-28 21:19:39 +0000 > >>> Commit:     Mitchell Horne > >>> CommitDate: 2022-10-28 21:21:08 +0000 > >>> > >>>      linux: populate sv_syscallnames in each sysentvec > >>>      This allows the syscallname() function to give a usable result > >>> for Linux > >>>      ABIs. > >>>      Reported by:    jrtc27 > >>>      Reviewed by:    jrtc27, markj, jhb > >>>      MFC after:      1 week > >>>      Sponsored by:   The FreeBSD Foundation > >>>      Differential Revision:  https://reviews.freebsd.org/D37199 > >>> --- > >>>   sys/amd64/linux/linux_sysvec.c     | 3 ++- > >>>   sys/amd64/linux32/linux32_sysvec.c | 3 ++- > >>>   sys/arm64/linux/linux_sysvec.c     | 3 ++- > >>>   sys/i386/linux/linux_sysvec.c      | 3 ++- > >>>   4 files changed, 8 insertions(+), 4 deletions(-) > >>> > >>> diff --git a/sys/amd64/linux/linux_sysvec.c > >>> b/sys/amd64/linux/linux_sysvec.c > >>> index abb498370f79..2a9e4909340b 100644 > >>> --- a/sys/amd64/linux/linux_sysvec.c > >>> +++ b/sys/amd64/linux/linux_sysvec.c > >>> @@ -110,6 +110,7 @@ extern char _binary_linux_vdso_so_o_end; > >>>   static vm_offset_t linux_vdso_base; > >>>   extern struct sysent linux_sysent[LINUX_SYS_MAXSYSCALL]; > >>> +extern const char *linux_syscallnames[]; > >>>   SET_DECLARE(linux_ioctl_handler_set, struct linux_ioctl_handler); > >>> @@ -729,7 +730,7 @@ struct sysentvec elf_linux_sysvec = { > >>>           SV_SIG_WAITNDQ | SV_TIMEKEEP, > >>>       .sv_set_syscall_retval = linux_set_syscall_retval, > >>>       .sv_fetch_syscall_args = linux_fetch_syscall_args, > >>> -    .sv_syscallnames = NULL, > >>> +    .sv_syscallnames = linux_syscallnames, > >>>       .sv_shared_page_base = LINUX_SHAREDPAGE_LA48, > >>>       .sv_shared_page_len = PAGE_SIZE, > >>>       .sv_schedtail    = linux_schedtail, > >>> diff --git a/sys/amd64/linux32/linux32_sysvec.c > >>> b/sys/amd64/linux32/linux32_s > >>> ysvec.c > >>> index bd10d659979c..15caa5a2c2cc 100644 > >>> --- a/sys/amd64/linux32/linux32_sysvec.c > >>> +++ b/sys/amd64/linux32/linux32_sysvec.c > >>> @@ -113,6 +113,7 @@ extern char _binary_linux32_vdso_so_o_end; > >>>   static vm_offset_t linux_vdso_base; > >>>   extern struct sysent linux32_sysent[LINUX32_SYS_MAXSYSCALL]; > >>> +extern const char *linux32_syscallnames[]; > >>>   SET_DECLARE(linux_ioctl_handler_set, struct linux_ioctl_handler); > >>> @@ -882,7 +883,7 @@ struct sysentvec elf_linux_sysvec = { > >>>           SV_SIG_DISCIGN | SV_SIG_WAITNDQ | SV_TIMEKEEP, > >>>       .sv_set_syscall_retval = linux32_set_syscall_retval, > >>>       .sv_fetch_syscall_args = linux32_fetch_syscall_args, > >>> -    .sv_syscallnames = NULL, > >>> +    .sv_syscallnames = linux32_syscallnames, > >>>       .sv_shared_page_base = LINUX32_SHAREDPAGE, > >>>       .sv_shared_page_len = PAGE_SIZE, > >>>       .sv_schedtail    = linux_schedtail, > >>> diff --git a/sys/arm64/linux/linux_sysvec.c > >>> b/sys/arm64/linux/linux_sysvec.c > >>> index 362917c3de31..41ac2912be29 100644 > >>> --- a/sys/arm64/linux/linux_sysvec.c > >>> +++ b/sys/arm64/linux/linux_sysvec.c > >>> @@ -98,6 +98,7 @@ extern char _binary_linux_vdso_so_o_end; > >>>   static vm_offset_t linux_vdso_base; > >>>   extern struct sysent linux_sysent[LINUX_SYS_MAXSYSCALL]; > >>> +extern const char *linux_syscallnames[]; > >>>   SET_DECLARE(linux_ioctl_handler_set, struct linux_ioctl_handler); > >>> @@ -576,7 +577,7 @@ struct sysentvec elf_linux_sysvec = { > >>>           SV_SIG_WAITNDQ | SV_TIMEKEEP, > >>>       .sv_set_syscall_retval = linux_set_syscall_retval, > >>>       .sv_fetch_syscall_args = linux_fetch_syscall_args, > >>> -    .sv_syscallnames = NULL, > >>> +    .sv_syscallnames = linux_syscallnames, > >>>       .sv_shared_page_base = LINUX_SHAREDPAGE, > >>>       .sv_shared_page_len = PAGE_SIZE, > >>>       .sv_schedtail    = linux_schedtail, > >>> diff --git a/sys/i386/linux/linux_sysvec.c > >>> b/sys/i386/linux/linux_sysvec.c > >>> index e964f475a393..f67b19725cdf 100644 > >>> --- a/sys/i386/linux/linux_sysvec.c > >>> +++ b/sys/i386/linux/linux_sysvec.c > >>> @@ -96,6 +96,7 @@ extern char _binary_linux_vdso_so_o_end; > >>>   static vm_offset_t linux_vdso_base; > >>>   extern struct sysent linux_sysent[LINUX_SYS_MAXSYSCALL]; > >>> +extern const char *linux_syscallnames[]; > >>>   SET_DECLARE(linux_ioctl_handler_set, struct linux_ioctl_handler); > >>> @@ -782,7 +783,7 @@ struct sysentvec linux_sysvec = { > >>>           SV_SIG_DISCIGN | SV_SIG_WAITNDQ, > >>>       .sv_set_syscall_retval = linux_set_syscall_retval, > >>>       .sv_fetch_syscall_args = linux_fetch_syscall_args, > >>> -    .sv_syscallnames = NULL, > >>> +    .sv_syscallnames = linux_syscallnames, > >>>       .sv_schedtail    = linux_schedtail, > >>>       .sv_thread_detach = linux_thread_detach, > >>>       .sv_trap    = NULL, > >>> > >> > >> This results in the following error: > >> > >> cwsys# nice -20 poudriere bulk -j HEADamd64 -J 4 -p prod -f _bulk-queue > >> kldload: an error occurred while loading module linux. Please check > >> dmesg(8) for more details. > >> [00:00:02] Error: Required kernel module 'linux' not found > >> cwsys# > >> > >> > >> dmesg shows: > >> > >> link_elf_obj: symbol linux32_syscallnames undefined > >> linker_load_file: /boot/kernel/linux.ko - unsupported file type > >> > >> > > > > This is my bad, I only compile-tested the change :( > > > > Thank you for the report, I am testing the fix. It is only a matter of > > adding the missing source file to each module... but I'll ensure it > > actually loads for each architecture before committing. > > > > Cheers, > > Mitchell > > This should be fixed by 331784880821 and f396f9b6c96f. Please let me > know if this is not the case! Thanks. I'm starting a new build now. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0