Re: [RFC 02/11] Add RoCE driver framework

2016-09-14 Thread Leon Romanovsky
On Thu, Sep 15, 2016 at 05:11:03AM +, Mintz, Yuval wrote: > > As a summary, I didn't see in your responses any real life example where > > you will > > need global debug level for your driver. > > Not sure what you you're expecting - a list of BZs /private e-mails where > user reproductions

Re: [PATCH V2 2/3] net-next: dsa: add Qualcomm tag RX/TX handler

2016-09-14 Thread Florian Fainelli
On 09/14/2016 03:39 AM, John Crispin wrote: > Add support for the 2-bytes Qualcomm tag that gigabit switches such as > the QCA8337/N might insert when receiving packets, or that we need > to insert while targeting specific switch ports. The tag is inserted > directly behind the ethernet header. >

RE: [RFC 02/11] Add RoCE driver framework

2016-09-14 Thread Mintz, Yuval
> > > If you want dynamic prints, you have two options: > > > 1. Add support of ethtool to whole RDMA stack. > > > 2. Use dynamic tracing infrastructure. > > > > > Which option do you prefer? > > Option 3 - continuing this discussion. :-) > > Sorry, > I was under impression that you want this

Re: [RFC v3 18/22] cgroup,landlock: Add CGRP_NO_NEW_PRIVS to handle unprivileged hooks

2016-09-14 Thread Alexei Starovoitov
On Wed, Sep 14, 2016 at 09:38:16PM -0700, Andy Lutomirski wrote: > On Wed, Sep 14, 2016 at 9:31 PM, Alexei Starovoitov > wrote: > > On Wed, Sep 14, 2016 at 09:08:57PM -0700, Andy Lutomirski wrote: > >> On Wed, Sep 14, 2016 at 9:00 PM, Alexei Starovoitov > >>

Re: [RFC v3 18/22] cgroup,landlock: Add CGRP_NO_NEW_PRIVS to handle unprivileged hooks

2016-09-14 Thread Andy Lutomirski
On Wed, Sep 14, 2016 at 9:31 PM, Alexei Starovoitov wrote: > On Wed, Sep 14, 2016 at 09:08:57PM -0700, Andy Lutomirski wrote: >> On Wed, Sep 14, 2016 at 9:00 PM, Alexei Starovoitov >> wrote: >> > On Wed, Sep 14, 2016 at 07:27:08PM

Re: [RFC 02/11] Add RoCE driver framework

2016-09-14 Thread Leon Romanovsky
On Wed, Sep 14, 2016 at 06:25:38PM +, Mintz, Yuval wrote: > > > > > >> >> +uint debug; > > > > > >> >> +module_param(debug, uint, 0); > > > > > > >>> +MODULE_PARM_DESC(debug, "Default debug msglevel"); > > > > > >> > > > > > >> >Why are you adding this as a module parameter? > > > > > >> > > >

Re: [RFC v3 18/22] cgroup,landlock: Add CGRP_NO_NEW_PRIVS to handle unprivileged hooks

2016-09-14 Thread Alexei Starovoitov
On Wed, Sep 14, 2016 at 09:08:57PM -0700, Andy Lutomirski wrote: > On Wed, Sep 14, 2016 at 9:00 PM, Alexei Starovoitov > wrote: > > On Wed, Sep 14, 2016 at 07:27:08PM -0700, Andy Lutomirski wrote: > >> >> > > >> >> > This RFC handle both cgroup and seccomp approaches

Re: [Intel-wired-lan] [net-next PATCH v3 1/3] e1000: track BQL bytes regardless of skb or not

2016-09-14 Thread John Fastabend
On 16-09-14 05:43 PM, Alexei Starovoitov wrote: > On Wed, Sep 14, 2016 at 11:57:24PM +, Brown, Aaron F wrote: >>> From: Intel-wired-lan [mailto:intel-wired-lan-boun...@lists.osuosl.org] On >>> Behalf Of John Fastabend >>> Sent: Monday, September 12, 2016 3:13 PM >>> To: bbla...@plumgrid.com;

Re: [RFC v3 18/22] cgroup,landlock: Add CGRP_NO_NEW_PRIVS to handle unprivileged hooks

2016-09-14 Thread Andy Lutomirski
On Wed, Sep 14, 2016 at 9:00 PM, Alexei Starovoitov wrote: > On Wed, Sep 14, 2016 at 07:27:08PM -0700, Andy Lutomirski wrote: >> >> > >> >> > This RFC handle both cgroup and seccomp approaches in a similar way. I >> >> > don't see why building on top of cgroup v2 is

Re: [RFC v3 18/22] cgroup,landlock: Add CGRP_NO_NEW_PRIVS to handle unprivileged hooks

2016-09-14 Thread Alexei Starovoitov
On Wed, Sep 14, 2016 at 07:27:08PM -0700, Andy Lutomirski wrote: > >> > > >> > This RFC handle both cgroup and seccomp approaches in a similar way. I > >> > don't see why building on top of cgroup v2 is a problem. Is there > >> > security issues with delegation? > >> > >> What I mean is: cgroup v2

[PATCH] nfp: fix error return code in nfp_net_netdev_open()

2016-09-14 Thread Wei Yongjun
From: Wei Yongjun Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 73725d9dfd99 ("nfp: allocate ring SW structs dynamically") Signed-off-by: Wei Yongjun ---

Re: [PATCH 0/5] Make /sys/class/net per net namespace objects belong to container

