lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200813014616.6enltdpq6hzlri6r@ast-mbp.dhcp.thefacebook.com>
Date:   Wed, 12 Aug 2020 18:46:16 -0700
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Alan Maguire <alan.maguire@...cle.com>
Cc:     ast@...nel.org, daniel@...earbox.net, andriin@...com, yhs@...com,
        linux@...musvillemoes.dk, andriy.shevchenko@...ux.intel.com,
        pmladek@...e.com, kafai@...com, songliubraving@...com,
        john.fastabend@...il.com, kpsingh@...omium.org, shuah@...nel.org,
        rdna@...com, scott.branden@...adcom.com, quentin@...valent.com,
        cneirabustos@...il.com, jakub@...udflare.com, mingo@...hat.com,
        rostedt@...dmis.org, bpf@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [RFC PATCH bpf-next 2/4] bpf: make BTF show support generic,
 apply to seq files/bpf_trace_printk

On Thu, Aug 06, 2020 at 03:42:23PM +0100, Alan Maguire wrote:
> 
> The bpf_trace_printk tracepoint is augmented with a "trace_id"
> field; it is used to allow tracepoint filtering as typed display
> information can easily be interspersed with other tracing data,
> making it hard to read.  Specifying a trace_id will allow users
> to selectively trace data, eliminating noise.

Since trace_id is not seen in trace_pipe, how do you expect users
to filter by it?
It also feels like workaround. May be let bpf prog print the whole
struct in one go with multiple new lines and call
trace_bpf_trace_printk(buf) once?

Also please add interface into bpf_seq_printf.
BTF enabled struct prints is useful for iterators too
and generalization you've done in this patch pretty much takes it there.

> +/*
> + * Options to control show behaviour.
> + *	- BTF_SHOW_COMPACT: no formatting around type information
> + *	- BTF_SHOW_NONAME: no struct/union member names/types
> + *	- BTF_SHOW_PTR_RAW: show raw (unobfuscated) pointer values;
> + *	  equivalent to %px.
> + *	- BTF_SHOW_ZERO: show zero-valued struct/union members; they
> + *	  are not displayed by default
> + *	- BTF_SHOW_NONEWLINE: include indent, but suppress newline;
> + *	  to be used when a show function implicitly includes a newline.
> + *	- BTF_SHOW_UNSAFE: skip use of bpf_probe_read() to safely read
> + *	  data before displaying it.
> + */
> +#define BTF_SHOW_COMPACT	(1ULL << 0)
> +#define BTF_SHOW_NONAME		(1ULL << 1)
> +#define BTF_SHOW_PTR_RAW	(1ULL << 2)
> +#define BTF_SHOW_ZERO		(1ULL << 3)
> +#define BTF_SHOW_NONEWLINE	(1ULL << 32)
> +#define BTF_SHOW_UNSAFE		(1ULL << 33)

I could have missed it earlier, but what is the motivation to leave the gap
in bits? Just do bit 4 and 5 ?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