Re: [v3,net-next,2/2] tls: Use correct sk->sk_prot for IPV6

2018-02-26 Thread Boris Pismenny
Hi Guenter, On 2/23/2018 11:52 PM, Guenter Roeck wrote: Hi Ilya, On Mon, Sep 04, 2017 at 01:14:01PM +0300, Ilya Lesokhin wrote: The tls ulp overrides sk->prot with a new tls specific proto structs. The tls specific structs were previously based on the ipv4 specific tcp_prot sturct. As a result

inconsistent lock state with usbnet/asix usb ethernet and xhci

2018-02-26 Thread Marek Szyprowski
Hi I've noticed that USBnet/ASIX AX88772B USB driver produces deplock kernel warning ("inconsistent lock state") on Chromebook2 Peach-PIT board. No special activity is needed to reproduce this issue, it happens almost on every boot. ASIX USB ethernet is connected to XHCI USB host controller on th

Re: [PATCH bpf-next v8 05/11] seccomp,landlock: Enforce Landlock programs per process hierarchy

2018-02-26 Thread Alexei Starovoitov
On Tue, Feb 27, 2018 at 05:20:55AM +, Andy Lutomirski wrote: > On Tue, Feb 27, 2018 at 4:54 AM, Alexei Starovoitov > wrote: > > On Tue, Feb 27, 2018 at 04:40:34AM +, Andy Lutomirski wrote: > >> On Tue, Feb 27, 2018 at 2:08 AM, Alexei Starovoitov > >> wrote: > >> > On Tue, Feb 27, 2018 at

Re: [PATCH bpf-next v8 05/11] seccomp,landlock: Enforce Landlock programs per process hierarchy

2018-02-26 Thread Andy Lutomirski
On Tue, Feb 27, 2018 at 4:54 AM, Alexei Starovoitov wrote: > On Tue, Feb 27, 2018 at 04:40:34AM +, Andy Lutomirski wrote: >> On Tue, Feb 27, 2018 at 2:08 AM, Alexei Starovoitov >> wrote: >> > On Tue, Feb 27, 2018 at 01:41:15AM +0100, Mickaël Salaün wrote: >> >> The seccomp(2) syscall can be u

Re: [PATCH bpf-next v8 08/11] landlock: Add ptrace restrictions

2018-02-26 Thread Andy Lutomirski
> On Feb 26, 2018, at 8:17 PM, Andy Lutomirski wrote: > >> On Tue, Feb 27, 2018 at 12:41 AM, Mickaël Salaün wrote: >> A landlocked process has less privileges than a non-landlocked process >> and must then be subject to additional restrictions when manipulating >> processes. To be allowed to u

Re: [PATCH bpf-next v8 05/11] seccomp,landlock: Enforce Landlock programs per process hierarchy

2018-02-26 Thread Alexei Starovoitov
On Tue, Feb 27, 2018 at 04:40:34AM +, Andy Lutomirski wrote: > On Tue, Feb 27, 2018 at 2:08 AM, Alexei Starovoitov > wrote: > > On Tue, Feb 27, 2018 at 01:41:15AM +0100, Mickaël Salaün wrote: > >> The seccomp(2) syscall can be used by a task to apply a Landlock program > >> to itself. As a sec

Re: [net-next v3 0/2] eBPF seccomp filters

2018-02-26 Thread Andy Lutomirski
> On Feb 26, 2018, at 8:38 PM, Kees Cook wrote: > > On Mon, Feb 26, 2018 at 8:19 PM, Andy Lutomirski wrote: >>> On Feb 26, 2018, at 3:20 PM, Kees Cook wrote: >>> >>> On Mon, Feb 26, 2018 at 3:04 PM, Alexei Starovoitov >>> wrote: > On Mon, Feb 26, 2018 at 07:26:54AM +, Sargun Dhillon

Re: [PATCH bpf-next v8 05/11] seccomp,landlock: Enforce Landlock programs per process hierarchy

2018-02-26 Thread Andy Lutomirski
On Tue, Feb 27, 2018 at 2:08 AM, Alexei Starovoitov wrote: > On Tue, Feb 27, 2018 at 01:41:15AM +0100, Mickaël Salaün wrote: >> The seccomp(2) syscall can be used by a task to apply a Landlock program >> to itself. As a seccomp filter, a Landlock program is enforced for the >> current task and all

Re: [net-next v3 0/2] eBPF seccomp filters

2018-02-26 Thread Kees Cook
On Mon, Feb 26, 2018 at 8:19 PM, Andy Lutomirski wrote: >> On Feb 26, 2018, at 3:20 PM, Kees Cook wrote: >> >> On Mon, Feb 26, 2018 at 3:04 PM, Alexei Starovoitov >> wrote: On Mon, Feb 26, 2018 at 07:26:54AM +, Sargun Dhillon wrote: This patchset enables seccomp filters to be writt

Re: [net] cb0789fd8b: INFO:task_blocked_for_more_than#seconds

2018-02-26 Thread Florian Fainelli
/commits/Andrew-Lunn/net-phy-Restore-phy_resume-locking-assumption/20180226-220932 This was testing v1 of Andrew's patch which had a mistake leading to a deadlock, v2 does not have that problem. -- Florian

Re: [PATCH bpf-next v8 00/11] Landlock LSM: Toward unprivileged sandboxing

2018-02-26 Thread Andy Lutomirski
On Tue, Feb 27, 2018 at 12:41 AM, Mickaël Salaün wrote: > Hi, > > This eight series is a major revamp of the Landlock design compared to > the previous series [1]. This enables more flexibility and granularity > of access control with file paths. It is now possible to enforce an > access control a

Re: [net-next v3 1/2] bpf, seccomp: Add eBPF filter capabilities

