From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from antelope.elm.relay.mailchannels.net (antelope.elm.relay.mailchannels.net [23.83.212.4]) by sourceware.org (Postfix) with ESMTPS id F2C8D3858D37 for ; Mon, 23 Oct 2023 18:43:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F2C8D3858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gotplt.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gotplt.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org F2C8D3858D37 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=23.83.212.4 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1698086613; cv=pass; b=NDOG4OkG78WsBXpea1WQiwnPIzSri2+srUPnvSZGPrGdNCxaNBTUFv7yeA3xvi48edALZW1J9s43uzJnU35S36Wi+WEsQFMKsimsxRctElGCd5WHvy7g4XXi69rv15A/1pKLVZY/0LDEEcS24+UYJTemNAtSWVS/hE9UESLhD4I= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1698086613; c=relaxed/simple; bh=ExpeAjqg8OXo7iUL0kXOgN+8zcNEXVOAhgHGJyTQIvM=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=CNkpm1kW7UXW7vRO0VC65qF8UxifwBZ4ShCMyWtFYHXVw+e1U4iPnjNetLF6h3XzZz8mKy8rpI5/GNAsSUNNRldHg5iIxqRshmg/gBjJbq9BqYVfd8LRv8UWvFFpPRPDEkAnOPrtLx6zC3V1xhw86Fnzl7swc1qqB/Fc3PuzmI0= ARC-Authentication-Results: i=2; server2.sourceware.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id AFE2BC1A45; Mon, 23 Oct 2023 18:43:30 +0000 (UTC) Received: from pdx1-sub0-mail-a202.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 0C75CC1925; Mon, 23 Oct 2023 18:43:30 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1698086610; a=rsa-sha256; cv=none; b=BLDKulL9dttyMBzvOTbocd/W2pBaAkIzere569RUKI+xZ0g12uQ3/Oa4QvgEOTteHqaz6R BFTAbl9T9nEkuhY5Ye9NlxbVKF7izV0nHaN28Few4OJujRVY/3/VcMUgjO4KNr8LYouI/0 gloUVbIlTPusr9eGVUNYb/jktDibSACAdTOMI3yclc6f7l0neIYL1yU+g9+M0GUkvdhNRb TkNRKECCGmvH8e2gkHSxub1fZUThrh2frYF3qL6vSxF16HEyta1s5P/sSemzBLdn1nLx+8 DHTDxbnszf1q+3vgzFghVo5E4uXseNrX8FIUgA5vqyt40FHhG/Kk4ip1uwQ6Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1698086610; 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:dkim-signature; bh=i+IMIsf6Adf9cfOIrkDHqRe5ChyJ1njEIje3kOq9+5k=; b=PQN2/AlxpqjcxMIQXFw3Nx3jbNHX9HdJenBQc0igWcackQo+8jRTWFYjJ4uBXPf9j1ZGb3 mU/HpatEdxUmGG/MDNOzOJv2AAG44zXzsdv/VrxEnzNZWXTfVmappMpfFzPG5uO+DIpMC9 /gcJeKsbsg76SSgqg3y0RyGyn1Gyj7H6hv5XokNhyfuh3sv3TlU/AIKs12W7IgCEUBmhpr hvk/1PxRSiNZ1Dc64TutacX4HCIqo1HNVElzO+oXurh5NqsXtzFnWUbab7RgXFVpsOOfgr 5mqk733S/vYVNhFi0aexpvbPD508dj7wna85dcC5arvIUMLvNi8ge2HzuJd7Qw== ARC-Authentication-Results: i=1; rspamd-6557c4b887-lww4d; auth=pass smtp.auth=dreamhost smtp.mailfrom=siddhesh@gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Gusty-Eyes: 02a1f8ae25c19266_1698086610345_4099094551 X-MC-Loop-Signature: 1698086610345:3845246685 X-MC-Ingress-Time: 1698086610345 Received: from pdx1-sub0-mail-a202.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.104.111.61 (trex/6.9.2); Mon, 23 Oct 2023 18:43:30 +0000 Received: from [192.168.2.12] (bras-vprn-toroon4834w-lp130-02-142-113-138-136.dsl.bell.ca [142.113.138.136]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a202.dreamhost.com (Postfix) with ESMTPSA id 4SDkbj1qltzDC; Mon, 23 Oct 2023 11:43:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gotplt.org; s=dreamhost; t=1698086609; bh=i+IMIsf6Adf9cfOIrkDHqRe5ChyJ1njEIje3kOq9+5k=; h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding; b=aoQoctmeAoQ65Xpw4bZwDg7w0h5GRMa92+IcKgMIzhHh5a4cATf34ZBuXYXNpYudz mfAyg5Hi4pZEOIdX2gXBdy0KLWXB+h5tR41gkqaO7YJHl8HpSwXbJ3Y5T3UchNkTXy LjrwgSZXiHEzMg3QEBBOUjBPYtkrsLynNTlVSyY8dYK2H3G2GbHsmwH265oeczYOqh nd9J/KYG90EGE5ZS0KdzSMxObhmujimwPr2kKvI5cF+o3TpVO9bAtQgLaGzoz1WEE/ oYMDziFqmAk3HTfjGcsT4x5wCqAgW9XUJu961SNKE0lR7e5Q+kW3iZqIo4IgVTupzd CldU6daMKFkmA== Message-ID: <168fea24-844e-4d1a-9361-afb6332b4f11@gotplt.org> Date: Mon, 23 Oct 2023 14:43:28 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: HELP: Will the reordering happen? Re: [V3][PATCH 0/3] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896) Content-Language: en-US To: Martin Uecker , Qing Zhao , Richard Biener , Joseph Myers Cc: Jakub Jelinek , gcc Patches , kees Cook , "isanbard@gmail.com" References: <9DDD0677-BFE7-4733-8C11-0FA8B3C25569@oracle.com> <283B5497-52BD-47D4-BC08-0982AB6740CA@oracle.com> <53e8ed5778d0e908d224d940ddc3d99575b83dd3.camel@tugraz.at> From: Siddhesh Poyarekar In-Reply-To: <53e8ed5778d0e908d224d940ddc3d99575b83dd3.camel@tugraz.at> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3030.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2023-10-23 14:06, Martin Uecker wrote: > We should aim for a good integration with the BDOS pass, so > that it can propagate the information further, e.g. the > following should work: > > struct { int L; char buf[] __counted_by(L) } x; > x.L = N; > x.buf = ...; > char *p = &x->f; > __bdos(p) -> N > > So we need to be smart on how we provide the size > information for x->f to the backend. > > This would also be desirable for the language extension. This is essentially why there need to be frontend rules constraining reordering and reachability semantics of x.L, thus restricting DSE and reordering for it. This is not really a __bdos/__bos question, because that bit is trivial; if the structure is visible, the value is simply x.L. This is also why adding a reference to x.L in __bos/__bdos is not sufficient or even possible in, e.g. the above case you note. Thanks, Sid