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:   Wed, 16 Aug 2017 07:15:15 +0200
From:   Jesper Dangaard Brouer <brouer@...hat.com>
To:     David Ahern <dsahern@...il.com>
Cc:     netdev@...r.kernel.org, pstaszewski@...are.pl, brouer@...hat.com
Subject: Re: [PATCH] qdisc: add tracepoint qdisc:qdisc_dequeue for dequeued
 SKBs

On Tue, 15 Aug 2017 20:31:44 -0600
David Ahern <dsahern@...il.com> wrote:

> On 8/15/17 1:11 PM, Jesper Dangaard Brouer wrote:
> > diff --git a/include/trace/events/qdisc.h b/include/trace/events/qdisc.h
> > new file mode 100644
> > index 000000000000..60d0d8bd336d
> > --- /dev/null
> > +++ b/include/trace/events/qdisc.h
> > @@ -0,0 +1,50 @@
> > +#undef TRACE_SYSTEM
> > +#define TRACE_SYSTEM qdisc
> > +
> > +#if !defined(_TRACE_QDISC_H) || defined(TRACE_HEADER_MULTI_READ)
> > +#define _TRACE_QDISC_H_
> > +
> > +#include <linux/skbuff.h>
> > +#include <linux/netdevice.h>
> > +#include <linux/tracepoint.h>
> > +#include <linux/ftrace.h>
> > +
> > +TRACE_EVENT(qdisc_dequeue,
> > +
> > +	TP_PROTO(struct Qdisc *qdisc, const struct netdev_queue *txq,
> > +		 int packets, struct sk_buff *skb),
> > +
> > +	TP_ARGS(qdisc, txq, packets, skb),
> > +
> > +	TP_STRUCT__entry(
> > +		__field(	struct Qdisc *,		qdisc	)
> > +		__field(const	struct netdev_queue *,	txq	)  
> 
> Why save qdisc and txq pointers in the tracepoint data?

I wanted to attach a BPF program, and allow it to dereference these
pointers.  Which is done via bpf_probe_read like:

 unsigned int qdisc_flags; 
 bpf_probe_read(&qdisc_flags, sizeof(qdisc_flags), &ctx->qdisc->flags);


-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