From nobody Fri Jul 07 18:10:10 2023 X-Original-To: freebsd-arm@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 4QyLzT4934z4l8jt for ; Fri, 7 Jul 2023 18:10:29 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic317-20.consmr.mail.gq1.yahoo.com (sonic317-20.consmr.mail.gq1.yahoo.com [98.137.66.146]) (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) by mx1.freebsd.org (Postfix) with ESMTPS id 4QyLzR6db8z3GVP for ; Fri, 7 Jul 2023 18:10:27 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1688753424; bh=HQE13nKTGbtNZPe1mEYJzsYEb+ZYyEbnaSqDLI3H66c=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=iX0RlLlTxi1wT85JvJYaJO6/3fWDXlVqzr8XCvXmGNiZ5eyqogWDcj1te+ZV0+MvJQd2/MvlV/7379+WARe7PCCDoBUejtiXRIMFUCv9qPsD9jGC3dvgWqkY+Tqz7pR0DH+SzvpF1sRjLvM1tMpeFYXaZZDS1O/HEYK9whjKVmGuYQ++myXJvFym4uymn/18rZJfgTpOs16zuMk20Macllu00GGXJHxLxmRb13p4qV6hTOeYR5JZkwFy9JflZIxLC7V+1CuDPcoOPrLEptm7BGqbCS2N6rETHfhojEAOKDaEHuGHEXthIocLZFM3RVWqjAHNuC5J4MztDgWLXfkeQg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1688753424; bh=mbZqTJMoxgvIVz0CiPs3S6nZjMGQbUbi7z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mXL3TezXpTClCXTteHneuIx43DSgcyyn_secut9ggHhHSdb qjsLnRufZfQuuNdCTzsv9eEa5oWBRR4V2lID41Vfh0NVHblnsvh4uJ28o4hoB4PChHrmLyfN2enb 9_lxuAy9aEpTYncDIIqV.deLP1OAtqPzsAx4.slFHwSO72ek6dlrNP.5vJFNjfSG2JbUsFLuCt3w ETo5BahOvW.w_6WKrkXv.xhZ3EIMZ_OIzXXgV_BuQMlEDFrWv2It6Wo689Z1M4YLHR1Cmedbuzah 1lOvx3LgN.jhHTYzj6FdB170ZxJkQ09UHLZCjZjFaw28cUKTGUQcz9obNyiH7rPhQshrRQA3g4Rv Gdq9s.C6Oo0X5upZ.dzBL414V4O0t_lBkJEDfpVl4BCb9QuXtO1MqemUMGHLB_UbGMylFpXKqUE9 OGxTtyfcwHnJr.D2ba7weILxeYkt77QfPY4abfrqji6oLck66kvRGmS6J0jpwYqr2rRORTB4kciH 19WmjXRXuQcdUoo.BTBdCeu0N_fA9FaGNpoP3TZpM6Pj03a0kb5mOvserW7xGF1XbJColMHoVw7V oC8w- X-Sonic-MF: X-Sonic-ID: 19d367e9-faae-48d6-9986-37bec7fb2ef2 Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.gq1.yahoo.com with HTTP; Fri, 7 Jul 2023 18:10:24 +0000 Received: by hermes--production-gq1-5748b5bccb-fpxlw (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 557d84a26a0a209e7754926bb49720e5; Fri, 07 Jul 2023 18:10:21 +0000 (UTC) Content-Type: text/plain; charset=us-ascii List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: For snapshot builds: armv7 chroot on aarch64 has kyua test -k /usr/tests/Kyuafile sys/kern/kern_copyin hung up [in getpid?], unkillable, prevents reboot From: Mark Millard In-Reply-To: <71C767A0-AE59-4A6C-A210-27386C80F26F@karels.net> Date: Fri, 7 Jul 2023 11:10:10 -0700 Cc: John F Carr , Current FreeBSD , freebsd-arm Content-Transfer-Encoding: quoted-printable Message-Id: References: <7A41DED4-876F-4270-A980-549A4832B39A.ref@yahoo.com> <7A41DED4-876F-4270-A980-549A4832B39A@yahoo.com> <3404EA26-BFDD-4B87-830B-62CB6E91C0BD@karels.net> <240A32EC-E255-4B04-83B3-0D57308B701B@mit.edu> <106875C8-76F9-4307-A495-D41EAE8F1C8B@karels.net> <9EE9CFF2-378B-42D0-A171-9481286805C2@yahoo.com> <3B31195E-9CAB-4F79-90D9-9E05927235C8@yahoo.com> <71C767A0-AE59-4A6C-A210-27386C80F26F@karels.net> To: Mike Karels X-Mailer: Apple Mail (2.3731.600.7) X-Rspamd-Queue-Id: 4QyLzR6db8z3GVP X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Jul 7, 2023, at 10:13, Mike Karels wrote: > On 7 Jul 2023, at 11:38, Mark Millard wrote: >=20 >> On Jul 7, 2023, at 07:36, Mark Millard wrote: >>=20 >>> On Jul 7, 2023, at 06:50, Mike Karels wrote: >>>=20 >>>> On 7 Jul 2023, at 6:06, John F Carr wrote: >>>>=20 >>>>> On Jul 6, 2023, at 20:42, Mike Karels wrote: >>>>>>=20 >>>>>>=20 >>>>>> Thanks for isolating this. Let me know when you have the bug = number. >>>>>> I just tested a fix (the compat code drops the reference on the = current >>>>>> address space an extra time, probably freeing it). >>>>>>=20 >>>>>> Mike >>>>=20 >>>> The fix is in = https://cgit.freebsd.org/src/commit/?id=3Dbe30fd3ab2e8418a696e69f54a91a7e2= db5962de. >>>>=20 >>>>> The bug was introduced in January, 2022. It allows 32 bit = binaries to crash a 64 bit system when COMPAT_FREEBSD32 is on. Test = coverage of the buggy function (sysctl_kern_proc_vm_layout) was added at = the same time. >>>>>=20 >>>>> There should be routine runs of 32 bit test suites on 64 bit = systems. Although i386 and armv7 are tier 2 systems, the tier 1 = COMPAT_FREEBSD32 kernel code needs to be exercised. This bug was only = discovered by manually running tests in the right environment, 17 months = after automated testing could have discovered it. >>>>=20 >>>> That is not so simple currently, as the shared libraries for the >>>> test environment are not part of 32-bit compatibility package. >>>> The required bits could be extracted from the corresponding 32-bit >>>> build, but that isn't easy to automate. Fortunately, I think that >>>> very few of the tests exercise any 32-bit-specific code paths. >>>=20 >>> One way that I demonstrated this problem on an aarch64 system >>> that supports aarch32/armv7 in user space was via the use of >>> an official snapshot armv7 image. In my case I: >>>=20 >>> A) dd'd the image to USB3 media (after downloading it) >>> B) mounted the ufs file system on the media to a mount point >>=20 >> I forgot to mention an important step: before chroot is >> used, I preload various kernel modules that are used in >> the Kyuafile tests --because the chroot'd activity will >> not cause the loads of themsleves but will use the >> modules if they have already been loaded. >>=20 >>> C) used a chroot into that mount point to run the: >>> "kyua test -k /usr/tests/Kyuafile" >>>=20 >>> (I happened to do all that as root.) >>>=20 >>> There may be viable alternatives to dd'ing to allow an analogy to >>> (B) for (C) to use. I've not experimented with using a jail >>> instead of a chroot. >>>=20 >>> One can also install an armv7 world into a local directory tree >>> and then use chroot (or analogous). >>>=20 >>> How far off is an analogous sort of procedure from being reasonable >>> to automate? >=20 > It would be easier to use the packages rather than the full image > (base.txz and tests.txz). But doing this as part of a CI setup would > mean fetching things from a different source from the install image, > and then of course doing various configuration. It's always a Small > Matter of Programming. Doing a full chroot gets into some other > problems, e.g. mdconfig doesn't currently work in compatibility > mode. It doesn't seem that automating all this would yield much; > it's hard enough to do manually. >=20 >>> i386, of course, also has lib32 and independently testing that is >>> a messier issue, including trying to use /usr/tests/Kyuafile based >>> testing that avoids use of chroot (or analogous). I'm not claiming >>> lib32 has as simple of a potential path to automated testing. >=20 > I think the problem is essentially the same. A chroot could be used > or a 32-bit library setup (which would test the libraries as well). >=20 >>> I do not know if FreeBSD has powerpc64 hardware able to use a >>> powerpc world directory tree analogously. Such hardware may be too >>> old and otherwise problematical, making it not viable to automate >>> testing. >=20 > Powerpc supports 32-bit libraries, unlike arm (so far). My understanding is that powerpc64le does not in FreeBSD: there is no powerpcle in FreeBSD. So, not even chroot style support for 32-bit little endian use. If I understand right, no 32 bit little endian ABI is defined, other than the void linux activity's material, anyway. It may be that all big endian POWER use has lib32 support, but I'm not sure if all POWER has big endian FreeBSD support. May be POWER9 (10?) still has such support in FreeBSD. =3D=3D=3D Mark Millard marklmi at yahoo.com