From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: [PATCH net 00/10] bpf: offload: check netdev pointer in the drivers and namespace trouble Date: Sun, 19 Nov 2017 20:55:12 -0800 Message-ID: <20171120045522.2188-1-jakub.kicinski@netronome.com> Cc: alexei.starovoitov@gmail.com, daniel@iogearbox.net, Jakub Kicinski To: netdev@vger.kernel.org Return-path: Received: from mail-pf0-f194.google.com ([209.85.192.194]:42967 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751128AbdKTE4H (ORCPT ); Sun, 19 Nov 2017 23:56:07 -0500 Received: by mail-pf0-f194.google.com with SMTP id m88so6408039pfi.9 for ; Sun, 19 Nov 2017 20:56:07 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: Hi! This series addresses some late comments and moves checking if program has been loaded for the correct device to the drivers. There are also some problems with net namespaces which I didn't take into consideration. On the kernel side we will now simply ignore namespace moves. Since the user space API is not reporting any namespace identification we have to remove the ifindex until a correct way of reporting is agreed upon. Jakub Kicinski (10): bpf: offload: add comment warning developers about double destroy bpf: offload: limit offload to cls_bpf and xdp programs only bpf: offload: rename the ifindex field bpf: offload: move offload device validation out to the drivers net: xdp: don't allow device-bound programs in driver mode bpf: turn bpf_prog_get_type() into a wrapper bpf: offload: ignore namespace moves bpftool: revert printing program device bound info bpf: revert report offload info to user space bpf: make bpf_prog_offload_verifier_prep() static inline drivers/net/ethernet/netronome/nfp/bpf/offload.c | 10 ++++-- include/linux/bpf.h | 18 +++++------ include/linux/bpf_verifier.h | 2 +- include/uapi/linux/bpf.h | 8 +---- kernel/bpf/offload.c | 27 +++++++--------- kernel/bpf/syscall.c | 40 ++++++++---------------- net/core/dev.c | 14 ++++++--- net/sched/cls_bpf.c | 8 ++--- tools/bpf/bpftool/prog.c | 31 ------------------ tools/include/uapi/linux/bpf.h | 8 +---- 10 files changed, 56 insertions(+), 110 deletions(-) -- 2.14.1