2016-09-14 Thread Dmitry Torokhov
On Mon, Aug 29, 2016 at 5:38 AM, Eric W. Biederman wrote: > David Miller writes: > >> From: Dmitry Torokhov >> Date: Tue, 16 Aug 2016 15:33:10 -0700 >> >>> There are objects in /sys hierarchy (/sys/class/net/) that logically

Re: [PATCH -next] net: dsa: b53: Remove unused including

2016-09-14 Thread Florian Fainelli
2016-09-14 19:24 GMT-07:00 Wei Yongjun : > From: Wei Yongjun > > Remove including that don't need it. > > Signed-off-by: Wei Yongjun Acked-by: Florian Fainelli -- Florian

Re: [PATCH -next] net: dsa: bcm_sf2: Fix non static symbol warning

2016-09-14 Thread Florian Fainelli
2016-09-14 19:24 GMT-07:00 Wei Yongjun : > From: Wei Yongjun > > Fixes the following sparse warning: > > drivers/net/dsa/bcm_sf2.c:963:19: warning: > symbol 'bcm_sf2_io_ops' was not declared. Should it be static? > > Signed-off-by: Wei Yongjun

Re: [RFC v3 18/22] cgroup,landlock: Add CGRP_NO_NEW_PRIVS to handle unprivileged hooks

2016-09-14 Thread Andy Lutomirski
On Wed, Sep 14, 2016 at 7:19 PM, Alexei Starovoitov wrote: > On Wed, Sep 14, 2016 at 06:25:07PM -0700, Andy Lutomirski wrote: >> On Wed, Sep 14, 2016 at 3:11 PM, Mickaël Salaün wrote: >> > >> > On 14/09/2016 20:27, Andy Lutomirski wrote: >> >> On

[PATCH -next] net: emac: remove .owner field for driver

2016-09-14 Thread Wei Yongjun
From: Wei Yongjun Remove .owner field if calls are used which set it automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Wei Yongjun --- drivers/net/ethernet/qualcomm/emac/emac.c | 1 - 1 file changed,

[PATCH -next] net: emac: remove unnecessary dev_set_drvdata()

2016-09-14 Thread Wei Yongjun
From: Wei Yongjun The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Wei Yongjun ---

[PATCH -next] net: dsa: b53: Remove unused including

2016-09-14 Thread Wei Yongjun
From: Wei Yongjun Remove including that don't need it. Signed-off-by: Wei Yongjun --- drivers/net/dsa/b53/b53_priv.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/dsa/b53/b53_priv.h b/drivers/net/dsa/b53/b53_priv.h index

[PATCH -next] net: dsa: bcm_sf2: Fix non static symbol warning

2016-09-14 Thread Wei Yongjun
From: Wei Yongjun Fixes the following sparse warning: drivers/net/dsa/bcm_sf2.c:963:19: warning: symbol 'bcm_sf2_io_ops' was not declared. Should it be static? Signed-off-by: Wei Yongjun --- drivers/net/dsa/bcm_sf2.c | 2 +- 1 file changed, 1

Re: [RFC v3 18/22] cgroup,landlock: Add CGRP_NO_NEW_PRIVS to handle unprivileged hooks

2016-09-14 Thread Alexei Starovoitov
On Wed, Sep 14, 2016 at 06:25:07PM -0700, Andy Lutomirski wrote: > On Wed, Sep 14, 2016 at 3:11 PM, Mickaël Salaün wrote: > > > > On 14/09/2016 20:27, Andy Lutomirski wrote: > >> On Wed, Sep 14, 2016 at 12:24 AM, Mickaël Salaün wrote: > >>> Add a new flag

Re: [RFC v3 18/22] cgroup,landlock: Add CGRP_NO_NEW_PRIVS to handle unprivileged hooks

2016-09-14 Thread Andy Lutomirski
On Wed, Sep 14, 2016 at 3:11 PM, Mickaël Salaün wrote: > > On 14/09/2016 20:27, Andy Lutomirski wrote: >> On Wed, Sep 14, 2016 at 12:24 AM, Mickaël Salaün wrote: >>> Add a new flag CGRP_NO_NEW_PRIVS for each cgroup. This flag is initially >>> set for all

Re: [RFC v3 19/22] landlock: Add interrupted origin

2016-09-14 Thread Andy Lutomirski
On Wed, Sep 14, 2016 at 3:14 PM, Mickaël Salaün wrote: > > On 14/09/2016 20:29, Andy Lutomirski wrote: >> On Wed, Sep 14, 2016 at 12:24 AM, Mickaël Salaün wrote: >>> This third origin of hook call should cover all possible trigger paths >>> (e.g. page fault).

Re: [PATCH V2 3/3] net-next: dsa: add new driver for qca8xxx family

2016-09-14 Thread Andrew Lunn
On Wed, Sep 14, 2016 at 12:39:02PM +0200, John Crispin wrote: > This patch contains initial support for the QCA8337 switch. It > will detect a QCA8337 switch, if present and declared in the DT. > > Each port will be represented through a standalone net_device interface, > as for other DSA

Re: [Intel-wired-lan] [net-next PATCH v3 1/3] e1000: track BQL bytes regardless of skb or not

2016-09-14 Thread Alexei Starovoitov
On Wed, Sep 14, 2016 at 11:57:24PM +, Brown, Aaron F wrote: > > From: Intel-wired-lan [mailto:intel-wired-lan-boun...@lists.osuosl.org] On > > Behalf Of John Fastabend > > Sent: Monday, September 12, 2016 3:13 PM > > To: bbla...@plumgrid.com; john.fastab...@gmail.com; > >

Re: [PATCH net-next 1/7] lwt: Add net to build_state argument