2018-02-26 Thread Kees Cook
On Mon, Feb 26, 2018 at 8:08 PM, Sargun Dhillon wrote: > On Mon, Feb 26, 2018 at 7:57 PM, Tycho Andersen wrote: >> On Mon, Feb 26, 2018 at 07:49:48PM -0800, Sargun Dhillon wrote: >>> On Mon, Feb 26, 2018 at 4:54 PM, Tycho Andersen wrote: >>> > On Mon, Feb 26, 2018 at 07:27:05AM +, Sargun Dhi

Re: [PATCH bpf-next 3/8] tools: bpftool: detect sub-programs from the eBPF sequence

2018-02-26 Thread Alexei Starovoitov
On Mon, Feb 26, 2018 at 08:12:49PM -0800, Jakub Kicinski wrote: > From: Jiong Wang > > This patch detect all sub-programs from the eBPF sequence and keep the > information in the new CFG data structure. > > The detection algorithm is basically the same as the one in verifier except > we need to

Re: [net-next v3 0/2] eBPF seccomp filters

2018-02-26 Thread Andy Lutomirski
> On Feb 26, 2018, at 3:20 PM, Kees Cook wrote: > > On Mon, Feb 26, 2018 at 3:04 PM, Alexei Starovoitov > wrote: >>> On Mon, Feb 26, 2018 at 07:26:54AM +, Sargun Dhillon wrote: >>> This patchset enables seccomp filters to be written in eBPF. Although, this >>> [...] >> The main statement I wa

Re: [PATCH bpf-next v8 08/11] landlock: Add ptrace restrictions

2018-02-26 Thread Andy Lutomirski
On Tue, Feb 27, 2018 at 12:41 AM, Mickaël Salaün wrote: > A landlocked process has less privileges than a non-landlocked process > and must then be subject to additional restrictions when manipulating > processes. To be allowed to use ptrace(2) and related syscalls on a > target process, a landloc

Re: [PATCH bpf-next 0/2] Few BPF kselftest improvements

2018-02-26 Thread Alexei Starovoitov
On Mon, Feb 26, 2018 at 10:34:31PM +0100, Daniel Borkmann wrote: > First one unifies the often repeated rlimit handling and the > second one enables and adds run-time tests for BPF tail calls > which provides useful coverage in particular for JITs. Applied to bpf-next, thanks Daniel.

[PATCH bpf-next 2/8] tools: bpftool: factor out xlated dump related code into separate file

2018-02-26 Thread Jakub Kicinski
From: Jiong Wang This patch factors out those code of dumping xlated eBPF instructions into xlated_dumper.[h|c]. They are quite independent dumper functions, so better to be kept separately. New dumper support will be added in later patches in this set. Signed-off-by: Jiong Wang Acked-by: Jak

[PATCH bpf-next 4/8] tools: bpftool: partition basic-block for each function in the CFG

2018-02-26 Thread Jakub Kicinski
From: Jiong Wang This patch partition basic-block for each function in the CFG. The algorithm is simple, we identify basic-block head in a first traversal, then second traversal to identify the tail. We could build extended basic-block (EBB) in next steps. EBB could make the graph more readable

[PATCH bpf-next 7/8] tools: bpftool: new command-line option and documentation for 'visual'

2018-02-26 Thread Jakub Kicinski
From: Jiong Wang This patch adds new command-line option for visualizing the xlated eBPF sequence. Documentations are updated accordingly. Usage: bpftool prog dump xlated id 2 visual Reviewed-by: Quentin Monnet Signed-off-by: Jiong Wang Acked-by: Jakub Kicinski --- tools/bpf/bpftool/Doc

[PATCH bpf-next 8/8] tools: bpftool: add bash completion for CFG dump

2018-02-26 Thread Jakub Kicinski
From: Quentin Monnet Add bash completion for the "visual" keyword used for dumping the CFG of eBPF programs with bpftool. Make sure we only complete with this keyword when we dump "xlated" (and not "jited") instructions. Acked-by: Jiong Wang Signed-off-by: Quentin Monnet Acked-by: Jakub Kicins

[PATCH bpf-next 1/8] tools: bpftool: remove unnecessary 'if' to reduce indentation

2018-02-26 Thread Jakub Kicinski
From: Jiong Wang It is obvious we could use 'else if' instead of start a new 'if' in the touched code. Signed-off-by: Jiong Wang Acked-by: Jakub Kicinski --- tools/bpf/bpftool/prog.c | 38 ++ 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/t

[PATCH bpf-next 0/8] tools: bpftool: visualization support for eBPF program

2018-02-26 Thread Jakub Kicinski
Jiong says: This patch set is an application of CFG information on eBPF program visualization. It presents some initial code for building CFG information from eBPF instruction sequences. After we get eBPF program bytecode, we do sub-program detection and basic-block partition. These information t

[PATCH bpf-next 3/8] tools: bpftool: detect sub-programs from the eBPF sequence

2018-02-26 Thread Jakub Kicinski
From: Jiong Wang This patch detect all sub-programs from the eBPF sequence and keep the information in the new CFG data structure. The detection algorithm is basically the same as the one in verifier except we need to use insn->off instead of insn->imm to get the pc-relative call offset. Because

[PATCH bpf-next 5/8] tools: bpftool: add out edges for each basic-block

2018-02-26 Thread Jakub Kicinski
From: Jiong Wang This patch adds out edges for each basic-block. We will need these out edges to finish the .dot graph drawing. Signed-off-by: Jiong Wang Acked-by: Jakub Kicinski --- tools/bpf/bpftool/cfg.c | 162 +++- 1 file changed, 160 insertions

[PATCH bpf-next 6/8] tools: bpftool: generate .dot graph from CFG information

2018-02-26 Thread Jakub Kicinski
From: Jiong Wang This patch let bpftool print .dot graph file into stdout. This graph is generated by the following steps: - iterate through the function list. - generate basic-block(BB) definition for each BB in the function. - draw out edges to connect BBs. This patch is the initial su

