We can't prevent anyone from doing insane things deliberately, but
we prevent from doing wrong things unconsciously.
Only if a TRACE_EVENT has a field defined as:
__field_ext(char *, name, FILTER_PTR_STR)
Here using FILTER_PTR_STR explicitly, he should know what he's doing.
Anyway, he can make a ptr pointing to unsafe data this way:
TP_STRUCT__entry(
__field(char *, name)
)
TP_printk("%s", name)
--