public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Qing Zhao <qing.zhao@oracle.com>
To: Kees Cook <keescook@chromium.org>, "tom@tromey.com" <tom@tromey.com>
Cc: Tom Tromey <tom@tromey.com>, Joseph Myers <josmyers@redhat.com>,
	"richard.guenther@gmail.com" <richard.guenther@gmail.com>,
	Siddhesh Poyarekar <siddhesh@gotplt.org>,
	"uecker@tugraz.at" <uecker@tugraz.at>,
	"isanbard@gmail.com" <isanbard@gmail.com>,
	"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH v8 0/5] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896)
Date: Fri, 29 Mar 2024 19:58:40 +0000	[thread overview]
Message-ID: <D9E350B5-ED3A-47C2-9C7E-11B5666DF8DF@oracle.com> (raw)
In-Reply-To: <202403291215.BEE1F60@keescook>

Hi,  Tom,

Thanks a lot for the comments. 

It’s good to hear that this new attribute might be able to be used to help gdb. 

We might spend some time to study to use this information in other consumers, for example, gdb, in the future, if necessary and possible.  If you have good examples to show the importance of using such information in gdb, please let me know. I’m glad to study a little more. 

At this time, I agree with Kees, it’s better for the initial patches of the “counted-by” support to focus on the the attribute itself and the immediate security consumers, such as array bound sanitizer and dynamic object size, etc. 

So, let’s delay the possible support to gdb in a later patch. 

Does this sound reasonable to you?

Qing



> On Mar 29, 2024, at 15:16, Kees Cook <keescook@chromium.org> wrote:
> 
> On Fri, Mar 29, 2024 at 12:09:15PM -0600, Tom Tromey wrote:
>>>>>>> Qing Zhao <qing.zhao@oracle.com> writes:
>> 
>>> This is the 8th version of the patch.
>> 
>>> compare with the 7th version, the difference are:
>> 
>> [...]
>> 
>> Hi.  I was curious to know if the information supplied by this attribute
>> shows up in the DWARF.  It would be good if it did, because that would
>> let gdb correctly print these arrays without user intervention.
> 
> Does DWARF have such an annotation? Regardless, I think this could be a
> future patch to not hold up landing the initial feature.
> 
> -- 
> Kees Cook


  reply	other threads:[~2024-03-29 19:58 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-29 16:06 Qing Zhao
2024-03-29 16:06 ` [PATCH v8 1/5] Provide counted_by attribute to flexible array member field (PR108896) Qing Zhao
2024-04-10 17:35   ` Joseph Myers
2024-04-10 18:05     ` Qing Zhao
2024-04-10 18:44       ` Joseph Myers
2024-04-10 19:21         ` Qing Zhao
2024-04-10 21:56           ` Joseph Myers
2024-04-11 13:17             ` Qing Zhao
2024-04-10 18:25     ` Martin Uecker
2024-04-10 19:05       ` Martin Uecker
2024-04-10 19:35         ` Qing Zhao
2024-04-11  6:02           ` Martin Uecker
2024-04-11 13:16             ` Qing Zhao
2024-03-29 16:07 ` [PATCH v8 2/5] Convert references with "counted_by" attributes to/from .ACCESS_WITH_SIZE Qing Zhao
2024-04-10 18:36   ` Joseph Myers
2024-04-10 19:38     ` Qing Zhao
2024-04-11 13:27     ` Qing Zhao
2024-03-29 16:07 ` [PATCH v8 3/5] Use the .ACCESS_WITH_SIZE in builtin object size Qing Zhao
2024-04-10 21:45   ` Siddhesh Poyarekar
2024-04-11 13:19     ` Qing Zhao
2024-03-29 16:07 ` [PATCH v8 4/5] Use the .ACCESS_WITH_SIZE in bound sanitizer Qing Zhao
2024-04-10 18:37   ` Joseph Myers
2024-04-10 21:46   ` Siddhesh Poyarekar
2024-04-11 13:22     ` Qing Zhao
2024-03-29 16:07 ` [PATCH v8 5/5] Add the 6th argument to .ACCESS_WITH_SIZE Qing Zhao
2024-04-10 18:38   ` Joseph Myers
2024-04-10 21:48   ` Siddhesh Poyarekar
2024-04-11 13:24     ` Qing Zhao
2024-03-29 18:09 ` [PATCH v8 0/5] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896) Tom Tromey
2024-03-29 19:16   ` Kees Cook
2024-03-29 19:58     ` Qing Zhao [this message]
2024-03-30  0:16       ` Tom Tromey
2024-03-30  0:15     ` Tom Tromey
2024-03-30 13:57 ` Kees Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D9E350B5-ED3A-47C2-9C7E-11B5666DF8DF@oracle.com \
    --to=qing.zhao@oracle.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=isanbard@gmail.com \
    --cc=josmyers@redhat.com \
    --cc=keescook@chromium.org \
    --cc=richard.guenther@gmail.com \
    --cc=siddhesh@gotplt.org \
    --cc=tom@tromey.com \
    --cc=uecker@tugraz.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).