public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Qing Zhao <qing.zhao@oracle.com>
To: Jose Marchesi <jose.marchesi@oracle.com>
Cc: Jakub Jelinek <jakub@redhat.com>,
	richard Biener <richard.guenther@gmail.com>,
	Joseph Myers <joseph@codesourcery.com>,
	Siddhesh Poyarekar <siddhesh@gotplt.org>,
	Martin Uecker <uecker@tugraz.at>,
	Kees Cook <keescook@chromium.org>,
	"isanbard@gmail.com" <isanbard@gmail.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: RFC (V2) the proposal to resolve the missing dependency issue for counted_by attribute
Date: Thu, 9 Nov 2023 17:23:01 +0000	[thread overview]
Message-ID: <8C1B01A5-E51E-4BD1-AED8-E6342DBC9651@oracle.com> (raw)
In-Reply-To: <871qcyub0m.fsf@oracle.com>



> On Nov 9, 2023, at 11:50 AM, Jose Marchesi <jose.marchesi@oracle.com> wrote:
> 
>> 
>> On Thu, Nov 09, 2023 at 03:49:49PM +0000, Qing Zhao wrote:
>>> Is it reasonable to add one option to disable the “counted_by” attribute?
>>> (then no insertion of the new .ACCESS_WITH_SIZE into IL).  
>>> 
>>> The major reason is: some users might want to ignore all the “counted_by” attribute added in the source code,
>>> We need to provide them a way to disable this feature.
>> 
>> -D'counted_by(x)='
>> and/or
>> -D'__counted_by__(x)='
>> ?
> 
> The insertion of .ACCESS_WITH_SIZE collides with the BPF CO-RE
> preserve_access_index implementation.
> 
> I don't think this will be a problem in practice (the BPF program can
> define counted_by to the empty string as Jakub suggests) but we ought to
> at least detect when a data structure featuring a counted_by FMA is
> accessed with access index preservation (either attribute or builtin)
> and either error out or warning out and try to accomodate by turning the
> .ACCESS_WTIH_INDEX back to plain accesses.  We can do either with BPF
> specific backend code.

Yes, I agree that handling this in BPF backend code might be a better approach
 since this is really a BPF CO-RE specific issue.

For the counted_by implementation, I will keep the current design.

But I will add this identified BPF CO-RE issue into the proposal as a known issue for record purpose.

Thanks a lot for raising this issue and the possible solutions.

Qing


      reply	other threads:[~2023-11-09 17:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-07  0:12 Qing Zhao
2023-11-09 15:49 ` Qing Zhao
2023-11-09 15:57   ` Jakub Jelinek
2023-11-09 16:50     ` Jose E. Marchesi
2023-11-09 17:23       ` Qing Zhao [this message]

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=8C1B01A5-E51E-4BD1-AED8-E6342DBC9651@oracle.com \
    --to=qing.zhao@oracle.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=isanbard@gmail.com \
    --cc=jakub@redhat.com \
    --cc=jose.marchesi@oracle.com \
    --cc=joseph@codesourcery.com \
    --cc=keescook@chromium.org \
    --cc=richard.guenther@gmail.com \
    --cc=siddhesh@gotplt.org \
    --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).