From nobody Sun Jul 30 04:54:55 2023 X-Original-To: freebsd-current@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 4RD8FF6MPDz4pkLb for ; Sun, 30 Jul 2023 04:55:13 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic305-19.consmr.mail.gq1.yahoo.com (sonic305-19.consmr.mail.gq1.yahoo.com [98.137.64.82]) (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 4RD8FD3FNzz4JVv for ; Sun, 30 Jul 2023 04:55:12 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=sqZxPoaY; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.64.82 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1690692909; bh=hJ4W5DARohQtXekRZZdF+LY1PVuj5tnLNAPVLA8Thxc=; h=From:Subject:Date:Cc:To:References:From:Subject:Reply-To; b=sqZxPoaYpg3u7Ma1zfQ2ya17DKX1pR+VAvPbPDHWXTYsFmL3fbYIUirFvdpfBxNKq1M2LiTM/p0WjKEZ1CenEBHfomThKcgprBscMlGcf8NZWgJ6bE7WsPCsR0CUZ5U2rxNEsgjq5KdRWA6282VE2TSc704qCUSedq5jrhrXVsDQYGk+uH/EKP9DGEKawtB9Ndktqh4HYIQQYiBkMYgaENe+o5r8evuaKT2o4RUMXLRPrU91HKTXc+HRqAysz5BIVoZfW1cB0dIm5pnAaKMnixWlg95Hs+0w7LHXXDd1rw9NkyzZ0LAAipYlVXgpJmPk3WC9U+DLrmRbFfkYeaPqRw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1690692909; bh=ukER8oLTWnpbQeEmFymtCU3fgi+LA1Qm6Z0D94DBfOX=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=TSTSQsFILCS+ikZAI4GjjbAEdga30KJBJHdyK4Y+cuCWY/QaVZSnu6yPs1/EhXqDXFAigu2Mot069n0yCydpJGzY8xADSeJbeBf/sQwyF4RIqnKzEgcDT7HLYnzrTiYRJ3hHlxljnSxia0aou5NVD+EfU9KYR93V7zutkrBf97Dz6nyQLLo1hvilqxF7XEnYIW9BJn4fJ01uPYsXQZTExa/2SgCfyyjA/MT2arwr2B56XRiENwJqR6MOiNbPiwEAyozCovWkyQezWKAl4S3jzzk6nTlb5yYvkojvQU2JdXQhYllh357I5wq/W8Izs9vStjAHcVFY9bKsBWULOtEVgg== X-YMail-OSG: iEet3YEVM1k9ZkEzgZILgi_GknOGJVPlQG8tHUcr2r5peVUPSGeF.gpG0Z6SZIA 5jjovtpw_1iH.8ynT6YIn.6ZRNX4RffKvpq88nwmlZ9FWs51_xL9TyzAr7wVh0i3YyBkGsIwW6l9 hnzufKEyO99ghIpnp_5CmQuGS6C49Z7E5kxzbMuQNOGZk2nkKcJCFxj04wqTTvVR9CXH112mPazG H1zsDSqIWEyoHFYVB2YeVjTdvu85Edn1mqwL_EKg8zhpMo6axz4DBw5lgFG8sJymN0Yc47uiTlth P9bZbKwT2HLjtC0HfQQ.VJyuVVVqm4Cp1Ge1BquLTvkms3HuvTti..8cdl_A849zdSDFnVvH49OX xqpI7Z_VlzLBxveC260RoaBz56JUPabsp.Wb.neFV.1y2FLtZKcQMZNy6cYdcEm7br0hS9sgcqk3 WlOY4v4pj8SuptSxvAUc2uP54PtoPpf4BAfU7NcskgBBKuvzhNx4OTE7rkpDvXsSNpC.yQFDyF.Q UIMd3OeVk8QTCJG0ttzEbGhmd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K6X18XEGPcT9XpfOJP0yeMHGLLorJqHy.UjisCv3 vCj67OsgEJ9CYXkEaXFJXnMQ69m2J2TTd1vzQAYWC0DHFROUcFycxuRTsWqS_Xkx1JYeas.DCCAu 1.HknRWfhxhrYV_bSJXHUTfP0oZreys4tevr.v7B7GAnIOUM2N8myz1yLK4ozzLWay1NvfDWQFb7 jPPDRVhCW8SAGuMnZnKE6wkgrYx.pySlGUX316XLY2pfVSRRzqxI447zXq.8pv3z4jpxxyZYi7W_ 5QhkZnU9FjCEOG4voSYP1B7fEr7x0J9FLk0kIMcLQCghhnuzRmnMUNU9QuUPBz96SZeoM0S6Fd4l pChEXOmOD6uoUoBOBz8k4x4ry79PogFXmNceuOuR5uY_HveEgUaYfNWAhbi.ZGr4yc0fHwUcB0VK RMZWIjjooCABx22nWinXIbhnVZYixchDzmeeKCF.axJkfUYpCMAMqteUvaIfI90aZ84T46V8abSY LFH_Vr.fNx7viRr6U4CWbk5EVYsbm3ZEGDoTN7PMP5KcShgRDYMmE6nnrUOs2HQmgG_oFMDJx34T T76vMe2NgSokPWlJaT2G8lCtbNNZfzmq6eaVpLz1iodekAPOX6VOMa9lcGCK03gtdJSFCwhpB6xK HvBxVB2k58xgGnXudL5K.QQsoxmDYuRC9j_XegsqQpYtFYmg1xYgORdEiMrwfZELd4GAcW8sClFQ - X-Sonic-MF: X-Sonic-ID: 77326888-25a6-4a32-9e4a-dba15a80eb12 Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.gq1.yahoo.com with HTTP; Sun, 30 Jul 2023 04:55:09 +0000 Received: by hermes--production-bf1-7c4db57b6-vlnps (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 4659ebd3072a8fb8f7ff6fb5c2e2d285; Sun, 30 Jul 2023 04:55:07 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: FYI for aarch64/armv7 lib32: armv7 kyua test sys/net/if_bridge_test:gif with preloaded if_bridge.ko still panics in my style of testing Message-Id: <6ED951F4-E08A-4448-A748-C80DE8515AED@yahoo.com> Date: Sat, 29 Jul 2023 21:54:55 -0700 Cc: FreeBSD ARM List , Current FreeBSD To: Mike Karels X-Mailer: Apple Mail (2.3731.700.6) References: <6ED951F4-E08A-4448-A748-C80DE8515AED.ref@yahoo.com> X-Spamd-Result: default: False [-1.45 / 15.00]; NEURAL_HAM_SHORT(-1.00)[-0.999]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_SPAM_MEDIUM(0.21)[0.212]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; NEURAL_HAM_LONG(-0.17)[-0.165]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_THREE(0.00)[3]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ARC_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.82:from]; BLOCKLISTDE_FAIL(0.00)[98.137.64.82:server fail]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.64.82:from] X-Rspamd-Queue-Id: 4RD8FD3FNzz4JVv X-Spamd-Bar: - I finally got around to testing lib32 some more, first trying the panic case that I'd gotten in early testing. The below is without any special lib32 patching for testing, just my normal non-debug environment updated to a lib32-present aarch64 FreeBSD vintage. Reminder: /usr/obj/DESTDIRs/main-CA7-chroot/ contains an armv7 installworld distrib-dirs distribution DB_FROM_SRC=3D1 result. (It also has various ports installed.) # ~/prekyua-kldloads.sh . . . # env \ > LD_32_LIBRARY_PATH=3D/usr/obj/DESTDIRs/main-CA7-chroot/lib\ > :/usr/obj/DESTDIRs/main-CA7-chroot/usr/lib\ > :/usr/obj/DESTDIRs/main-CA7-chroot/usr/tests/libexec/rtld-elf\ > :/usr/obj/DESTDIRs/main-CA7-chroot/usr/tests/lib/libxo\ > :/usr/obj/DESTDIRs/main-CA7-chroot/usr/tests/lib/csu/dynamiclib\ > :/usr/obj/DESTDIRs/main-CA7-chroot/usr/tests/lib/libc/tls\ > :/usr/obj/DESTDIRs/main-CA7-chroot/usr/tests/lib/libc/stdlib\ > :/usr/obj/DESTDIRs/main-CA7-chroot/usr/tests/lib/libthr/dlopen\ > :/usr/obj/DESTDIRs/main-CA7-chroot/usr/local/lib\ > = :/usr/obj/DESTDIRs/main-CA7-chroot/usr/local/lib/python3.9/site-packages\ > = :/usr/obj/DESTDIRs/main-CA7-chroot/usr/local/lib/python3.9/lib-dynload\ > :/usr/obj/DESTDIRs/main-CA7-chroot/usr/local/lib/perl5/5.32/mach/CORE\ > :/usr/obj/DESTDIRs/main-CA7-chroot/usr/local/lib/perl5/5.32/mach/auto = \ > PATH=3D/usr/obj/DESTDIRs/main-CA7-chroot/sbin\ > :/usr/obj/DESTDIRs/main-CA7-chroot/bin\ > :/usr/obj/DESTDIRs/main-CA7-chroot/usr/sbin\ > :/usr/obj/DESTDIRs/main-CA7-chroot/usr/bin\ > :/usr/obj/DESTDIRs/main-CA7-chroot/usr/local/sbin\ > :/usr/obj/DESTDIRs/main-CA7-chroot/usr/local/bin\ > :/usr/obj/DESTDIRs/main-CA7-chroot/root/bin \ > /usr/obj/DESTDIRs/main-CA7-chroot/usr/bin/kyua test \ > -k /usr/obj/DESTDIRs/main-CA7-chroot/usr/tests/Kyuafile = sys/net/if_bridge_test:gif sys/net/if_bridge_test:gif -> Jul 29 21:29:16 CA72-16Gp-ZFS = dhclient[56641]: epair0a: not found Jul 29 21:29:16 CA72-16Gp-ZFS dhclient[56641]: exiting. Fatal data abort: x0: 0xffffa0275306c560 x1: 0xffffa027f9d053d2 x2: 0x000000000000002a x3: 0xffffa0275306c560 x4: 0xffffa027f9d053fc x5: 0xffffa0275306c58a x6: 0x3ec2ffffffffffff x7: 0x010006085ba958bc x8: 0x000000000000002a x9: 0x000000000000002a x10: 0x0008010006085ba9 x11: 0x58bc3ec201000406 x12: 0x0000016433c65ba9 x13: 0x026433c600000000 x14: 0x00000000000000ff x15: 0x000000000000289f x16: 0xffff0002d056b370 (_DYNAMIC + 0x370) x17: 0xffff000000598110 (m_dup + 0x0) x18: 0xffff0002801e94a0 x19: 0x0000000000000001 x20: 0x0000000000000000 x21: 0x0000000000000000 x22: 0xffff000000d95000 (vop_spare3_desc + 0x18) x23: 0xffffa0275306c500 x24: 0xffffa0275306c500 x25: 0x00000000000000a0 x26: 0x0000000000000002 x27: 0x0000000000000000 x28: 0xffffa0275306c500 x29: 0xffff0002801e94c0 sp: 0xffff0002801e94a0 lr: 0xffff000000598308 (m_dup + 0x1f8) elr: 0xffff000000598160 (m_dup + 0x50) spsr: 0x0000000020000045 far: 0x000000000000001c esr: 0x0000000096000004 panic: vm_fault failed: 0xffff000000598160 error 1 cpuid =3D 14 time =3D 1690691356 KDB: stack backtrace: db_trace_self() at db_trace_self db_trace_self_wrapper() at db_trace_self_wrapper+0x30 vpanic() at vpanic+0x13c panic() at panic+0x44 data_abort() at data_abort+0x2fc handle_el1h_sync() at handle_el1h_sync+0x14 --- exception, esr 0x96000004 m_dup() at m_dup+0x50 bridge_input() at bridge_input+0x17c gif_input() at gif_input+0x2dc in_gif_input() at in_gif_input+0x5c encap_input() at encap_input+0xfc encap4_input() at encap4_input+0x30 ip_input() at ip_input+0x5ac netisr_dispatch_src() at netisr_dispatch_src+0xf8 ether_demux() at ether_demux+0x14c ether_nh_input() at ether_nh_input+0x39c netisr_dispatch_src() at netisr_dispatch_src+0xf8 ether_input() at ether_input+0x50 epair_tx_start_deferred() at epair_tx_start_deferred+0x110 taskqueue_run_locked() at taskqueue_run_locked+0x198 taskqueue_thread_loop() at taskqueue_thread_loop+0x130 fork_exit() at fork_exit+0x88 fork_trampoline() at fork_trampoline+0x14 KDB: enter: panic [ thread pid 0 tid 1028122 ] Stopped at kdb_enter+0x44: str xzr, [x19, #3328] For reference: # uname -apKU FreeBSD CA72-16Gp-ZFS 14.0-CURRENT FreeBSD 14.0-CURRENT aarch64 1400093 = #102 main-n264334-215bab7924f6-dirty: Wed Jul 26 02:02:48 PDT 2023 = root@CA72-16Gp-ZFS:/usr/obj/BUILDs/main-CA72-nodbg-clang/usr/main-src/arm6= 4.aarch64/sys/GENERIC-NODBG-CA72 arm64 aarch64 1400093 1400093 =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Sun Jul 30 15:17:43 2023 X-Original-To: freebsd-current@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 4RDQ3n2vWXz4p8HS for ; Sun, 30 Jul 2023 15:17:53 +0000 (UTC) (envelope-from grahamperrin@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 4RDQ3g70yDz4JJd for ; Sun, 30 Jul 2023 15:17:51 +0000 (UTC) (envelope-from grahamperrin@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690730272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=FwsdZpnSJxkgLS1RcB4Ua4TK6BjN0gb0iYnViPBapk4=; b=MVYc+1/k1dPvI8ioZJ+mCx2AtFI1agRxce75nHG0b1hby0LMdeoyKmOvNn5wjc1IuOedX/ WN2pNSluF6VRMn1A7cC5A46C0QiFtDHS5MnsRS5DF6SrRvL+wEEpz8H3CT1VuSeyQyIKj2 1jcbPLDYTnXD0hVtuf0arLVyg+x38bXIIh9+SQCclmdadMq/OS/80iUhCnZ4gMMknPN/64 7gnf8NXFir5DyHvACfGVtog5tKnPGdgHdCbWItT751L+45rfRMEGPYgjOqF0O6suLWYkCQ rkM7NNXPncz+h5qYZGZygCqi5byCg2wE9VKqn32oip24MmJBicFPwIjGw7ifBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690730272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=FwsdZpnSJxkgLS1RcB4Ua4TK6BjN0gb0iYnViPBapk4=; b=qysbFhgELKEx/X/TWKZKgDirr4uQNWXEV5eQq+ackiAMPlboNTi9jkB7cLYO5dDeC4xYSK bdgmPLMFb0FKbp/V3jEnF7zFqjA7edYrBSLtY8xheFwukVd+jLCOfgIutL0ay6il7XAo2Z sGJNLGEX2Hfew2YWMvtSVjbM9mImseKtUNSE+DnUpT7juYxg1DPBg187BrQpGCPjcGBDv3 YcZeHnjXykmsysU2DeH85HPSWHbkgt9t+6cvmD2b+8ycDIL5sQgIuzsDn++eeXcYs6qBp5 G4uP9wQVv5eeJdgmovqHi9BH8r3Kz8tCkxr9hVRocNYwNQa5/8WdCAveePCwOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690730272; a=rsa-sha256; cv=none; b=wkj0bVCW1Rk2sp2ji0/3Tiwb9zVOX95TCAxIVyM0/KOsfOPtlA0UGv83jO+GQu23JGrw/e eMdH7fFepRM86Q/SKa9kHk9E2Etj7ISEgJRXpnQWNisexiHM25HeUm/QhR1QIIp6y7pFlN 9tm2nbnU4RV2KINjOeA0it63VkD0ExRc+AWvpMeTx/Yd4PzDHCGeLelwUheSIkicPfMlfM BQcP4TPmMoF6/v4BR487gIVN2MlFlsuyDUoX65nyHeTtkPQp/NI/p26/pvt+43T/JODEjW lO21emwT7hJZJDqEW9Y3R2VzYl+F6FA8RukCVUPGt1oD99gmkJWtqPBtT5O4Ww== Received: from [192.168.1.10] (80-42-66-93.dynamic.dsl.as9105.com [80.42.66.93]) (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: grahamperrin) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RDQ3f2CWqz16Bq for ; Sun, 30 Jul 2023 15:17:49 +0000 (UTC) (envelope-from grahamperrin@freebsd.org) Message-ID: <62d300c8-2c3e-58fa-334e-23a17962279a@freebsd.org> Date: Sun, 30 Jul 2023 16:17:43 +0100 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.13.1 To: FreeBSD CURRENT Content-Language: en-US From: Graham Perrin Subject: Unreliability with DHCP Organization: FreeBSD Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------Vl03Tqn9B1qz056ReDSd9oA8" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------Vl03Tqn9B1qz056ReDSd9oA8 Content-Type: multipart/mixed; boundary="------------oU6hlYKmQh0c3Lk9TINI1Cyp"; protected-headers="v1" From: Graham Perrin To: FreeBSD CURRENT Message-ID: <62d300c8-2c3e-58fa-334e-23a17962279a@freebsd.org> Subject: Unreliability with DHCP --------------oU6hlYKmQh0c3Lk9TINI1Cyp Content-Type: multipart/alternative; boundary="------------48ZDuw9jm6zFH4IL0acpjpdA" --------------48ZDuw9jm6zFH4IL0acpjpdA Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 MS4gU2xlZXAgKHN1c3BlbmQpIHdoaWxzdCBjb25uZWN0ZWQgdG8gb25lIG5ldHdvcmsNCg0K Mi4gY29ubmVjdCB0byBhIG5ldHdvcmsgZWxzZXdoZXJlDQoNCjMuIHdha2UgKHJlc3VtZSku DQoNClJlc3VsdDoNCg0KL2V0Yy9yZXNvbHYuY29uZiBmcmVxdWVudGx5IGNvbnRhaW5zIG91 dGRhdGVkIGluZm9ybWF0aW9uLiBJbiBzb21lIA0KKG1heWJlIGFsbCkgc3VjaCBjYXNlcywg dGhlIElQdjQgaW5ldCBhZGRyZXNzIGlzIG91dGRhdGVkOyBhbmQgc28gb24uDQoNCldoaWNo IC9ldGMvcmMuZC8gZmlsZShzKSBzaG91bGQgSSBhdHRlbXB0IHRvIGZpeD8NCg0KSSBpbWFn aW5lIHVzaW5nIHRoZSByZXN1bWUga2V5d29yZCwgd2hpY2ggaXMgY3VycmVudGx5IHVzZWQg Ynkgb25seSBvbmUgDQpzY3JpcHQ6DQoNCiUgcmNvcmRlciAtayByZXN1bWUgL2V0Yy9yYy5k LyoNCi9ldGMvcmMuZC9udHBkDQolDQoNCg0KSSByb3V0aW5lbHkgcnVuIHRoZSBjb21tYW5k IGJlbG93IHRvIHdvcmsgYXJvdW5kIHRoZSBidWcgKGFuZCBvYnNlcnZlIA0KdGhlIHN0YXRl cyBvZiB0aGluZ3MpIOKAkyBydW4gX2FmdGVyXyB0aGUgYnVnIGJpdGVzLiBJJ2QgcHJlZmVy IGEgZml4LCB0byANCnByZXZlbnQgdGhlIGJpdGVzLg0KDQpscyAvdmFyL3J1bi9yZXNvbHZj b25mL2ludGVyZmFjZXMvIDsgcm91dGUgZGVsZXRlIGRlZmF1bHQgOyBpZmNvbmZpZyANCnds YW4wIGRvd24gJiYgaWZjb25maWcgZW0wIGRvd24gJiYgc2xlZXAgNSA7IGxzIA0KL3Zhci9y dW4vcmVzb2x2Y29uZi9pbnRlcmZhY2VzLyA7IGlmY29uZmlnIGVtMCB1cCAmJiBzbGVlcCAx NQ0KOyBscyAvdmFyL3J1bi9yZXNvbHZjb25mL2ludGVyZmFjZXMvIDsgY2F0IC9ldGMvcmVz b2x2LmNvbmYgOyBwaW5nIC1jIDIgDQotNCBmcmVzaHBvcnRzLm9yZw0KDQo= --------------48ZDuw9jm6zFH4IL0acpjpdA Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

