[PATCH net 1/4] sfp: fix RX_LOS signal handling

2017-11-30 Thread Russell King
The options word is a be16 quantity, so we need to test the flags having converted the endian-ness. Convert the flag bits to be16, which can be optimised by the compiler, rather than converting a variable at runtime. Reported-by: Florian Fainelli Signed-off-by: Russell

[PATCH net 3/4] sfp: warn about modules requiring address change sequence

2017-11-30 Thread Russell King
We do not support SFP modules which require the address change sequence as detailed by SFF 8472 revision 1.22 section 8.9. Warn when these modules are inserted, and treat them as SFF8079 modules for ethtool. Signed-off-by: Russell King --- drivers/net/phy/sfp.c | 8

[PATCH 0/4] SFP/phylink fixes

2017-11-30 Thread Russell King - ARM Linux
Hi, Here are four phylink fixes: - the "options" is a big-endian value, we must test the bits taking the endian-ness into account. - improve the handling of RX_LOS polarity, taking no RX_LOS polarity bits set to mean there is no RX_LOS functionality provided. - do not report modules that

Re: [RFC] virtio-net: help live migrate SR-IOV devices

2017-11-30 Thread Michael S. Tsirkin
On Wed, Nov 29, 2017 at 07:51:38PM -0800, Jakub Kicinski wrote: > On Thu, 30 Nov 2017 11:29:56 +0800, Jason Wang wrote: > > On 2017年11月29日 03:27, Jesse Brandeburg wrote: > > > Hi, I'd like to get some feedback on a proposal to enhance virtio-net > > > to ease configuration of a VM and that would

[PATCH net-next 0/5] bpftool: cgroup bpf operations

2017-11-30 Thread Roman Gushchin
This patchset adds basic cgroup bpf operations to bpftool. Right now there is no convenient way to perform these operations. The /samples/bpf/load_sock_ops.c implements attach/detacg operations, but only for BPF_CGROUP_SOCK_OPS programs. Bps (part of bcc) implements bpf introspection, but lacks

[PATCH net-next 1/5] libbpf: add ability to guess program type based on section name

2017-11-30 Thread Roman Gushchin
The bpf_prog_load() function will guess program type if it's not specified explicitly. This functionality will be used to implement loading of different programs without asking a user to specify the program type. In first order it will be used by bpftool. Signed-off-by: Roman Gushchin

[PATCH net-next 5/5] bpftool: implement cglist command

2017-11-30 Thread Roman Gushchin
Implement cgattach command to list bpf progrrams attached to the given cgroup: Example: $ ./bpftool cgattach dev_cgroup.o /sys/fs/cgroup/user.slice/ device $ ./bpftool cglist /sys/fs/cgroup/user.slice/ ID AttachType Name 1device bpf_prog1 Signed-off-by: Roman Gushchin

[PATCH net-next 4/5] bpftool: implement cgdetach command

2017-11-30 Thread Roman Gushchin
Implement cgdetach command, which allows to detach the bpf program from a cgroup. It takes program id and attach type as arguments. Example: $ ./bpftool cgdetach /sys/fs/cgroup/user.slice/ device 1 Signed-off-by: Roman Gushchin Cc: Alexei Starovoitov Cc: Daniel

[PATCH net-next 3/5] bpftool: implement cgattach command

2017-11-30 Thread Roman Gushchin
This patch add the cgattach command to bpftool. It allows to load a bpf program from a binary file and attach it to a given cgroup. Example: $ bpftool cgattach ./mybpfprog.o /sys/fs/cgroup/user.slice/ ingress Signed-off-by: Roman Gushchin Cc: Alexei Starovoitov

[PATCH net-next 2/5] libbpf: prefer global symbols as bpf program name source

2017-11-30 Thread Roman Gushchin
Libbpf picks the name of the first symbol in the corresponding elf section to use as a program name. But without taking symbol's scope into account it may end's up with some local label as a program name. E.g.: $ bpftool cglist /sys/fs/cgroup/system.slice/tmp.mount/ 16 device

Re: [PATCH 1/6] perf: Add new type PERF_TYPE_PROBE

2017-11-30 Thread Peter Zijlstra
On Thu, Nov 30, 2017 at 01:43:06AM +, Song Liu wrote: > I added two fixed types (PERF_TYPE_KPROBE and PERF_TYPE_UPROBE) in the new > version. I know that perf doesn't need them any more. But currently bcc still > relies on these fixed types to use the probes/tracepoints. Yeah, sorry,