Re: [net-next v3 1/2] bpf, seccomp: Add eBPF filter capabilities

2018-02-26 Thread Sargun Dhillon
On Mon, Feb 26, 2018 at 7:57 PM, Tycho Andersen wrote: > On Mon, Feb 26, 2018 at 07:49:48PM -0800, Sargun Dhillon wrote: >> On Mon, Feb 26, 2018 at 4:54 PM, Tycho Andersen wrote: >> > On Mon, Feb 26, 2018 at 07:27:05AM +, Sargun Dhillon wrote: >> >> +config SECCOMP_FILTER_EXTENDED >> >> +

Re: [net-next v3 0/2] eBPF seccomp filters

2018-02-26 Thread Tycho Andersen
On Mon, Feb 26, 2018 at 07:46:19PM -0800, Sargun Dhillon wrote: > On Mon, Feb 26, 2018 at 5:01 PM, Tycho Andersen wrote: > > On Mon, Feb 26, 2018 at 03:20:15PM -0800, Kees Cook wrote: > >> On Mon, Feb 26, 2018 at 3:04 PM, Alexei Starovoitov > >> wrote: > >> > On Mon, Feb 26, 2018 at 07:26:54AM +0

Re: [PATCH bpf] bpf, ppc64: fix out of bounds access in tail call

2018-02-26 Thread Alexei Starovoitov
On Mon, Feb 26, 2018 at 10:00:47PM +0100, Daniel Borkmann wrote: > While working on 16338a9b3ac3 ("bpf, arm64: fix out of bounds access in > tail call") I noticed that ppc64 JIT is partially affected as well. While > the bound checking is correctly performed as unsigned comparison, the > register w

Re: [net-next v3 1/2] bpf, seccomp: Add eBPF filter capabilities

2018-02-26 Thread Tycho Andersen
On Mon, Feb 26, 2018 at 07:49:48PM -0800, Sargun Dhillon wrote: > On Mon, Feb 26, 2018 at 4:54 PM, Tycho Andersen wrote: > > On Mon, Feb 26, 2018 at 07:27:05AM +, Sargun Dhillon wrote: > >> +config SECCOMP_FILTER_EXTENDED > >> + bool "Extended BPF seccomp filters" > >> + depends on SEC

Re: [net-next v3 1/2] bpf, seccomp: Add eBPF filter capabilities

2018-02-26 Thread Sargun Dhillon
On Mon, Feb 26, 2018 at 4:54 PM, Tycho Andersen wrote: > On Mon, Feb 26, 2018 at 07:27:05AM +, Sargun Dhillon wrote: >> +config SECCOMP_FILTER_EXTENDED >> + bool "Extended BPF seccomp filters" >> + depends on SECCOMP_FILTER && BPF_SYSCALL >> + depends on !CHECKPOINT_RESTORE > > Why

Re: [net-next v3 0/2] eBPF seccomp filters

2018-02-26 Thread Sargun Dhillon
On Mon, Feb 26, 2018 at 5:01 PM, Tycho Andersen wrote: > On Mon, Feb 26, 2018 at 03:20:15PM -0800, Kees Cook wrote: >> On Mon, Feb 26, 2018 at 3:04 PM, Alexei Starovoitov >> wrote: >> > On Mon, Feb 26, 2018 at 07:26:54AM +, Sargun Dhillon wrote: >> >> This patchset enables seccomp filters to

Re: [PATCH] net: make tc-police action MTU behavior match documentation

2018-02-26 Thread Cong Wang
On Mon, Feb 26, 2018 at 12:10 PM, Andrew Collins wrote: > The man page for tc-police states that the MTU defaults to > unlimited if peakrate is not specified, but it actually defaults > to 2047. I don't find such statement from the man page: http://man7.org/linux/man-pages/man8/tc-police.8.html

Re: [PATCH v2 net] net: phy: Restore phy_resume() locking assumption

2018-02-26 Thread Florian Fainelli
On February 26, 2018 4:56:06 PM PST, Andrew Lunn wrote: >commit f5e64032a799 ("net: phy: fix resume handling") changes the >locking semantics for phy_resume() such that the caller now needs to >hold the phy mutex. Not all call sites were adopted to this new >semantic, resulting in warnings from th

Re: [PATCH net-next] net/ncsi: Add generic netlink family

2018-02-26 Thread Samuel Mendoza-Jonas
On Mon, 2018-02-26 at 11:31 -0500, David Miller wrote: > From: Samuel Mendoza-Jonas > Date: Fri, 23 Feb 2018 15:15:18 +1100 > > > + * @NCSI_CMD_SET_INTERFACE: set preferred package and channel combination. > > + * Requires NCSI_ATTR_IFINDEX and the preferred NCSI_ATTR_PACKAGE_ID and > > + * o

Re: [RFC PATCH v2] ptr_ring: linked list fallback

2018-02-26 Thread Jason Wang
On 2018年02月27日 04:34, Michael S. Tsirkin wrote: On Mon, Feb 26, 2018 at 11:15:42AM +0800, Jason Wang wrote: On 2018年02月26日 09:17, Michael S. Tsirkin wrote: So pointer rings work fine, but they have a problem: make them too small and not enough entries fit. Make them too large and you start f

Re: [net PATCH 1/4] virtio_net: disable XDP_REDIRECT in receive_mergeable() case

2018-02-26 Thread Jason Wang
On 2018年02月27日 10:25, Jason Wang wrote: On 2018年02月27日 08:40, Michael S. Tsirkin wrote: IMHO we should consider NOT supporting XDP in receive_mergeable() at all, because the principles behind XDP are to gain speed by (1) code simplicity, (2) sacrificing memory and (3) where possible moving r

Re: [net PATCH 1/4] virtio_net: disable XDP_REDIRECT in receive_mergeable() case

