Re: [PATCH v2] Bluetooth: Remove VLA usage in aes_cmac

2018-04-05 Thread Marcel Holtmann
Hi Gustavo, > In preparation to enabling -Wvla, remove VLA and replace it > with dynamic memory allocation instead. > > The use of stack Variable Length Arrays needs to be avoided, as they > can be a vector for stack exhaustion, which can be both a runtime bug > or a security flaw. Also, in gener

[PATCH net] arp: fix arp_filter on l3slave devices

2018-04-05 Thread Miguel Fadon Perlines
arp_filter performs an ip_route_output search for arp source address and checks if output device is the same where the arp request was received, if it is not, the arp request is not answered. This route lookup is always done on main route table so l3slave devices never find the proper route and ar

Re: [PATCH v2] Bluetooth: Remove VLA usage in aes_cmac

2018-04-05 Thread Marcel Holtmann
Hi Gustavo, >> so I took this patch back out of bluetooth-next before sending the pull >> request. I think the discussion on how to fix SHASH_DESC_ON_STACK macro >> needs to complete first. Once that has concluded we can revisit if this >> patch is still needed or if another solution has been f

Re: [PATCH v2 bpf-next 0/3] bpf/verifier: subprog/func_call simplifications

2018-04-05 Thread Edward Cree
On 05/04/18 06:28, Alexei Starovoitov wrote: > On Thu, Apr 05, 2018 at 12:58:46AM +0100, Edward Cree wrote: >> On 04/04/18 00:37, Alexei Starovoitov wrote: >>> hmm. that doesn't fail for me and any other bots didn't complain. >>> Are you sure you're running the latest kernel and tests? >> Ah, test_

Re: [PATCH v2] Bluetooth: Remove VLA usage in aes_cmac

2018-04-05 Thread Gustavo A. R. Silva
Hi Marcel, On 04/05/2018 02:23 AM, Marcel Holtmann wrote: so I took this patch back out of bluetooth-next before sending the pull request. I think the discussion on how to fix SHASH_DESC_ON_STACK macro needs to complete first. Once that has concluded we can revisit if this patch is still nee

Re: [PATCH v2] Bluetooth: Remove VLA usage in aes_cmac

2018-04-05 Thread Gustavo A. R. Silva
On 04/05/2018 03:46 AM, Marcel Holtmann wrote: By the way, what is you opinion on replacing crypto_shash_descsize(ctx) with PAGE_SIZE / 8 in SHASH_DESC_ON_STACK? Does it work for you? isn’t that just waste? Agree. The macro itself is this. #define SHASH_DESC_ON_STACK(shash, ctx)

[PATCH net] net: mvpp2: Fix parser entry init boundary check

2018-04-05 Thread Maxime Chevallier
Boundary check in mvpp2_prs_init_from_hw must be done according to the passed "tid" parameter, not the mvpp2_prs_entry index, which is not yet initialized at the time of the check. Fixes: 47e0e14eb1a6 ("net: mvpp2: Make mvpp2_prs_hw_read a parser entry init function") Signed-off-by: Maxime Cheval

Re: [PATCH v3 2/4] bus: fsl-mc: add restool userspace support

2018-04-05 Thread Laurentiu Tudor
Hello, My 2c below. On 04/04/2018 03:42 PM, Andrew Lunn wrote: >> I hear you. It is more complicated this way...having all these individual >> objects vs just a single "bundle" of them that represents a NIC. But, that's >> the way the DPAA2 hardware is, and we're implementing kernel support for

Re: [iovisor-dev] Best userspace programming API for XDP features query to kernel?

2018-04-05 Thread Daniel Borkmann
On 04/04/2018 02:28 PM, Jesper Dangaard Brouer via iovisor-dev wrote: > Hi Suricata people, > > When Eric Leblond (and I helped) integrated XDP in Suricata, we ran > into the issue, that at Suricata load/start time, we cannot determine > if the chosen XDP config options, like xdp-cpu-redirect[1],

[RFC] ethtool: Support for driver private ioctl's

2018-04-05 Thread Jose Abreu
Hi All, I would like to know your opinion regarding adding support for driver private ioctl's in ethtool. Background: Synopsys Ethernet IP's have a certain number of features which can be reconfigured at runtime. Giving you two examples: One of the most recent one is the safety features, which ca

[PATCH 2/2] net: phy: dp83640: Read strapped configuration settings

2018-04-05 Thread esben . haabendal
From: Esben Haabendal Read configration settings, to allow automatic forced speed/duplex setup by hardware strapping. Signed-off-by: Esben Haabendal Cc: Rasmus Villemoes --- drivers/net/phy/dp83640.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/phy/dp83640.c b/drivers/

[PATCH 1/2] net: phy: Helper function for reading strapped configuration values

