> 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.

Reply via email to