1. Sleep (suspend) whilst connected to one network

2. connect to= a network elsewhere

3. wake (resume).

Result:

/etc/resolv.c= onf frequently contains outdated information. In some (maybe all) such cases, the IPv4 inet address is outdated; and so on.

Which /etc/rc.d/ file(s) should I attempt to fix?

I imagine using the resume keyword, which is currently used by only one script:

% rcorder -k resume /etc/rc.d/*
/etc/rc.d/ntpd
%


I routinely run the command below to work around the bug (and observe the states of things) =E2=80=93 run _after_ the bug bites. I'd prefer a fix, to prevent= the bites.

ls /var/run/resolvconf/interfaces/ ; route delete default ; ifconfig wlan0 down && ifconfig em0 down && sleep 5 ; ls /var/run/resolvconf/interfaces/ ; ifconfig em0 up && sleep 15
; ls /var/run/resolvconf/interfaces/ ; cat /etc/resolv.conf ; ping -c 2 -4 freshports.org

--------------48ZDuw9jm6zFH4IL0acpjpdA-- --------------oU6hlYKmQh0c3Lk9TINI1Cyp-- --------------Vl03Tqn9B1qz056ReDSd9oA8 Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEEWT/lssMHB+28ly8Kt2dIb0oY1AsFAmTGfxgFAwAAAAAACgkQt2dIb0oY1AtG Pg//TRTpulK/Ux2KggmQuhjJ20sxAJ0TZb2M6tpplpFc3B3bqBvzo4gct/OzrBae0ycnbq/e7JQj h8vfIrqJzEWDVT2PP8Ks7MFOBoh3z3nh7LtKjAYSS7r7y3jmZSVq2187QPX4cHc4sUpFlYVVW4Dp eWWNS2iyjN+7qb59nDTeODLiYz3ssn/kEpPJIOBBlW7wXAqRsR6u03vmpZmgvG6bbWE35lyWxGYS 6kepN8s2O+lXaubCD/ZKGgzDXhEDAdcZqqTarZ1L16bW+3sCEg5hUlVaU0+CJVBnprLFvpGvkLrG 6whHxsGIq6CetKIbhSF9Ka0Uym7iW+o53NnyzPRn/0gPK0tW9m0rpUm95nTwNa7spmbgu4i0HbZV Le5hDyTdEckeawHl6XkSIpLWDeN10d8YZpTcc75mwK4DphF4NOKbUU+1TOUXdihn8le98J8iMsYE KpN6vgMsJU7EVWD5+8A2WMZk2GXwJn5/2TcZ0Y1LJhSBiwknn58UGwSANpdZd83d5fr5NmhUwoRQ i8yMopr3VW4TjvlfNC834eIQnrattm/oONemnIwLiflO4+Dn23DG0u1q1HzI5gd8N8m6URG12p8C 4/he9wJqXsoPA88riIP4IrN72lMW+JuPFDRkOFp7paK5LM4GpwuwX8gx9SZHRKdzWtayAiIjtHQ5 iqg= =E4o/ -----END PGP SIGNATURE----- --------------Vl03Tqn9B1qz056ReDSd9oA8-- From nobody Tue Aug 1 01:16:52 2023 X-Original-To: freebsd-current@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 4RFHJt4lrjz4pdwJ for ; Tue, 1 Aug 2023 01:17:08 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-oi1-x22e.google.com (mail-oi1-x22e.google.com [IPv6:2607:f8b0:4864:20::22e]) (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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFHJb1m4Xz42jw for ; Tue, 1 Aug 2023 01:17:03 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20221208 header.b=b6Tq5zoj; spf=pass (mx1.freebsd.org: domain of rick.macklem@gmail.com designates 2607:f8b0:4864:20::22e as permitted sender) smtp.mailfrom=rick.macklem@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-oi1-x22e.google.com with SMTP id 5614622812f47-3a43cbb432aso3746839b6e.3 for ; Mon, 31 Jul 2023 18:17:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690852622; x=1691457422; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=pAWIA5K2zZJz3/lUJIn9YATCisJRJbG26BiMdpwKiqc=; b=b6Tq5zoj4db9nanVE71yUibQ0w/PrZEqwAZdQZsWf0dH9rWDBRyNUkejALQX7Pqm98 9KB9mHrfBpBLv3fD4LYFoLWf/s/E5B3gjyiFvaE25m7VsoCM9DosnVR23vPj/r0BpQr1 2Pty331NwIoQwa0l9NBlG6JUH79BE6IdXDZrWy+mPIGzst/R6R0XWS7F/2jBhlFaSW4w 5EwnZQopr1yfS0y7FOKL8xZya/XMxg24h04va5EP0eMrt6y+Yz5Xv9+icRf1uEGNxcQB 9mHffwczhPpK19VaLuU/kbzqMdIQf2cWcqH91RuXMKK8Umvut5tyIUxl8cRwdQK4n9LE FW0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690852622; x=1691457422; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=pAWIA5K2zZJz3/lUJIn9YATCisJRJbG26BiMdpwKiqc=; b=HoHlGOHBshy10KMFgW+TZMthM+/509AUIleogQW5lOMHU0qJvPAM72acdjtiXoWuIL tNpf5eg+Rf7e5CtZ73ebQ8Q6BxYCSfNXWn94d6B24b2BVGy04Fj2u61n8uJiStWE6CAE BCKi9qydigoiUT+VPCMKUc+XjK275o9RDuybQc9IueR15FxyhWzyI+sD3LNNZkA+tVYH gcfVH2jydOqLEFGYF3tk71f/+yWy71xJGhHqAAVeG4VhFYKqU6CCHS0ZSj0m4BN9K/gK 0c7QldxFpuJga20JYD8voGcBm4gE+Ni2IfO1IQIJD/GmCsF1EVxxvpLVy7KTfZTvAY4p EEaQ== X-Gm-Message-State: ABy/qLaL/CPf+giwyk/jSJDtoP5525xDXP6Cilr5X9DaACy91KkIIffO 2GfU/KqgnnU5dTG6qKTlvyBQ3e3Ev10z8LvJWZngBM8AfA== X-Google-Smtp-Source: APBJJlG67qpXAqs9hHEYWtRN0Cl7buAHi+ckn2YXBKUFM67TGa8ilvEl9n3I7FVh1mgq7ApDKAIfnYT8s/YI58BcuYU= X-Received: by 2002:a05:6808:203:b0:3a4:8086:bb9f with SMTP id l3-20020a056808020300b003a48086bb9fmr12124037oie.18.1690852621759; Mon, 31 Jul 2023 18:17:01 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 From: Rick Macklem Date: Mon, 31 Jul 2023 18:16:52 -0700 Message-ID: Subject: Review of patch that uses "volatile sig_atomic_t" To: FreeBSD CURRENT Content-Type: text/plain; charset="UTF-8" X-Spamd-Result: default: False [-3.25 / 15.00]; NEURAL_HAM_SHORT(-0.99)[-0.992]; NEURAL_HAM_LONG(-0.94)[-0.937]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_MEDIUM(-0.32)[-0.319]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20221208]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; RCPT_COUNT_ONE(0.00)[1]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::22e:from]; ARC_NA(0.00)[]; TAGGED_FROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; DKIM_TRACE(0.00)[gmail.com:+]; TO_DN_ALL(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4RFHJb1m4Xz42jw X-Spamd-Bar: --- Hi, I just put D41265 up on phabricator. It is a trivial change to mountd.c that defines the variable set by got_sighup() (the SIGHUP handler) as static volatile sig_atomic_t instead of static int I did list a couple of reviewers, but if you are familiar with this C requirement, please take a look at it and review it. Thanks, rick ps: I was unaware of this C requirement until Peter Eriksson reported it to me yesterday. Several of the other NFS related daemons probably need to same fix, which I will do after this is reviewed. From nobody Tue Aug 1 06:05:19 2023 X-Original-To: freebsd-current@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 4RFPk3068Pz4prVj for ; Tue, 1 Aug 2023 06:05:47 +0000 (UTC) (envelope-from theraven@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 4RFPjT6hfNz4Nsj; Tue, 1 Aug 2023 06:05:33 +0000 (UTC) (envelope-from theraven@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690869934; 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=CBUhqarDV5UFS2xfJTCgRo6eoEXQ720J3E7d9+e1Q/8=; b=ul0VotGWbddJzpfobzOdkouk0tvr9+m8AKPlf48z/i/fUxFGJS6xfwleJNOOcbtD+jM/U4 j0LMHbup9qAlGYtVjkMahzMg+GqBGnlb9NuVtcwX965RT+E67Nk1RvorOo2BZ+MZcgWN/r sRrAWj3kiR5Pc0d+DtIj3KsG4GbIOWPR2WZrOAwVTiVlA5TkcTajOMva26gdpkKybaIiEf kICXO4jFoMhiIW2dFHvn3vsd+Wr7T+G2BvZxSfoXz6aQnIMv7YeWRgM5XAPA/84S2CpDnM xMYKn8BA1SqZon6YakfhP/jALmJ5JRYYrT0AiNCQSiurlJB7C95Sc9ddeGuohQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690869934; a=rsa-sha256; cv=none; b=KHAWrRF2b7TUzrdnNxk+QRwxMkfCePy9v4boUA0Vy24ArEJwHvomFSPefyKkfobv6MRU6r CsBMKzm5XFrQGbaaUtKY4i+mp1V8wpUPJxmjH8FCwCcm05pUke5M/R82chJfXI5Pol8Nlb CbUH6/uRfCmj8VshdQlO2adOzgPQpEZVm+f+J/9ct3CfIy3EO6v3mNBrEtvJYdKKgSSklA 0ueaP3DtzKfI0U5jogfSnL265Bfm7DpIymrqb6VRTlBeOpDfw2mDGGEl1TdRn7qlH1Y1dy ZeNki6CTC37FKvneTD7DFPl9fdjjwXD/oxCViQtrpVlB5l3vDVnWKJtL4YygxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690869934; 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=CBUhqarDV5UFS2xfJTCgRo6eoEXQ720J3E7d9+e1Q/8=; b=ZmS6RF+ZfbfSnwo03aaMebea0nWL/mQJrmRqR0FdKwcq6Wrpks/4GO7dAGYPveLo7qzCkD 0BqZIWB4jNGrAxH64mtSrILKdwfJhvkDMQ2DdlSN6ON7u/AvmhF4Ceb8FqzhFSdkWBAWLR P3ntrWaYmeIiWWy+piZa9lNckuXKquTYWe8EI10O6ly87M8Lh1Bwm8MEfITM9v2MsJCNCU dN6gRJ5Rzj6FJGykoOyBDJ3rJvAWUNBUxd175benjCjgWsR2E2VBz52NWMzT+6RqXuy0j7 1l5LpeLztI0yXiC5D1UPaY9i7D25woEZZXBsYm5yIHQzHqvAIToe/epu9et2WA== Received: from smtp.theravensnest.org (smtp.theravensnest.org [45.77.103.195]) (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 did not present a certificate) (Authenticated sender: theraven) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RFPjT2FKwzcG9; Tue, 1 Aug 2023 06:05:33 +0000 (UTC) (envelope-from theraven@freebsd.org) Received: from smtpclient.apple (host86-141-212-56.range86-141.btcentralplus.com [86.141.212.56]) by smtp.theravensnest.org (Postfix) with ESMTPSA id 2589A8869; Tue, 1 Aug 2023 07:05:31 +0100 (BST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: David Chisnall List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 (1.0) Subject: Re: Review of patch that uses "volatile sig_atomic_t" Date: Tue, 1 Aug 2023 07:05:19 +0100 Message-Id: References: Cc: FreeBSD CURRENT In-Reply-To: To: Rick Macklem X-Mailer: iPad Mail (20F75) Hi, This bit of the C spec is a bit of a mess. There was, I believe, a desire to= return volatile to its original use and make any use of volatile other than= MMIO discouraged. This broke too much legacy code and so now it=E2=80=99s a= confusing state. The requirements for volatile are that the compiler must not elide loads or s= tores and may not narrow them (I am not sure if it=E2=80=99s allowed to wide= n them). Loads and stores to a volatile variable may not be reordered with r= espect to other loads or stores to the same object but *may* be reordered wi= th respect to any other accesses. The sig_atomic_t typedef just indicates an integer type that can be loaded a= nd stored with a single instruction and so is immune to tearing if updated f= rom a signal handler. There is no requirement to use this from signal handle= rs in preference to int on FreeBSD (whether other types work is implementati= on defined and int works on all supported architectures for us). The weak ordering guarantees for volatile mean that any code using volatile f= or detecting whether a signal has fired is probably wrong if if does not inc= lude a call to automic_signal_fence(). This guarantees that the compiler wil= l not reorder the load of the volatile with respect to other accesses. In pr= actice, compilers tend to be fairly conservative about reordering volatile a= ccesses and so it probably won=E2=80=99t break until you upgrade your compil= er in a few years time. My general recommendation is to use _Atomic(int) (or ideally a enum type) fo= r this. If you just use it like a normal int, you will get sequentially cons= istent atomics. On a weakly ordered platform like Arm this will include some= more atomic barrier instructions but it will do the right thing if you add a= dditional threads monitoring the same variable later. In something like moun= td, the extra performance overhead from the barriers is unlikely to be measu= rable, if it is then you can weaken the atomicity (sequentially consistent u= nless specified otherwise is a good default in C/C++, for once prioritising c= orrectness over performance). David > On 1 Aug 2023, at 06:14, Rick Macklem wrote: >=20 > =EF=BB=BFHi, >=20 > I just put D41265 up on phabricator. It is a trivial > change to mountd.c that defines the variable set > by got_sighup() (the SIGHUP handler) as > static volatile sig_atomic_t > instead of > static int >=20 > I did list a couple of reviewers, but if you are familiar > with this C requirement, please take a look at it and > review it. >=20 > Thanks, rick > ps: I was unaware of this C requirement until Peter Eriksson > reported it to me yesterday. Several of the other NFS > related daemons probably need to same fix, which I will > do after this is reviewed. >=20 From nobody Tue Aug 1 06:22:12 2023 X-Original-To: freebsd-current@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 4RFQ5d5w9rz4psNf for ; Tue, 1 Aug 2023 06:22:39 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic311-25.consmr.mail.gq1.yahoo.com (sonic311-25.consmr.mail.gq1.yahoo.com [98.137.65.206]) (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 4RFQ564qW7z4Q6y for ; Tue, 1 Aug 2023 06:22:32 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=cuv1dJMq; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.65.206 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1690870948; bh=a9fPu+ZAKieAFj0ZPMMSV6WB0MSERjWgfcHOXLIrr+M=; h=From:Subject:Date:To:References:From:Subject:Reply-To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-ID: c03e088d-a119-4326-9ef8-e69afd8d9536 Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.gq1.yahoo.com with HTTP; Tue, 1 Aug 2023 06:22:28 +0000 Received: by hermes--production-bf1-7c4db57b6-49kxr (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 9df8b633e57ef1bd49d2b8418a583c3e; Tue, 01 Aug 2023 06:22:25 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: aarch64 lib32 vs. armv7 mdconfig behavior: "mdconfig: ioctl(/dev/mdctl): Inappropriate ioctl for device" Message-Id: <49479F21-3CCD-469F-BF23-FF332D8EF0E8@yahoo.com> Date: Mon, 31 Jul 2023 23:22:12 -0700 To: Mike Karels , FreeBSD ARM List , Current FreeBSD X-Mailer: Apple Mail (2.3731.700.6) References: <49479F21-3CCD-469F-BF23-FF332D8EF0E8.ref@yahoo.com> X-Spamd-Result: default: False [-2.52 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998]; NEURAL_HAM_SHORT(-1.00)[-0.997]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-0.02)[-0.023]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ARC_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.65.206:from]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.65.206:from] X-Rspamd-Queue-Id: 4RFQ564qW7z4Q6y X-Spamd-Bar: -- Not via a chroot'd context, but using the files from a directory tree that allows an armv7 chroot: # /usr/obj/DESTDIRs/main-CA7-chroot/sbin/mdconfig -s40m mdconfig: ioctl(/dev/mdctl): Inappropriate ioctl for device This sort of thing messes up the operation of the likes of the /usr/tests/sbin/growfs/legacy_test logic: #! /usr/local/bin/perl # $FreeBSD$ use strict; use warnings; use POSIX; use Test::More tests =3D> 19; use Fcntl qw(:DEFAULT :seek); . . . SKIP: { skip "Cannot test without UID 0", 19 if $<; chomp(my $md =3D `mdconfig -s40m`); like($md, qr/^md\d+$/, "Created $md with size 40m") or die; $unit =3D substr $md, 2; . . . Other ioctl complaints: sys/aio/aio_test:md_kq -> failed: ioctl MDIOCATTACH failed: = Inappropriate ioctl for device sys/aio/aio_test:md_poll -> failed: ioctl MDIOCATTACH failed: = Inappropriate ioctl for device sys/aio/aio_test:md_signal -> failed: ioctl MDIOCATTACH failed: = Inappropriate ioctl for device sys/aio/aio_test:md_suspend -> failed: ioctl MDIOCATTACH failed: = Inappropriate ioctl for device sys/aio/aio_test:md_thread -> failed: ioctl MDIOCATTACH failed: = Inappropriate ioctl for device sys/aio/aio_test:md_waitcomplete -> failed: ioctl MDIOCATTACH failed: = Inappropriate ioctl for device sys/aio/aio_test:vectored_md_poll -> failed: ioctl MDIOCATTACH failed: = Inappropriate ioctl for device For reference: # uname -apKU FreeBSD CA78C-WDK23-ZFS 14.0-CURRENT FreeBSD 14.0-CURRENT aarch64 = 1400093 #5 main-n264334-215bab7924f6-dirty: Wed Jul 26 02:13:44 PDT 2023 = = root@CA78C-WDK23-ZFS:/usr/obj/BUILDs/main-CA78C-nodbg-clang/usr/main-src/a= rm64.aarch64/sys/GENERIC-NODBG-CA78C arm64 aarch64 1400093 1400093 =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Tue Aug 1 06:42:20 2023 X-Original-To: freebsd-current@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 4RFQXK216cz4psx6 for ; Tue, 1 Aug 2023 06:42:41 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic317-22.consmr.mail.gq1.yahoo.com (sonic317-22.consmr.mail.gq1.yahoo.com [98.137.66.148]) (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 4RFQXG59bKz3C8x for ; Tue, 1 Aug 2023 06:42:38 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=ZR+EC8Qq; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.66.148 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1690872156; bh=C3sOZNqChWqRfuu6BH30J7qpjUsS1CwpLCWDPHedAKM=; h=From:Subject:Date:References:To:In-Reply-To:From:Subject:Reply-To; b=ZR+EC8QqkBxCXEZxO+42EKMjSBfFPZF0V1leUGAoKWSmY1swPO2HejPASKmpSwQVFjtUeo09VGNK/BfGm+g69kXOfD6tOAO9LAaueZgx0II253pqTfQY/qHUAOL07XrzeefTsNTgzpymBnLOA/bzEVcQ1waFIaczUBvnvN9peZYTDw7KLv7bxOi2zrVuzRZibpASkF2mjNEfEis9CCk58VIxiKT+weh1oIADYGMf/s60TZ8Oc7F+vdqaIwNAD/3O2fU35oY0++rmvo8iOv5iVhNkuOkDq7+/ALKE39AsFIfKeqgAOLPFcH0q1LgNxYMu0sA9O8rzZbz1+ElLhVSoxQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1690872156; bh=9B/b34mr0TXUWWe4lf2UC5h+xzkyse5uMUA4cebmbR+=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=hWN7tPJUkWk43kylb16TK5M96Aq0sMlB/a9H01arqWd1wvq7t6obvgblEiwJLGHa6bIrfuCsdTDfYYIs5ojPmD6t9Lo8ihh59075Y92wImYQJXDD7cyqkbQmAbfIuwVHsncMZ8GCi+5hH2VNwvKeXzYVv08tDSqwJKSUJ+0qsgbZNnjQGjBgN71xVXfeZ8Pa7ywYSn11nZtRWLnaIDN99kCrDKsRg51erkJCV6hcg+34JLTDvmKOY66Tlwf9CFXr+WUF9xiqCL6WHPGeJPIgWLK2Pdp1aSsEgCCl36koylXWKJVcAewj9g/qVHRR1e4FtsFLBwFq+vN+kzVq+A9JAQ== X-YMail-OSG: KqD42twVM1lJLAI0vV6gsz2469xugU29Tx3.b3ilqQt_FbxCLQIhpobI762knvx n0KUxF4elkD1NTFuAPqb6ngpxPcf9_QOoElVJAKmpgpFssUWPYTOlV3bVLBIFZAfoz00c6PdYjkU h3ZKyiTNBBhS8oxkycai8YfB83HfoNRpdODNBed5ywt1u6L8yexhkIKjkMzsfnAoGSs6qOGHGf7i 36Xr0ievzbebZ3cxVeF2ZivZx5Zc3aqt3YuQhwkWkx2y4_Q46JS_vq173VYeN7cPBk0tWtvHx_xa aVFM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q1.yahoo.com with HTTP; Tue, 1 Aug 2023 06:42:36 +0000 Received: by hermes--production-bf1-7c4db57b6-wcllk (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 01062b1ecdfa67f9dcea08f65f217b62; Tue, 01 Aug 2023 06:42:32 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: aarch64 lib32 vs. armv7 mdconfig behavior: "mdconfig: ioctl(/dev/mdctl): Inappropriate ioctl for device" Date: Mon, 31 Jul 2023 23:42:20 -0700 References: <49479F21-3CCD-469F-BF23-FF332D8EF0E8@yahoo.com> To: Mike Karels , FreeBSD ARM List , Current FreeBSD In-Reply-To: <49479F21-3CCD-469F-BF23-FF332D8EF0E8@yahoo.com> Message-Id: X-Mailer: Apple Mail (2.3731.700.6) X-Spamd-Result: default: False [-3.10 / 15.00]; NEURAL_HAM_SHORT(-1.00)[-0.996]; NEURAL_HAM_MEDIUM(-0.99)[-0.993]; NEURAL_HAM_LONG(-0.61)[-0.608]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ARC_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.66.148:from]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.66.148:from] X-Rspamd-Queue-Id: 4RFQXG59bKz3C8x X-Spamd-Bar: --- On Jul 31, 2023, at 23:22, Mark Millard wrote: > Not via a chroot'd context, but using the files from a > directory tree that allows an armv7 chroot: >=20 > # /usr/obj/DESTDIRs/main-CA7-chroot/sbin/mdconfig -s40m > mdconfig: ioctl(/dev/mdctl): Inappropriate ioctl for device >=20 > This sort of thing messes up the operation of the likes > of the /usr/tests/sbin/growfs/legacy_test logic: >=20 > #! /usr/local/bin/perl > # $FreeBSD$ >=20 > use strict; > use warnings; > use POSIX; > use Test::More tests =3D> 19; > use Fcntl qw(:DEFAULT :seek); > . . . > SKIP: { > skip "Cannot test without UID 0", 19 if $<; >=20 > chomp(my $md =3D `mdconfig -s40m`); > like($md, qr/^md\d+$/, "Created $md with size 40m") or die; > $unit =3D substr $md, 2; > . . . >=20 >=20 > Other ioctl complaints: >=20 > sys/aio/aio_test:md_kq -> failed: ioctl MDIOCATTACH failed: = Inappropriate ioctl for device > sys/aio/aio_test:md_poll -> failed: ioctl MDIOCATTACH failed: = Inappropriate ioctl for device > sys/aio/aio_test:md_signal -> failed: ioctl MDIOCATTACH failed: = Inappropriate ioctl for device > sys/aio/aio_test:md_suspend -> failed: ioctl MDIOCATTACH failed: = Inappropriate ioctl for device > sys/aio/aio_test:md_thread -> failed: ioctl MDIOCATTACH failed: = Inappropriate ioctl for device > sys/aio/aio_test:md_waitcomplete -> failed: ioctl MDIOCATTACH = failed: Inappropriate ioctl for device > sys/aio/aio_test:vectored_md_poll -> failed: ioctl MDIOCATTACH = failed: Inappropriate ioctl for device >=20 >=20 > For reference: >=20 > # uname -apKU > FreeBSD CA78C-WDK23-ZFS 14.0-CURRENT FreeBSD 14.0-CURRENT aarch64 = 1400093 #5 main-n264334-215bab7924f6-dirty: Wed Jul 26 02:13:44 PDT 2023 = = root@CA78C-WDK23-ZFS:/usr/obj/BUILDs/main-CA78C-nodbg-clang/usr/main-src/a= rm64.aarch64/sys/GENERIC-NODBG-CA78C arm64 aarch64 1400093 1400093 Adding more examples of ioctl failure contexts . . . sys/netpfil/pf/ioctl/validation:clrtstats -> failed: Request with size = -1 failed=20 is actually at least associated with a ioctl use: ATF_TC_BODY(clrtstats, tc) { struct pfioc_table io; struct pfr_table tbl; int flags; COMMON_HEAD(); flags =3D 0; common_init_tbl(&tbl); bzero(&io, sizeof(io)); io.pfrio_flags =3D flags; io.pfrio_buffer =3D &tbl; io.pfrio_esize =3D sizeof(tbl); /* Negative size. This will succeed, because = the kernel will not copy * tables than it has. */ io.pfrio_size =3D -1; if (ioctl(dev, DIOCRCLRTSTATS, &io) !=3D 0) atf_tc_fail("Request with size -1 failed "); DIOCGETSRCNODES, DIOCRGETTABLES, DIOCRGETTSTATS, and DIOCRSETTFLAGS are similar and get the notice as well. The earlier aio_test examples are from: static int aio_md_setup(void) { int error, fd, mdctl_fd, unit; char pathname[PATH_MAX]; struct md_ioctl mdio; char buf[80]; =20 ATF_REQUIRE_KERNEL_MODULE("aio"); =20 mdctl_fd =3D open("/dev/" MDCTL_NAME, O_RDWR, 0); ATF_REQUIRE_MSG(mdctl_fd !=3D -1, "opening /dev/%s failed: %s", MDCTL_NAME, strerror(errno)); =20 bzero(&mdio, sizeof(mdio)); mdio.md_version =3D MDIOVERSION; mdio.md_type =3D MD_MALLOC; mdio.md_options =3D MD_AUTOUNIT | MD_COMPRESS; mdio.md_mediasize =3D GLOBAL_MAX; mdio.md_sectorsize =3D 512; strlcpy(buf, __func__, sizeof(buf)); mdio.md_label =3D buf; if (ioctl(mdctl_fd, MDIOCATTACH, &mdio) < 0) { error =3D errno; errno =3D error; atf_tc_fail("ioctl MDIOCATTACH failed: %s", = strerror(errno)); } . . . =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Tue Aug 1 08:25:39 2023 X-Original-To: freebsd-current@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 4RFSqn1JcKz4py6D for ; Tue, 1 Aug 2023 08:26:03 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic317-22.consmr.mail.gq1.yahoo.com (sonic317-22.consmr.mail.gq1.yahoo.com [98.137.66.148]) (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 4RFSqX2p24z3MMg for ; Tue, 1 Aug 2023 08:25:59 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=teKQulOb; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.66.148 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1690878357; bh=7r2Njw3yZjak5Gg0oYlfu1T1xASa5l9Lv6Wtqli7CCQ=; h=From:Subject:Date:To:References:From:Subject:Reply-To; b=teKQulObUujESI60Su4oGCWmeiJy4oxr8leeqIViTZCHSLBFcDw7mj3m5WZToOVzQ2lO5L3HmPPihFjJ/VEjIzuP3VaErvle9ces+TmXbXlNeCEyss8T7QnBWHH8Jbnoh+dC5pTGS2QdsmTg66f+C7cOqWqaYQgDo818z21jMXPrTL847OMJBWxV1LxQmswxR9vO/dWeXI3GA/g3b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FWkP61tPtuKu_XObIPCQKxz6lCVrjB8E9NPGGMwsbpoxAboIETJKkomYIDKE c5vurTpfQn.2sc7cRRL.SWUwJ4.xoouaoHIF5BgsyIt6Ydc0ONwlMnOVvGQYH_RTmG76T6fhp3eo 33YwtGRPANw.kdc222BC9iBmj7IPqXMCelduwQ0ZPUCITDKH0HLxCQlsJ1q.mYCQM8DM.pU_n8.H uqqgYEBY0hJdbSKxJcmsV.7ULDyfXnkLPmJJxnqJKUau3t2lqv9U08ttMK5HA_IJi5gNKcaN3mNs 3cCEbSw0hJ6i6NlZ1wE4GR609P_kTYkuYNfM1BCYLSB6qVw1Pps4B29QBlFcU81nVBYe_92HrFPJ 5idke.lNhlUhOWudpBPLhDA7j24AdZ5U3YGAofsB7jXUClZzA9LhMboaLE6JDEfR1jMnuXR1xX_G vLtij3DvJLrq2iv8vGmQowSjaeUGwJ6w0dI1IKfpIYFHK2syOe29fAcKKDOPDMdZVvGHhLP3oSbL 2n_V2SXUSLbnp0U36nkju3CJG.i1yeCERab.OsajwPUErNE9IrJbfvGlRQGmBgwj5.MV.FVImPA1 ypu01mibR7GwxfIqHXgVtZLZmdEqn3T.PfPL.TLGL9bbvSSoISB26esfwaM2B5ob5KwoGu2pbPtu nfFtRVcjLv6eKJZzgIqdYh7IxxdW2bYTMg5S5SZSHOesf6wXZr9C2agSunbT6fgWtpumgVHwjwzg mBNWMPoOEC90OrlzFTJjQ_uydSJECuq7qwvMPRfdReQsFb7fET432.hJxQfBAGIX3Dx6Use6Krg- - X-Sonic-MF: X-Sonic-ID: b810b3a2-32a4-4997-bef8-3fb0fed15858 Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.gq1.yahoo.com with HTTP; Tue, 1 Aug 2023 08:25:57 +0000 Received: by hermes--production-bf1-7c4db57b6-87g95 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 389e984e1a39be2279f616d41f7b46c1; Tue, 01 Aug 2023 08:25:51 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Some results from my crude technique of using (some of) Kyua to test aarch64's lib32 vs. kyua runs in a armv7 chroot on aarch64 Message-Id: <84EFE4FC-D8E0-41C0-AC10-D1DBE2262F6E@yahoo.com> Date: Tue, 1 Aug 2023 01:25:39 -0700 To: FreeBSD ARM List , Current FreeBSD X-Mailer: Apple Mail (2.3731.700.6) References: <84EFE4FC-D8E0-41C0-AC10-D1DBE2262F6E.ref@yahoo.com> X-Spamd-Result: default: False [-3.20 / 15.00]; NEURAL_HAM_SHORT(-1.00)[-0.997]; NEURAL_HAM_MEDIUM(-0.99)[-0.989]; NEURAL_HAM_LONG(-0.71)[-0.710]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; RCVD_IN_DNSWL_NONE(0.00)[98.137.66.148:from]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MIME_TRACE(0.00)[0:+]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.66.148:from] X-Rspamd-Queue-Id: 4RFSqX2p24z3MMg X-Spamd-Bar: --- [I first report how I tested before reporting on errors that look to be valid kyua reports of issues.] [This testing is with a line commented out in order to prevent sys/net/if_bridge_test:gif from being tested, because of its leading to a panic for lib32 style testing.] I have /usr/obj/DESTDIRs/main-CA7-chroot/ containing an armv7 installworld distrib-dirs distribution DB_FROM_SRC=3D1 result. It also has various ports installed that kyua runs use. I use this tree for both the lib32 and the chroot testing. I have a script to preload various kernel modules: # grep kldload ~/prekyua-kldloads.sh | sort #kldload -v -n ipfw.ko #kldload -v -n pflog.ko #kldload -v -n pfsync.ko kldload -v -n bridgestp.ko kldload -v -n carp.ko kldload -v -n cryptodev.ko kldload -v -n dtrace.ko kldload -v -n dummynet.ko kldload -v -n fdescfs.ko kldload -v -n filemon.ko kldload -v -n geom_concat.ko kldload -v -n geom_eli.ko kldload -v -n geom_gate.ko kldload -v -n geom_mirror.ko kldload -v -n geom_multipath.ko kldload -v -n geom_nop.ko kldload -v -n geom_raid3.ko kldload -v -n geom_shsec.ko kldload -v -n geom_stripe.ko kldload -v -n geom_uzip.ko kldload -v -n if_bridge.ko kldload -v -n if_epair.ko kldload -v -n if_gif.ko kldload -v -n if_infiniband.ko kldload -v -n if_lagg.ko kldload -v -n if_ovpn.ko kldload -v -n if_stf.ko kldload -v -n if_tuntap.ko kldload -v -n if_wg.ko kldload -v -n ipdivert.ko kldload -v -n ipsec.ko kldload -v -n mqueuefs.ko kldload -v -n netgraph.ko kldload -v -n nfsd.ko kldload -v -n ng_bridge.ko kldload -v -n ng_ether.ko kldload -v -n ng_hub.ko kldload -v -n ng_socket.ko kldload -v -n ng_vlan_rotate.ko kldload -v -n nullfs.ko kldload -v -n opensolaris.ko kldload -v -n pf.ko kldload -v -n sctp.ko kldload -v -n sdt.ko kldload -v -n tarfs.ko kldload -v -n tcpmd5.ko kldload -v -n xz.ko kldload -v -n zfs.ko (Some I've listed despite there being built into the kernel or already being loaded for my normal environment.) Likely I'll end up adding some more later. I have some ports used by kyua runs that I build and then install into /usr/obj/DESTDIRs/main-CA7-chroot/ : # more ~/origins/kyua-origins.txt=20 archivers/gtar devel/py-pytest devel/py-pytest-twisted devel/py-twisted lang/perl5.32 lang/python net/scapy security/openvpn security/sudo shells/ksh93 shells/bash sysutils/coreutils sysutils/sg3_utils textproc/jq Likely I'll add some more later. The above, of course, lead to other installs as well. For lib32 testing, I try to control where most *.so* 's that are not based full path references are found. This is via use of LD_32_LIBRARY_PATH . I try to have more programs that are not based on full path references run as armv7 code. This is via use of PATH . So: # env \ LD_32_LIBRARY_PATH=3D/usr/obj/DESTDIRs/main-CA7-chroot/lib\ :/usr/obj/DESTDIRs/main-CA7-chroot/usr/lib\ :/usr/obj/DESTDIRs/main-CA7-chroot/usr/tests/libexec/rtld-elf\ :/usr/obj/DESTDIRs/main-CA7-chroot/usr/tests/lib/libxo\ :/usr/obj/DESTDIRs/main-CA7-chroot/usr/tests/lib/csu/dynamiclib\ :/usr/obj/DESTDIRs/main-CA7-chroot/usr/tests/lib/libc/tls\ :/usr/obj/DESTDIRs/main-CA7-chroot/usr/tests/lib/libc/stdlib\ :/usr/obj/DESTDIRs/main-CA7-chroot/usr/tests/lib/libthr/dlopen\ :/usr/obj/DESTDIRs/main-CA7-chroot/usr/local/lib\ = :/usr/obj/DESTDIRs/main-CA7-chroot/usr/local/lib/python3.9/site-packages\ :/usr/obj/DESTDIRs/main-CA7-chroot/usr/local/lib/python3.9/lib-dynload\ :/usr/obj/DESTDIRs/main-CA7-chroot/usr/local/lib/perl5/5.32/mach/CORE\ :/usr/obj/DESTDIRs/main-CA7-chroot/usr/local/lib/perl5/5.32/mach/auto \ PATH=3D/usr/obj/DESTDIRs/main-CA7-chroot/sbin\ :/usr/obj/DESTDIRs/main-CA7-chroot/bin\ :/usr/obj/DESTDIRs/main-CA7-chroot/usr/sbin\ :/usr/obj/DESTDIRs/main-CA7-chroot/usr/bin\ :/usr/obj/DESTDIRs/main-CA7-chroot/usr/local/sbin\ :/usr/obj/DESTDIRs/main-CA7-chroot/usr/local/bin\ :/usr/obj/DESTDIRs/main-CA7-chroot/root/bin \ /usr/obj/DESTDIRs/main-CA7-chroot/usr/bin/kyua test \ -k /usr/obj/DESTDIRs/main-CA7-chroot/usr/tests/Kyuafile On the Windows Dev Kit 2023 I end up with the lib32 summary being (so far): # kyua report --verbose \ = --results-file=3Dusr_obj_DESTDIRs_main-CA7-chroot_usr_tests.20230731-08082= 0-275974 \ 2>&1 \ | tail -6 =3D=3D=3D> Summary Results read from = /usr/home/root/.kyua/store/results.usr_obj_DESTDIRs_main-CA7-chroot_usr_te= sts.20230731-080820-275974.db Test cases: 8704 total, 1442 skipped, 37 expected failures, 46 broken, = 746 failed Start time: 2023-07-31T08:08:20.858437Z End time: 2023-07-31T10:18:37.393732Z Total time: 6954.365s Of course, some tests labeled as broken/failed are just from the limitations of the techniques involved lib32 based kyua testing. For example the 127 "failures": In the chroot it is currently: # kyua report --verbose \ --results-file=3Dusr_tests.20230731-163737-720329 \ 2>&1 \ | tail -6 =3D=3D=3D> Summary Results read from = /usr/home/root/.kyua/store/results.usr_tests.20230731-163737-720329.db Test cases: 8699 total, 1478 skipped, 38 expected failures, 200 broken, = 664 failed Start time: 2023-07-31T16:37:38.302188Z End time: 2023-08-01T06:57:18.663231Z Total time: 50619.428s To generate files to diff lib32 vs. chroot results I used for lib32: # kyua report --results-filter "" \ = --results-file=3Dusr_obj_DESTDIRs_main-CA7-chroot_usr_tests.20230731-08082= 0-275974 \ 2>&1 \ | grep " -> " \ | sed -e 's@\(.*\) [\[0-9.s\]*]$@\1@' \ | sort -u > ~/kyua_lib32_aarch64_armv7.txt NOTE: That strips off the [TIME-IN-SECONDS] suffix. For inside the chroot I used: # kyua report --results-filter "" \ --results-file=3Dusr_tests.20230731-163737-720329 \ 2>&1 \ | grep " -> " \ | sed -e 's@\(.*\) [\[0-9.s\]*]$@\1@' \ | sort -u > ~/kyua_chroot_aarch64_armv7.txt NOTE: That strips off the [TIME-IN-SECONDS] suffix. Then I did the diff (from outside the chroot): # diff -u ~/kyua_lib32_aarch64_armv7.txt \ /usr/obj/DESTDIRs/main-CA7-chroot/root/kyua_chroot_aarch64_armv7.txt \ | grep "^[+-]" \ | sort -k1.2 -k1.1 > ~/kyua_aarch64_lib32_chroot_armv7_diff.txt I later swapped the first 2 lines to get the -then+ order there as well. See the 1021 lines at: https://gist.github.com/markmi/37400c797bc94e5670622bb36919964e There are interesting differences, such as many sys/net* tests for the chroot context hanging up and timing out after 300s but lib32 having many of these tests pass instead. There are other types of tests that chroot generally has the passing status and lib32 has the failure/broken status. One thing I've noticed is that for lib32 some of the failures trace back to examples of "Inappropriate ioctl for device" or other ioctl behavior differences. I sent out a prior notice to the lists for that. There are examples of -/+ line pairs that only exist because of /tmp/* paths that are different in the text of the 2 lines. So the overall line count overstates the differences by some amount. =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Tue Aug 1 17:12:12 2023 X-Original-To: freebsd-current@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 4RFhWp6006z4pdvJ for ; Tue, 1 Aug 2023 17:12:57 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic301-22.consmr.mail.gq1.yahoo.com (sonic301-22.consmr.mail.gq1.yahoo.com [98.137.64.148]) (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 4RFhW434sfz4NJ7 for ; Tue, 1 Aug 2023 17:12:32 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=Ftk9kxdw; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.64.148 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1690909949; bh=RtGKRq3HolSNhZFf4oRxvkzjBx9g6SsdopTRX5hch6A=; h=From:Subject:Date:To:References:From:Subject:Reply-To; b=Ftk9kxdwFFdJdeXTr25sw/fij3PK7l4TYLdto4mclgWem4t8EeUvaAKTIdzr+JYP21KjV2J0l2eDFF+X9cS1nWgi6wuo28N89FjYFBNw7/wvvqOwhGuEP3PX7Wds9ZYg2oabLOX6ueEdW/ROySaTwAVXDi477LmumWgSDwd5URp+kzM7e3yaKacVOxiW9z5zzPivlua28Mf++OADx0p3FG/YT0naZU+xb8QvB5fkTs97bnnMbVLJCDbNuhfcLdxEaj5mL/ZP5BsXZr5GYp8iWN0qaxAwBaS8BYhoWb1G1vm7cvn2GVy+Iuhg9os4uUm4Vu1HWBY7HBse496GjIsZ7A== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1690909949; bh=r8YWbURrlXhrK/SiXLBiPoFvFWAZOgvjMOa6xnv3A0s=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=M2E6gplTdrTjaZP4Ta3psPLPXt2bgwpC/kX/sq2EiGm1XrcYC1NR2k4CgfshPYZNOD0w+83lPcoshU3TZL1TOvv35MSzUgBdawcWCp3pOexJxE77CzmS/jgjN+C+y+tw6wYJAQ2LM2RW52ihXfaeEhG/oHTLOY0Vhzmhim15qwxMDLUViYFTtM3pIJtPugamOs5qb72h6iy34JFVjmkfI/FlQ+RyIeXSeBL5iPobJ+FUyAOQ3R3mOHPHE3adUTvD0fXC2mAoVE7PIDEuyHfI6mkzyC7udQzZ+gZFcbpqqgPcALSHBrhtbNOvtxw9uWYAI7motDzjgylUvPuK4MK6ng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_PAaRaBkcs9vdytxeXLSeSRWhEKsRIDkEu.8yyTsCPk4bAd215s9ryd_kgy L6p1ZWQBHtqSW3rfeyItrdSIKDSD3Ze6nU42Afh3bU6iKbXFsviYUwY1d_8c2KI9ADSWG6ZyOAAn Hzj4SaE2qcnUTXZpaHrh.7Ma.I5PUL9buF6AJPLt8BOkJXi21O9FXxyoyEuKUEK0Wo62rdhWG3k. RiQ-- X-Sonic-MF: X-Sonic-ID: aa73251d-4777-4026-9fee-c827283a6e06 Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.gq1.yahoo.com with HTTP; Tue, 1 Aug 2023 17:12:29 +0000 Received: by hermes--production-ne1-549c7f6c44-c7r4q (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 882422d1e25e66c73e15c57108bab52b; Tue, 01 Aug 2023 17:12:24 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: aarch64/armv7 via lib32 and via chroot: db_test:btree_byteswap_unaligned_access_skbd gets bus error Message-Id: Date: Tue, 1 Aug 2023 10:12:12 -0700 To: FreeBSD ARM List , Current FreeBSD X-Mailer: Apple Mail (2.3731.700.6) References: X-Spamd-Result: default: False [-2.12 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.987]; NEURAL_HAM_SHORT(-0.60)[-0.596]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-0.04)[-0.041]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.148:from]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MIME_TRACE(0.00)[0:+]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.64.148:from] X-Rspamd-Queue-Id: 4RFhW434sfz4NJ7 X-Spamd-Bar: -- I do not know if the unaligned access activity in the likes of: db_test:btree_byteswap_unaligned_access_skbd is some form of FreeBSD requirement or not. But, for armv7 activity, it results in a bus error (and kyua test failure). Probaly also true native armv7 operation. =3D=3D=3D> lib/libc/db/db_test:btree_byteswap_unaligned_access_skbd Result: failed: atf-check failed; see the output of the test for = details Start time: 2023-08-01T09:07:38.975390Z End time: 2023-08-01T09:07:39.006220Z Duration: 0.031s Metadata: allowed_architectures is empty allowed_platforms is empty description =3D btree: small key, big data, byteswap unaligned = access has_cleanup =3D false is_exclusive =3D false required_configs is empty required_disk_space =3D 0 required_files is empty required_memory =3D 0 required_programs is empty required_user is empty timeout =3D 300 Standard output: Executing command [ = /usr/obj/DESTDIRs/main-CA7-chroot/usr/tests/lib/libc/db/h_db -o out -i = psize=3D512,lorder=3D1234 btree in ] Executing command [ = /usr/obj/DESTDIRs/main-CA7-chroot/usr/tests/lib/libc/db/h_db -o out -i = psize=3D512,lorder=3D4321 btree in ] Standard error: Fail: program did not exit cleanly stdout: stderr: Files left in work directory after failure: h_db.core, in, out For reference: Reading symbols from = /usr/obj/DESTDIRs/main-CA7-chroot/usr/tests/lib/libc/db/h_db... (No debugging symbols found in = /usr/obj/DESTDIRs/main-CA7-chroot/usr/tests/lib/libc/db/h_db) [New LWP 102818] Core was generated by = `/usr/obj/DESTDIRs/main-CA7-chroot/usr/tests/lib/libc/db/h_db -o out -i = psize=3D512'. Program terminated with signal SIGBUS, Bus error. Invalid address alignment. #0 __bt_pgout (t=3D, pg=3D, = pp=3D0x4060651c) at /usr/main-src/lib/libc/db/btree/bt_conv.c:174 174 P_32_SWAP(p); (gdb) bt #0 __bt_pgout (t=3D, pg=3D, = pp=3D0x4060651c) at /usr/main-src/lib/libc/db/btree/bt_conv.c:174 #1 0x401468ac in mpool_write (mp=3D0x40610000, bp=3D0x40606500) at = /usr/main-src/lib/libc/db/mpool/mpool.c:406 #2 mpool_sync (mp=3D0x40610000) at = /usr/main-src/lib/libc/db/mpool/mpool.c:329 #3 0x4013d548 in __bt_sync (dbp=3D, = dbp@entry=3D0x4060b000, flags=3D) at = /usr/main-src/lib/libc/db/btree/bt_close.c:146 #4 0x4013d35c in __bt_close (dbp=3D0x4060b000) at = /usr/main-src/lib/libc/db/btree/bt_close.c:80 #5 0x000221b4 in main () =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Tue Aug 1 17:46:49 2023 X-Original-To: freebsd-current@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 4RFjH46fy9z4pgFM for ; Tue, 1 Aug 2023 17:47:07 +0000 (UTC) (envelope-from ctuffli@gmail.com) Received: from mail-vs1-f46.google.com (mail-vs1-f46.google.com [209.85.217.46]) (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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFjGw5Q01z4Sfw for ; Tue, 1 Aug 2023 17:47:04 +0000 (UTC) (envelope-from ctuffli@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of ctuffli@gmail.com designates 209.85.217.46 as permitted sender) smtp.mailfrom=ctuffli@gmail.com; dmarc=none Received: by mail-vs1-f46.google.com with SMTP id ada2fe7eead31-44768034962so1531280137.3 for ; Tue, 01 Aug 2023 10:47:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690912023; x=1691516823; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=jpPx0Bfh6a79ho7R4/l2eC5QA+KS4t0bFXvjLZo7cYk=; b=NnZ2Hn40cOe9R7MhtE4Nw52C1QGmAx6SfWom/6flC0N6e13l5FIqsjBVKRkPljcpCE zfFByjCJ1pSSIl2Hi8Pu2f5yeL3z0l39dmhArKAKlyuTPZTDO/+tlrPERGufcbUJZLqL Ncu7oya3rmAmAbUV3nVlTxbt9JdnQi51fdQD9BZrNa192FehvxMgpqOaSi+MX4nibZwa 5mT/cS8T29yPuILP1Q9sUeWtDF7oaNEsb1iHLBuPc7X9OIch8XnUj3oZez5slmlFHEqU c7fqakXqK38u+iefc0KzrF+1PdlckTWLENSxTTIAtd+LWdA9hr3pgjM/8/fPCRDH+F58 1dHw== X-Gm-Message-State: ABy/qLYkCC5zBrhYerdwFz5zo5hdvxdDI0vrrml3wJG2eQcXvClXvanW kvho7npUb7M2aNCgfJhg7BSqNpbC/aA= X-Google-Smtp-Source: APBJJlGD7ESWeZe184f0f/tOQ1jkwFDOfDsxPfDycOXhtRsl0B29wnyuWK98jSR2WXoT3xQfijTFyg== X-Received: by 2002:a05:6102:a35:b0:447:4f20:c79c with SMTP id 21-20020a0561020a3500b004474f20c79cmr2261082vsb.12.1690912022939; Tue, 01 Aug 2023 10:47:02 -0700 (PDT) Received: from mail-vk1-f180.google.com (mail-vk1-f180.google.com. [209.85.221.180]) by smtp.gmail.com with ESMTPSA id u2-20020ab05b02000000b0079a01ecb0a0sm1680827uae.38.2023.08.01.10.47.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Aug 2023 10:47:02 -0700 (PDT) Received: by mail-vk1-f180.google.com with SMTP id 71dfb90a1353d-486519e5da0so1937118e0c.2 for ; Tue, 01 Aug 2023 10:47:02 -0700 (PDT) X-Received: by 2002:a1f:bf4d:0:b0:481:2d01:867f with SMTP id p74-20020a1fbf4d000000b004812d01867fmr2437912vkf.3.1690912022480; Tue, 01 Aug 2023 10:47:02 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 From: Chuck Tuffli Date: Tue, 1 Aug 2023 10:46:49 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Can't assign address to igc To: FreeBSD-Current Content-Type: text/plain; charset="UTF-8" X-Spamd-Result: default: False [-1.31 / 15.00]; NEURAL_HAM_LONG(-0.99)[-0.994]; NEURAL_HAM_MEDIUM(-0.97)[-0.970]; NEURAL_SPAM_SHORT(0.66)[0.657]; FORGED_SENDER(0.30)[chuck@freebsd.org,ctuffli@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_NONE(0.00)[209.85.217.46:from,209.85.221.180:received]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[chuck@freebsd.org,ctuffli@gmail.com]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.217.46:from]; R_DKIM_NA(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[freebsd.org]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; TO_DOM_EQ_FROM_DOM(0.00)[] X-Rspamd-Queue-Id: 4RFjGw5Q01z4Sfw X-Spamd-Bar: - Running a recent-ish version (n264266-8f8da1bcc799) on an Intel NUC (RNUC11PABi5), assigning an IPv4 address to igc0 doesn't work. There is no error message, and this has been working in the past. Looking through dmesg only shows: igc0: link state changed to UP igc0: link state changed to DOWN igc0: link state changed to UP The address is set in rc.conf: ifconfig_igc0="inet 192.168.5.10 netmask 255.255.255.0" And manually setting it via # ifconfig igc0 inet 192.168.5.10/24 up does not work either. Any suggestions? --chuck From nobody Tue Aug 1 23:33:16 2023 X-Original-To: freebsd-current@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 4RFryt6QRLz4q11W for ; Tue, 1 Aug 2023 23:33:30 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-oo1-xc2a.google.com (mail-oo1-xc2a.google.com [IPv6:2607:f8b0:4864:20::c2a]) (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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFryd6zJzz3mJ6; Tue, 1 Aug 2023 23:33:29 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oo1-xc2a.google.com with SMTP id 006d021491bc7-56ca4d7079aso2312666eaf.0; Tue, 01 Aug 2023 16:33:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690932808; x=1691537608; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+Gs09JfHRKH+QEve/edjtuZNHhDcggtZKq4pvyRrx4g=; b=bYvaCsuS9dRUpSHSY6HFwY/nikgmWHTr9JuIMMxUFpn0N2KuRgdT2d2y5lUdMdyfk1 xNPdvwOY4RkVPs1XIyJjTETvXbffpSDMZdio0KQFMvzsX3/3fxSAaAAHAnN1KRy9bNwL NeSQWlVQ2QcjG2zPFd9k8E0tXZ+dmDeUkofdzD61Ooc5o92KNg5Q5Q04X3H9ZRSyN6Ug qQxuRjw1TyuYdfWb1TnIV27r11edA4IQkN1Uxgxbj1JTKBDW5vF2BvZ1vCri0KxvhB56 zeB53rE281CMoJ1MPLGj/y11hTXJRB2xIpsphV2bHpJnokvBz4+1Wka8zBJ07JUgSfb6 cn4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690932808; x=1691537608; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+Gs09JfHRKH+QEve/edjtuZNHhDcggtZKq4pvyRrx4g=; b=PHzH0x6UJysHyMRdePxDNxeaq/hReYkw1pl14xsR3NO/RpyCpWirC5OKVBMcKo8mfD 3JDKBGzp2Uh3dq8cxjc8v8AcI/5qi9AEBlJjO2peqmPlOTbZ0ihtKXHp3fDWvMehkwsp /Mkbl6b6PJ9ieCmtcw9k2DLTpY3vc/Sh+V2v0LkJP0YtzWQcgVpnvwk5chzJi1lEPLIB 4vKDrRD+NW2HBu5GURwtKIyZbdR6GH5Tdv4D+FpTqDGE7m1El0e0VwAF0wF9uayA84pZ e4emLqdHIDojccmIZE+c/CNoQ4t21O4TeQJcOf2GM4L3sWL3PisqH43HGnPFca6hzoDF 35Ig== X-Gm-Message-State: ABy/qLZAWSMOTz8u/koezkKGaRSCEZWg1P+peLRPIOrG0Sy0/gT9TxvI lVQRdFi4AELvne9anKfk/1E8Txioa8v2+PZ994JqSC3GHA== X-Google-Smtp-Source: APBJJlErtWNCaVfqknb8yWvEoSONcwRK5qIO8F17Go092uCsC7G7EUWqOZLGDSJFyTGNPGgxErr8MPIPDpBTwaO1g24= X-Received: by 2002:a05:6870:4182:b0:1b0:2f70:15a5 with SMTP id y2-20020a056870418200b001b02f7015a5mr15574670oac.52.1690932806999; Tue, 01 Aug 2023 16:33:26 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Rick Macklem Date: Tue, 1 Aug 2023 16:33:16 -0700 Message-ID: Subject: Re: Review of patch that uses "volatile sig_atomic_t" To: David Chisnall Cc: FreeBSD CURRENT Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4RFryd6zJzz3mJ6 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] On Mon, Jul 31, 2023 at 11:33=E2=80=AFPM David Chisnall wrote: > > Hi, > > This bit of the C spec is a bit of a mess. There was, I believe, a desire= to return volatile to its original use and make any use of volatile other = than MMIO discouraged. This broke too much legacy code and so now it=E2=80= =99s a confusing state. > > The requirements for volatile are that the compiler must not elide loads = or stores and may not narrow them (I am not sure if it=E2=80=99s allowed to= widen them). Loads and stores to a volatile variable may not be reordered = with respect to other loads or stores to the same object but *may* be reord= ered with respect to any other accesses. > > The sig_atomic_t typedef just indicates an integer type that can be loade= d and stored with a single instruction and so is immune to tearing if updat= ed from a signal handler. There is no requirement to use this from signal h= andlers in preference to int on FreeBSD (whether other types work is implem= entation defined and int works on all supported architectures for us). > > The weak ordering guarantees for volatile mean that any code using volati= le for detecting whether a signal has fired is probably wrong if if does no= t include a call to automic_signal_fence(). This guarantees that the compil= er will not reorder the load of the volatile with respect to other accesses= . In practice, compilers tend to be fairly conservative about reordering vo= latile accesses and so it probably won=E2=80=99t break until you upgrade yo= ur compiler in a few years time. > > My general recommendation is to use _Atomic(int) (or ideally a enum type)= for this. If you just use it like a normal int, you will get sequentially = consistent atomics. On a weakly ordered platform like Arm this will include= some more atomic barrier instructions but it will do the right thing if yo= u add additional threads monitoring the same variable later. In something l= ike mountd, the extra performance overhead from the barriers is unlikely to= be measurable, if it is then you can weaken the atomicity (sequentially co= nsistent unless specified otherwise is a good default in C/C++, for once pr= ioritising correctness over performance). Just trying to understand what you are suggesting... 1 - Declare the variable _Atomic(int) OR atomic_int (is there a preference)= and not volatile. 2 - Is there a need for signal_atomic_fence(memory_order_acquire); before t= he assignment of the variable in the signal handler. (This exists in one place in the source tree (bin/dd/misc,c), although for this example, neither volatile nor _Atomic() are used for the variable's declaration. 3 - Is there any need for other atomic_XXX() calls where the variable is us= ed outside of the signal handler? In general, it is looking like FreeBSD needs to have a standard way of deal= ing with this and there will be assorted places that need to be fixed? Thanks, rick > > David > > > On 1 Aug 2023, at 06:14, Rick Macklem wrote: > > > > =EF=BB=BFHi, > > > > I just put D41265 up on phabricator. It is a trivial > > change to mountd.c that defines the variable set > > by got_sighup() (the SIGHUP handler) as > > static volatile sig_atomic_t > > instead of > > static int > > > > I did list a couple of reviewers, but if you are familiar > > with this C requirement, please take a look at it and > > review it. > > > > Thanks, rick > > ps: I was unaware of this C requirement until Peter Eriksson > > reported it to me yesterday. Several of the other NFS > > related daemons probably need to same fix, which I will > > do after this is reviewed. > > From nobody Wed Aug 2 08:12:06 2023 X-Original-To: freebsd-current@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 4RG4TZ16HCz4qPgZ for ; Wed, 2 Aug 2023 08:12:28 +0000 (UTC) (envelope-from theraven@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 4RG4TH72wjz3H00; Wed, 2 Aug 2023 08:12:19 +0000 (UTC) (envelope-from theraven@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690963940; 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=VRfpbFpba+aFanVU03R3qG5yUbt/f0sJViScGxYkRyA=; b=iE4Sv+UAmE14EUhY9VB/UJnDxkcO2PENs4KxVtHnt3QhzmNhXoVG5DOLZHJzccFgs+3Q7L Y2+oJTb1zzkTttHHK/tg+Pa3EZ38W2qix8fLyesbX+XIJ1P+G6kJQpQ0llIGSY9okst5vp gWRdMKJ/PMjZmmcymE9GIPYk0Ua+iB+dtC+oVOtSWfPxZRNui574HNSVVA8POMIfo0d0FO h+jX/iO8/CreH2Fcswwkrt0URJSgIuwXMRb+OFfnHdo5fUZ7uxoA7qlX/X5DhrLt/ig3iq QYNix+qPs9VhlC/c91A7jBKD24+bn3jfBhEqyKNb1m0yEzLEN6KyivZnTCxIWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690963940; a=rsa-sha256; cv=none; b=elbdiIcqV8ud5PWpePh/FM6Fgk7NQ5BxAje23Jek+qdJ5jhmhaneaeNtbiJD1UlK81CsN3 bZvyP8TyXOCJy1uJf37dolr0DAXyjI0vLd4O9mt9eeawG78Wrgmq+z6AoVJ+Z35C9tHTqB IFJwP1JB2B61WQP5CYkWGRxXKBvZLhG5FOk7h1rcDliUtz6H2G1VpZsDWyu4ZFLKWGskW+ JbNwEqrsbEnD8ONKDF2JShKYq77f/s1HuJ1v3f25cEt2M7p+QkzdFPP3hBUhSc5DWWXqjE KC+1afP/3JZUoDogkeUUFqsIJw/RlncJvueW81QDvvPjIu/uEaS4s30YRPQHCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690963940; 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=VRfpbFpba+aFanVU03R3qG5yUbt/f0sJViScGxYkRyA=; b=Opn/0pF8pzkOdBLU0MxuelhpaObcZ18tcTbWfebFx+zGjJhvRnnxqTQFYmd7qLOtMyT5H+ SjzBjsvIOyGMbHFDGSA5+XQA6j/DWDL3W74z7SYRsTUFl92LCrQIWXFT/IdRa92eA/oIhP KonI501dymvLR39Nd5ytSofW4QSjJdiPrVgD0EkzTgBT1ti72g6tQHhnQTC0lHmzAgbr23 py+sRa1qjTOx1WF5pA/pq0jtpzIZe6uXkSlUc4thIKzu5C4omjpH9S2iUFIyqbB9F/qZt1 RmISY254SlBXaq/AfFqMKwu9R66o/mM+4vWjO0P0rdiSDAhgO5eZWfBM0WzYbQ== Received: from smtp.theravensnest.org (smtp.theravensnest.org [45.77.103.195]) (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 did not present a certificate) (Authenticated sender: theraven) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RG4TH3Y8Rz17ym; Wed, 2 Aug 2023 08:12:19 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from smtpclient.apple (host86-141-212-56.range86-141.btcentralplus.com [86.141.212.56]) by smtp.theravensnest.org (Postfix) with ESMTPSA id DF572889C; Wed, 2 Aug 2023 09:12:17 +0100 (BST) Content-Type: text/plain; charset=utf-8 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: Review of patch that uses "volatile sig_atomic_t" From: David Chisnall In-Reply-To: Date: Wed, 2 Aug 2023 09:12:06 +0100 Cc: FreeBSD CURRENT Content-Transfer-Encoding: quoted-printable Message-Id: <9A5C0082-2FFD-4B2B-9381-7ACD9EB7C4DF@FreeBSD.org> References: To: Rick Macklem X-Mailer: Apple Mail (2.3731.600.7) On 2 Aug 2023, at 00:33, Rick Macklem wrote: >=20 > Just trying to understand what you are suggesting... > 1 - Declare the variable _Atomic(int) OR atomic_int (is there a = preference) and > not volatile. Either is fine (the latter is a typedef for the former). I am not a = huge fan of the typedefs, some people like them, as far as I can tell = it=E2=80=99s purely personal preference. > 2 - Is there a need for signal_atomic_fence(memory_order_acquire); = before the > assignment of the variable in the signal handler. (This exists in > one place in > the source tree (bin/dd/misc,c), although for this example, > neither volatile nor > _Atomic() are used for the variable's declaration. You don=E2=80=99t need a fence if you use an atomic variable. The fence = prevents the compiler reordering things across it, using atomic = operations also prevents this. You might be able to use a fence and not = use an atomic but I=E2=80=99d have to reread the spec very carefully to = convince myself that this didn=E2=80=99t trigger undefined behaviour. > 3 - Is there any need for other atomic_XXX() calls where the variable = is used > outside of the signal handler? No. By default, _Atomic variables use sequentially consistent = semantics. You need to use the `atomic_` functions only for explicit = memory orderings, which you might want to do for optimisation (very = unlikely in this case). Reading it outside the signal handler is the = equivalent of doing `atomic_load` with a sequentially consistent memory = order. This is a stronger guarantee than you need, but it=E2=80=99s = unlikely to cause performance problems if you=E2=80=99re doing more than = a few dozen instructions worth of work between checks. > In general, it is looking like FreeBSD needs to have a standard way of = dealing > with this and there will be assorted places that need to be fixed? If we used a language that let you build abstractions, that would be = easy (I have a C++ class that provides a static epoch counter that=E2=80=99= s incremented in a signal handler and a local copy for each instance, so = you can check if the signal handler has fired since it was last used. = It=E2=80=99s trivial to reuse in C++ projects but C doesn=E2=80=99t give = you tools for doing this. David From nobody Wed Aug 2 17:26:52 2023 X-Original-To: freebsd-current@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 4RGJnh3084z4qksm for ; Wed, 2 Aug 2023 17:27:11 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic306-20.consmr.mail.gq1.yahoo.com (sonic306-20.consmr.mail.gq1.yahoo.com [98.137.68.83]) (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 4RGJnQ5C6mz4NJ8 for ; Wed, 2 Aug 2023 17:27:06 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=inEcVdv2; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.68.83 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1690997225; bh=MojFUMFvj1uhAj5zknqAn0dSevZXaXGSGprTDJKNmWI=; h=From:Subject:Date:Cc:To:References:From:Subject:Reply-To; b=inEcVdv25BGVeLtVM1G3i+Nlh9TLl8bfiFdJDDkvxKYeaXzQZ92blEo2oljUEeWOdCiwFn7Xv9f1UwxlPnrKIvMWAobP7vBQIqrAWS4Iz38vjd6OrNKoZU7rzLmsUiVUgpva+fAZF21KTo2V1oCCsA3m0IP/Q2a5/qquB/yFl4AuXVIgdzyj/yvnChufdvohh2tZOy9pmk8XPuj+M2fvkn3W2AxjkdKe3YURjfKwsIvQ62e+0RVfnTTzyjK6D+XT5jNQXibYj8pCoi6zfOIRLFRq0xzhp2/9TjfIyhL+oIc1sLTEIYqDS1npZn/YBUkaaBDAAOZmIsGAZPrld2gdBA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1690997225; bh=Ct7s4CchfhQDYTBYuSGqrMuKF30Bm79dxColPPfZQQa=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=tqjYUf2V7/+v4iAF6nCzUrkmA0z/02du2vMlYMdPEuHoY4XurktGkkqMszSXlEM7UnXXQGX4n2fO+FDCU22GcWwNNFc6uH2eeHi2Lz5xQtFM1Tg5hVDtKCJPM4QuwqEzRx541K0uPpGoTtimBRIcEmL8rd6zMY9UPBHLXMP42IkAOfgb5+jC/nVYzXtd/+g3id+RBMtH0RXOmuw9pERON389RbsDS6fJLdXJN8JFyGhsYwLjgjkQeZjsmjG8n9hFMOwYwmFiWgWQpkM4dzHV4i6n5R3KRBRx1fZJfX7i5RiAv/iXtCq3+dvqP789M9Hq2chV5zrzH1cqhaj97CnfaA== X-YMail-OSG: _XrV.1sVM1mhFOvpgNKBpMpyECSs1CiA_rw5bgDh3lTv0cx..unErVCzpteWPgZ dCOarjjISE57.57bLBM0qeSG2YnD_c5iuecyCgak6WMt68VoTrlAd4MwJLKE1r51V18pW6nxUKaL OHWxGmxMTNVy2EtLfyBZs1XE_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mb9cXJGPvZoqJBKJ_mCNJlj0eCojAhulbb MVPJR_7A- X-Sonic-MF: X-Sonic-ID: b11533ea-d9af-44ca-bc25-0bf09015198f Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.gq1.yahoo.com with HTTP; Wed, 2 Aug 2023 17:27:05 +0000 Received: by hermes--production-gq1-7d844d8954-pkqkw (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 65aeada7a322bf1e07fd0d38d06bcc69; Wed, 02 Aug 2023 17:27:03 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: sys/modules/Makefile and MACHINE_ARCH vs arm64 (in use) vs aarch64 (not in use) VS. man arch; also COMPAT_FREEBSD32_ENABLED use Message-Id: Date: Wed, 2 Aug 2023 10:26:52 -0700 Cc: FreeBSD ARM List To: Warner Losh , Current FreeBSD X-Mailer: Apple Mail (2.3731.700.6) References: X-Rspamd-Queue-Id: 4RGJnQ5C6mz4NJ8 X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.38 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.88)[-0.885]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ARC_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.68.83:from]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.68.83:from] man arch reports: MACHINE MACHINE_CPUARCH MACHINE_ARCH arm64 aarch64 aarch64 . . . arm arm armv6, armv7 So I'd not expect arm64 in MACHINE_ARCH . But sys/modules/Makefile has (from a grep for MACHINE_ARCH): .if ${MACHINE_ARCH} =3D=3D "amd64" || ${MACHINE_ARCH} =3D=3D "arm64" .if ${MACHINE_ARCH} =3D=3D "amd64" || ${MACHINE_ARCH} =3D=3D "arm64" || = ${MACHINE_ARCH:Mpowerpc64*} Another issue may be that COMPAT_FREEBSD32_ENABLED is only put to use in the Makefile for MACHINE_CPUARCH being i386 or amd64 : .if ${MACHINE_CPUARCH} =3D=3D "i386" || ${MACHINE_CPUARCH} =3D=3D = "amd64" _agp=3D agp .if ${MACHINE_CPUARCH} =3D=3D "i386" || !empty(COMPAT_FREEBSD32_ENABLED) . . . =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Wed Aug 2 18:16:40 2023 X-Original-To: freebsd-current@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 4RGKxV2qfHzZf9J for ; Wed, 2 Aug 2023 18:18:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) (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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGKtt6mFwz4RjS for ; Wed, 2 Aug 2023 18:16:53 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20221208.gappssmtp.com header.s=20221208 header.b=XHuhOymg; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2a00:1450:4864:20::12d) smtp.mailfrom=wlosh@bsdimp.com; dmarc=none Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-4fe1344b707so188826e87.1 for ; Wed, 02 Aug 2023 11:16:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20221208.gappssmtp.com; s=20221208; t=1691000212; x=1691605012; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=MXV+zd2Do8aYpEYfdwf5KzmM24s5tVaNrRJnM24l+CE=; b=XHuhOymgZH7serzmoBjLi5bYc4594c7jWefvGlmZy4N6zuNdActTgcjL1kuPht8EXd c+WPpkIYxcdAwcpKEbfg71c0jTeMKh6FASxsOxMixuhtVBRhi2bUFbHN6Rs3/CIJfKWM DL7f1k0Kj5XpTrgH2ZC09Ist981+uhAEyQkSDelhU0A9LxcaYhMEwZ27X8kdK/XWOzDx tdf6s01XcrL+v8v4jdFa4cV2l0Y3SElApYBZBjg2SfueNcgpxMf8ZP/P+7fPzyY/6B6l vUZ3r71R3IJAwcwf63ZNFJKzjySC6kNhtQsJ1AhKzHxklNlHRH/PoBcP1UCKTTf+Tfkp Wa7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691000212; x=1691605012; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MXV+zd2Do8aYpEYfdwf5KzmM24s5tVaNrRJnM24l+CE=; b=W+9ojInAW6DvFfzfBXfKKuYI/hRw6Rzsy4bcAt7oZ/vwUseRIcAOrtU7LCV3SQFbLh qJhppmo47icWwQ+ZeBkNh0SCczFz9cQIc/nNR8p4+ZXThhaKjEEcizg4JLICj9RwdOco 9FQC22Ue2W8Wy7izw71N6EBGRjSDer0xCj71WTI/RhohhLZ/k4lTI8bCs96VdZyT3udz QtsfV9gR7W9ijLIRy5VgKgx3N+ehSRe1W5lo98JGMPd2OweCWgdR3nr+t0Qvr0WYsMTn bv4CGVDIMLy30tr0rxmZlxoHBRloJ4y/OD5aFH5eszgDOPpmXDq+V4OsjidrCeZ1sqep 8Mlw== X-Gm-Message-State: ABy/qLaPQvRGlPS58x4w7vfsoqK8G6cLKdJutWyGSgqclgMx5tdSNlTf wpZszOedhShw6ORyJQdeZ1JlJLbjVgp+SRbcS1XX1g== X-Google-Smtp-Source: APBJJlH3yj531rDeKu7lpm4GoefNwL7ohOChYSCAGsDVfVyHdoy8U/slqNlwcNUDLZ6jCWOx1JJ8Xwgm+GdJvvnER/c= X-Received: by 2002:a19:8c06:0:b0:4fd:f80d:f6a3 with SMTP id o6-20020a198c06000000b004fdf80df6a3mr4599732lfd.43.1691000211586; Wed, 02 Aug 2023 11:16:51 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Warner Losh Date: Wed, 2 Aug 2023 12:16:40 -0600 Message-ID: Subject: Re: sys/modules/Makefile and MACHINE_ARCH vs arm64 (in use) vs aarch64 (not in use) VS. man arch; also COMPAT_FREEBSD32_ENABLED use To: Mark Millard Cc: Current FreeBSD , FreeBSD ARM List Content-Type: multipart/alternative; boundary="000000000000ed657e0601f4aab3" X-Rspamd-Queue-Id: 4RGKtt6mFwz4RjS X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.99 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_HAM_SHORT(-0.99)[-0.993]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20221208.gappssmtp.com:s=20221208]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; FREEMAIL_TO(0.00)[yahoo.com]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; R_SPF_NA(0.00)[no SPF record]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::12d:from]; DKIM_TRACE(0.00)[bsdimp-com.20221208.gappssmtp.com:+]; TO_DN_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FROM_HAS_DN(0.00)[]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DMARC_NA(0.00)[bsdimp.com]; RCVD_COUNT_TWO(0.00)[2] --000000000000ed657e0601f4aab3 Content-Type: text/plain; charset="UTF-8" Those all look wrong to me. Warner On Wed, Aug 2, 2023, 11:27 AM Mark Millard wrote: > man arch reports: > > MACHINE MACHINE_CPUARCH MACHINE_ARCH > arm64 aarch64 aarch64 > . . . > arm arm armv6, armv7 > > So I'd not expect arm64 in MACHINE_ARCH . But > sys/modules/Makefile has (from a grep for MACHINE_ARCH): > > .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "arm64" > .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "arm64" || > ${MACHINE_ARCH:Mpowerpc64*} > > > Another issue may be that COMPAT_FREEBSD32_ENABLED is only > put to use in the Makefile for MACHINE_CPUARCH being i386 > or amd64 : > > .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" > _agp= agp > .if ${MACHINE_CPUARCH} == "i386" || !empty(COMPAT_FREEBSD32_ENABLED) > . . . > > > > > === > Mark Millard > marklmi at yahoo.com > > --000000000000ed657e0601f4aab3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Those all look wrong=C2=A0to me.

Warner=C2=A0

On Wed, Aug 2, 2023, 11:27 AM Mark M= illard <marklmi@yahoo.com> w= rote:
man arch reports:

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0MACHINE=C2=A0 =C2=A0 =C2=A0 =C2=A0= MACHINE_CPUARCH=C2=A0 =C2=A0 =C2=A0 =C2=A0MACHINE_ARCH
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0arm64=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0aarch64=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0aarch64=
. . .
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0arm=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0arm=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0armv6, armv7

So I'd not expect arm64 in MACHINE_ARCH . But
sys/modules/Makefile has (from a grep for MACHINE_ARCH):

.if ${MACHINE_ARCH} =3D=3D "amd64" || ${MACHINE_ARCH} =3D=3D &quo= t;arm64"
.if ${MACHINE_ARCH} =3D=3D "amd64" || ${MACHINE_ARCH} =3D=3D &quo= t;arm64" || ${MACHINE_ARCH:Mpowerpc64*}


Another issue may be that COMPAT_FREEBSD32_ENABLED is only
put to use in the Makefile for MACHINE_CPUARCH being i386
or amd64 :

.if ${MACHINE_CPUARCH} =3D=3D "i386" || ${MACHINE_CPUARCH} =3D=3D= "amd64"
_agp=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0agp
.if ${MACHINE_CPUARCH} =3D=3D "i386" || !empty(COMPAT_FREEBSD32_E= NABLED)
. . .




=3D=3D=3D
Mark Millard
marklmi at yahoo.com

--000000000000ed657e0601f4aab3-- From nobody Wed Aug 2 19:56:42 2023 X-Original-To: freebsd-current@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 4RGN8Q6t38zZjqt for ; Wed, 2 Aug 2023 19:58:25 +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 4RGN6R1ktTz3C7C for ; Wed, 2 Aug 2023 19:57:01 +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=1691006218; bh=w+B5jJcvRIqykxajCt/60beNzfwIYV+hNzYzN1oe8GE=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=uRrmalhuuCvMjlIks9pr/ydn5VeksYloLwXcrRIDPSZ200dWOisILC4msA9fQhCDE55DsSO4q4c/LneedL66fEkHjm8HwVR+8kedtuqkxtoQjfVbWqTkH8GFZIfbes8KT/ELr1dEDWoS+oiKoH8gy1CF2U1IRqog9ODhOKPJhqp72VPO3YlDrgoxKrikkas/kJqep+N+7EwOQCdk5D+RqHs7X0HeTcYQqQIrihSmVcgr0wElL01mI6zlD4i3rwe0KFi4Q+VVdhqivHUoDQnrTFRcQDDys/0/xldb/gjr8t/tfcvSWMt+mTHUspQ5GB6BPLjH+1zPJOp3JT/XQ51VtA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1691006218; bh=WRmhcgsctJa0GPaNPjtWiyCGYi4s1i0AL7jY4iTw5dP=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=h+37H/h+TtwRq4SVa7c6dRWfyw3h4kXMm7bqHGN18vEqxyXzeIuZqkMKhkwP2iJixPbWR7jguADW2Nel5NUf6Fqqy8JXb2EnUli00Fa0nEz12m07cHuGzlxreeL61HS0PmDJg6PYrMySLNwiUqu4l6bMDeMGYmLSbz1wQStwwhASxZm+nNEofnmKb53Itl9DhUHnpYvmQ37QfbD5aL3bKAPkpIbSVbLOPGL7AsbeWD9klsyENhwwN+9h7nhwema204yPYzlxG4wvL8hgToagdT75speKesxj5kc6QPqXL8bQdgiRSsalXGs283nUyoTAGmlAvLKKLfMZvccIE6fIJA== X-YMail-OSG: QFYBCkYVM1k1hZgitIiAc7vSU5WFxwGJk1eRxzCXxiuAjpnV7CYtj5R6GLk0fKm FowOexsLchhSqtn3a8z6yg4Jv2ZAzO9_We1S7KmzaaKpahR8AHMXqGMicPNoMVK0ngRT8HN_jkUM bpsPKeYttwVP1JUCsdLQtEbvInuSyT4203ZL6UHxNmTTY.uJ4A0QRlzh52QfYLIJaCPOuoZ5qTTG tn7Rlc7jB2f3.RCRYRLX5f7.tsbmvCDVVrI.A2sm37TCh9rU1S_hdmmLcs0rodFa0_8gVKGsjno3 R3SH45m_E61dxL1lpNPz6vxeyRyCS9jhWVguAMySXKTvpNnkDvQ.Wa0gUvhBk0iFS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_Du s4Cow7R9.5mNz1CWzYrp5zWenEeTH.r5L21LK.HXRhGY6I40IonfrfVASuYUk5A1SKBLPICzQS1n ggos_esQbgzf9nn_53TtP5h2uGMkmMx3Y1etR2UwP098Sm.3n_RzBCouOKNy5roXCi2WVIRaL.FD eDO0YXK69T2FuUrfwbmsnNBj5itdXfJXHMiT0DIhSYjP3g5mBOufQjUNSQ7lenntJlJ6IDP46syw ruvH4QxL2_E06L4Kg6ChYMT9Jh84JXUgxojViWocbJqK5dI8MURNh42BnE3FGyNU.NI6dYb7WEaW U5an_Lr2iKEUki3hMWLFHNmckbzaADPOrwUwvdRSiYZEjLWquaMAG3X6OMfD029CXsaB9PjDbews c929LmgRpUY_0uxPTQTKQKVlpbLxy6B0JDYAxaSUjmTkbJ43YxSz8TOVma0L0adT_j4dNsmN8c3v KiFsZNWPTyM059KAm3FDVYUPuTYimjNqRD7AftCnNAekZVgs3kYOURsIwH65X1Qma2dPCwSBhCCK 1o60cGMkAs9pR3shy1J6GlWnsr.rH3MqYaEuj5aJhNnaJh3kmCcRjLRKFuf7Wo8AMIuRoprBFiUm yVXPtEy.pTJf4fCynpff1bewhv0Xu7WbwrgNGTHnih6vH7z6pAmcYw1cyDveosmhQQrTzB9b013w g_sJf6gXt_y21JUyh8nsJl7M.wQeFqVXNeLFwuOfHG5ILYH8NFSK5_v9JOepPl4o58T.dc7Pg.Rn pxTzLkgG8QXXgH2sDtCGNKYunf0B7pKd.rKKCVkNlLPCqW40phSMw_c7PHwjxvjiNEG67FH_RIAM yUqw_zGCBEHa75ddh_PWjdVDWcJYqo6CgLejggJmKEvC7BoYUZDwJz2e3SUydqnBmJslqvalwQQ- - X-Sonic-MF: X-Sonic-ID: edde3f38-98c4-4707-81dc-6d9df92b8e6f Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.gq1.yahoo.com with HTTP; Wed, 2 Aug 2023 19:56:58 +0000 Received: by hermes--production-gq1-7d844d8954-qb9gk (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID bbcd901997ee516ccc08a927d0ce0448; Wed, 02 Aug 2023 19:56:53 +0000 (UTC) Content-Type: text/plain; charset=us-ascii List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: sys/modules/Makefile and MACHINE_ARCH vs arm64 (in use) vs aarch64 (not in use) VS. man arch; also COMPAT_FREEBSD32_ENABLED use From: Mark Millard In-Reply-To: Date: Wed, 2 Aug 2023 12:56:42 -0700 Cc: Current FreeBSD , FreeBSD ARM List Content-Transfer-Encoding: quoted-printable Message-Id: <2B0FE8B1-5E53-4E70-9792-15A8E423CA33@yahoo.com> References: To: Warner Losh X-Mailer: Apple Mail (2.3731.700.6) X-Rspamd-Queue-Id: 4RGN6R1ktTz3C7C X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated 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] On Aug 2, 2023, at 11:16, Warner Losh wrote: > Those all look wrong to me. >=20 > Warner=20 >=20 > On Wed, Aug 2, 2023, 11:27 AM Mark Millard wrote: > man arch reports: >=20 > MACHINE MACHINE_CPUARCH MACHINE_ARCH > arm64 aarch64 aarch64 > . . . > arm arm armv6, armv7 >=20 > So I'd not expect arm64 in MACHINE_ARCH . But > sys/modules/Makefile has (from a grep for MACHINE_ARCH): >=20 > .if ${MACHINE_ARCH} =3D=3D "amd64" || ${MACHINE_ARCH} =3D=3D "arm64" > .if ${MACHINE_ARCH} =3D=3D "amd64" || ${MACHINE_ARCH} =3D=3D "arm64" = || ${MACHINE_ARCH:Mpowerpc64*} >=20 >=20 > Another issue may be that COMPAT_FREEBSD32_ENABLED is only > put to use in the Makefile for MACHINE_CPUARCH being i386 > or amd64 : >=20 > .if ${MACHINE_CPUARCH} =3D=3D "i386" || ${MACHINE_CPUARCH} =3D=3D = "amd64" > _agp=3D agp > .if ${MACHINE_CPUARCH} =3D=3D "i386" || = !empty(COMPAT_FREEBSD32_ENABLED) > . . . I'll note that, for example, i386 vs. armv7 do not match for some struct md_ioctl field offsets and the overall size. Mike Karels is looking at getting struct md_ioctl32 correctly matching each of of the contexts: i386, (32-bit) powerpc, and armv7. I do not know if there are other COMPAT_FREEBSD32 adjustments needed for differences in memory layout across the 3 (i386, powerpc, armv7). md_ioctl I learned about via kyua test runs and looking at the background for some things it reported for armv7. I've not found a clear indication of what is expected to work for chroot/lib32 vs. what is not expected to work. It seems one must look in the code and see if one finds conditional material based, in part, on COMPAT_FREEBSD32. It might also be that COMPAT_FREEBSD32 for i386 vs. armv7 vs. powerpc might not be intending identical coverage for all I know. So seeing COMPAT_FREEBSD32 might not be enough to know the intent. =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Wed Aug 2 22:51:08 2023 X-Original-To: freebsd-current@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 4RGRzz1VGQz4d7kv for ; Wed, 2 Aug 2023 22:51:30 +0000 (UTC) (envelope-from pen@lysator.liu.se) Received: from mail.lysator.liu.se (mail.lysator.liu.se [IPv6:2001:6b0:17:f0a0::3]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RGRzj3f0fz3m15; Wed, 2 Aug 2023 22:51:29 +0000 (UTC) (envelope-from pen@lysator.liu.se) Authentication-Results: mx1.freebsd.org; none Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 44D45141D3; Thu, 3 Aug 2023 00:51:20 +0200 (CEST) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id 4332514367; Thu, 3 Aug 2023 00:51:20 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on hermod.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,AWL,HTML_MESSAGE, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.6 X-Spam-Score: -1.0 Received: from smtpclient.apple (unknown [IPv6:2001:9b1:28fa:7900:50ae:3785:3e33:f653]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id F052D14824; Thu, 3 Aug 2023 00:51:18 +0200 (CEST) From: Peter Eriksson Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_58B5A35C-7465-46C1-B6E9-025C34A8A2FE" List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: Review of patch that uses "volatile sig_atomic_t" Date: Thu, 3 Aug 2023 00:51:08 +0200 In-Reply-To: <9A5C0082-2FFD-4B2B-9381-7ACD9EB7C4DF@FreeBSD.org> Cc: Rick Macklem , FreeBSD CURRENT To: David Chisnall References: <9A5C0082-2FFD-4B2B-9381-7ACD9EB7C4DF@FreeBSD.org> X-Mailer: Apple Mail (2.3731.600.7) X-Virus-Scanned: ClamAV using ClamSMTP X-Rspamd-Queue-Id: 4RGRzj3f0fz3m15 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:1653, ipnet:2001:6b0::/32, country:EU]; TAGGED_RCPT(0.00)[] --Apple-Mail=_58B5A35C-7465-46C1-B6E9-025C34A8A2FE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Interesting discussion regarding sig_atomic_t, volatile & stuff. It = seems I opened a can of worms. Sorry :-) Anyway here are the references I had read when suggesting this change: C89: - http://port70.net/~nsz/c/c99/n1256.html#7.14p2 CERT C Coding Standard: - = https://wiki.sei.cmu.edu/confluence/display/c/SIG31-C.+Do+not+access+share= d+objects+in+signal+handlers I=E2=80=99ve also been using "static int foo;=E2=80=9D in my own code = forever before and like you say it works but then I got curious and = started searching to see if there was a more =E2=80=9Ccorrect=E2=80=9D = (and portable) way of doing this) If I read you right then just dropping =E2=80=9Cvolatile=E2=80=9D and = use =E2=80=9Csig_atomic_t=E2=80=9D should be better (and =E2=80=9Cportable= =E2=80=9D for some value of portable, not a problem in this case with = mountd) but using atomic_int from stdatomic.h from C11 is even better? = (volatile sig_atomic_t is from C89 I think). Something like this: > #if __STDC_NO_ATOMICS__ !=3D 1 > /* C11 */ > #include > static atomic_int got_sighup =3D ATOMIC_VAR_INIT(0); >=20 > #else > /* C89 */ > static volatile sig_atomic_t got_sighup =3D 0; > #endif (for portability, not needed for mountd though).=20 https://www.informit.com/articles/article.aspx?p=3D2204014=EF=BF=BC Ah well, time to relearn C again :-) (K&R C was simpler :-) - Peter > On 2 Aug 2023, at 10:12, David Chisnall wrote: >=20 > On 2 Aug 2023, at 00:33, Rick Macklem wrote: >>=20 >> Just trying to understand what you are suggesting... >> 1 - Declare the variable _Atomic(int) OR atomic_int (is there a = preference) and >> not volatile. >=20 > Either is fine (the latter is a typedef for the former). I am not a = huge fan of the typedefs, some people like them, as far as I can tell = it=E2=80=99s purely personal preference. >=20 >> 2 - Is there a need for signal_atomic_fence(memory_order_acquire); = before the >> assignment of the variable in the signal handler. (This exists in >> one place in >> the source tree (bin/dd/misc,c), although for this example, >> neither volatile nor >> _Atomic() are used for the variable's declaration. >=20 > You don=E2=80=99t need a fence if you use an atomic variable. The = fence prevents the compiler reordering things across it, using atomic = operations also prevents this. You might be able to use a fence and not = use an atomic but I=E2=80=99d have to reread the spec very carefully to = convince myself that this didn=E2=80=99t trigger undefined behaviour. >=20 >> 3 - Is there any need for other atomic_XXX() calls where the variable = is used >> outside of the signal handler? >=20 > No. By default, _Atomic variables use sequentially consistent = semantics. You need to use the `atomic_` functions only for explicit = memory orderings, which you might want to do for optimisation (very = unlikely in this case). Reading it outside the signal handler is the = equivalent of doing `atomic_load` with a sequentially consistent memory = order. This is a stronger guarantee than you need, but it=E2=80=99s = unlikely to cause performance problems if you=E2=80=99re doing more than = a few dozen instructions worth of work between checks. >=20 >> In general, it is looking like FreeBSD needs to have a standard way = of dealing >> with this and there will be assorted places that need to be fixed? >=20 > If we used a language that let you build abstractions, that would be = easy (I have a C++ class that provides a static epoch counter that=E2=80=99= s incremented in a signal handler and a local copy for each instance, so = you can check if the signal handler has fired since it was last used. = It=E2=80=99s trivial to reuse in C++ projects but C doesn=E2=80=99t give = you tools for doing this. >=20 > David >=20 >=20 --Apple-Mail=_58B5A35C-7465-46C1-B6E9-025C34A8A2FE Content-Type: multipart/related; type="text/html"; boundary="Apple-Mail=_CE0F325C-78E2-41AE-B8CF-3F116913547F" --Apple-Mail=_CE0F325C-78E2-41AE-B8CF-3F116913547F Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Interesting = discussion regarding sig_atomic_t, volatile & stuff. It seems I = opened a can of worms. Sorry :-)


Anyway here are the references I had read = when suggesting this change:

C89:
- = http://port70.net/~nsz/c/c99/n1256.html#7.14p2

CERT C Coding = Standard:
- = https://wiki.sei.cmu.edu/confluence/display/c/SIG31-C.+Do+not+access+share= d+objects+in+signal+handlers


I=E2=80=99ve also been using "static int = foo;=E2=80=9D in my own code forever before and like you say it works = but then I got curious and started searching to see if there was a more = =E2=80=9Ccorrect=E2=80=9D (and portable) way of doing this)


If I read you = right then just dropping =E2=80=9Cvolatile=E2=80=9D and use = =E2=80=9Csig_atomic_t=E2=80=9D should be better (and =E2=80=9Cportable=E2=80= =9D for some value of portable, not a problem in this case with mountd) = but using atomic_int from stdatomic.h from C11 is even better? (volatile = sig_atomic_t is from C89 I think). Something like this:

#if __STDC_NO_ATOMICS__ = !=3D 1
/* C11 */
#include = <stdatomic.h>
static atomic_int got_sighup =3D = ATOMIC_VAR_INIT(0);

#else
/* C89 = */
static volatile sig_atomic_t got_sighup =3D = 0;
#endif

(for = portability, not needed for mountd = though).