2018-04-05 Thread esben . haabendal
From: Esben Haabendal Add a function for use in PHY driver probe functions, reading current autoneg, speed and duplex configuration from BMCR register. Useful for PHY that supports hardware strapped configuration, enabling Linux to respect that configuration (i.e. strapped non-autoneg configurat

Re: [PATCH v3 2/4] bus: fsl-mc: add restool userspace support

2018-04-05 Thread Andrew Lunn
On Thu, Apr 05, 2018 at 10:30:01AM +, Laurentiu Tudor wrote: > Hello, > > My 2c below. > > On 04/04/2018 03:42 PM, Andrew Lunn wrote: > >> I hear you. It is more complicated this way...having all these individual > >> objects vs just a single "bundle" of them that represents a NIC. But, >

Re: [PATCH v3 2/4] bus: fsl-mc: add restool userspace support

2018-04-05 Thread Laurentiu Tudor
On 04/05/2018 02:47 PM, Andrew Lunn wrote: > On Thu, Apr 05, 2018 at 10:30:01AM +, Laurentiu Tudor wrote: >> Hello, >> >> My 2c below. >> >> On 04/04/2018 03:42 PM, Andrew Lunn wrote: I hear you. It is more complicated this way...having all these individual objects vs just a single

Re: marvell switch

2018-04-05 Thread Andrew Lunn
On Thu, Apr 05, 2018 at 05:47:24AM +0300, Ran Shalit wrote: > Hello, > > I am trying to use marvell switch in linux, > Is it that the kernel drivers from marvell switch are used just to > enable all ports, or do they also provide APIs to userspace to enable > specific ports only. > I have not find

Re: [PATCH v3 2/4] bus: fsl-mc: add restool userspace support

2018-04-05 Thread gregkh
On Thu, Apr 05, 2018 at 10:30:01AM +, Laurentiu Tudor wrote: > Hello, > > My 2c below. > > On 04/04/2018 03:42 PM, Andrew Lunn wrote: > >> I hear you. It is more complicated this way...having all these individual > >> objects vs just a single "bundle" of them that represents a NIC. But, >

Re: [PATCH ethtool] ethtool: Add register dump support for MICROCHIP LAN78xx

2018-04-05 Thread Andrew Lunn
On Thu, Apr 05, 2018 at 11:41:28AM +0530, Raghuram Chary J wrote: Hi Raghuram > + fprintf(stdout, "PHY Registers:\n"); > + fprintf(stdout, "--\n"); > + fprintf(stdout, "Mode Control = 0x%04X\n", *lan78xx_reg++); > + fprintf(stdout, "Mode Status = 0x%04X\n", *lan78xx_re

Re: [v2] net: thunderx: nicvf_main: Fix potential NULL pointer dereferences

2018-04-05 Thread Vadim Lomovtsev
Hi guys, Please give me couple days to workout solution for this. I'll post patch for this as soon as I done with my testing. WBR, Vadim On Tue, Apr 03, 2018 at 05:04:23PM -0500, Gustavo A. R. Silva wrote: > Add null check on kmalloc() return value in order to prevent > a null pointer dereferenc

Re: [PATCH 06/12] wireless: Convert simple uses of a static const Ethernet broadcast address

2018-04-05 Thread Kalle Valo
Joe Perches writes: > Use the new ether_broadcast_addr global instead to save some object code. > > Signed-off-by: Joe Perches > --- > drivers/net/wireless/admtek/adm8211.c | 3 +-- > drivers/net/wireless/ath/carl9170/mac.c | 4 +--- > drivers/net/wireless/broadcom/b43/main.c

Re: [PATCH 06/12] wireless: Convert simple uses of a static const Ethernet broadcast address

2018-04-05 Thread Kalle Valo
Kalle Valo writes: > Joe Perches writes: > >> Use the new ether_broadcast_addr global instead to save some object code. >> >> Signed-off-by: Joe Perches >> --- >> drivers/net/wireless/admtek/adm8211.c | 3 +-- >> drivers/net/wireless/ath/carl9170/mac.c | 4 +--- >> drivers/ne

Re: [PATCH v3 2/4] bus: fsl-mc: add restool userspace support

2018-04-05 Thread Andrew Lunn
> > Hi Laurentiu > > > > So i can use switchdev without it? I can modprobe the switchdev > > driver, all the physical interfaces will appear, and i can use ip addr > > add etc. I do not need to use a user space tool at all in order to use > > the network functionality? > > Absolutely! Great. The

Re: [PATCH net-next] netns: filter uevents correctly

2018-04-05 Thread Kirill Tkhai
On 04.04.2018 22:48, Christian Brauner wrote: > commit 07e98962fa77 ("kobject: Send hotplug events in all network namespaces") > > enabled sending hotplug events into all network namespaces back in 2010. > Over time the set of uevents that get sent into all network namespaces has > shrunk. We have

Re: [PATCH net-next v2 2/2] dt: bindings: add new dt entries for brcmfmac

2018-04-05 Thread Kalle Valo
Ulf Hansson writes: > On 20 March 2018 at 10:55, Kalle Valo wrote: >> Arend van Spriel writes: >> > If I get it right, you mean something like this: > > mmc3: mmc@1c12000 { > ... > broken-sg-support; > sd-head-align = 4; > sd-sgentry-align

net_dim() may use uninitialized data

2018-04-05 Thread Geert Uytterhoeven
Hi Tal, With gcc-4.1.2: drivers/net/ethernet/broadcom/bcmsysport.c: In function ‘bcm_sysport_poll’: include/linux/net_dim.h:354: warning: ‘curr_stats.ppms’ may be used uninitialized in this function include/linux/net_dim.h:354: warning: ‘curr_stats.bpms’ may be used uninitialized in t

Re: [PATCH 00/12] Ethernet: Add and use ether__addr globals

2018-04-05 Thread Felix Fietkau
On 2018-03-31 09:05, Joe Perches wrote: > There are many local static and non-static arrays that are used for > Ethernet broadcast address output or comparison. > > Centralize the array into a single separate file and remove the local > arrays. I suspect that for many targets and configurations, t

[PATCH] net: phy: marvell: Enable interrupt function on LED2 pin

2018-04-05 Thread Esben Haabendal
From: Esben Haabendal The LED2[2]/INTn pin on Marvell 88E1318S as well as 88E1510/12/14/18 needs to be configured to be usable as interrupt not only when WOL is enabled, but whenever we rely on interrupts from the PHY. Signed-off-by: Esben Haabendal Cc: Rasmus Villemoes --- drivers/net/phy/ma

[PATCH net 0/6] net: better validate user provided tunnel names

2018-04-05 Thread Eric Dumazet
This series changes dev_valid_name() to not attempt reading a possibly too long user-provided device name, then use this helper in five different tunnel providers. Eric Dumazet (6): net: fool proof dev_valid_name() ip_tunnel: better validate user provided tunnel names ipv6: sit: better valid

[PATCH net 1/6] net: fool proof dev_valid_name()

2018-04-05 Thread Eric Dumazet
We want to use dev_valid_name() to validate tunnel names, so better use strnlen(name, IFNAMSIZ) than strlen(name) to make sure to not upset KASAN. Signed-off-by: Eric Dumazet --- net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/dev.c b/net/core/dev.c in

[PATCH net 2/6] ip_tunnel: better validate user provided tunnel names

2018-04-05 Thread Eric Dumazet
Use dev_valid_name() to make sure user does not provide illegal device name. syzbot caught the following bug : BUG: KASAN: stack-out-of-bounds in strlcpy include/linux/string.h:300 [inline] BUG: KASAN: stack-out-of-bounds in __ip_tunnel_create+0xca/0x6b0 net/ipv4/ip_tunnel.c:257 Write of size 20

[PATCH net 3/6] ipv6: sit: better validate user provided tunnel names

2018-04-05 Thread Eric Dumazet
Use dev_valid_name() to make sure user does not provide illegal device name. syzbot caught the following bug : BUG: KASAN: stack-out-of-bounds in strlcpy include/linux/string.h:300 [inline] BUG: KASAN: stack-out-of-bounds in ipip6_tunnel_locate+0x63b/0xaa0 net/ipv6/sit.c:254 Write of size 33 at

[PATCH net 4/6] ip6_gre: better validate user provided tunnel names

2018-04-05 Thread Eric Dumazet
Use dev_valid_name() to make sure user does not provide illegal device name. syzbot caught the following bug : BUG: KASAN: stack-out-of-bounds in strlcpy include/linux/string.h:300 [inline] BUG: KASAN: stack-out-of-bounds in ip6gre_tunnel_locate+0x334/0x860 net/ipv6/ip6_gre.c:339 Write of size 2

[PATCH net 5/6] ip6_tunnel: better validate user provided tunnel names

2018-04-05 Thread Eric Dumazet
Use valid_name() to make sure user does not provide illegal device name. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet --- net/ipv6/ip6_tunnel.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c in

[PATCH net 6/6] vti6: better validate user provided tunnel names

2018-04-05 Thread Eric Dumazet
Use valid_name() to make sure user does not provide illegal device name. Fixes: ed1efb2aefbb ("ipv6: Add support for IPsec virtual tunnel interfaces") Signed-off-by: Eric Dumazet Cc: Steffen Klassert --- net/ipv6/ip6_vti.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git

Re: [PATCH 00/12] Ethernet: Add and use ether__addr globals

2018-04-05 Thread Joe Perches
On Thu, 2018-04-05 at 15:27 +0200, Felix Fietkau wrote: > On 2018-03-31 09:05, Joe Perches wrote: > > There are many local static and non-static arrays that are used for > > Ethernet broadcast address output or comparison. > > > > Centralize the array into a single separate file and remove the loc

RE: [PATCH] net: phy: marvell: Enable interrupt function on LED2 pin

2018-04-05 Thread Bhadram Varka
Hi Esben, -Original Message- From: netdev-ow...@vger.kernel.org On Behalf Of Esben Haabendal Sent: Thursday, April 05, 2018 7:05 PM To: netdev@vger.kernel.org Cc: Esben Haabendal ; Rasmus Villemoes ; Andrew Lunn ; Florian Fainelli ; open list Subject: [PATCH] net: phy: marvell: Enable

Re: [PATCH 00/12] Ethernet: Add and use ether__addr globals

2018-04-05 Thread Felix Fietkau
On 2018-04-05 15:51, Joe Perches wrote: >> You have to factor in >> not just the .text size, but the fact that referencing an exported >> symbol needs a .reloc entry as well, which also eats up some space (at >> least when the code is being built as module). > > Thanks, the modules I built got sm

Re: [PATCH net-next] netns: filter uevents correctly

2018-04-05 Thread Christian Brauner
On Thu, Apr 05, 2018 at 04:01:03PM +0300, Kirill Tkhai wrote: > On 04.04.2018 22:48, Christian Brauner wrote: > > commit 07e98962fa77 ("kobject: Send hotplug events in all network > > namespaces") > > > > enabled sending hotplug events into all network namespaces back in 2010. > > Over time the s

Re: [PATCH v3 2/4] bus: fsl-mc: add restool userspace support

2018-04-05 Thread Laurentiu Tudor
Hi Greg, On 04/05/2018 03:30 PM, gregkh wrote: > On Thu, Apr 05, 2018 at 10:30:01AM +, Laurentiu Tudor wrote: >> Hello, >> >> My 2c below. >> >> On 04/04/2018 03:42 PM, Andrew Lunn wrote: I hear you. It is more complicated this way...having all these individual objects vs just a sin

Re: [PATCH v3 2/4] bus: fsl-mc: add restool userspace support

2018-04-05 Thread gregkh
On Thu, Apr 05, 2018 at 02:09:47PM +, Laurentiu Tudor wrote: > Hi Greg, > > On 04/05/2018 03:30 PM, gregkh wrote: > > On Thu, Apr 05, 2018 at 10:30:01AM +, Laurentiu Tudor wrote: > >> Hello, > >> > >> My 2c below. > >> > >> On 04/04/2018 03:42 PM, Andrew Lunn wrote: > I hear you. It

Re: [PATCH net-next] netns: filter uevents correctly

2018-04-05 Thread Kirill Tkhai
On 05.04.2018 17:07, Christian Brauner wrote: > On Thu, Apr 05, 2018 at 04:01:03PM +0300, Kirill Tkhai wrote: >> On 04.04.2018 22:48, Christian Brauner wrote: >>> commit 07e98962fa77 ("kobject: Send hotplug events in all network >>> namespaces") >>> >>> enabled sending hotplug events into all netw

Re: [PATCH net] arp: fix arp_filter on l3slave devices

2018-04-05 Thread David Ahern
On 4/5/18 2:25 AM, Miguel Fadon Perlines wrote: > arp_filter performs an ip_route_output search for arp source address and > checks if output device is the same where the arp request was received, > if it is not, the arp request is not answered. > > This route lookup is always done on main route t

Re: [PATCH net-next] netns: filter uevents correctly

2018-04-05 Thread Christian Brauner
On Thu, Apr 05, 2018 at 05:26:59PM +0300, Kirill Tkhai wrote: > On 05.04.2018 17:07, Christian Brauner wrote: > > On Thu, Apr 05, 2018 at 04:01:03PM +0300, Kirill Tkhai wrote: > >> On 04.04.2018 22:48, Christian Brauner wrote: > >>> commit 07e98962fa77 ("kobject: Send hotplug events in all network

Re: [PATCH v3 2/4] bus: fsl-mc: add restool userspace support

2018-04-05 Thread Laurentiu Tudor
Hi Andrew, On 04/05/2018 03:48 PM, Andrew Lunn wrote: >>> Hi Laurentiu >>> >>> So i can use switchdev without it? I can modprobe the switchdev >>> driver, all the physical interfaces will appear, and i can use ip addr >>> add etc. I do not need to use a user space tool at all in order to use >>> t

Re: [PATCH] net: phy: marvell: Enable interrupt function on LED2 pin

2018-04-05 Thread Andrew Lunn
> diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index > 0e0978d8a0eb..f03a510f1247 100644 > --- a/drivers/net/phy/marvell.c > +++ b/drivers/net/phy/marvell.c > @@ -457,6 +457,21 @@ static int marvell_of_reg_init(struct phy_device > *phydev) } #endif /* CONFIG_OF_MDIO */ >

[PATCH] net: thunderx: rework mac addresses list to u64 array

2018-04-05 Thread Vadim Lomovtsev
From: Vadim Lomovtsev It is too expensive to pass u64 values via linked list, instead allocate array for them by overall number of mac addresses from netdev. This eventually removes multiple kmalloc() calls, aviod memory fragmentation and allow to put single null check on kmalloc return value in

Re: [PATCH] net: thunderx: rework mac addresses list to u64 array

2018-04-05 Thread Vadim Lomovtsev
[correct Roberts' address] On Thu, Apr 05, 2018 at 07:57:56AM -0700, Vadim Lomovtsev wrote: > From: Vadim Lomovtsev > > It is too expensive to pass u64 values via linked list, instead > allocate array for them by overall number of mac addresses from netdev. > > This eventually removes multiple

Re: [PATCH] net: thunderx: rework mac addresses list to u64 array

2018-04-05 Thread Christoph Hellwig
> struct xcast_addr_list { > - struct list_head list; > int count; > + u64 mc[0]; Please use the standard C99 syntax here: u64 mc[]; > + mc_list = kmalloc(sizeof(*mc_list) + > +

[PATCH 9/9] perf tools: The buildid usage in example eBPF program

2018-04-05 Thread Jiri Olsa
The bpf-samples/bpf-stdout-example.c demonstrates how to put the buildid data into eBPF program. Link: http://lkml.kernel.org/n/tip-dq97ddil7h3qbvphbbo8p...@git.kernel.org Signed-off-by: Jiri Olsa --- tools/perf/bpf-samples/bpf-stdout-example.c | 42 + 1 file changed,

[PATCH 8/9] libbpf: Add support to attach buildid to program load

2018-04-05 Thread Jiri Olsa
Adding support to retrieve buildid from elf's "buildid" section and passing it through to the load_program function to kernel bpf syscall. Fixing perf use of the bpf_load_program function and linking in the vsprintf.o into bpftool to have the scnprintf function in. Link: http://lkml.kernel.org/n/

[PATCH 6/9] bpf: Add CONFIG_BPF_BUILDID_CHECK option

2018-04-05 Thread Jiri Olsa
Adding CONFIG_BPF_BUILDID_CHECK option that forces kernel to check on provided build id when loading eBPF program. If the build id does not match the one in kernel the program fails to load. Adding new field into struct bpf_attr. The kern_buildid points to the user memory that contains the buildid

[PATCH 7/9] libbpf: Synchronize uapi bpf.h header

2018-04-05 Thread Jiri Olsa
Synchronize include/uapi/linux/bpf.h with tools version. Link: http://lkml.kernel.org/n/tip-gaja0nnet6oku657642nx...@git.kernel.org Signed-off-by: Jiri Olsa --- tools/include/uapi/linux/bpf.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/ua

[PATCH 5/9] bpf: Add CONFIG_BUILDID_H option

2018-04-05 Thread Jiri Olsa
Adding CONFIG_BUILDID_H option that forces build to generate file with GNU build id value: include/linux/buildid.h It contains following macros: #define LINUX_BUILDID_DATA "\x6c\x41\x0f\xea\xa9\x5d ... #define LINUX_BUILDID_SIZE 20 Those macros will be used in following patches to identif

[PATCH 3/9] kbuild: Do not pass arguments to link-vmlinux.sh

2018-04-05 Thread Jiri Olsa
There's no need to pass LD* arguments to link-vmlinux.sh, because they are passed as variables. The only argument the link-vmlinux.sh supports is the 'clean' argument. Signed-off-by: Jiri Olsa --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile in

[PATCH 4/9] kbuild: Add filechk2 function

2018-04-05 Thread Jiri Olsa
Adding filechk2 function that has the same semantics as filechk, but it takes the target file from the 2nd argument instead of from the '$@' as in the filechk function. This function is needed when we can't have separate target for the file, like in the following patch. Signed-off-by: Jiri Olsa

[PATCH 2/9] perf tools: Add fetch_kernel_buildid function

2018-04-05 Thread Jiri Olsa
Adding fetch_kernel_buildid helper function to retrieve build id from running kernel. It will be used in following patches. Link: http://lkml.kernel.org/n/tip-at98orsncas8v2ito61u3...@git.kernel.org Signed-off-by: Jiri Olsa --- tools/perf/util/util.c | 18 ++ tools/perf/util/util

[PATCH 1/9] perf tools: Make read_build_id function public

2018-04-05 Thread Jiri Olsa
And renaming it into parse_notes_buildid to be more precise and usable in following patches. Link: http://lkml.kernel.org/n/tip-v1mz76rkdxfnbfz2v05fu...@git.kernel.org Signed-off-by: Jiri Olsa --- tools/perf/util/symbol-minimal.c | 50 ++-- tools/perf/util/uti

[RFC 0/9] bpf: Add buildid check support

2018-04-05 Thread Jiri Olsa
hi, eBPF programs loaded for kprobes are allowed to read kernel internal structures. We check the provided kernel version to ensure that the program is loaded for the proper kernel. The problem is that the version check is not enough, because it only follows the version setup from kernel's Makefi

Kernel bug from adding bpf actions in tc

2018-04-05 Thread Lucas Bates
Hi Davide, Our overnight tc test runs of net-next revealed a kernel bug on one of the BPF tests you submitted, d959. The add action completes successfully, but the bug occurs on the verify when tdc does a get of the action that was just added. Here's the text of the dump: [ 61.973632] BUG: un

Re: [PATCH v3 2/4] bus: fsl-mc: add restool userspace support

2018-04-05 Thread Andrew Lunn
On Thu, Apr 05, 2018 at 02:43:29PM +, Laurentiu Tudor wrote: > Hi Andrew, > > On 04/05/2018 03:48 PM, Andrew Lunn wrote: > >>> Hi Laurentiu > >>> > >>> So i can use switchdev without it? I can modprobe the switchdev > >>> driver, all the physical interfaces will appear, and i can use ip addr >

Re: [virtio-dev] Re: [RFC PATCH 1/3] qemu: virtio-bypass should explicitly bind to a passthrough device

2018-04-05 Thread Paolo Bonzini
On 04/04/2018 10:02, Siwei Liu wrote: >> pci_bus_num is almost always a bug if not done within >> a context of a PCI host, bridge, etc. >> >> In particular this will not DTRT if run before guest assigns bus >> numbers. >> > I was seeking means to reserve a specific pci bus slot from drivers, > and

RE: [PATCH v3 2/4] bus: fsl-mc: add restool userspace support

2018-04-05 Thread Ruxandra Ioana Ciocoi Radulescu
> -Original Message- > From: Andrew Lunn [mailto:and...@lunn.ch] > Sent: Thursday, April 5, 2018 6:24 PM > To: Laurentiu Tudor > Cc: Stuart Yoder ; Arnd Bergmann ; > Ioana Ciornei ; gregkh > ; Linux Kernel Mailing List ker...@vger.kernel.org>; Ruxandra Ioana Ciocoi Radulescu > ; Razvan St

Re: [PATCH v2 bpf-next 0/3] bpf/verifier: subprog/func_call simplifications

2018-04-05 Thread Jiong Wang
On 03/04/2018 02:08, Alexei Starovoitov wrote: Combining subprog pass with do_check is going into opposite direction of this long term work. Divide and conquer. Combining more things into do_check is the opposite of this programming principle. Agree. And for the redundant insn traversal issue i

Re: [RFC] ethtool: Support for driver private ioctl's

2018-04-05 Thread Florian Fainelli
On 04/05/2018 03:47 AM, Jose Abreu wrote: > Hi All, > > I would like to know your opinion regarding adding support for > driver private ioctl's in ethtool. > > Background: Synopsys Ethernet IP's have a certain number of > features which can be reconfigured at runtime. Giving you two > examples:

Re: marvell switch

2018-04-05 Thread Ran Shalit
On Thu, Apr 5, 2018 at 3:22 PM, Andrew Lunn wrote: > On Thu, Apr 05, 2018 at 05:47:24AM +0300, Ran Shalit wrote: >> Hello, >> >> I am trying to use marvell switch in linux, >> Is it that the kernel drivers from marvell switch are used just to >> enable all ports, or do they also provide APIs to us

Re: [PATCH 1/2] net: phy: Helper function for reading strapped configuration values

2018-04-05 Thread Florian Fainelli
On 04/05/2018 04:44 AM, esben.haaben...@gmail.com wrote: > From: Esben Haabendal > > Add a function for use in PHY driver probe functions, reading current > autoneg, speed and duplex configuration from BMCR register. > > Useful for PHY that supports hardware strapped configuration, enabling >

Re: [PATCH 2/2] net: phy: dp83640: Read strapped configuration settings

2018-04-05 Thread Florian Fainelli
On 04/05/2018 04:44 AM, esben.haaben...@gmail.com wrote: > From: Esben Haabendal > > Read configration settings, to allow automatic forced speed/duplex setup > by hardware strapping. OK but why? What problem is this solving for you? In general, we do not really want to preserve too much of wha

Re: [PATCH 3/9] kbuild: Do not pass arguments to link-vmlinux.sh

2018-04-05 Thread Masahiro Yamada
2018-04-06 0:16 GMT+09:00 Jiri Olsa : > There's no need to pass LD* arguments to link-vmlinux.sh, > because they are passed as variables. The only argument > the link-vmlinux.sh supports is the 'clean' argument. > > Signed-off-by: Jiri Olsa > --- Wrong. $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) exist

Re: [PATCH] net: thunderx: rework mac addresses list to u64 array

2018-04-05 Thread Vadim Lomovtsev
Hi Christoph, Thank you for your feedback and time. On Thu, Apr 05, 2018 at 08:07:48AM -0700, Christoph Hellwig wrote: > > struct xcast_addr_list { > > - struct list_head list; > > int count; > > + u64 mc[0]; > > Please use the standard C99 syntax here: > >

Re: marvell switch

2018-04-05 Thread Andrew Lunn
> Is there a wiki which explains switch configuration ? Nope. The whole idea is that they behave like normal linux interfaces. So there is no need to document them. You already know how to use them. > Is it possible to open socket and send/recieve on switch ports (lan0 > for example) ? Sure. It

[PATCH] qtnfmac: pearl: pcie: fix memory leak in qtnf_fw_work_handler

2018-04-05 Thread Gustavo A. R. Silva
In case memory resources for fw were succesfully allocated, release them before jumping to fw_load_fail. Addresses-Coverity-ID: 1466092 ("Resource leak") Fixes: c3b2f7ca4186 ("qtnfmac: implement asynchronous firmware loading") Signed-off-by: Gustavo A. R. Silva --- drivers/net/wireless/quantenna

Re: [PATCH v3 2/4] bus: fsl-mc: add restool userspace support

2018-04-05 Thread gregkh
On Thu, Apr 05, 2018 at 03:35:30PM +, Ruxandra Ioana Ciocoi Radulescu wrote: > > -Original Message- > > From: Andrew Lunn [mailto:and...@lunn.ch] > > Sent: Thursday, April 5, 2018 6:24 PM > > To: Laurentiu Tudor > > Cc: Stuart Yoder ; Arnd Bergmann ; > > Ioana Ciornei ; gregkh > > ; Li

Re: [PATCH] net: thunderx: rework mac addresses list to u64 array

2018-04-05 Thread Christoph Hellwig
On Thu, Apr 05, 2018 at 09:07:49AM -0700, Vadim Lomovtsev wrote: > > > > > + mc_list = kmalloc(sizeof(*mc_list) + > > > + sizeof(u64) * > > > netdev_mc_count(netdev), > > > + GFP_ATOMIC); >

[PATCH] ieee802154: mcr20a: Fix memory leak in mcr20a_probe

2018-04-05 Thread Gustavo A. R. Silva
Free allocated memory for pdata before return. Addresses-Coverity-ID: 1466096 ("Resource leak") Fixes: 8c6ad9cc5157 ("ieee802154: Add NXP MCR20A IEEE 802.15.4 transceiver driver") Signed-off-by: Gustavo A. R. Silva --- drivers/net/ieee802154/mcr20a.c | 9 ++--- 1 file changed, 6 insertions(

Re: [PATCH v2 bpf-next 0/3] bpf/verifier: subprog/func_call simplifications

2018-04-05 Thread Edward Cree
On 05/04/18 16:50, Jiong Wang wrote: > On 03/04/2018 02:08, Alexei Starovoitov wrote: >> Combining subprog pass with do_check is going into opposite direction >> of this long term work. Divide and conquer. Combining more things into >> do_check is the opposite of this programming principle. > > Agr

Re: [PATCH] qtnfmac: pearl: pcie: fix memory leak in qtnf_fw_work_handler

2018-04-05 Thread Sergey Matyukevich
Hello Gustavo, > In case memory resources for fw were succesfully allocated, release > them before jumping to fw_load_fail. > > Addresses-Coverity-ID: 1466092 ("Resource leak") > Fixes: c3b2f7ca4186 ("qtnfmac: implement asynchronous firmware loading") > Signed-off-by: Gustavo A. R. Silva > --- >

Re: [PATCH] qtnfmac: pearl: pcie: fix memory leak in qtnf_fw_work_handler

2018-04-05 Thread Gustavo A. R. Silva
Hi Sergey, On 04/05/2018 11:31 AM, Sergey Matyukevich wrote: Hello Gustavo, In case memory resources for fw were succesfully allocated, release them before jumping to fw_load_fail. Addresses-Coverity-ID: 1466092 ("Resource leak") Fixes: c3b2f7ca4186 ("qtnfmac: implement asynchronous firmware

Re: [PATCH net-next] pptp: remove a buggy dst release in pptp_connect()

2018-04-05 Thread Sasha Levin
Hi. [This is an automated email] This commit has been processed by the -stable helper bot and determined to be a high probability candidate for -stable trees. (score: 30.1120) The bot has tested the following trees: v4.15.15, v4.14.32, v4.9.92, v4.4.126, v4.15.15: Build OK! v4.14.32: Build OK!

Re: [PATCH v3 2/4] bus: fsl-mc: add restool userspace support

2018-04-05 Thread Andrew Lunn
> > Hi Andrew, > > > > We're waiting for the DPIO driver (which we depend on) to be moved > > out of staging first, it's currently under review: > > https://lkml.org/lkml/2018/3/27/1086 > > That's stalled on my side right now as the merge window is open and I > can't do any new stuff until after

Re: [PATCH iproute2] ip/l2tp: remove offset and peer-offset options

2018-04-05 Thread Guillaume Nault
On Wed, Apr 04, 2018 at 04:43:10PM -0700, Stephen Hemminger wrote: > On Tue, 3 Apr 2018 17:39:54 +0200 > Guillaume Nault wrote: > > > Ignore options "peer-offset" and "offset" when creating sessions. Keep > > them when dumping sessions in order to avoid breaking external scripts. > > > > "peer-o

[PATCH iproute2] l2tp: no need to export session offsets in JSON output

2018-04-05 Thread Guillaume Nault
The offset and peer_offset parameters are only printed to avoid confusing external scripts that may parse "ip l2tp show session" output. There's no reason to keep them in JSON. Signed-off-by: Guillaume Nault --- ip/ipl2tp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a

Re: [PATCH net-next 6/6] netdevsim: Add simple FIB resource controller via devlink

2018-04-05 Thread Jiri Pirko
Wed, Mar 28, 2018 at 03:22:00AM CEST, d...@cumulusnetworks.com wrote: >Add devlink support to netdevsim and use it to implement a simple, >profile based resource controller. Only one controller is needed >per namespace, so the first netdevsim netdevice in a namespace >registers with devlink. If tha

Re: Kernel bug from adding bpf actions in tc

2018-04-05 Thread Davide Caratti
On Thu, 2018-04-05 at 11:23 -0400, Lucas Bates wrote: > Hi Davide, > > Our overnight tc test runs of net-next revealed a kernel bug on one of > the BPF tests you submitted, d959. The add action completes > successfully, but the bug occurs on the verify when tdc does a get of > the action that was

RE: [Intel-wired-lan] [next-queue PATCH v6 08/10] igb: Add MAC address support for ethtool nftuple filters

2018-04-05 Thread Vinicius Costa Gomes
Hi, "Brown, Aaron F" writes: >> From: Intel-wired-lan [mailto:intel-wired-lan-boun...@osuosl.org] On >> Behalf Of Vinicius Costa Gomes >> Sent: Thursday, March 29, 2018 2:08 PM >> To: intel-wired-...@lists.osuosl.org >> Cc: netdev@vger.kernel.org; Sanchez-Palencia, Jesus > palen...@intel.com> >>

Re: marvell switch

2018-04-05 Thread Andrew Lunn
On Thu, Apr 05, 2018 at 05:26:37PM +, Ran Shalit wrote: > בתאריך יום ה׳, 5 באפר׳ 2018, 19:09, מאת Andrew Lunn ‏: > > > > Is there a wiki which explains switch configuration ? > > > > Nope. The whole idea is that they behave like normal linux > > interfaces. So there is no need to document them

[PATCH net-next] hv_netvsc: Add NetVSP v6 into version negotiation

2018-04-05 Thread Haiyang Zhang
From: Haiyang Zhang This patch adds the NetVSP v6 message structures, and includes this version into NetVSC/NetVSP version negotiation process. Signed-off-by: Haiyang Zhang --- drivers/net/hyperv/hyperv_net.h | 33 + drivers/net/hyperv/netvsc.c | 3 ++- 2 f

Re: [PATCH 07/12] brcmfmac: Convert ALLFFMAC to ether_broadcast_addr

2018-04-05 Thread Arend van Spriel
On 3/31/2018 9:05 AM, Joe Perches wrote: Remove the local ALLFFMAC extern array and use the new global instead. I stumbled upon this one couple of weeks ago. I moved the definition to flowring.c although I considered for a moment to pick up the task you took here valiantly. Miscellanea: o

Re: [PATCH 3/9] kbuild: Do not pass arguments to link-vmlinux.sh

2018-04-05 Thread Jiri Olsa
On Fri, Apr 06, 2018 at 12:50:00AM +0900, Masahiro Yamada wrote: > 2018-04-06 0:16 GMT+09:00 Jiri Olsa : > > There's no need to pass LD* arguments to link-vmlinux.sh, > > because they are passed as variables. The only argument > > the link-vmlinux.sh supports is the 'clean' argument. > > > > Signed

[PATCH 4/4] hv_netvsc: Pass net_device parameter to revoke and teardown functions

2018-04-05 Thread Mohammed Gamal
The callers to netvsc_revoke_*_buf() and netvsc_teardown_*_gpadl() already have their net_device instances. Pass them as a paramaeter to the function instead of obtaining them from netvsc_device struct everytime Signed-off-by: Mohammed Gamal --- drivers/net/hyperv/netvsc.c | 37 +

[PATCH 2/4] hv_netvsc: Split netvsc_revoke_buf() and netvsc_teardown_gpadl()

2018-04-05 Thread Mohammed Gamal
Split each of the functions into two for each of send/recv buffers. This will be needed in order to implement a fine-grained messaging sequence to the host so tht we accommodate the requirements of different Windows versions Fixes: 0ef58b0a05c12 ("hv_netvsc: change GPAD teardown order on older ver

[PATCH 3/4] hv_netvsc: Ensure correct teardown message sequence order

2018-04-05 Thread Mohammed Gamal
Prior to commit 0cf737808ae7 ("hv_netvsc: netvsc_teardown_gpadl() split") the call sequence in netvsc_device_remove() was as follows (as implemented in netvsc_destroy_buf()): 1- Send NVSP_MSG1_TYPE_REVOKE_RECV_BUF message 2- Teardown receive buffer GPADL 3- Send NVSP_MSG1_TYPE_REVOKE_SEND_BUF messa

[PATCH 0/4] hv_netvsc: Fix shutdown issues on older Windows hosts

2018-04-05 Thread Mohammed Gamal
Guests running on WS2012 hosts would not shutdown when changing network interface setting (e.g. Number of channels, MTU ... etc). This patch series addresses these shutdown issues we enecountered with WS2012 hosts. It's essentialy a rework of the series sent in https://lkml.org/lkml/2018/1/23/11

[PATCH 1/4] hv_netvsc: Use Windows version instead of NVSP version on GPAD teardown

2018-04-05 Thread Mohammed Gamal
When changing network interface settings, Windows guests older than WS2016 can no longer shutdown. This was addressed by commit 0ef58b0a05c12 ("hv_netvsc: change GPAD teardown order on older versions"), however the issue also occurs on WS2012 guests that share NVSP protocol versions with WS2016 gue

Re: [PATCH net-next v2 2/2] dt: bindings: add new dt entries for brcmfmac

2018-04-05 Thread Ulf Hansson
On 5 April 2018 at 15:10, Kalle Valo wrote: > Ulf Hansson writes: > >> On 20 March 2018 at 10:55, Kalle Valo wrote: >>> Arend van Spriel writes: >>> >> If I get it right, you mean something like this: >> >> mmc3: mmc@1c12000 { >> ... >> broken-sg-support; >>

Re: [PATCH net-next v2 2/2] dt: bindings: add new dt entries for brcmfmac

2018-04-05 Thread Arend van Spriel
On 4/5/2018 3:10 PM, Kalle Valo wrote: Ulf Hansson writes: On 20 March 2018 at 10:55, Kalle Valo wrote: Arend van Spriel writes: If I get it right, you mean something like this: mmc3: mmc@1c12000 { ... broken-sg-support; sd-head-align = 4; sd-sgentry-align =

Re: [PATCH net 0/6] net: better validate user provided tunnel names

2018-04-05 Thread David Miller
From: Eric Dumazet Date: Thu, 5 Apr 2018 06:39:25 -0700 > This series changes dev_valid_name() to not attempt reading > a possibly too long user-provided device name, then use > this helper in five different tunnel providers. Series applied and queued up for -stable, thanks Eric. Reading over

Re: [PATCH net 0/6] net: better validate user provided tunnel names

2018-04-05 Thread Eric Dumazet
On 04/05/2018 12:21 PM, David Miller wrote: > From: Eric Dumazet > Date: Thu, 5 Apr 2018 06:39:25 -0700 > >> This series changes dev_valid_name() to not attempt reading >> a possibly too long user-provided device name, then use >> this helper in five different tunnel providers. > > Series app

Re: [PATCH iproute2] l2tp: no need to export session offsets in JSON output

2018-04-05 Thread Stephen Hemminger
On Thu, 5 Apr 2018 19:24:17 +0200 Guillaume Nault wrote: > The offset and peer_offset parameters are only printed to avoid > confusing external scripts that may parse "ip l2tp show session" > output. There's no reason to keep them in JSON. > > Signed-off-by: Guillaume Nault > --- Applied thank

Re: [PATCH net-next 6/6] netdevsim: Add simple FIB resource controller via devlink

2018-04-05 Thread David Ahern
On 4/5/18 11:27 AM, Jiri Pirko wrote: > Wed, Mar 28, 2018 at 03:22:00AM CEST, d...@cumulusnetworks.com wrote: >> Add devlink support to netdevsim and use it to implement a simple, >> profile based resource controller. Only one controller is needed >> per namespace, so the first netdevsim netdevice

Enable and configure storm prevention in a network device

2018-04-05 Thread Murali Karicheri
Hello Netdev experts, Is there a standard way to implement and configure storm prevention in a Linux network device? Our NIC firmware has the capability to enable storm prevention which is implemented using a credit based scheme. The configuration is how many number of multicast + broadcast pack

[patch net] devlink: convert occ_get op to separate registration

2018-04-05 Thread Jiri Pirko
From: Jiri Pirko This resolves race during initialization where the resources with ops are registered before driver and the structures used by occ_get op is initialized. So keep occ_get callbacks registered only when all structs are initialized. The example flows, as it is in mlxsw: 1) driver lo

  1   2   >