2018-02-26 Thread Jason Wang
On 2018年02月27日 08:40, Michael S. Tsirkin wrote: IMHO we should consider NOT supporting XDP in receive_mergeable() at all, because the principles behind XDP are to gain speed by (1) code simplicity, (2) sacrificing memory and (3) where possible moving runtime checks to setup time. These princip

Re: [net-next 1/7] i40e: link_down_on_close private flag support

2018-02-26 Thread Jakub Kicinski
On Mon, 26 Feb 2018 13:39:25 -0800, Jeff Kirsher wrote: > From: Mariusz Stachura > > This patch introduces new ethtool private flag used for > forcing true link state. Function i40e_force_link_state that implements > this functionality was added, it sets phy_type = 0 in order to > work-around fir

http://www.skbuff.net/iputils/iputils-current.tar.bz2 gives 404 error.

2018-02-26 Thread Graph Worlok
I tried posting this last week, but it seems to have been lost. Did somebody forget to migrate part of a script to correctly link -current against the latest tarball at http://www.skbuff.net/iputils/ ? Its referenced as the source location for ping in just about any distro i can get my hands on.

Re: [PATCH bpf-next v2] samples/bpf: Add program for CPU state statistics

2018-02-26 Thread Leo Yan
On Mon, Feb 26, 2018 at 11:26:52AM +0100, Daniel Borkmann wrote: > On 02/26/2018 02:19 AM, Leo Yan wrote: [...] > > CPU states statistics: > > state(ms) cstate-0cstate-1cstate-2pstate-0pstate-1 > > pstate-2pstate-3pstate-4 > > CPU-0 767 6111111863

Re: [PATCH bpf-next v8 05/11] seccomp,landlock: Enforce Landlock programs per process hierarchy

2018-02-26 Thread Alexei Starovoitov
On Tue, Feb 27, 2018 at 01:41:15AM +0100, Mickaël Salaün wrote: > The seccomp(2) syscall can be used by a task to apply a Landlock program > to itself. As a seccomp filter, a Landlock program is enforced for the > current task and all its future children. A program is immutable and a > task can onl

Re: [PATCH net] r8152: fix tx packets accounting

2018-02-26 Thread David Miller
From: Eric Dumazet Date: Sun, 25 Feb 2018 19:12:10 -0800 > From: Eric Dumazet > > r8152 driver handles TSO packets (limited to ~16KB) quite well, > but pretends each TSO logical packet is a single packet on the wire. > > There is also some error since headers are accounted once, but > error ra

Re: [net-next 00/13][pull request] 10GbE Intel Wired LAN Driver Updates 2018-02-26

2018-02-26 Thread David Miller
From: Jeff Kirsher Date: Mon, 26 Feb 2018 10:07:43 -0800 > This series contains updates to ixgbe and ixgbevf only. ... > Emil updates ixgbevf with several features and improvements done in > other drivers, starting with the handling of page addresses so that we > always refer to them using a voi

Re: [next-queue PATCH 7/8] igb: Add support for adding offloaded clsflower filters

2018-02-26 Thread Vinicius Costa Gomes
Hi, Florian Fainelli writes: > On 02/26/2018 04:40 PM, Vinicius Costa Gomes wrote: >> Hi, >> >> Florian Fainelli writes: >> >>> On February 23, 2018 5:20:35 PM PST, Vinicius Costa Gomes >>> wrote: This allows filters added by tc-flower and specifying MAC addresses, Ethernet types,

Re: [PATCH bpf-next v8 01/11] fs,security: Add a security blob to nameidata

2018-02-26 Thread Al Viro
On Tue, Feb 27, 2018 at 12:57:21AM +, Al Viro wrote: > On Tue, Feb 27, 2018 at 01:41:11AM +0100, Mickaël Salaün wrote: > > The function current_nameidata_security(struct inode *) can be used to > > retrieve a blob's pointer address tied to the inode being walk through. > > This enable to follow

Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-26 Thread Michael S. Tsirkin
On Mon, Feb 26, 2018 at 05:02:18PM -0800, Stephen Hemminger wrote: > On Mon, 26 Feb 2018 08:19:24 +0100 > Jiri Pirko wrote: > > > Sat, Feb 24, 2018 at 12:59:04AM CET, step...@networkplumber.org wrote: > > >On Thu, 22 Feb 2018 13:30:12 -0800 > > >Alexander Duyck wrote: > > > > > >> > Again, I u

Re: [PATCH 0/2] mark some slabs as visible not mergeable

2018-02-26 Thread David Miller
From: Stephen Hemminger Date: Mon, 26 Feb 2018 13:46:13 -0800 > This is ancient original iproute2 code that dumpster dives into > slabinfo to get summary statistics on active objects. > > 1) open sockets (sock_inode_cache) The sockets inuse counter from /proc/net/sockstat is really suffic

Re: [RFC PATCH v3 0/3] Enable virtio_net to act as a backup for a passthru device

2018-02-26 Thread Stephen Hemminger
On Mon, 26 Feb 2018 08:19:24 +0100 Jiri Pirko wrote: > Sat, Feb 24, 2018 at 12:59:04AM CET, step...@networkplumber.org wrote: > >On Thu, 22 Feb 2018 13:30:12 -0800 > >Alexander Duyck wrote: > > > >> > Again, I undertand your motivation. Yet I don't like your solution. > >> > But if the decisio

Re: [net-next v3 0/2] eBPF seccomp filters

2018-02-26 Thread Tycho Andersen
On Mon, Feb 26, 2018 at 03:20:15PM -0800, Kees Cook wrote: > On Mon, Feb 26, 2018 at 3:04 PM, Alexei Starovoitov > wrote: > > On Mon, Feb 26, 2018 at 07:26:54AM +, Sargun Dhillon wrote: > >> This patchset enables seccomp filters to be written in eBPF. Although, this > >> [...] > > The main sta

