From nobody Sat Oct 29 15:21:41 2022 X-Original-To: dev-commits-src-all@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 4N036b752Nz4g5Zb; Sat, 29 Oct 2022 15:21:43 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4N036b6Mg1z3mB6; Sat, 29 Oct 2022 15:21:43 +0000 (UTC) (envelope-from mhorne@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667056903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cvndz+qa1ON412AM1amNjGC8DKyLxgFdjw45yrOtJQY=; b=cXgqx3BTQy14w1rJc2v2KvTFhNYfjlOS/CgAVN9s8Cz3P7U/KjZrnjrB+lsfKQbAcOx9N4 wHE5ZJxUg+0BUB3D5ugLLWZwbNiqKQ+mPKxUKMWtVAvd6qSa8R0p4dlRm+Gof+yP+lGL9D PJ7dubXExJ9HddqiPvv3NxHdyRNZTtzghcACer0YINRuTr89JpzzUPI4QoyVYbuyZm+qgd gTa+ha6UJajKGr3/yhP5F9BqhDahGErDp7fPVJAJKUwhPCF4IOYdDu3Lx3o58MYYdBD+ZZ ZA+hxIlnxc5m/iv5Y302LrPjQIbBIPPXErcH7FT3IrnwXKiLsEHB75kX5clLbw== Received: from [192.168.1.151] (host-173-212-76-127.public.eastlink.ca [173.212.76.127]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: mhorne) by smtp.freebsd.org (Postfix) with ESMTPSA id 4N036b3ZZpzhND; Sat, 29 Oct 2022 15:21:43 +0000 (UTC) (envelope-from mhorne@freebsd.org) Message-ID: <87ba6e9b-fa69-d131-0941-6688d58ae029@freebsd.org> Date: Sat, 29 Oct 2022 12:21:41 -0300 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: git: 1da65dcb1c57 - main - linux: populate sv_syscallnames in each sysentvec Content-Language: en-CA To: Cy Schubert Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202210282133.29SLXqfq064166@gitrepo.freebsd.org> <20221029150145.6BD6713@slippy.cwsent.com> From: Mitchell Horne In-Reply-To: <20221029150145.6BD6713@slippy.cwsent.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667056903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cvndz+qa1ON412AM1amNjGC8DKyLxgFdjw45yrOtJQY=; b=mkBMrQKVnlu5yzP/Vgj+hqIRppG+epRVG+6PejR5pkaRnu5qdJEE+xy2I1Ou016CriuyjZ AOCey/tIiQ6BgC4cM3uKjXaI8A6yQCMaAQtNCJlA3EUGzWU9ieeGqbZRJUvfAsCfbwfnE4 qDu8MrFZeaqGjwTv8XkbMOZn9Uq/VYb/48l1t00fZQwsmgpcZRM5HR6DGc78TxbZZNNMVd l+NfpfPB0n0W4oUatSCbQG+quL8Q/MC4f2Nwzu6vYd1I6AjErVoMfI3xVrjd2vp7JZxy67 ABKsx8vzAR+8/n1PWhXjrXZN8cAXTy5UMNY3wUd2FHZDD8XYcuaHS9Zkh4mwhA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1667056903; a=rsa-sha256; cv=none; b=CiL+u1h7VB7mG/GLcZ14BAhhhbaPMiN7/0LAwK/cM/cp+eJcm8JyIhIs58bG+ygWCm0YXy EApbuJgWVm6zf2jITmz8jZg06LSsz73il9g/Xau07UyhSNoApddRiH2SlW49u1uEDxfoVr 6yLvL635KoVZ1GNV5zIA9LuZLanfwYsMclxzobfD3+ni6LXR/NirDjOSFMgKqRaDSRoe06 StWiFjVT2zHMQ5GA4T4s41bq+4CRezMP32EsXmrCiesBQvAzichyijx+SrusD+/3454qNo whN9wE1AUu9GoWNf3LB1u8AF+eQopRq6nlG0FE60LX5U/xe+dAVb0DfQLA2l8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N 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