2016-09-14 Thread kbuild test robot
Hi Tom, [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Tom-Herbert/net-ILA-resolver-and-generic-resolver-backend/20160915-073357 config: microblaze-mmu_defconfig (attached as .config) compiler: microblaze-linux-gcc (GCC) 4.9.0 reproduce:

Re: [PATCH V2 2/3] net-next: dsa: add Qualcomm tag RX/TX handler

2016-09-14 Thread Andrew Lunn
On Wed, Sep 14, 2016 at 12:39:01PM +0200, John Crispin wrote: > Add support for the 2-bytes Qualcomm tag that gigabit switches such as > the QCA8337/N might insert when receiving packets, or that we need > to insert while targeting specific switch ports. The tag is inserted > directly behind the

Re: [PATCH V2 1/3] Documentation: devicetree: add qca8k binding

2016-09-14 Thread Andrew Lunn
On Wed, Sep 14, 2016 at 12:39:00PM +0200, John Crispin wrote: > Add device-tree binding for ar8xxx switch families. > > Cc: devicet...@vger.kernel.org > Signed-off-by: John Crispin > --- > Changes in V2 > * fixup ecample to include phy nodes and corresponding phandles > * add a

Re: [PATCH net-next 1/7] lwt: Add net to build_state argument

2016-09-14 Thread kbuild test robot
Hi Tom, [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Tom-Herbert/net-ILA-resolver-and-generic-resolver-backend/20160915-073357 config: i386-randconfig-x003-201637 (attached as .config) compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705 reproduce:

Re: [RFC 2/3] staging: rtl8712: Change _LED_STATE enum in rtl871x driver to avoid conflicts with LED namespace

2016-09-14 Thread Larry Finger
On 09/14/2016 04:55 PM, Zach Brown wrote: Adding led support for phy causes namespace conflicts for some phy drivers. The rtl871 driver declared an enum for representing LED states. The enum contains constant LED_OFF which conflicted with declartation found in linux/leds.h. LED_OFF changed to

RE: [PATCH v4 05/16] IB/pvrdma: Add functions for Verbs support

2016-09-14 Thread Adit Ranadive
On Wed, Sep 14, 2016 at 05:49:50 -0700 Christoph Hellwig wrote: > > + props->max_fmr = dev->dsr->caps.max_fmr; > > + props->max_map_per_fmr = dev->dsr->caps.max_map_per_fmr; > > Please don't add FMR support to any new drivers. We don't and our device reports these as 0. If you want me to

Re: [PATCH v4 09/16] IB/pvrdma: Add support for Completion Queues

2016-09-14 Thread Adit Ranadive
On Wed, Sep 14, 2016 at 05:43:37 -0700, Yuval Shaia wrote: > On Sun, Sep 11, 2016 at 09:49:19PM -0700, Adit Ranadive wrote: > > + > > +static int pvrdma_poll_one(struct pvrdma_cq *cq, struct pvrdma_qp > **cur_qp, > > + struct ib_wc *wc) > > +{ > > + struct pvrdma_dev *dev =

Re: [PATCH net-next 1/7] lwt: Add net to build_state argument

2016-09-14 Thread kbuild test robot
Hi Tom, [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Tom-Herbert/net-ILA-resolver-and-generic-resolver-backend/20160915-073357 config: x86_64-randconfig-x013-201637 (attached as .config) compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705 reproduce:

RE: [Intel-wired-lan] [net-next PATCH v3 1/3] e1000: track BQL bytes regardless of skb or not

2016-09-14 Thread Brown, Aaron F
> From: Intel-wired-lan [mailto:intel-wired-lan-boun...@lists.osuosl.org] On > Behalf Of John Fastabend > Sent: Monday, September 12, 2016 3:13 PM > To: bbla...@plumgrid.com; john.fastab...@gmail.com; > alexei.starovoi...@gmail.com; Kirsher, Jeffrey T > ;

RE: [Intel-wired-lan] [net-next PATCH v3 2/3] e1000: add initial XDP support

2016-09-14 Thread Brown, Aaron F
> From: Intel-wired-lan [mailto:intel-wired-lan-boun...@lists.osuosl.org] On > Behalf Of Rustad, Mark D > Sent: Tuesday, September 13, 2016 3:41 PM > To: Alexei Starovoitov > Cc: Eric Dumazet ; Tom Herbert > ; Brenden

[PATCH v2] net: VRF: Pass original iif to ip_route_input()

2016-09-14 Thread Mark Tomlinson
The function ip_rcv_finish() calls l3mdev_ip_rcv(). On any VRF except the global VRF, this replaces skb->dev with the VRF master interface. When calling ip_route_input_noref() from here, the checks for forwarding look at this master device instead of the initial ingress interface. This will allow

Re: [RFC v3 03/22] bpf,landlock: Add a new arraymap type to deal with (Landlock) handles

2016-09-14 Thread Alexei Starovoitov
On Thu, Sep 15, 2016 at 01:22:49AM +0200, Mickaël Salaün wrote: > > On 14/09/2016 20:51, Alexei Starovoitov wrote: > > On Wed, Sep 14, 2016 at 09:23:56AM +0200, Mickaël Salaün wrote: > >> This new arraymap looks like a set and brings new properties: > >> * strong typing of entries: the eBPF

[PATCH net-next 7/7] ila: Resolver mechanism

2016-09-14 Thread Tom Herbert
Implement an ILA resolver. This uses LWT to implement the hook to a userspace resolver and tracks pending unresolved address using the backend net resolver. The idea is that the kernel sets an ILA resolver route to the SIR prefix, something like: ip route add ::/64 encap ila-resolve \

Re: [RFC v3 07/22] landlock: Handle file comparisons

2016-09-14 Thread Alexei Starovoitov
On Thu, Sep 15, 2016 at 01:02:22AM +0200, Mickaël Salaün wrote: > > > > I would suggest for the next RFC to do minimal 7 patches up to this point > > with simple example that demonstrates the use case. > > I would avoid all unpriv stuff and all of seccomp for the next RFC as well, > > otherwise I

[PATCH net-next 3/7] rhashtable: Call library function alloc_bucket_locks

2016-09-14 Thread Tom Herbert
To allocate the array of bucket locks for the hash table we now call library function alloc_bucket_spinlocks. This function is based on the old alloc_bucket_locks in rhashtable and should produce the same effect. Acked-by: Thomas Graf Signed-off-by: Tom Herbert

[PATCH net-next 1/7] lwt: Add net to build_state argument

2016-09-14 Thread Tom Herbert
Users of LWT need to know net if they want to have per net operations in LWT. Signed-off-by: Tom Herbert --- include/net/lwtunnel.h| 10 +- net/core/lwtunnel.c | 11 +++ net/ipv4/fib_semantics.c | 7 --- net/ipv4/ip_tunnel_core.c | 12

Re: [RFC v3 03/22] bpf,landlock: Add a new arraymap type to deal with (Landlock) handles

2016-09-14 Thread Mickaël Salaün
On 14/09/2016 20:51, Alexei Starovoitov wrote: > On Wed, Sep 14, 2016 at 09:23:56AM +0200, Mickaël Salaün wrote: >> This new arraymap looks like a set and brings new properties: >> * strong typing of entries: the eBPF functions get the array type of >> elements instead of CONST_PTR_TO_MAP (e.g.

[PATCH net-next 5/7] rhashtable: abstract out function to get hash

2016-09-14 Thread Tom Herbert
Split out most of rht_key_hashfn which is calculating the hash into its own function. This way the hash function can be called separately to get the hash value. Acked-by: Thomas Graf Signed-off-by: Tom Herbert --- include/linux/rhashtable.h | 28

[PATCH net-next 2/7] spinlock: Add library function to allocate spinlock buckets array

2016-09-14 Thread Tom Herbert
Add two new library functions alloc_bucket_spinlocks and free_bucket_spinlocks. These are use to allocate and free an array of spinlocks that are useful as locks for hash buckets. The interface specifies the maximum number of spinlocks in the array as well as a CPU multiplier to derive the number

[PATCH net-next 0/7] net: ILA resolver and generic resolver backend

2016-09-14 Thread Tom Herbert
This patch set implements an ILA host side resolver. This uses LWT to implement the hook to a userspace resolver and tracks pending unresolved address using the backend net resolver. This patch set contains: - An new library function to allocate an array of spinlocks for use with locking hash

[PATCH net-next 4/7] ila: Call library function alloc_bucket_locks

2016-09-14 Thread Tom Herbert
To allocate the array of bucket locks for the hash table we now call library function alloc_bucket_spinlocks. Signed-off-by: Tom Herbert --- net/ipv6/ila/ila_xlat.c | 36 +--- 1 file changed, 5 insertions(+), 31 deletions(-) diff --git

[PATCH net-next 6/7] net: Generic resolver backend

2016-09-14 Thread Tom Herbert
This patch implements the backend of a resolver, specifically it provides a means to track unresolved addresses and to time them out. The resolver is mostly a frontend to an rhashtable where the key of the table is whatever address type or object is tracked. A resolver instance is created by

Re: [RFC 3/3] phy,leds: add support for led triggers on phy link state change

2016-09-14 Thread Florian Fainelli
On 09/14/2016 02:55 PM, Zach Brown wrote: > From: Josh Cartwright > > Create an option CONFIG_LED_TRIGGER_PHY (default n), which will > create a set of led triggers for each instantiated PHY device. There is > one LED trigger per link-speed, per-phy. > > This allows for

Re: [PATCHv3 net-next 08/15] nfp: add BPF to NFP code translator

2016-09-14 Thread Alexei Starovoitov
On Wed, Sep 14, 2016 at 08:00:16PM +0100, Jakub Kicinski wrote: > Add translator for JITing eBPF to operations which > can be executed on NFP's programmable engines. > > Signed-off-by: Jakub Kicinski > --- > v3: > - don't clone the program for the verifier (no

[PATCH net-next 0/4] rxrpc: Support IPv6 [ver #2]

2016-09-14 Thread David Howells
Here is a set of patches that add IPv6 support. They need to be applied on top of the just-posted miscellaneous fix patches. They are: (1) Make autobinding of an unconnected socket work when sendmsg() is called to initiate a client call. (2) Don't specify the protocol when creating the

[PATCH net-next 2/4] rxrpc: Don't specify protocol to when creating transport socket [ver #2]

2016-09-14 Thread David Howells
Pass 0 as the protocol argument when creating the transport socket rather than IPPROTO_UDP. Signed-off-by: David Howells --- net/rxrpc/local_object.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/rxrpc/local_object.c

[PATCH net-next 1/4] rxrpc: Create an address for sendmsg() to bind unbound socket with [ver #2]

2016-09-14 Thread David Howells
Create an address for sendmsg() to bind unbound socket with rather than using a completely blank address otherwise the transport socket creation will fail because it will try to use address family 0. We use the address family specified in the protocol argument when the AF_RXRPC socket was created

[PATCH net-next 3/4] rxrpc: Use rxrpc_extract_addr_from_skb() rather than doing this manually [ver #2]

2016-09-14 Thread David Howells
There are two places that want to transmit a packet in response to one just received and manually pick the address to reply to out of the sk_buff. Make them use rxrpc_extract_addr_from_skb() instead so that IPv6 is handled automatically. Signed-off-by: David Howells ---

[PATCH net-next 4/4] rxrpc: Add IPv6 support [ver #2]

2016-09-14 Thread David Howells
Add IPv6 support to AF_RXRPC. With this, AF_RXRPC sockets can be created: service = socket(AF_RXRPC, SOCK_DGRAM, PF_INET6); instead of: service = socket(AF_RXRPC, SOCK_DGRAM, PF_INET); The AFS filesystem doesn't support IPv6 at the moment, though, since that requires upgrades

Re: [PATCHv3 net-next 05/15] bpf: enable non-core use of the verfier

2016-09-14 Thread Alexei Starovoitov
On Wed, Sep 14, 2016 at 08:00:13PM +0100, Jakub Kicinski wrote: > Advanced JIT compilers and translators may want to use > eBPF verifier as a base for parsers or to perform custom > checks and validations. > > Add ability for external users to invoke the verifier > and provide callbacks to be

Re: [RFC v3 07/22] landlock: Handle file comparisons

2016-09-14 Thread Mickaël Salaün
On 14/09/2016 23:06, Alexei Starovoitov wrote: > On Wed, Sep 14, 2016 at 09:24:00AM +0200, Mickaël Salaün wrote: >> Add eBPF functions to compare file system access with a Landlock file >> system handle: >> * bpf_landlock_cmp_fs_prop_with_struct_file(prop, map, map_op, file) >> This function

Re: [PATCH v4 00/16] Add Paravirtual RDMA Driver

2016-09-14 Thread Jason Gunthorpe
On Wed, Sep 14, 2016 at 10:20:22PM +, Woodruff, Robert J wrote: > >this new scheme works with >kernel.org 4.8, then it is possible > >that it could go into that OFED-4.8 Release, but again, we are > >still looking at the new scheme and evaluating how it affects >the > >community OFED. > >

Re: [PATCHv3 net-next 04/15] bpf: don't (ab)use instructions to store state

2016-09-14 Thread Alexei Starovoitov
On Wed, Sep 14, 2016 at 08:00:12PM +0100, Jakub Kicinski wrote: > Storing state in reserved fields of instructions makes > it impossible to run validator on programs already > marked as read-only. Allocate and use an array of > per-instruction state instead. > > While touching the error path

Re: [RFC v3 21/22] bpf,landlock: Add optional skb pointer in the Landlock context

2016-09-14 Thread Mickaël Salaün
On 14/09/2016 23:20, Alexei Starovoitov wrote: > On Wed, Sep 14, 2016 at 09:24:14AM +0200, Mickaël Salaün wrote: >> This is a proof of concept to expose optional values that could depend >> of the process access rights. >> >> There is two dedicated flags: LANDLOCK_FLAG_ACCESS_SKB_READ and >>

Re: [RFC v3 07/22] landlock: Handle file comparisons

2016-09-14 Thread Mickaël Salaün
On 14/09/2016 21:07, Jann Horn wrote: > On Wed, Sep 14, 2016 at 09:24:00AM +0200, Mickaël Salaün wrote: >> Add eBPF functions to compare file system access with a Landlock file >> system handle: >> * bpf_landlock_cmp_fs_prop_with_struct_file(prop, map, map_op, file) >> This function allows to

Re: [RFC v3 11/22] seccomp,landlock: Handle Landlock hooks per process hierarchy

2016-09-14 Thread Mickaël Salaün
On 14/09/2016 20:43, Andy Lutomirski wrote: > On Wed, Sep 14, 2016 at 12:24 AM, Mickaël Salaün wrote: >> A Landlock program will be triggered according to its subtype/origin >> bitfield. The LANDLOCK_FLAG_ORIGIN_SECCOMP value will trigger the >> Landlock program when a seccomp

RE: [PATCH v4 00/16] Add Paravirtual RDMA Driver

2016-09-14 Thread Woodruff, Robert J
Woody Wrote, >We are still discussing this within the OFA EWG for the OFED releases. I >suspect that if all of the maintainers of the user-space packages agree to >merge into >and support this new merged repo-model, then OFED would eventually >base their OFED user-space packages on that repo,

Re: [PATCH 3/3] mm: memcontrol: consolidate cgroup socket tracking

2016-09-14 Thread Andrew Morton
On Thu, 15 Sep 2016 13:34:24 +0800 kbuild test robot <l...@intel.com> wrote: > Hi Johannes, > > [auto build test ERROR on net/master] > [also build test ERROR on v4.8-rc6 next-20160914] > [if your patch is applied to the wrong git tree, please drop us a note to >

Re: [RFC v3 19/22] landlock: Add interrupted origin

2016-09-14 Thread Mickaël Salaün
On 14/09/2016 20:29, Andy Lutomirski wrote: > On Wed, Sep 14, 2016 at 12:24 AM, Mickaël Salaün wrote: >> This third origin of hook call should cover all possible trigger paths >> (e.g. page fault). Landlock eBPF programs can then take decisions >> accordingly. >> >>

Re: [RFC v3 18/22] cgroup,landlock: Add CGRP_NO_NEW_PRIVS to handle unprivileged hooks

2016-09-14 Thread Mickaël Salaün
On 14/09/2016 20:27, Andy Lutomirski wrote: > On Wed, Sep 14, 2016 at 12:24 AM, Mickaël Salaün wrote: >> Add a new flag CGRP_NO_NEW_PRIVS for each cgroup. This flag is initially >> set for all cgroup except the root. The flag is clear when a new process >> without the

Re: [RFC v3 17/22] cgroup: Add access check for cgroup_get_from_fd()

2016-09-14 Thread Mickaël Salaün
On 14/09/2016 09:24, Mickaël Salaün wrote: > Add security access check for cgroup backed FD. The "cgroup.procs" file > of the corresponding cgroup must be readable to identify the cgroup, and > writable to prove that the current process can manage this cgroup (e.g. > through delegation). This is

RE: [PATCH v4 00/16] Add Paravirtual RDMA Driver

2016-09-14 Thread Woodruff, Robert J
Adit wrote, >Thanks. So does this mean that the libraries distributed via OFED >(openfabrics.org) will be now from the rdma-plumbing git tree? >Or is the switch to happen only when distros start shipping with the 4.9 >kernel by default? We are still discussing this within the OFA EWG for the

[RFC 1/3] skge: Change LED_OFF to LED_REG_OFF in marvel skge driver to avoid conflicts with leds namespace

2016-09-14 Thread Zach Brown
Adding led support for phy causes namespace conflicts for some phy drivers. The marvel skge driver declared an enum for representing the states of Link LED Register. The enum contained constant LED_OFF which conflicted with declartation found in linux/leds.h. LED_OFF changed to LED_REG_OFF

[RFC 2/3] staging: rtl8712: Change _LED_STATE enum in rtl871x driver to avoid conflicts with LED namespace

2016-09-14 Thread Zach Brown
Adding led support for phy causes namespace conflicts for some phy drivers. The rtl871 driver declared an enum for representing LED states. The enum contains constant LED_OFF which conflicted with declartation found in linux/leds.h. LED_OFF changed to LED_STATE_OFF Signed-off-by: Zach Brown

[RFC 3/3] phy,leds: add support for led triggers on phy link state change

2016-09-14 Thread Zach Brown
From: Josh Cartwright Create an option CONFIG_LED_TRIGGER_PHY (default n), which will create a set of led triggers for each instantiated PHY device. There is one LED trigger per link-speed, per-phy. This allows for a user to configure their system to allow a set of LEDs

[RFC 0/3] Add support for led triggers on phy link state change

2016-09-14 Thread Zach Brown
Some drivers that include phy.h defined LED_OFF which conflicts with definition in leds.h. phy led support uses leds.h so the two namespaces are no longer isolated. The first two patches fix the two net drivers that declared enum constants that conflict with enum constants in linux/leds.h. The

Re: [PATCH 3/3] mm: memcontrol: consolidate cgroup socket tracking

2016-09-14 Thread kbuild test robot
Hi Johannes, [auto build test ERROR on net/master] [also build test ERROR on v4.8-rc6 next-20160914] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] [Suggest to use git(>=2.9.0) format-patch --base= (or --base=auto for convenience) to rec

Re: [RFC v3 22/22] samples/landlock: Add sandbox example

2016-09-14 Thread Alexei Starovoitov
On Wed, Sep 14, 2016 at 09:24:15AM +0200, Mickaël Salaün wrote: > Add a basic sandbox tool to create a process isolated from some part of > the system. This can depend of the current cgroup. > > Example with the current process hierarchy (seccomp): > > $ ls /home > user1 > $

Re: [RFC v3 21/22] bpf,landlock: Add optional skb pointer in the Landlock context

2016-09-14 Thread Alexei Starovoitov
On Wed, Sep 14, 2016 at 09:24:14AM +0200, Mickaël Salaün wrote: > This is a proof of concept to expose optional values that could depend > of the process access rights. > > There is two dedicated flags: LANDLOCK_FLAG_ACCESS_SKB_READ and > LANDLOCK_FLAG_ACCESS_SKB_WRITE. Each of them can be

Re: [RFC v3 14/22] bpf/cgroup: Make cgroup_bpf_update() return an error code

2016-09-14 Thread Alexei Starovoitov
On Wed, Sep 14, 2016 at 09:24:07AM +0200, Mickaël Salaün wrote: > This will be useful to support Landlock for the next commits. > > Signed-off-by: Mickaël Salaün > Cc: Alexei Starovoitov > Cc: Daniel Borkmann > Cc: Daniel Mack

Re: [PATCH 7/9] net: ethernet: ti: cpts: calc mult and shift from refclk freq

2016-09-14 Thread Grygorii Strashko
On 09/15/2016 12:03 AM, Richard Cochran wrote: On Wed, Sep 14, 2016 at 11:47:46PM +0300, Grygorii Strashko wrote: As I understand (and tested), clocks_calc_mult_shift() will return max possible mult which can be used without overflow. Yes, BUT the returned values depends on the @maxsec input.

Re: [PATCH 3/3] mm: memcontrol: consolidate cgroup socket tracking

2016-09-14 Thread kbuild test robot
Hi Johannes, [auto build test ERROR on net/master] [also build test ERROR on v4.8-rc6 next-20160914] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] [Suggest to use git(>=2.9.0) format-patch --base= (or --base=auto for convenience) to rec

Re: [PATCH 3/3] mm: memcontrol: consolidate cgroup socket tracking

2016-09-14 Thread kbuild test robot
Hi Johannes, [auto build test ERROR on net/master] [also build test ERROR on v4.8-rc6 next-20160914] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] [Suggest to use git(>=2.9.0) format-patch --base= (or --base=auto for convenience) to rec

Re: [RFC v3 07/22] landlock: Handle file comparisons

2016-09-14 Thread Alexei Starovoitov
On Wed, Sep 14, 2016 at 09:24:00AM +0200, Mickaël Salaün wrote: > Add eBPF functions to compare file system access with a Landlock file > system handle: > * bpf_landlock_cmp_fs_prop_with_struct_file(prop, map, map_op, file) > This function allows to compare the dentry, inode, device or mount >

Re: [PATCH 7/9] net: ethernet: ti: cpts: calc mult and shift from refclk freq

2016-09-14 Thread Richard Cochran
On Wed, Sep 14, 2016 at 11:47:46PM +0300, Grygorii Strashko wrote: > As I understand (and tested), clocks_calc_mult_shift() will > return max possible mult which can be used without overflow. Yes, BUT the returned values depends on the @maxsec input. As the kerneldec says, * Larger ranges may

Re: [PATCH 3/9] net: ethernet: ti: cpts: rework initialization/deinitialization

2016-09-14 Thread Grygorii Strashko
On 09/14/2016 11:52 PM, Richard Cochran wrote: > On Wed, Sep 14, 2016 at 11:37:45PM +0300, Grygorii Strashko wrote: >> The problem is that if cpts not initialized than pinter on >> cpts (in consumer/parent driver - NETCP) will be NULL. > > You made that problem with your "clean up" in this

Re: [PATCH 8/9] net: ethernet: ti: cpts: fix overflow check period

2016-09-14 Thread Grygorii Strashko
On 09/14/2016 11:43 PM, Richard Cochran wrote: On Wed, Sep 14, 2016 at 11:23:43PM +0300, Grygorii Strashko wrote: if yes then those changes are correct as from patch#7 point of view, as from patch#8 because they are separate standalone changes. In patch patch#7 it reasonable to ball out

Re: [PATCH 3/9] net: ethernet: ti: cpts: rework initialization/deinitialization

2016-09-14 Thread Richard Cochran
On Wed, Sep 14, 2016 at 11:37:45PM +0300, Grygorii Strashko wrote: > The problem is that if cpts not initialized than pinter on > cpts (in consumer/parent driver - NETCP) will be NULL. You made that problem with your "clean up" in this series. Previously, cpts was always allocated. > So,

Re: [PATCH 7/9] net: ethernet: ti: cpts: calc mult and shift from refclk freq

2016-09-14 Thread Grygorii Strashko
On 09/14/2016 11:26 PM, Richard Cochran wrote: > On Wed, Sep 14, 2016 at 04:02:29PM +0300, Grygorii Strashko wrote: >> +static void cpts_calc_mult_shift(struct cpts *cpts) >> +{ >> +u64 maxsec; >> +u32 freq; >> +u32 mult; >> +u32 shift; >> +u64 ns; >> +u64 frac; >> + >> +

Re: [PATCH v4 00/16] Add Paravirtual RDMA Driver

2016-09-14 Thread Jason Gunthorpe
On Wed, Sep 14, 2016 at 07:44:45PM +, Adit Ranadive wrote: > On Wed, Sep 14, 2016 at 10:37:00 -0700, Jason Gunthorpe wrote: > > We desire to use this as the vehical for the userspace included with the 4.9 > > kernel. > > > > I anticipate the tree will be running by Oct 1. > > Thanks. So does

Re: [PATCH 3/3] mm: memcontrol: consolidate cgroup socket tracking

2016-09-14 Thread Tejun Heo
On Wed, Sep 14, 2016 at 03:48:46PM -0400, Johannes Weiner wrote: > The cgroup core and the memory controller need to track socket > ownership for different purposes, but the tracking sites being > entirely different is kind of ugly. > > Be a better citizen and rename the memory controller

Re: [PATCH 8/9] net: ethernet: ti: cpts: fix overflow check period

2016-09-14 Thread Richard Cochran
On Wed, Sep 14, 2016 at 11:23:43PM +0300, Grygorii Strashko wrote: > if yes then those changes are correct as from patch#7 point of > view, as from patch#8 because they are separate standalone changes. > In patch patch#7 it reasonable to ball out earlier, while in patch#8 > it required to move

Re: [PATCH 3/9] net: ethernet: ti: cpts: rework initialization/deinitialization

2016-09-14 Thread Grygorii Strashko
On 09/14/2016 11:32 PM, Richard Cochran wrote: > On Wed, Sep 14, 2016 at 11:10:48PM +0300, Grygorii Strashko wrote: >> On 09/14/2016 04:52 PM, Richard Cochran wrote: >>> On Wed, Sep 14, 2016 at 04:02:25PM +0300, Grygorii Strashko wrote: > - if (!cpts->rx_enable) + if (!cpts ||

Re: [PATCH 3/9] net: ethernet: ti: cpts: rework initialization/deinitialization

2016-09-14 Thread Richard Cochran
On Wed, Sep 14, 2016 at 11:10:48PM +0300, Grygorii Strashko wrote: > On 09/14/2016 04:52 PM, Richard Cochran wrote: > > On Wed, Sep 14, 2016 at 04:02:25PM +0300, Grygorii Strashko wrote: > >> - if (!cpts->rx_enable) > >> + if (!cpts || !cpts->rx_enable) > >>return; > Ok. I can't

Re: [PATCH 7/9] net: ethernet: ti: cpts: calc mult and shift from refclk freq

2016-09-14 Thread Richard Cochran
On Wed, Sep 14, 2016 at 04:02:29PM +0300, Grygorii Strashko wrote: > +static void cpts_calc_mult_shift(struct cpts *cpts) > +{ > + u64 maxsec; > + u32 freq; > + u32 mult; > + u32 shift; > + u64 ns; > + u64 frac; > + > + if (cpts->cc_mult || cpts->cc.shift) > +

Re: [PATCH 8/9] net: ethernet: ti: cpts: fix overflow check period

2016-09-14 Thread Grygorii Strashko
On 09/14/2016 11:08 PM, Richard Cochran wrote: > On Wed, Sep 14, 2016 at 11:03:18PM +0300, Grygorii Strashko wrote: >> On 09/14/2016 05:25 PM, Richard Cochran wrote: >>> On Wed, Sep 14, 2016 at 04:02:30PM +0300, Grygorii Strashko wrote: @@ -427,9 +427,6 @@ static void

Re: [PATCH 3/9] net: ethernet: ti: cpts: rework initialization/deinitialization

2016-09-14 Thread Grygorii Strashko
On 09/14/2016 04:52 PM, Richard Cochran wrote: > On Wed, Sep 14, 2016 at 04:02:25PM +0300, Grygorii Strashko wrote: >> @@ -323,7 +307,7 @@ void cpts_rx_timestamp(struct cpts *cpts, struct sk_buff >> *skb) >> u64 ns; >> struct skb_shared_hwtstamps *ssh; >> >> -if (!cpts->rx_enable)

Re: [PATCH 8/9] net: ethernet: ti: cpts: fix overflow check period

2016-09-14 Thread Richard Cochran
On Wed, Sep 14, 2016 at 11:03:18PM +0300, Grygorii Strashko wrote: > On 09/14/2016 05:25 PM, Richard Cochran wrote: > > On Wed, Sep 14, 2016 at 04:02:30PM +0300, Grygorii Strashko wrote: > >> @@ -427,9 +427,6 @@ static void cpts_calc_mult_shift(struct cpts *cpts) > >>u64 ns; > >>u64 frac;

Re: [PATCH 8/9] net: ethernet: ti: cpts: fix overflow check period

2016-09-14 Thread Grygorii Strashko
On 09/14/2016 05:25 PM, Richard Cochran wrote: > On Wed, Sep 14, 2016 at 04:02:30PM +0300, Grygorii Strashko wrote: >> @@ -427,9 +427,6 @@ static void cpts_calc_mult_shift(struct cpts *cpts) >> u64 ns; >> u64 frac; >> >> -if (cpts->cc_mult || cpts->cc.shift) >> -return;

Re: [PATCH 4/9] net: ethernet: ti: cpts: move dt props parsing to cpts driver

2016-09-14 Thread Richard Cochran
On Wed, Sep 14, 2016 at 10:45:54PM +0300, Grygorii Strashko wrote: > With this change It will not be required to add the same DT parsing code > in Keystone 2 netcp driver, so overall number of lines will be reduced. This explanation would make the commit message much more informative. Thanks,

Re: [PATCH 7/9] net: ethernet: ti: cpts: calc mult and shift from refclk freq

2016-09-14 Thread Grygorii Strashko
On 09/14/2016 05:22 PM, Richard Cochran wrote: On Wed, Sep 14, 2016 at 04:02:29PM +0300, Grygorii Strashko wrote: @@ -35,6 +33,8 @@ Optional properties: For example in dra72x-evm, pcf gpio has to be driven low so that cpsw slave 0 and phy data

Re: [PATCH RFC 5/6] net: Generic resolver backend

2016-09-14 Thread Tom Herbert
On Wed, Sep 14, 2016 at 2:49 AM, Thomas Graf wrote: > On 09/09/16 at 04:19pm, Tom Herbert wrote: >> diff --git a/net/core/resolver.c b/net/core/resolver.c >> new file mode 100644 >> index 000..61b36c5 >> --- /dev/null >> +++ b/net/core/resolver.c >> @@ -0,0 +1,267 @@ >>

Re: [PATCH 6/9] net: ethernet: ti: cpts: clean up event list if event pool is empty

2016-09-14 Thread Grygorii Strashko
On 09/14/2016 05:14 PM, Richard Cochran wrote: On Wed, Sep 14, 2016 at 04:02:28PM +0300, Grygorii Strashko wrote: From: WingMan Kwok When a CPTS user does not exit gracefully by disabling cpts timestamping and leaving a joined multicast group, the system continues to receive

[PATCH 3/3] mm: memcontrol: consolidate cgroup socket tracking

2016-09-14 Thread Johannes Weiner
The cgroup core and the memory controller need to track socket ownership for different purposes, but the tracking sites being entirely different is kind of ugly. Be a better citizen and rename the memory controller callbacks to match the cgroup core callbacks, then move them to the same place.

[PATCH 1/3] mm: memcontrol: make per-cpu charge cache IRQ-safe for socket accounting

2016-09-14 Thread Johannes Weiner
From: Johannes Weiner During cgroup2 rollout into production, we started encountering css refcount underflows and css access crashes in the memory controller. Splitting the heavily shared css reference counter into logical users narrowed the imbalance down to the cgroup2 socket

[PATCH 2/3] cgroup: duplicate cgroup reference when cloning sockets

2016-09-14 Thread Johannes Weiner
From: Johannes Weiner When a socket is cloned, the associated sock_cgroup_data is duplicated but not its reference on the cgroup. As a result, the cgroup reference count will underflow when both sockets are destroyed later on. Fixes: bd1060a1d671 ("sock, cgroup: add

  1   2   3   >