Re: [PATCH bpf-next v8 01/11] fs,security: Add a security blob to nameidata

2018-02-26 Thread Al Viro
On Tue, Feb 27, 2018 at 01:41:11AM +0100, Mickaël Salaün wrote: > The function current_nameidata_security(struct inode *) can be used to > retrieve a blob's pointer address tied to the inode being walk through. > This enable to follow a path lookup and know where an inode access come > from. This i

[PATCH v2 net] net: phy: Restore phy_resume() locking assumption

2018-02-26 Thread Andrew Lunn
commit f5e64032a799 ("net: phy: fix resume handling") changes the locking semantics for phy_resume() such that the caller now needs to hold the phy mutex. Not all call sites were adopted to this new semantic, resulting in warnings from the added WARN_ON(!mutex_is_locked(&phydev->lock)). Rather tha

Re: [net-next v3 1/2] bpf, seccomp: Add eBPF filter capabilities

2018-02-26 Thread Tycho Andersen
On Mon, Feb 26, 2018 at 07:27:05AM +, Sargun Dhillon wrote: > +config SECCOMP_FILTER_EXTENDED > + bool "Extended BPF seccomp filters" > + depends on SECCOMP_FILTER && BPF_SYSCALL > + depends on !CHECKPOINT_RESTORE Why not just give -EINVAL or something in case one of these is reque

Re: [next-queue PATCH 7/8] igb: Add support for adding offloaded clsflower filters

2018-02-26 Thread Florian Fainelli
On 02/26/2018 04:40 PM, Vinicius Costa Gomes wrote: > Hi, > > Florian Fainelli writes: > >> On February 23, 2018 5:20:35 PM PST, Vinicius Costa Gomes >> wrote: >>> This allows filters added by tc-flower and specifying MAC addresses, >>> Ethernet types, and the VLAN priority field, to be offloa

RE: [PATCH RFC iproute-next 5/5] rdma: Add PD resource tracking information

2018-02-26 Thread Steve Wise
> > On Wed, Feb 14, 2018 at 01:07:01PM -0800, Steve Wise wrote: > > > Sample output: > > > > > > # rdma resource show pd > > > link cxgb4_0/- local_dma_lkey 0x0 usecnt 4 flags 0x0 pid 30503 comm > rping > > > > One more thing, flags need to be pre-parsed and accessible with "-d" > > command, > > as

[PATCH bpf-next v8 00/11] Landlock LSM: Toward unprivileged sandboxing

2018-02-26 Thread Mickaël Salaün
Hi, This eight series is a major revamp of the Landlock design compared to the previous series [1]. This enables more flexibility and granularity of access control with file paths. It is now possible to enforce an access control according to a file hierarchy. Landlock uses the concept of inode and

[PATCH bpf-next v8 05/11] seccomp,landlock: Enforce Landlock programs per process hierarchy

2018-02-26 Thread Mickaël Salaün
The seccomp(2) syscall can be used by a task to apply a Landlock program to itself. As a seccomp filter, a Landlock program is enforced for the current task and all its future children. A program is immutable and a task can only add new restricting programs to itself, forming a list of programss.

[PATCH bpf-next v8 03/11] bpf: Add eBPF program subtype and is_valid_subtype() verifier

