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:   Thu, 9 Feb 2017 08:49:35 +0100
From:   Jiri Pirko <jiri@...nulli.us>
To:     Tom Herbert <tom@...bertland.com>
Cc:     netdev@...r.kernel.org, kernel-team@...com
Subject: Re: [PATCH RFC v2 1/8] xdp: Infrastructure to generalize XDP

Thu, Feb 09, 2017 at 12:41:20AM CET, tom@...bertland.com wrote:
>This patch creates an infrastructure for registering and running code at
>XDP hooks in drivers. This extends and generalizes the original XDP/BPF
>interface. Specifically, it defines a generic xdp_hook structure and a
>set of hooks that can be assigned to devices or napi instances.  These
>hooks are also generic to allow for XDP/BPF programs as well as non-BPF
>code (e.g. kernel code can be written in a module).
>
>An XDP hook is defined by the xdp_hook structure. A pointer to this
>structure is passed into the XDP register function to set up a hook.
>The XDP register function mallocs its own xdp_hook structure and copies
>the values from the xdp_hook passed in. The register function also saves
>the pointer value of the xdp_hook argument; this pointer is used in
>subsequently calls to XDP to identify the registered hook.
>
>The interface is defined in net/xdp.h. This includes the definition of
>xdp_hook, functions to register and unregister hooks on a device
>or individual instances of napi, and xdp_hook_run that is called by
>drivers to run the hooks.
>
>Signed-off-by: Tom Herbert <tom@...bertland.com>
>---
> drivers/net/ethernet/netronome/nfp/nfp_bpf_jit.c |   1 +
> include/linux/filter.h                           |  10 +-
> include/linux/netdev_features.h                  |   3 +-
> include/linux/netdevice.h                        |  16 ++
> include/net/xdp.h                                | 310 +++++++++++++++++++++++
> include/trace/events/xdp.h                       |  31 +++
> kernel/bpf/core.c                                |   1 +
> net/core/Makefile                                |   2 +-
> net/core/dev.c                                   |  53 ++--
> net/core/filter.c                                |   1 +
> net/core/rtnetlink.c                             |  14 +-
> net/core/xdp.c                                   | 304 ++++++++++++++++++++++
> 12 files changed, 711 insertions(+), 35 deletions(-)
> create mode 100644 include/net/xdp.h
> create mode 100644 net/core/xdp.c
>

[...]

>@@ -48,6 +49,36 @@ TRACE_EVENT(xdp_exception,
> 		  __print_symbolic(__entry->act, __XDP_ACT_SYM_TAB))
> );
> 
>+/* Temporaray trace function. This will be renamed to xdp_exception after all

typo

>+ * the calling drivers have been patched.
>+ */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