[PATCH/trivial] skbuff: Grammar s/are can/can/, s/change/changes/

2017-11-30 Thread Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven --- include/linux/skbuff.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index bc486ef23f20f91c..a38c80e9f91efee0 100644 --- a/include/linux/skbuff.h +++

Re: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-30 Thread Russell King - ARM Linux
On Thu, Nov 30, 2017 at 10:10:18AM +, Russell King - ARM Linux wrote: > On Thu, Nov 30, 2017 at 08:51:21AM +, Yan Markman wrote: > > The phylink_stop is called before phylink_disconnect_phy > > You could see in mvpp2.c: > > > > mvpp2_stop_dev() { > > phylink_stop(port->phylink); > >

Re: [PATCH net,stable v2] vhost: fix skb leak in handle_rx()

2017-11-30 Thread Michael S. Tsirkin
On Thu, Nov 30, 2017 at 10:46:17AM +0800, Jason Wang wrote: > > > On 2017年11月29日 23:31, Michael S. Tsirkin wrote: > > On Wed, Nov 29, 2017 at 09:23:24AM -0500,w...@redhat.com wrote: > > > From: Wei Xu > > > > > > Matthew found a roughly 40% tcp throughput regression with

Re: [PATCH] vsock.7: document VSOCK socket address family

2017-11-30 Thread Jorgen S. Hansen
> On Nov 30, 2017, at 12:21 PM, Stefan Hajnoczi wrote: > > The AF_VSOCK address family has been available since Linux 3.9 without a > corresponding man page. > > This patch adds vsock.7 and describes its use along the same lines as > existing ip.7, unix.7, and netlink.7

Re: [RFC] bpf: offload: report device information for offloaded programs

2017-11-30 Thread Kirill Tkhai
Hi, Jakub, please, read comments below. On 30.11.2017 03:22, Jakub Kicinski wrote: > Report to the user ifindex and namespace information of offloaded > programs. Always set dev_bound to true if program was loaded for > a device which has been since removed. Specify the namespace > using

Re: KASAN: use-after-free Read in sock_release

2017-11-30 Thread Christoph Hellwig
On Thu, Nov 30, 2017 at 02:07:19AM +, Al Viro wrote: > Incidentally, grepping for sys_close() shows another piece of fun in > net/netfilter/xt_bpf.c. Folks, ONCE DESCRIPTOR IS INSTALLED, THAT'S > IT; THERE'S NO REMOVING IT ON FAILURE EXITS. sys_close() should > never, ever be used that way.

Re: [iproute PATCH] link_gre6: Detect invalid encaplimit values

2017-11-30 Thread Nicolas Dichtel
Le 28/11/2017 à 16:49, Phil Sutter a écrit : > Looks like a typo: get_u8() returns 0 on success and -1 on error, so the > error checking here was ineffective. > > Fixes: a11b7b71a6eba ("link_gre6: really support encaplimit option") > Signed-off-by: Phil Sutter Good catch! Acked-by:

Re: [BUG] kernel stack corruption during/after Netlabel error

2017-11-30 Thread Paul Moore
On Thu, Nov 30, 2017 at 5:50 AM, Eric Dumazet wrote: > On Wed, 2017-11-29 at 19:16 -0800, Casey Schaufler wrote: >> On 11/29/2017 4:31 PM, James Morris wrote: >> > On Wed, 29 Nov 2017, Casey Schaufler wrote: >> > >> > > I see that there is a proposed fix later in the

Re: [PATCH net v2] tipc: call tipc_rcv() only if bearer is up in tipc_udp_recv()

2017-11-30 Thread Tommi Rantala
On 30.11.2017 12:57, Ying Xue wrote: On 11/29/2017 06:48 PM, Tommi Rantala wrote: Remove the second tipc_rcv() call in tipc_udp_recv(). We have just checked that the bearer is not up, and calling tipc_rcv() with a bearer that is not up leads to a TIPC div-by-zero crash in

Re: [PATCH v5 next 3/5] modules:capabilities: automatic module loading restriction

2017-11-30 Thread Djalal Harouni
On Thu, Nov 30, 2017 at 2:23 AM, Luis R. Rodriguez wrote: > On Mon, Nov 27, 2017 at 06:18:36PM +0100, Djalal Harouni wrote: >> diff --git a/include/linux/module.h b/include/linux/module.h >> index 5cbb239..c36aed8 100644 >> --- a/include/linux/module.h >> +++

[PATCH] vsock.7: document VSOCK socket address family

2017-11-30 Thread Stefan Hajnoczi
The AF_VSOCK address family has been available since Linux 3.9 without a corresponding man page. This patch adds vsock.7 and describes its use along the same lines as existing ip.7, unix.7, and netlink.7 man pages. CC: Jorgen Hansen CC: Dexuan Cui

Re: [PATCH net v2] tipc: call tipc_rcv() only if bearer is up in tipc_udp_recv()

2017-11-30 Thread Ying Xue
On 11/29/2017 06:48 PM, Tommi Rantala wrote: > Remove the second tipc_rcv() call in tipc_udp_recv(). We have just > checked that the bearer is not up, and calling tipc_rcv() with a bearer > that is not up leads to a TIPC div-by-zero crash in > tipc_node_calculate_timer(). The crash is rare in

Re: [PATCH v2 27/35] irqchip: Andestech Internal Vector Interrupt Controller driver

2017-11-30 Thread Marc Zyngier
On Wed, Nov 29 2017 at 11:23:34 pm GMT, Greentime Hu wrote: Hi Greentime, >>> +} >>> + >>> +static void ativic32_mask_ack_irq(struct irq_data *data) >>> +{ >>> + unsigned long int_mask2 = __nds32__mfsr(NDS32_SR_INT_MASK2); >>> + __nds32__mtsr_dsb(int_mask2 & (~(1 <<

Re: [BUG] kernel stack corruption during/after Netlabel error

2017-11-30 Thread Eric Dumazet
On Wed, 2017-11-29 at 19:16 -0800, Casey Schaufler wrote: > On 11/29/2017 4:31 PM, James Morris wrote: > > On Wed, 29 Nov 2017, Casey Schaufler wrote: > > > > > I see that there is a proposed fix later in the thread, but I > > > don't see > > > the patch. Could you send it to me, so I can try it

RE: [PATCH V11 4/5] vsprintf: add printk specifier %px

2017-11-30 Thread David Laight
From: Kees Cook > Sent: 29 November 2017 22:28 > On Wed, Nov 29, 2017 at 2:07 AM, David Laight wrote: > > From: Linus Torvalds > >> Sent: 29 November 2017 02:29 > >> > >> On Tue, Nov 28, 2017 at 6:05 PM, Tobin C. Harding wrote: > >> > > >> >Let's add

Re: [PATCH V11 0/5] hash addresses printed with %p

2017-11-30 Thread Sergey Senozhatsky
On (11/30/17 10:23), David Laight wrote: [..] > > Maybe I'm being thick, but... if we're rendering these addresses > > unusable by hashing them, why not just print something like > > "" in their place? That loses the uniqueness thing but I > > wonder how valuable that is in practice? > > My

RE: [PATCH V11 0/5] hash addresses printed with %p

2017-11-30 Thread David Laight
From: Andrew Morton > Sent: 29 November 2017 23:21 > > > > The added advantage of hashing %p is that security is now opt-out, if > > you _really_ want the address you have to work a little harder and use > > %px. You need a system-wide opt-out that prints the actual values. Otherwise developers

Re: flow cache removed = xfrm doesnt work

2017-11-30 Thread Steffen Klassert
On Mon, Nov 27, 2017 at 05:46:28PM +0100, Tomas Charvat wrote: > Gentoo-sources has no change vs vanilla in ipsec. However here is result > from Vanila 4.14.2 with OFFLOAD=N > > [ 2338.440735] BUG: unable to handle kernel NULL pointer dereference at > 0018 > [ 2338.440830] IP:

Re: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-30 Thread Russell King - ARM Linux
On Thu, Nov 30, 2017 at 08:51:21AM +, Yan Markman wrote: > The phylink_stop is called before phylink_disconnect_phy > You could see in mvpp2.c: > > mvpp2_stop_dev() { > phylink_stop(port->phylink); > } > > mvpp2_stop() { > mvpp2_stop_dev(port); >

[PATCH] net: phy-micrel: check return code in flp center function

2017-11-30 Thread Max Uvarov
Fix obvious typo that first return value is set but not checked. Signed-off-by: Max Uvarov --- drivers/net/phy/micrel.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index fdb43dd..ab46141 100644

Re: [PATCH v2 25/35] nds32: Build infrastructure

2017-11-30 Thread Greentime Hu
2017-11-30 17:30 GMT+08:00 Arnd Bergmann : > On Thu, Nov 30, 2017 at 6:48 AM, Greentime Hu wrote: >> 2017-11-30 4:27 GMT+08:00 Arnd Bergmann : >>> On Wed, Nov 29, 2017 at 3:10 PM, Greentime Hu wrote: 2017-11-29 19:57

[PATCH net] net: mvpp2: allocate zeroed tx descriptors

2017-11-30 Thread Antoine Tenart
From: Yan Markman Reserved and unused fields in the Tx descriptors should be 0. The PPv2 driver doesn't clear them at run-time (for performance reasons) but these descriptors aren't zeroed when allocated, which can lead to unpredictable behaviors. This patch fixes this by

Re: [PATCH v2 25/35] nds32: Build infrastructure

2017-11-30 Thread Arnd Bergmann
On Thu, Nov 30, 2017 at 6:48 AM, Greentime Hu wrote: > 2017-11-30 4:27 GMT+08:00 Arnd Bergmann : >> On Wed, Nov 29, 2017 at 3:10 PM, Greentime Hu wrote: >>> 2017-11-29 19:57 GMT+08:00 Arnd Bergmann : >> When you put them in a

Re: [PATCH v2 25/35] nds32: Build infrastructure

2017-11-30 Thread Greentime Hu
2017-11-30 15:52 GMT+08:00 Geert Uytterhoeven : > On Thu, Nov 30, 2017 at 6:48 AM, Greentime Hu wrote: >> 2017-11-30 4:27 GMT+08:00 Arnd Bergmann : >>> On Wed, Nov 29, 2017 at 3:10 PM, Greentime Hu wrote:

[PATCH 1/1] phy: Add 2.5G SGMII interface mode

2017-11-30 Thread Bhaskar Upadhaya
Add 2.5G SGMII interface mode(PHY_INTERFACE_MODE_2500SGMII) in existing phy_interface list.As auto-negotiation is not supported for 2.5G SGMII, we need to add a new type PHY_INTERFACE_MODE_2500SGMII to differentiate SGMII-1G and SGMII-2.5G with different setting for auto-negotiation.

Re: [PATCH net,stable v2] vhost: fix skb leak in handle_rx()

2017-11-30 Thread Wei Xu
On Thu, Nov 30, 2017 at 10:46:17AM +0800, Jason Wang wrote: > > > On 2017年11月29日 23:31, Michael S. Tsirkin wrote: > > On Wed, Nov 29, 2017 at 09:23:24AM -0500,w...@redhat.com wrote: > > > From: Wei Xu > > > > > > Matthew found a roughly 40% tcp throughput regression with

RE: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-30 Thread Yan Markman
The phylink_stop is called before phylink_disconnect_phy You could see in mvpp2.c: mvpp2_stop_dev() { phylink_stop(port->phylink); } mvpp2_stop() { mvpp2_stop_dev(port); phylink_disconnect_phy(port->phylink); } .ndo_stop = mvpp2_stop, -Original Message-

Re: [PATCH v2 6/6] bpf: add new test test_many_kprobe

2017-11-30 Thread Philippe Ombredanne
On Thu, Nov 30, 2017 at 2:44 AM, Song Liu wrote: > The test compares old text based kprobe API with PERF_TYPE_KPROBE. > > Here is a sample output of this test: > > Creating 1000 kprobes with text-based API takes 6.979683 seconds > Cleaning 1000 kprobes with text-based API

Re: [PATCH net] tcp: remove buggy call to tcp_v6_restore_cb()

2017-11-30 Thread Florian Westphal
Eric Dumazet wrote: > From: Eric Dumazet > > tcp_v6_send_reset() expects to receive an skb with skb->cb[] layout as > used in TCP stack. > MD5 lookup uses tcp_v6_iif() and tcp_v6_sdif() and thus > TCP_SKB_CB(skb)->header.h6 Indeed, thanks for fixing

Re: [RFC] virtio-net: help live migrate SR-IOV devices

2017-11-30 Thread achiad shochat
On 30 November 2017 at 05:29, Jason Wang wrote: > > > On 2017年11月29日 03:27, Jesse Brandeburg wrote: >> >> Hi, I'd like to get some feedback on a proposal to enhance virtio-net >> to ease configuration of a VM and that would enable live migration of >> passthrough network

<    1   2   3   4