2018-02-26 Thread Mickaël Salaün
The goal of the program subtype is to be able to have different static fine-grained verifications for a unique program type. The struct bpf_verifier_ops gets a new optional function: is_valid_subtype(). This new verifier is called at the beginning of the eBPF program verification to check if the (

[PATCH bpf-next v8 02/11] fs,security: Add a new file access type: MAY_CHROOT

2018-02-26 Thread Mickaël Salaün
For compatibility reason, MAY_CHROOT is always set with MAY_CHDIR. However, this new flag enable to differentiate a chdir form a chroot. This is needed for the Landlock LSM to be able to evaluate a new root directory. Signed-off-by: Mickaël Salaün Cc: Alexander Viro Cc: Casey Schaufler Cc: Jam

[PATCH bpf-next v8 04/11] bpf,landlock: Define an eBPF program type for Landlock hooks

2018-02-26 Thread Mickaël Salaün
Add a new type of eBPF program used by Landlock hooks. This type of program can be chained with the same eBPF program type (according to subtype rules). A state can be kept with a value available in the program's context (e.g. named "cookie" for Landlock programs). This new BPF program type will b

[PATCH bpf-next v8 06/11] bpf,landlock: Add a new map type: inode

2018-02-26 Thread Mickaël Salaün
This new map store arbitrary 64-bits values referenced by inode keys. The map can be updated from user space with file descriptor pointing to inodes tied to a file system. From an eBPF (Landlock) program point of view, such a map is read-only and can only be used to retrieved a 64-bits value tied

[PATCH bpf-next v8 01/11] fs,security: Add a security blob to nameidata

2018-02-26 Thread Mickaël Salaün
The function current_nameidata_security(struct inode *) can be used to retrieve a blob's pointer address tied to the inode being walk through. This enable to follow a path lookup and know where an inode access come from. This is needed for the Landlock LSM to be able to restrict access to file path

[PATCH bpf-next v8 08/11] landlock: Add ptrace restrictions

2018-02-26 Thread Mickaël Salaün
A landlocked process has less privileges than a non-landlocked process and must then be subject to additional restrictions when manipulating processes. To be allowed to use ptrace(2) and related syscalls on a target process, a landlocked process must have a subset of the target process' rules. Sig

[PATCH bpf-next v8 11/11] landlock: Add user and kernel documentation for Landlock

2018-02-26 Thread Mickaël Salaün
This documentation can be built with the Sphinx framework. Signed-off-by: Mickaël Salaün Cc: Alexei Starovoitov Cc: Andy Lutomirski Cc: Daniel Borkmann Cc: David S. Miller Cc: James Morris Cc: Jonathan Corbet Cc: Kees Cook Cc: Serge E. Hallyn --- Changes since v7: * update documentation

[PATCH bpf-next v8 10/11] bpf,landlock: Add tests for Landlock

2018-02-26 Thread Mickaël Salaün
Test basic context access, ptrace protection and filesystem hooks and Landlock program chaining with multiple cases. Signed-off-by: Mickaël Salaün Cc: Alexei Starovoitov Cc: Andy Lutomirski Cc: Daniel Borkmann Cc: David S. Miller Cc: James Morris Cc: Kees Cook Cc: Serge E. Hallyn Cc: Shuah

[PATCH bpf-next v8 07/11] landlock: Handle filesystem access control

2018-02-26 Thread Mickaël Salaün
This add three Landlock: FS_WALK, FS_PICK and FS_GET. The FS_WALK hook is used to walk through a file path. A program tied to this hook will be evaluated for each directory traversal except the last one if it is the leaf of the path. The FS_PICK hook is used to validate a set of actions requested

[PATCH bpf-next v8 09/11] bpf: Add a Landlock sandbox example

2018-02-26 Thread Mickaël Salaün
Add a basic sandbox tool to launch a command which is only allowed to access in a read only or read-write way a whitelist of file hierarchies. Add to the bpf_load library the ability to handle a BPF program subtype. Signed-off-by: Mickaël Salaün Cc: Alexei Starovoitov Cc: Andy Lutomirski Cc: D

Re: [net PATCH 1/4] virtio_net: disable XDP_REDIRECT in receive_mergeable() case

2018-02-26 Thread Michael S. Tsirkin
On Tue, Feb 20, 2018 at 02:32:04PM +0100, Jesper Dangaard Brouer wrote: > The virtio_net code have three different RX code-paths in receive_buf(). > Two of these code paths can handle XDP, but one of them is broken for > at least XDP_REDIRECT. > > Function(1): receive_big() does not support XDP. >

Re: [next-queue PATCH 7/8] igb: Add support for adding offloaded clsflower filters

2018-02-26 Thread Vinicius Costa Gomes
Hi, Florian Fainelli writes: > On February 23, 2018 5:20:35 PM PST, Vinicius Costa Gomes > wrote: >>This allows filters added by tc-flower and specifying MAC addresses, >>Ethernet types, and the VLAN priority field, to be offloaded to the >>controller. >> >>This reuses most of the infrastructu

Re: [PATCH RFC net-next 16/20] net/ipv6: Cleanup exception route handling

2018-02-26 Thread Wei Wang
On Mon, Feb 26, 2018 at 3:02 PM, David Ahern wrote: > On 2/26/18 3:29 PM, Wei Wang wrote: >> On Sun, Feb 25, 2018 at 11:47 AM, David Ahern wrote: >>> IPv6 FIB will only contain FIB entries with exception routes added to >>> the FIB entry. Remove CACHE and dst checks from fib6 add and delete since

Re: [PATCH RFC net-next 10/20] net/ipv6: move expires into rt6_info

2018-02-26 Thread Wei Wang
On Mon, Feb 26, 2018 at 2:55 PM, David Ahern wrote: > On 2/26/18 3:28 PM, Wei Wang wrote: >>> @@ -213,11 +234,6 @@ static inline void rt6_set_expires(struct rt6_info >>> *rt, unsigned long expires) >>> >>> static inline void rt6_update_expires(struct rt6_info *rt0, int timeout) >>> { >>> -

Re: [PATCH] test_bpf: add a schedule point

2018-02-26 Thread Eric Dumazet
On Mon, 2018-02-26 at 21:11 +0100, Daniel Borkmann wrote: > On 02/26/2018 07:52 PM, Eric Dumazet wrote: > > From: Eric Dumazet > > > > test_bpf() is taking 1.6 seconds nowadays, it is time > > to add a schedule point in it. > > > > Signed-off-by: Eric Dumazet > > Applied to bpf tree, thanks Er

[PATCH 4/5 net-next] ibmvnic: Report queue stops and restarts as debug output

2018-02-26 Thread Thomas Falcon
It's not necessary to report each time a queue is stopped and restarted as an informational message. Change that to be a debug message so that it can be observed if needed but not printed by default. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 6 +++--- 1 file changed,

[PATCH 5/5 net-next] ibmvnic: Do not attempt to login if RX or TX queues are not allocated

2018-02-26 Thread Thomas Falcon
If a device reset fails for some reason, TX and RX queue resources could be released. If a user attempts to open the device in this scenario, it may result in a kernel panic as the driver tries to access this memory. To fix this, include a check before device login that TX/RX queues are still there

[PATCH 0/5 net-next] ibmvnic: Miscellaneous driver fixes and enhancements

2018-02-26 Thread Thomas Falcon
There is not a general theme to this patch set other than that it fixes a few issues with the ibmvnic driver. I will just give a quick summary of what each patch does here. "ibmvnic: Fix TX descriptor tracking again" resolves a race condition introduced in an earlier fix to track outstanding trans

[PATCH 1/5 net-next] ibmvnic: Fix TX descriptor tracking again

2018-02-26 Thread Thomas Falcon
Sorry, the previous change introduced a race condition between transmit completion processing and tracking TX descriptors. If a completion is received before the number of descriptors is logged, the number of descriptors will be add but not removed. After enough times, this could halt the transmit

[PATCH 3/5 net-next] ibmvnic: Harden TX/RX pool cleaning

2018-02-26 Thread Thomas Falcon
If the driver releases resources after a failed reset or some other error, the driver might attempt to clean up and free memory that isn't there anymore. Include some additional checks that RX/TX queues along with their associated structures are still there before cleaning. Signed-off-by: Thomas F

[PATCH 2/5 net-next] ibmvnic: Allocate statistics buffers during probe

2018-02-26 Thread Thomas Falcon
Currently, buffers holding individual queue statistics are allocated when the device is opened. If an ibmvnic interface is hotplugged or initialized but never opened, an attempt to get statistics with ethtool will result in a kernel panic. Since the driver allocates a constant number, the maximum

Re: [net-next v3 0/2] eBPF seccomp filters

2018-02-26 Thread Sargun Dhillon
On Mon, Feb 26, 2018 at 3:04 PM, Alexei Starovoitov wrote: > On Mon, Feb 26, 2018 at 07:26:54AM +, Sargun Dhillon wrote: >> This patchset enables seccomp filters to be written in eBPF. Although, this >> patchset doesn't introduce much of the functionality enabled by eBPF, it lays >> the ground

[PATCH] net: allow interface to be set into VRF if VLAN interface in same VRF

2018-02-26 Thread Mike Manning
Setting an interface into a VRF fails with 'RTNETLINK answers: File exists' if one of its VLAN interfaces is already in the same VRF. As the VRF is an upper device of the VLAN interface, it is also showing up as an upper device of the interface itself. The solution is to restrict this check to devi

Re: linux-next: manual merge of the bpf-next tree with the bpf tree

2018-02-26 Thread Stephen Rothwell
Hi Dave, On Mon, 26 Feb 2018 11:41:47 +1100 Stephen Rothwell wrote: > > Today's linux-next merge of the bpf-next tree got a conflict in: > > tools/testing/selftests/bpf/test_verifier.c > > between commit: > > ca36960211eb ("bpf: allow xadd only on aligned memory") > > from the bpf tree a

Re: [net-next v3 0/2] eBPF seccomp filters

2018-02-26 Thread Kees Cook
On Mon, Feb 26, 2018 at 3:04 PM, Alexei Starovoitov wrote: > On Mon, Feb 26, 2018 at 07:26:54AM +, Sargun Dhillon wrote: >> This patchset enables seccomp filters to be written in eBPF. Although, this >> [...] > The main statement I want to hear from seccomp maintainers before > proceeding any

Re: [PATCH RFC net-next 07/20] net/ipv6: Move nexthop data to fib6_nh

2018-02-26 Thread Wei Wang
On Mon, Feb 26, 2018 at 2:47 PM, David Ahern wrote: > On 2/26/18 3:28 PM, Wei Wang wrote: >> On Sun, Feb 25, 2018 at 11:47 AM, David Ahern wrote: >>> Introduce fib6_nh structure and move nexthop related data from >>> rt6_info and rt6_info.dst to fib6_nh. References to dev, gateway or >>> lwtstate

Re: [net-next v3 0/2] eBPF seccomp filters

2018-02-26 Thread Alexei Starovoitov
On Mon, Feb 26, 2018 at 07:26:54AM +, Sargun Dhillon wrote: > This patchset enables seccomp filters to be written in eBPF. Although, this > patchset doesn't introduce much of the functionality enabled by eBPF, it lays > the ground work for it. Currently, you have to disable CHECKPOINT_RESTORE >

Re: [PATCH RFC net-next 16/20] net/ipv6: Cleanup exception route handling

2018-02-26 Thread David Ahern
On 2/26/18 3:29 PM, Wei Wang wrote: > On Sun, Feb 25, 2018 at 11:47 AM, David Ahern wrote: >> IPv6 FIB will only contain FIB entries with exception routes added to >> the FIB entry. Remove CACHE and dst checks from fib6 add and delete since >> they can never happen once the data type changes. >> >

Re: [PATCH V8 2/4] sctp: Add ip option support

2018-02-26 Thread Marcelo Ricardo Leitner
On Mon, Feb 26, 2018 at 05:48:48PM -0500, Paul Moore wrote: > On Sat, Feb 24, 2018 at 11:18 AM, Richard Haines > wrote: > > Add ip option support to allow LSM security modules to utilise CIPSO/IPv4 > > and CALIPSO/IPv6 services. > > > > Signed-off-by: Richard Haines > > --- > > All SCTP lksctp-to

Re: [PATCH RFC net-next 10/20] net/ipv6: move expires into rt6_info

2018-02-26 Thread David Ahern
On 2/26/18 3:28 PM, Wei Wang wrote: >> @@ -213,11 +234,6 @@ static inline void rt6_set_expires(struct rt6_info *rt, >> unsigned long expires) >> >> static inline void rt6_update_expires(struct rt6_info *rt0, int timeout) >> { >> - struct rt6_info *rt; >> - >> - for (rt = rt0; rt && !

Re: [PATCH V8 2/4] sctp: Add ip option support

2018-02-26 Thread Paul Moore
On Sat, Feb 24, 2018 at 11:18 AM, Richard Haines wrote: > Add ip option support to allow LSM security modules to utilise CIPSO/IPv4 > and CALIPSO/IPv6 services. > > Signed-off-by: Richard Haines > --- > All SCTP lksctp-tools/src/func_tests run correctly in enforcing mode. > All "./sctp-tests run"

Re: [PATCH RFC net-next 07/20] net/ipv6: Move nexthop data to fib6_nh

2018-02-26 Thread David Ahern
On 2/26/18 3:28 PM, Wei Wang wrote: > On Sun, Feb 25, 2018 at 11:47 AM, David Ahern wrote: >> Introduce fib6_nh structure and move nexthop related data from >> rt6_info and rt6_info.dst to fib6_nh. References to dev, gateway or >> lwtstate from a FIB lookup perspective are converted to use fib6_nh

Re: [RFC PATCH V4] pci: virtio_pci: Add SR-IOV support for virtio_pci devices

2018-02-26 Thread Alexander Duyck
On Mon, Feb 26, 2018 at 2:38 PM, Michael S. Tsirkin wrote: > On Mon, Feb 26, 2018 at 10:05:31AM -0800, Alexander Duyck wrote: >> On Mon, Feb 26, 2018 at 9:48 AM, Rustad, Mark D >> wrote: >> > Alex, >> > >> >> On Feb 26, 2018, at 7:26 AM, Alexander Duyck >> >> wrote: >> >> >> >> Mark, >> >> >>

Re: [RFC PATCH V4] pci: virtio_pci: Add SR-IOV support for virtio_pci devices

2018-02-26 Thread Michael S. Tsirkin
On Mon, Feb 26, 2018 at 02:38:01PM -0800, Alexander Duyck wrote: > On Mon, Feb 26, 2018 at 2:32 PM, Michael S. Tsirkin wrote: > > On Mon, Feb 26, 2018 at 07:26:14AM -0800, Alexander Duyck wrote: > >> On Sun, Feb 25, 2018 at 8:48 PM, Mark Rustad > >> wrote: > >> > Hardware-realized virtio_pci dev

Re: [RFC PATCH V4] pci: virtio_pci: Add SR-IOV support for virtio_pci devices

2018-02-26 Thread Michael S. Tsirkin
On Mon, Feb 26, 2018 at 10:05:31AM -0800, Alexander Duyck wrote: > On Mon, Feb 26, 2018 at 9:48 AM, Rustad, Mark D > wrote: > > Alex, > > > >> On Feb 26, 2018, at 7:26 AM, Alexander Duyck > >> wrote: > >> > >> Mark, > >> > >> In the future please don't put my "Reviewed-by" on a patch that I > >

Re: [RFC PATCH V4] pci: virtio_pci: Add SR-IOV support for virtio_pci devices

2018-02-26 Thread Alexander Duyck
On Mon, Feb 26, 2018 at 2:32 PM, Michael S. Tsirkin wrote: > On Mon, Feb 26, 2018 at 07:26:14AM -0800, Alexander Duyck wrote: >> On Sun, Feb 25, 2018 at 8:48 PM, Mark Rustad wrote: >> > Hardware-realized virtio_pci devices can implement SR-IOV, so this >> > patch enables its use. The device in qu

Re: [RFC PATCH V4] pci: virtio_pci: Add SR-IOV support for virtio_pci devices

2018-02-26 Thread Michael S. Tsirkin
On Mon, Feb 26, 2018 at 07:26:14AM -0800, Alexander Duyck wrote: > On Sun, Feb 25, 2018 at 8:48 PM, Mark Rustad wrote: > > Hardware-realized virtio_pci devices can implement SR-IOV, so this > > patch enables its use. The device in question is an upcoming Intel > > NIC that implements both a virtio

Re: [PATCH RFC net-next 16/20] net/ipv6: Cleanup exception route handling

2018-02-26 Thread Wei Wang
On Sun, Feb 25, 2018 at 11:47 AM, David Ahern wrote: > IPv6 FIB will only contain FIB entries with exception routes added to > the FIB entry. Remove CACHE and dst checks from fib6 add and delete since > they can never happen once the data type changes. > > Fixup the lookup functions to use a f6i n

Re: [PATCH RFC net-next 10/20] net/ipv6: move expires into rt6_info

2018-02-26 Thread Wei Wang
On Sun, Feb 25, 2018 at 11:47 AM, David Ahern wrote: > Add expires to rt6_info for FIB entries, and add fib6 helpers to > manage it. Data path use of dst.expires remains. > > Signed-off-by: David Ahern > --- > include/net/ip6_fib.h | 26 +- > net/ipv6/addrconf.c | 6 ++

[PATCH ipsec-next] esp: check the NETIF_F_HW_ESP_TX_CSUM bit before segmenting

2018-02-26 Thread Shannon Nelson
If I understand correctly, we should not be asking for a checksum offload on an ipsec packet if the netdev isn't advertising NETIF_F_HW_ESP_TX_CSUM. In that case, we should clear the NETIF_F_CSUM_MASK bits. Signed-off-by: Shannon Nelson --- net/ipv4/esp4_offload.c | 2 ++ net/ipv6/esp6_offload.

Re: [PATCH RFC net-next 07/20] net/ipv6: Move nexthop data to fib6_nh

2018-02-26 Thread Wei Wang
On Sun, Feb 25, 2018 at 11:47 AM, David Ahern wrote: > Introduce fib6_nh structure and move nexthop related data from > rt6_info and rt6_info.dst to fib6_nh. References to dev, gateway or > lwtstate from a FIB lookup perspective are converted to use fib6_nh; > datapath references to dst version ar

[PATCH net-next 0/4] stmmac barrier fixes and cleanup

2018-02-26 Thread Niklas Cassel
stmmac barrier fixes and cleanup Niklas Cassel (4): net: stmmac: ensure that the MSS desc is the last desc to set the own bit net: stmmac: use correct barrier between coherent memory and MMIO net: stmmac: ensure that the device has released ownership before reading data net: stmmac

[PATCH net-next 2/4] net: stmmac: use correct barrier between coherent memory and MMIO

2018-02-26 Thread Niklas Cassel
The last memory barrier in stmmac_xmit()/stmmac_tso_xmit() is placed between a coherent memory write and a MMIO write: The own bit is written in First Desc (TSO: MSS desc or First Desc). The DMA engine is started by a write to the tx desc tail pointer/ enable dma transmission register, i.e. a MMI

[PATCH net-next 1/4] net: stmmac: ensure that the MSS desc is the last desc to set the own bit

2018-02-26 Thread Niklas Cassel
A dma_wmb() is used to guarantee the ordering, with respect to other writes, to cache coherent DMA memory. There is a dma_wmb() in prepare_tx_desc()/prepare_tso_tx_desc() which ensures that TDES0/1/2 is written before TDES3 (which contains the own bit), for First Desc. However, in the rare case t

  1   2   3   4   >