On Wed, 30 Jun 2021 22:46:19 +0300 "Yordan Karadzhov (VMware)" <y.karadz@xxxxxxxxx> wrote: > > +int tracefs_kprobe_raw(const char *system, const char *event, > > + const char *addr, const char *format) > > +{ > > + char *str; > > + int ret; > > + > > + errno = EBADMSG; > > + if (!addr || !format) > > + return -1; > > + > > + if (!event) > > + event = addr; > > + > > + if (system) > > + ret = asprintf(&str, "p:%s/%s %s %s\n", > > + system, event, addr, format); > > + else > > + ret = asprintf(&str, "p:%s %s %s\n", > > + event, addr, format); > > I wonder what will be the way to register a "return value" ("r:") > kprobe. Do you consider having a separate API for them? Yes, I was thinking about having a "tracefs_kretprobe_raw()" as well. I also thought of adding a flag in the parameter, but thought that a separate function would be better instead. I wanted to play with this interface before creating the retprobe one. If you are happy with the current design, I can add that too. -- Steve