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]
Date:   Tue, 22 Aug 2017 23:30:21 +0200
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Jesper Dangaard Brouer <brouer@...hat.com>, netdev@...r.kernel.org
CC:     John Fastabend <john.fastabend@...il.com>
Subject: Re: [PATCH net-next 5/5] xdp: get tracepoints xdp_exception and xdp_redirect
 in sync

On 08/22/2017 10:47 PM, Jesper Dangaard Brouer wrote:
> Remove the net_device string name from the xdp_exception tracepoint,
> like the xdp_redirect tracepoint.
>
> Align the TP_STRUCT to have common entries between these two
> tracepoint.
>
> Signed-off-by: Jesper Dangaard Brouer <brouer@...hat.com>
> ---
>   include/trace/events/xdp.h |   24 ++++++++++++------------
>   1 file changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/include/trace/events/xdp.h b/include/trace/events/xdp.h
> index 7511bed80558..6495b0d9d5c7 100644
> --- a/include/trace/events/xdp.h
> +++ b/include/trace/events/xdp.h
> @@ -31,22 +31,22 @@ TRACE_EVENT(xdp_exception,
>   	TP_ARGS(dev, xdp, act),
>
>   	TP_STRUCT__entry(
> -		__string(name, dev->name)
>   		__array(u8, prog_tag, 8)
>   		__field(u32, act)
> +		__field(int, ifindex)
>   	),
>
>   	TP_fast_assign(
>   		BUILD_BUG_ON(sizeof(__entry->prog_tag) != sizeof(xdp->tag));
>   		memcpy(__entry->prog_tag, xdp->tag, sizeof(xdp->tag));
> -		__assign_str(name, dev->name);
> -		__entry->act = act;
> +		__entry->act		= act;
> +		__entry->ifindex	= dev->ifindex;
>   	),
>
[...]
>   TRACE_EVENT(xdp_redirect,
> @@ -57,26 +57,26 @@ TRACE_EVENT(xdp_redirect,
>   	TP_ARGS(from_index, to_index, xdp, act, err),
>
>   	TP_STRUCT__entry(
> -		__field(int, from_index)
> -		__field(int, to_index)
>   		__array(u8, prog_tag, 8)
>   		__field(u32, act)
> +		__field(int, from_index)
> +		__field(int, to_index)
>   		__field(int, err)
>   	),
>
>   	TP_fast_assign(
>   		BUILD_BUG_ON(sizeof(__entry->prog_tag) != sizeof(xdp->tag));
>   		memcpy(__entry->prog_tag, xdp->tag, sizeof(xdp->tag));
> +		__entry->act		= act;
>   		__entry->from_index	= from_index;
>   		__entry->to_index	= to_index;
> -		__entry->act = act;

If you already get them in sync, could you also make it consistent
that for both tracepoints in TP_ARGS() we use either ifindex
directly or device pointer and extract it from TP_fast_assign().
Right now, it's mixed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