From nobody Mon Jul 3 23:20:41 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 4Qw23h07NKz4lm45 for ; Mon, 3 Jul 2023 23:21:04 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic308-8.consmr.mail.gq1.yahoo.com (sonic308-8.consmr.mail.gq1.yahoo.com [98.137.68.32]) (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 4Qw23f4C2Vz40x6 for ; Mon, 3 Jul 2023 23:21:02 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=mJMPCXu0; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.68.32 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=1688426460; bh=EKJSEhezxG8keWPKC91Pd8D373plftvFv/P1Sc1xQcs=; h=From:Subject:Date:References:To:In-Reply-To:From:Subject:Reply-To; b=mJMPCXu0XgnLO4irBIsaKX4+EcbzHhUAi7YyRxSs4mWCypoT2bDZPexDI16+pEW0Nj5/4vYixCdtYk02wL32qy9kNMOZ0mTGg0UZwoJvGHWCUzb+KP1Aoz2pOYo3O1885qiyxe+Kj+PBRnPqP/BrHyU3+OxaiZm5q1S6jvsrcIAByHWvQpQjTZ1Yh7yshSXmthpqKjp7T++nMZvhlW9c+shFMUPvWgB2BSu+BF/6/2HD5YPEoWaJZcnjpU+0oqZOnUYykaxeoT32QLxD9oauri/hRy9RO/2WcJvk7nF7XhhXYWhgHl8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Hh0Y2JeDwdMvTZa6cumXELtY0G3kEP64iDTJTlXSNd9.x15LhQriqBXCcvkrlNQ5 _Cywh8GzaWrOKpA4j8Gcv28Fc2.6YoXCrKTPD9ziT9eAYe.Wnvqh25UCQhUfNdcrY_0Y5Uhe9bTS _LhhchoVaatnu_MqZXmoL_ZmHkTP9A6FaqRoOgYQAwRC6p9.khG3cT8pFim25SKFUeaHNYS9KbXq _x09DPH.W6N6Kbm2EylD.cungyzNsjim9ij5S1sYxTm4Zhartd.3XWBF.mKrawdZ90J4RKAcIoY4 QDy58u149iKbrexg_dTnMJQn06V4eluwinKDUTaOXgV1snwWqjTZ6u6YLh1UovPPsyO9InpDVI3T 49UoAtt8O9SXsJh3W1coIC9xoeGWPtlIN8.5YeNTddJR4dHhTggb.PBi3uk14o_ebtubXVnP8b4r g5cs.rpP4uMeR_Tcuczsg0ExMWiDtiDHSxJg1VqHquZ1zim2WRM_KqVU1hbMHfv8eef.sIQwE0Hl fZdu7OC6uKy5lfvEpCJz4eOi2ZyxvdFaU21adLKYdokgvy7t9ci0cVAXnMVMAH7O0r4E1WplPCpg r1.sdB_sXwV9XItqJmd45pFXdm7M0phyNAxTRoizkD7VpFWxGHYTwkrGaNxdTAhRLrQ3wGFNH135 k_e927n9prs18onifzAIiYszHoKh2dZ2K1OegNtPvXD435LZavn163N7XqCjyu8kEOFJu5rkVC.U - X-Sonic-MF: X-Sonic-ID: 32ad53c9-da84-4b69-b222-bfa6b7aa208f Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.gq1.yahoo.com with HTTP; Mon, 3 Jul 2023 23:21:00 +0000 Received: by hermes--production-bf1-5d96b4b9f-nmj82 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 4b41d751d9ff6da873c5afab68bd1d83; Mon, 03 Jul 2023 23:20:54 +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: 005aa1743b42 - main - modules: bzero the modspecific_t Date: Mon, 3 Jul 2023 16:20:41 -0700 References: To: Brooks Davis , dev-commits-src-main@freebsd.org In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3731.600.7) X-Spamd-Result: default: False [-3.04 / 15.00]; NEURAL_HAM_LONG(-1.00)[-0.999]; NEURAL_HAM_MEDIUM(-0.99)[-0.993]; NEURAL_HAM_SHORT(-0.55)[-0.548]; 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)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(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.32:from]; BLOCKLISTDE_FAIL(0.00)[98.137.68.32: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]; TO_DN_SOME(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.32:from] X-Rspamd-Queue-Id: 4Qw23f4C2Vz40x6 X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N On Jul 3, 2023, at 15:27, Mark Millard wrote: > Brooks Davis wrote on > Date: Mon, 03 Jul 2023 21:24:11 UTC : >=20 >> On Sat, Jul 01, 2023 at 10:59:22PM +0000, Ka Ho Ng wrote: >>> The branch main has been updated by khng: >>>=20 >>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D005aa1743b42b52fbd49b9d5ec448169= 02b6ee9f >>>=20 >>> commit 005aa1743b42b52fbd49b9d5ec44816902b6ee9f >>> Author: Ka Ho Ng >>> AuthorDate: 2023-07-01 19:41:53 +0000 >>> Commit: Ka Ho Ng >>> CommitDate: 2023-07-01 22:58:46 +0000 >>>=20 >>> modules: bzero the modspecific_t >>>=20 >>> Per https://reviews.llvm.org/D68115, only the first field is >>> zero-initialized, meanwhile other fields are undef. >>>=20 >>> The pattern can be observed on clang as well, that when >>> -ftrivial-auto-var-init=3Dpattern is specified 0xaa is filled for >>> non-active fields, otherwise they are zero-initialized. >>> Technically both are acceptable when using clang. However it >>> would be good to simply bzero the modspecific_t in such case to >>> be strict to the standard. >>=20 >> IMO this is a move in the wrong direction. We should see about >> switching this file to C17 which IIRC removes this bug in the = standard. >>=20 >> Ideally we'd be moving to C23 where we can just do foo =3D {} >> to zero things, but we've got a ways to go... >=20 > Can you point me to where some (draft?) C?? standard material = indicates > that: >=20 > A) pad bytes are to be determined to have a specific value? >=20 > B) union bytes unused by a smaller size field that is the one = initialized > are to be determined to have a specific value? >=20 > My copy of N2176 for ISO/IEC 9899:2017 still has the J.1 Unspecified > behavior wording: >=20 > -- The value of padding bytes when storing values in structures > or unions (6.2.6.1) >=20 > -- The values of bytes that correspond to union members other > than the one last stored into (6.2.6.1) >=20 > As long as those are true, initializer notation is not guaranteed > to avoid memory content leakage for the padding bytes and unused > bytes for smaller union fields. >=20 > (I'll not generate wording to deal with trap representations for such > issues, something C++ avoids.) >=20 I just got a copy of N3096 for ISO/IEC 9899:2023 and it still reports for memcmp (note 379): QUOTE The unused bytes used as padding for purposes of alignment within struture objects take on unspecified values when a value is stored in the object (see 6.2.6.1). Strings shorter than their allocated space and unions can also cause problems in comparison. END QUOTE The J.1 Unspecfied behavior items are still there as well. [These are numbered in the C23 draft: (10) and (11).] Such suggests no "fix" is present in that C23 draft. =3D=3D=3D Mark Millard marklmi at yahoo.com