On Mon, Oct 23, 2023 at 8:25 PM Song Liu <songliubraving@xxxxxxxx> wrote: > > > > > On Oct 23, 2023, at 5:49 PM, Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx> wrote: > > > > On Mon, Oct 23, 2023 at 3:41 PM Song Liu <song@xxxxxxxxxx> wrote: > >> + > >> + __bpf_kfunc bpf_get_file_xattr(..., const char *name__const_str, > > ... > >> + case KF_ARG_PTR_TO_CONST_STR: > > > > CONST_STR was ok here, but as __const_str suffix is a bit too verbose. > > How about just __str ? I don't think we'll have non-const strings in > > the near future. > > I thought about this. While we don't foresee non-const strings in the > near future, I think __const_str is acceptable. These annotations are > part of the core APIs of kfuncs. As we enabled other subsystems to add > kfuncs without touching BPF core, it makes sense to keep the annoations > as stable as possible. Making __const_str a little shorter doesn't seem > to justify the risk of changing it in the future. > > Also, we already have longer annotations like __refcounted_kptr. So I > personally prefer to keep the annotation as __const_str. Ok. That's fair. Didn't realize that such a long suffix is already in use.