From nobody Fri Jul 28 01:26:11 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RBqjP74zVz4pTj5 for ; Fri, 28 Jul 2023 01:26:33 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic306-21.consmr.mail.gq1.yahoo.com (sonic306-21.consmr.mail.gq1.yahoo.com [98.137.68.84]) (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 4RBqjK59ztz3rfd for ; Fri, 28 Jul 2023 01:26:29 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b="iuZC/LMx"; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.68.84 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=1690507588; bh=q8ioKQXLGZJkHLRqoBTExsGeF291v/94/nqjk3jugbg=; h=From:Subject:Date:References:To:In-Reply-To:From:Subject:Reply-To; b=iuZC/LMxR9rjFMD920RszX9+nDrEczLP0NL9bnO7oMu26rg2pZUiFdu2cScJopScdIgTalSJnCEvz7JtfYinHVa9Ug4bQ7wZRWgyXy/shlYUD+EASucDy6svPBVderBl9Z0LEmICEBsaScEjc6YUL0Q9hMcrhJn+LEC7kQ1ALMtIDs7lrpgP9VD1PRaY1MpHr1riw7MSALS5/KjHpQy0z6i2OA18qhCK1kh/tBcjL+WINNllSjxEI3GWyfIT0icROimqhb8+8LZMtBEtsIsMNKpA0ih7FseN43apLZ1LjGe8YOxSCW6RuVxK0//UDNDXvOPq0dlkpAYXzneaL8IRoA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1690507588; bh=2v8MrzySmMcwYbkJS1cylIADMvuDfWclIRcamqvLvk7=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=NsscdQk9UqGVa+4EwNZjQVRDXHJqugaVXdFTFEE8Kvh8tMYxkKiZAJ0y7quQHMObcLr7EBpyNfILLhp4XmbEjKPxbrZdyraRZJmc2nSE7Kn5FxXsrqRuohV51ps+mJv9w1P3q83wqlEHP1pqJb6K2e1a6NHzbdNnBe86+2Wpz7I8V/kHGbe7iayNRITR3rBuHqyAq2LtTWDRH7LGPaV5Ua8l76A65gNZN6dFeUQU6mhfnIxFmylIkUjk81MUXIAXvxSMXuywoSSZDVLGaupcglzZRneOL5+EqAhoNvEDv0ibUAx0PCvr7m/0+StGshxB3/QQuSiSP1KGMl9h80ha8Q== X-YMail-OSG: luPd1_EVM1n8oga7mCGKC26WxL_ZcPROjVnOhEY3_jYsYMK4hg4FY5ZOkC6UcZX DFnLwLlinfU4T2Olzs9hBF4ZRlHS9nNe38ybtdcYPviiQ7IkhXzRexP8Y.6LtynMeeV.YFA0qGOt 5GCAlkjer0_K4JlFHEXXqfett2FphyuHc14G4mtTTchaAiddARz12VECq_RPEvTxeyn5x8o0aRr3 VOEpHDBls8rifdQrfNN6aegTS2KrRNQUlAR6LLzCPO9zrSmLH60wgWpgKR6zJR5jZnIQ_SCpB04_ UyPTR3Zn06EzevCumDCjUnP4iEcNDC4pgiY9CmR9r_1eu4RbcyDmLuj8N6dG8uFQHQKhfwos4Nkq sW.DPn6NUtsBvziKxB44d_W0YUvS1X75de9usLSgdx2sMmybZo3yD1KFk7NOMN1ZTSsAImkNOhD_ Tco.2ZZZNE6zLNtrH86NyMBVUT0fchrPoHQAjo_FayjWITI3GDJ7CnYeUjG33wbcTEApJIZ4eqSo d.SmqjeX6Vhr5txI.g4.MKvG1fEX41PpC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j5fTgVVr3R0lfS5mT1vVwTYhWfCcz VnEoy9T7TZ3zp6b4p2iSRn.58lY_v46gBWIgtEAChSUtqnM4ihsPe8efR.shh7rjvNUKCOHZlxFc QeerfplKlKX_7I_E1w1UXH95b0mZ0BuncugzfgLoPJNbiLYA.YiV6.ZJMGWOpcbVo8e2RzH067TB km72wZa_XkomYYF7XKtmdqnuIpxE493CNTN_5gNU_wxZLLteN0IthjjVZVMhYMgvsM4YlUOEmmlc bgNOFG1tj8OY6742do.YsKAwkhH4xAQ7nb.M9A1B8OkbErrLNUtEcmRFSL6FIWu_E56MzsEhhCOe 5O94empuGBWDLD9rV_RiglLTkVzHOoohRDShTXFndw7hjrroZn_ZuNi5PyL935aONdMFS3RdD8Vy GJgP1sjv7wK9om8lPmgbfjhq_35tYKztNMAXdNqCpB1Kyk545O.w.7XWOsV91WHhGJ17MXNLwVgd NdM_iPwSWdWIxM2IDsPJ05xv9NPY69XhkQYPxORpjuPmzgmj7IczLrzh53RV7BCQLD_KSBB.78LE d5si52g50xCjXlyo32S8SQtlPUJm5CgITUbibCzGvnjtFsIr4_7VGm4GssX_zgkgjwKfyht53Ir_ gAq0DecwqJE0fraYgK8pj81INx6g2IljZbvzeIqNRd1QLXNj7dPxWuqefcxPk.3V6qnvfglTi X-Sonic-MF: X-Sonic-ID: e7d12b2d-3b3a-4c01-92aa-4918022e94c6 Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.gq1.yahoo.com with HTTP; Fri, 28 Jul 2023 01:26:28 +0000 Received: by hermes--production-bf1-7c4db57b6-bc5pm (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 97f4c8144fa20904c892405ca7c2b25c; Fri, 28 Jul 2023 01:26:23 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: git: 831b1ff7913f - main - UFS/FFS: Migrate to modern uintXX_t from u_intXX_t. Date: Thu, 27 Jul 2023 18:26:11 -0700 References: To: "mckusick@freebsd.org" , dev-commits-src-main@freebsd.org In-Reply-To: Message-Id: <56D46196-6F4D-4C3E-AFD0-53FD43A984C4@yahoo.com> X-Mailer: Apple Mail (2.3731.600.7) X-Spamd-Result: default: False [-1.52 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.98)[-0.984]; NEURAL_SPAM_LONG(0.96)[0.960]; 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]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; RCVD_IN_DNSWL_NONE(0.00)[98.137.68.84:from]; BLOCKLISTDE_FAIL(0.00)[98.137.68.84:server fail]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; 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.68.84:from] X-Rspamd-Queue-Id: 4RBqjK59ztz3rfd X-Spamd-Bar: - On Jul 27, 2023, at 17:22, Mark Millard wrote: > Kirk McKusick wrote on > Date: Thu, 27 Jul 2023 22:27:49 UTC : >=20 >> The branch main has been updated by mckusick: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D831b1ff7913fb0b317a258a43dce5abe= fee03a31 >>=20 >> commit 831b1ff7913fb0b317a258a43dce5abefee03a31 >> Author: Kirk McKusick >> AuthorDate: 2023-07-27 22:26:01 +0000 >> Commit: Kirk McKusick >> CommitDate: 2023-07-27 22:27:36 +0000 >>=20 >> UFS/FFS: Migrate to modern uintXX_t from u_intXX_t. >>=20 >> As per = https://lists.freebsd.org/archives/freebsd-scsi/2023-July/000257.html >> move to the modern uintXX_t. While here also migrate u_char to = uint8_t. >> Where other kernel interfaces allow, migrate u_long to uint64_t. >=20 > Looks dangerous to me . . . >=20 > u_long (a.k.a. unsigned long) on armv7, for example, is > 32 bits, not 64. Same for i386, I expect. I forgot to mention 32-bit powerpc and could have just quoted: LP64 ILP32 counterpart amd64 i386 powerpc64 powerpc aarch64 armv6/armv7 and/or: On all supported architectures: Type Size short 2 int 4 long sizeof(void*) long long 8 float 4 double 8 > For reference, from /usr/include/sys/types.h : >=20 > #if __BSD_VISIBLE > typedef unsigned char u_char; > typedef unsigned short u_short; > typedef unsigned int u_int; > typedef unsigned long u_long; > #ifndef _KERNEL > typedef unsigned short ushort; /* Sys V compatibility */ > typedef unsigned int uint; /* Sys V compatibility */ > #endif > #endif >=20 > Quoting FreeBSD's man arch: >=20 > ILP32 int, long, void * types machine representations all have = 4-byte > size. >=20 > LP64 int type machine representation uses 4 bytes, while long = and > void * are 8 bytes. >=20 > armv7 is ILP32, as, likely, i386 would be as well. >=20 > Note that u_int is 32 bits for both ILP32 and LP64, not 64. > But there are a lot of u_int -> uint64_t replacements in > the update. >=20 >> No functional changes intended. >=20 > It would appear that it would take a bunch of validation to know if > the size changes actually make no actual difference on the > architectures where some sizes changed. >=20 >> MFC-after: 1 week >> Sponsored-by: The FreeBSD Foundation > . . . >=20 I also noticed an int vs. uint64_t switch (but the signed status does not change the sizeof(...) results here vs. u_int / unsigned int): - len =3D roundup2(howmany(fs->fs_ncg, NBBY), sizeof(int)); + len =3D roundup2(howmany(fs->fs_ncg, NBBY), sizeof(uint64_t)); =3D=3D=3D Mark Millard marklmi at yahoo.com