[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200623130434.GX2428291@smile.fi.intel.com>
Date: Tue, 23 Jun 2020 16:04:34 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Alan Maguire <alan.maguire@...cle.com>
Cc: ast@...nel.org, daniel@...earbox.net, yhs@...com, andriin@...com,
arnaldo.melo@...il.com, kafai@...com, songliubraving@...com,
john.fastabend@...il.com, kpsingh@...omium.org,
linux@...musvillemoes.dk, joe@...ches.com, pmladek@...e.com,
rostedt@...dmis.org, sergey.senozhatsky@...il.com, corbet@....net,
bpf@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org
Subject: Re: [PATCH v3 bpf-next 7/8] bpf: add support for %pT format
specifier for bpf_trace_printk() helper
On Tue, Jun 23, 2020 at 01:07:10PM +0100, Alan Maguire wrote:
> Allow %pT[cNx0] format specifier for BTF-based display of data associated
> with pointer. The unsafe data modifier 'u' - where the source data
> is traversed without copying it to a safe buffer via probe_kernel_read() -
> is not supported.
I think I already saw this data structure definition...
> +/*
> + * struct __btf_ptr is used for %pT (typed pointer) display; the
> + * additional type string/BTF id are used to render the pointer
> + * data as the appropriate type.
> + */
> +struct __btf_ptr {
> + void *ptr;
> + const char *type;
> + __u32 id;
> +};
So, this is 2nd...
> +/*
> + * struct __btf_ptr is used for %pT (typed pointer) display; the
> + * additional type string/BTF id are used to render the pointer
> + * data as the appropriate type.
> + */
> +struct __btf_ptr {
> + void *ptr;
> + const char *type;
> + __u32 id;
> +};
,..and this is 3rd copy. Why?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists