[PATCH] net: dsa: Add support for port mac address

2019-03-04 Thread xiaofeis
Allow port network device's mac address to be retrieved from the device tree. Signed-off-by: xiaofeis --- Documentation/devicetree/bindings/net/dsa/dsa.txt | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.txt b/Documentation/devicetree/bindi

Re: [PATCH] net: xfrm: Fix potential oops in xfrm_user_rcv_msg and array out of bounds

2019-03-04 Thread Su Yanjun
On 2019/3/5 15:31, Steffen Klassert wrote: On Tue, Mar 05, 2019 at 03:08:49PM +0800, Su Yanjun wrote: On 2019/3/5 14:49, Herbert Xu wrote: On Sun, Mar 03, 2019 at 10:47:39PM -0500, Su Yanjun wrote: When i review xfrm_user.c code, i found some potentical bug in it. In xfrm_user_rcvmsg if

Re: "A call to built-in function '__stack_chk_fail' is not supported." when building BPF samples/tools

2019-03-04 Thread Hazrael
‐‐‐ Original Message ‐‐‐ On Tuesday, March 5, 2019 12:31 AM, Daniel Borkmann wrote: > On 03/05/2019 12:18 AM, Hazrael wrote: > > > Hello, > > I guess I'm taking risks by asking this here, as the problem > > I have is definitely more likely to come from my setup, but > > after many resear

Re: [PATCH] net: xfrm: Fix potential oops in xfrm_user_rcv_msg and array out of bounds

2019-03-04 Thread Steffen Klassert
On Tue, Mar 05, 2019 at 03:08:49PM +0800, Su Yanjun wrote: > On 2019/3/5 14:49, Herbert Xu wrote: > > > On Sun, Mar 03, 2019 at 10:47:39PM -0500, Su Yanjun wrote: > > > When i review xfrm_user.c code, i found some potentical bug in it. > > > > > > In xfrm_user_rcvmsg if type parameter from user

Re: [RFC net-next 8/8] net/mlx5: Add subdev driver to bind to subdev devices

2019-03-04 Thread Greg KH
On Fri, Mar 01, 2019 at 05:21:13PM +, Parav Pandit wrote: > > > > -Original Message- > > From: Greg KH > > Sent: Friday, March 1, 2019 1:22 AM > > To: Parav Pandit > > Cc: netdev@vger.kernel.org; linux-ker...@vger.kernel.org; > > michal.l...@markovi.net; da...@davemloft.net; Jiri Pi

Re: net-next: new CL45 regression

2019-03-04 Thread Heiner Kallweit
On 05.03.2019 04:07, S-k, Shyam-sundar wrote: > Hi Heiner, > > On 3/5/2019 2:18 AM, Heiner Kallweit wrote: >> On 04.03.2019 15:48, S-k, Shyam-sundar wrote: >>> Hi Heiner, >>> >>> We noticed that, the recent changes for CL45 in net-next tree causing >>> regression on AMD platforms. The following i

Re: [PATCH] net: xfrm: Fix potential oops in xfrm_user_rcv_msg and array out of bounds

2019-03-04 Thread Herbert Xu
On Sun, Mar 03, 2019 at 10:47:39PM -0500, Su Yanjun wrote: > When i review xfrm_user.c code, i found some potentical bug in it. > > In xfrm_user_rcvmsg if type parameter from user space is set to > XFRM_MSG_MAX or XFRM_MSG_NEWSADINFO or XFRM_MSG_NEWSPDINFO. It will cause > xfrm_user_rcv_msg refe

Re: [PATCH] iwlwifi: fix 64-bit division

2019-03-04 Thread Luciano Coelho
Hi Arnd, On Mon, 2019-03-04 at 21:38 +0100, Arnd Bergmann wrote: > do_div() expects unsigned operands and otherwise triggers a warning > like: > > drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c:465:2: error: > comparison of distinct pointer types ('typeof ((rtt_avg)) *' (aka > 'long long

Re: [PATCH] sysctl: Fix proc_do_large_bitmap for large input buffers

2019-03-04 Thread Eric Sandeen
On 2/20/19 5:32 PM, Eric Sandeen wrote: > Today, proc_do_large_bitmap() truncates a large write input buffer > to PAGE_SIZE - 1, which may result in misparsed numbers at the > (truncated) end of the buffer. Further, it fails to notify the caller > that the buffer was truncated, so it doesn't get c

Re: question about memory leak in ip_mc_del1_src

2019-03-04 Thread maowenan
On 2019/3/5 2:16, David Miller wrote: > From: maowenan > Date: Mon, 4 Mar 2019 20:47:42 +0800 > >> pmc->tomb = psf; >> rv = 1; //if it does not kfree(psf), will it >> lead to memory leak after this line? > > pmc->tomb points to psf, why shoul

Re: net-next: new CL45 regression

2019-03-04 Thread S-k, Shyam-sundar
Hi Heiner, On 3/5/2019 2:18 AM, Heiner Kallweit wrote: > On 04.03.2019 15:48, S-k, Shyam-sundar wrote: >> Hi Heiner, >> >> We noticed that, the recent changes for CL45 in net-next tree causing >> regression on AMD platforms. The following is the commit: >> >> 3ce2a02 net: phy: marvell10g: check f

Re: [PATCH v6 1/4] can: m_can: Create a m_can platform framework

2019-03-04 Thread Joe Perches
On Mon, 2019-03-04 at 13:12 -0600, Dan Murphy wrote: > On 3/4/19 12:13 PM, Wolfgang Grandegger wrote: > > Am 04.03.19 um 18:22 schrieb Dan Murphy: > > > > > + int pm_clock_support; > > > > > > > > A "bool" would be more appropriate, I think. > > > > > > I was abiding by this checkpatch warnin

Re: [RFC PATCH net-next] failover: allow name change on IFF_UP slave interfaces

2019-03-04 Thread Michael S. Tsirkin
On Mon, Mar 04, 2019 at 07:50:59PM -0500, Si-Wei Liu wrote: > When a netdev appears through hot plug then gets enslaved by a failover > master that is already up and running, the slave will be opened > right away after getting enslaved. Today there's a race that userspace > (udev) may fail to renam

static bpf vars. Was: [PATCH bpf-next v2 5/7] bpf, libbpf: support global data/bss/rodata sections

2019-03-04 Thread Alexei Starovoitov
On Fri, Mar 01, 2019 at 09:06:35PM +0100, Daniel Borkmann wrote: > Overall I think the patches and direction is great. Thanks a lot for working on it. More thoughts below: > By the way, from LLVM side, do you think it makes sense for local vars > where you encode the offset into insn->imm to alr

Re: [RFC PATCH net] failover: allow name change on IFF_UP slave interfaces

2019-03-04 Thread si-wei liu
Sorry for multiple sends. The patch is exactly same. I added a few people who were missing int the cc lines in the first attemt. And corrected the subject line in the second attempt. -Siwei On 3/4/2019 6:04 PM, David Miller wrote: Why did you send this three times? What's different in each

Re: [PATCH net-next 4/8] devlink: allow subports on devlink PCI ports

2019-03-04 Thread Jakub Kicinski
On Tue, 5 Mar 2019 01:30:19 +, Jason Gunthorpe wrote: > On Mon, Mar 04, 2019 at 05:03:20PM -0800, Jakub Kicinski wrote: > > > > Don't we already have devlink instances for every mlx5 physical port > > > and VF as they are unique PCI functions? > > > > That's a very NIC-centric view of the w

Re: [RFC PATCH net] failover: allow name change on IFF_UP slave interfaces

2019-03-04 Thread David Miller
Why did you send this three times? What's different in each of these copies?

Re: [RFC net-next 0/8] Introducing subdev bus and devlink extension

2019-03-04 Thread Jakub Kicinski
On Mon, 4 Mar 2019 04:41:01 +, Parav Pandit wrote: > > > $ devlink dev show > > > pci/:05:00.0 > > > subdev/subdev0 > > > > Please don't spawn devlink instances. Devlink instance is supposed to > > represent an ASIC. If we start spawning them willy nilly for whatever > > software const

Re: [RFC PATCH net] failover: allow name change on IFF_UP slave interfaces

2019-03-04 Thread si-wei liu
Please disregard patch emails previously sent with similar subject. The patch target is set to net rather than net-next. Any discussion or comment around this patch should go after this email. -Siwei On 3/4/2019 4:53 PM, Si-Wei Liu wrote: When a netdev appears through hot plug then gets ensl

Re: [RFC net-next 0/8] Introducing subdev bus and devlink extension

2019-03-04 Thread Jakub Kicinski
Parav, please wrap your responses to at most 80 characters. This is hard to read. On Mon, 4 Mar 2019 04:41:01 +, Parav Pandit wrote: > > -Original Message- > > From: Jakub Kicinski > > Sent: Friday, March 1, 2019 2:04 PM > > To: Parav Pandit ; Or Gerlitz > > Cc: netdev@vger.kernel.or

Re: [PATCH net-next 4/8] devlink: allow subports on devlink PCI ports

2019-03-04 Thread Jason Gunthorpe
On Mon, Mar 04, 2019 at 05:03:20PM -0800, Jakub Kicinski wrote: > > Don't we already have devlink instances for every mlx5 physical port > > and VF as they are unique PCI functions? > > That's a very NIC-centric view of the world, though. Equating devlink > instances to ports, and further to PCI

RE: [PATCH v1 net-next 3/3] net: dsa: microchip: add KSZ9893 switch support

2019-03-04 Thread Tristram.Ha
> > static int ksz9477_phy_read16(struct dsa_switch *ds, int addr, int reg) > > @@ -389,6 +399,10 @@ static int ksz9477_phy_write16(struct dsa_switch > *ds, int addr, int reg, > > /* No real PHY after this. */ > > if (addr >= dev->phy_port_cnt) > > return 0; > > + > > + /* No

[PATCH] samples: bpf: add xdp_sample_pkts to .gitignore

2019-03-04 Thread Daniel T. Lee
This commit adds xdp_sample_pkts to .gitignore which is currently ommited from the ignore file. Signed-off-by: Daniel T. Lee --- samples/bpf/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/samples/bpf/.gitignore b/samples/bpf/.gitignore index 8ae4940025f8..5a1d084be806 100644 ---

[PATCH v2] net: xfrm: Add '_rcu' tag for rcu protected pointer in netns_xfrm

2019-03-04 Thread Su Yanjun
For rcu protected pointers, we'd better add '__rcu' for them. Once added '__rcu' tag for rcu protected pointer, the sparse tool reports warnings. net/xfrm/xfrm_user.c:1198:39: sparse:expected struct sock *sk net/xfrm/xfrm_user.c:1198:39: sparse:got struct sock [noderef] *nlsk [...] So i

[RFC PATCH net] failover: allow name change on IFF_UP slave interfaces

2019-03-04 Thread Si-Wei Liu
When a netdev appears through hot plug then gets enslaved by a failover master that is already up and running, the slave will be opened right away after getting enslaved. Today there's a race that userspace (udev) may fail to rename the slave if the kernel (net_failover) opens the slave earlier tha

[RFC PATCH net-next] failover: allow name change on IFF_UP slave interfaces

2019-03-04 Thread Si-Wei Liu
When a netdev appears through hot plug then gets enslaved by a failover master that is already up and running, the slave will be opened right away after getting enslaved. Today there's a race that userspace (udev) may fail to rename the slave if the kernel (net_failover) opens the slave earlier tha

Re: [PATCH net] net: hns3: add rmb() for rx description

2019-03-04 Thread tanhuazhong
On 2019/3/4 13:15, David Miller wrote: From: Huazhong Tan Date: Sat, 2 Mar 2019 16:49:30 +0800 From: Jian Shen HW can not guarantee complete write desc->rx.size, even though HNS3_RXD_VLD_B has been set. Driver needs to add rmb() instruction to make sure desc->rx.size is always valid. Fix

Re: [PATCH net-next 4/8] devlink: allow subports on devlink PCI ports

2019-03-04 Thread Jakub Kicinski
On Mon, 4 Mar 2019 16:15:14 +, Jason Gunthorpe wrote: > On Wed, Feb 27, 2019 at 10:30:00AM -0800, Jakub Kicinski wrote: > > On Wed, 27 Feb 2019 13:37:53 +0100, Jiri Pirko wrote: > > > Tue, Feb 26, 2019 at 07:24:32PM CET, jakub.kicin...@netronome.com wrote: > > > >PCI endpoint corresponds to

[RFC PATCH net-next] failover: allow name change on IFF_UP slave interfaces

2019-03-04 Thread Si-Wei Liu
When a netdev appears through hot plug then gets enslaved by a failover master that is already up and running, the slave will be opened right away after getting enslaved. Today there's a race that userspace (udev) may fail to rename the slave if the kernel (net_failover) opens the slave earlier tha

Re: [PATCH -next] net: dsa: mv88e6xxx: Fix build warning when CONFIG_NET_DSA_LEGACY is n

2019-03-04 Thread Zhangshaokun
Hi Andrew, On 2019/3/4 22:57, Andrew Lunn wrote: > On Mon, Mar 04, 2019 at 10:16:08PM +0800, Zhangshaokun wrote: >> Hi Andrew, >> >> On 2019/3/4 21:26, Andrew Lunn wrote: >>> On Mon, Mar 04, 2019 at 08:43:01PM +0800, Shaokun Zhang wrote: When CONFIG_NET_DSA_LEGACY is n, there is a GCC bulid w

Re: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-04 Thread Jakub Kicinski
On Mon, 4 Mar 2019 12:08:57 +0100, Jiri Pirko wrote: > Fri, Mar 01, 2019 at 07:04:50PM CET, jakub.kicin...@netronome.com wrote: > >PCI endpoint corresponds to a PCI device, but such device > >can have one more more logical device ports associated with it. > >We need a way to distinguish those. Add

Re: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-04 Thread Jakub Kicinski
On Mon, 4 Mar 2019 12:19:02 +0100, Jiri Pirko wrote: > Sat, Mar 02, 2019 at 08:48:47PM CET, jakub.kicin...@netronome.com wrote: > >On Sat, 2 Mar 2019 10:41:16 +0100, Jiri Pirko wrote: > >> Fri, Mar 01, 2019 at 07:04:50PM CET, jakub.kicin...@netronome.com wrote: > >> >PCI endpoint corresponds to

Re: [PATCH net-next v2 4/7] devlink: allow subports on devlink PCI ports

2019-03-04 Thread Jakub Kicinski
On Mon, 4 Mar 2019 08:56:09 +0100, Jiri Pirko wrote: > Sat, Mar 02, 2019 at 08:48:47PM CET, jakub.kicin...@netronome.com wrote: > >On Sat, 2 Mar 2019 10:41:16 +0100, Jiri Pirko wrote: > >> Fri, Mar 01, 2019 at 07:04:50PM CET, jakub.kicin...@netronome.com wrote: > >> >PCI endpoint corresponds to

[PATCH net-next v2] net/sched: act_tunnel_key: Fix double free dst_cache

2019-03-04 Thread wenxu
From: wenxu dst_cache_destroy will be called in dst_release dst_release-->dst_destroy_rcu-->dst_destroy-->metadata_dst_free -->dst_cache_destroy It should not call dst_cache_destroy before dst_release Fixes: 41411e2fd6b8 ("net/sched: act_tunnel_key: Add dst_cache support") Signed-off-by: wenxu

[PATCH net-next (fix) 1/2] net: fix GSO in bpf_lwt_push_ip_encap

2019-03-04 Thread Peter Oskolkov
GSO needs inner headers and inner protocol set properly to work. skb->inner_mac_header: skb_reset_inner_headers() assigns the current mac header value to inner_mac_header; but it is not set at the point, so we need to call skb_reset_inner_mac_header, otherwise gre_gso_segment fails: it does i

[PATCH net-next (fix) 2/2] selftests/bpf: test that GSO works in lwt_ip_encap

2019-03-04 Thread Peter Oskolkov
Add a test on egress that a large TCP packet successfully goes through the lwt+bpf encap tunnel. Although there is no direct evidence that GSO worked, as opposed to e.g. TCP segmentation or IP fragmentation (maybe a kernel stats counter should be added to track the number of failed GSO attempts?),

[PATCH net-next (fix) 0/2] fix GSO bpf_lwt_ip_encap

2019-03-04 Thread Peter Oskolkov
This is a small fix and a test. Sent to net-next because the offending patch is not in net yet. Peter Oskolkov (2): net: fix GSO in bpf_lwt_push_ip_encap selftests/bpf: test that GSO works in lwt_ip_encap net/core/lwt_bpf.c| 2 + .../selftests/bpf/test_lwt_ip_enc

Re: [PATCH net-next v2 04/12] net: sched: flower: track filter deletion with flag

2019-03-04 Thread Stefano Brivio
On Mon, 4 Mar 2019 14:24:05 + Vlad Buslov wrote: > On Fri 01 Mar 2019 at 23:51, Stefano Brivio wrote: > > Hi Vlad, > > > > On Wed, 27 Feb 2019 12:12:18 +0200 > > Vlad Buslov wrote: > > > >> -static bool __fl_delete(struct tcf_proto *tp, struct cls_fl_filter *f, > >> - str

Re: [PATCH net-next v2 00/12] Refactor flower classifier to remove dependency on rtnl lock

2019-03-04 Thread Stefano Brivio
On Wed, 27 Feb 2019 12:12:14 +0200 Vlad Buslov wrote: > Currently, all netlink protocol handlers for updating rules, actions and > qdiscs are protected with single global rtnl lock which removes any > possibility for parallelism. This patch set is a third step to remove > rtnl lock dependency fro

Re: [PATCH] net: ethernet: Fix phy_set_max_speed by checking for NULL

2019-03-04 Thread Florian Fainelli
On 3/4/19 3:36 PM, Aditya Pakki wrote: > phy_device can be a NULL pointer which is further dereferenced > downstream in phy_set_max_speed. This patch avoids such a scenario. > > Signed-off-by: Aditya Pakki > --- > drivers/net/ethernet/broadcom/genet/bcmmii.c | 2 ++ > 1 file changed, 2 insertion

[PATCH] net: ethernet: Fix phy_set_max_speed by checking for NULL

2019-03-04 Thread Aditya Pakki
phy_device can be a NULL pointer which is further dereferenced downstream in phy_set_max_speed. This patch avoids such a scenario. Signed-off-by: Aditya Pakki --- drivers/net/ethernet/broadcom/genet/bcmmii.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/broadcom/gene

Re: [PATCH net-next v2 3/7] nfp: register devlink ports of all reprs

2019-03-04 Thread Jakub Kicinski
On Mon, 4 Mar 2019 08:36:31 +0100, Jiri Pirko wrote: > >> >+ case NFP_PORT_PF_PORT: > >> >+ return devlink_port_register(devlink, &port->dl_port, > >> >+ (port->pf_id + 1) * 1 + > >> >+ port->pf_split_id * 1000);

Re: "A call to built-in function '__stack_chk_fail' is not supported." when building BPF samples/tools

2019-03-04 Thread Daniel Borkmann
On 03/05/2019 12:18 AM, Hazrael wrote: > Hello, > > I guess I'm taking risks by asking this here, as the problem > I have is definitely more likely to come from my setup, but > after many research I don't know where to seek help. No worries, completely fine to ask. > So here it goes : when I try

Re: [PATCH bpf-next] bpf: fix memory leak in bpf_lwt_xmit_reroute

2019-03-04 Thread Eric Dumazet
On 03/04/2019 02:37 PM, Peter Oskolkov wrote: > On Mon, Mar 4, 2019 at 1:03 PM David Ahern wrote: >> >> On 3/4/19 1:39 PM, Peter Oskolkov wrote: >>> I found the problem: skb->inner_protocol was not set, so software GSO >>> fallback failed. I have a patch that fixes the issue: IPIP+GRE+TCP >>>

"A call to built-in function '__stack_chk_fail' is not supported." when building BPF samples/tools

2019-03-04 Thread Hazrael
Hello, I guess I'm taking risks by asking this here, as the problem I have is definitely more likely to come from my setup, but after many research I don't know where to seek help. So here it goes : when I try building samples/bpf or tools/testing/selftests/bpf/, I always end up with the followin

Re: [PATCH bpf] bpf: fix replace_map_fd_with_map_ptr's ldimm64 second imm field

2019-03-04 Thread Song Liu
On Mon, Mar 4, 2019 at 12:09 PM Daniel Borkmann wrote: > > Non-zero imm value in the second part of the ldimm64 instruction for > BPF_PSEUDO_MAP_FD is invalid, and thus must be rejected. The map fd > only ever sits in the first instructions' imm field. None of the BPF > loaders known to us are usi

Re: [PATCH] selftests/bpf: Add arm target register definitions

2019-03-04 Thread Song Liu
On Mon, Mar 4, 2019 at 12:50 PM Adrian Ratiu wrote: > > eBPF "restricted C" code can be compiled with LLVM/clang using target > triplets like armv7l-unknown-linux-gnueabihf and loaded/run with small > cross-compiled gobpf/elf [1] programs without requiring a full BCC > port which is also undesirab

Re: [PATCH net-next v3 2/3] xdp: Always use a devmap for XDP_REDIRECT to a device

2019-03-04 Thread Jakub Kicinski
On Mon, 04 Mar 2019 23:28:14 +0100, Toke Høiland-Jørgensen wrote: > Jakub Kicinski writes: > > On Mon, 04 Mar 2019 20:05:30 +0100, Toke Høiland-Jørgensen wrote: > >> > Hm. I think you'll still need a lock (mutex?) on the alloc path, but > >> > the free path should be fine as long as you load th

[net 1/1] tipc: fix RDM/DGRAM connect() regression

2019-03-04 Thread Jon Maloy
From: Erik Hugne Fix regression bug introduced in commit 365ad353c256 ("tipc: reduce risk of user starvation during link congestion") Only signal -EDESTADDRREQ for RDM/DGRAM if we don't have a cached sockaddr. Signed-off-by: Erik Hugne Signed-off-by: Jon Maloy --- net/tipc/socket.c | 2 +- 1

Re: [PATCH bpf-next] bpf: fix memory leak in bpf_lwt_xmit_reroute

2019-03-04 Thread Peter Oskolkov
On Mon, Mar 4, 2019 at 1:03 PM David Ahern wrote: > > On 3/4/19 1:39 PM, Peter Oskolkov wrote: > > I found the problem: skb->inner_protocol was not set, so software GSO > > fallback failed. I have a patch that fixes the issue: IPIP+GRE+TCP > > gso works! net-next is closed though... Will have to

Re: [PATCH net-next v3 2/3] xdp: Always use a devmap for XDP_REDIRECT to a device

2019-03-04 Thread Toke Høiland-Jørgensen
Jakub Kicinski writes: > On Mon, 04 Mar 2019 20:05:30 +0100, Toke Høiland-Jørgensen wrote: >> > Hm. I think you'll still need a lock (mutex?) on the alloc path, but >> > the free path should be fine as long as you load the map pointer before >> > looking at the refcnt (atomic op ensuring the bar

kernel BUG at include/linux/mm.h:LINE! (5)

2019-03-04 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:9e9322e5d28e selftest/net: Remove duplicate header git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=1351623320 kernel config: https://syzkaller.appspot.com/x/.config?x=47f2db597668ac40 dashboard li

Re: [PATCH net-next v3 2/3] xdp: Always use a devmap for XDP_REDIRECT to a device

2019-03-04 Thread Jakub Kicinski
On Mon, 04 Mar 2019 20:05:30 +0100, Toke Høiland-Jørgensen wrote: > > Hm. I think you'll still need a lock (mutex?) on the alloc path, but > > the free path should be fine as long as you load the map pointer before > > looking at the refcnt (atomic op ensuring the barrier there). > > Yeah, for

Re: [PATCH] tls: export decrypt_skb

2019-03-04 Thread David Miller
From: Pedro Tammela Date: Mon, 4 Mar 2019 18:35:02 -0300 > Export decrypt_skb() to other kernel modules. > This is useful for other ulps that are on top of TLS and need to > have access to the skb's plain data. > > Signed-off-by: Pedro Tammela Not applying this until there is an in-tree user.

Re: [PATCH v4 perf,bpf 14/15] perf: introduce side band thread

2019-03-04 Thread Song Liu
> On Feb 27, 2019, at 5:21 AM, Jiri Olsa wrote: > > On Mon, Feb 25, 2019 at 04:20:18PM -0800, Song Liu wrote: > > SNIP > >> diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c >> index 8c902276d4b4..61b87c8111e6 100644 >> --- a/tools/perf/util/evlist.c >> +++ b/tools/perf/util/e

[PATCH] tls: export decrypt_skb

2019-03-04 Thread Pedro Tammela
Export decrypt_skb() to other kernel modules. This is useful for other ulps that are on top of TLS and need to have access to the skb's plain data. Signed-off-by: Pedro Tammela --- net/tls/tls_sw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index bf5b

Re: [PATCH] net/sched: avoid unused-label warning

2019-03-04 Thread David Miller
From: Arnd Bergmann Date: Mon, 4 Mar 2019 21:40:32 +0100 > The label is only used from inside the #ifdef and should be > hidden the same way, to avoid this warning: > > net/sched/act_tunnel_key.c: In function 'tunnel_key_init': > net/sched/act_tunnel_key.c:389:1: error: label 'release_tun_meta'

Re: [PATCH] aio: prevent the final fput() in the middle of vfs_poll() (Re: KASAN: use-after-free Read in unix_dgram_poll)

2019-03-04 Thread Linus Torvalds
On Sun, Mar 3, 2019 at 6:36 PM Al Viro wrote: > > OK, having dug through the archives, the reasons were not strong. > So that part is OK... I've committed the patch. However, I didn't actually do the separate and independent cleanups: > > @@ -1060,6 +1071,8 @@ static inline void iocb_put(struc

Re: [PATCH] net: ignore sysctl_devconf_inherit_init_net without SYSCTL

2019-03-04 Thread David Miller
From: Arnd Bergmann Date: Mon, 4 Mar 2019 21:38:03 +0100 > When CONFIG_SYSCTL is turned off, we get a link failure for > the newly introduced tuning knob. > > net/ipv6/addrconf.o: In function `addrconf_init_net': > addrconf.c:(.text+0x31dc): undefined reference to > `sysctl_devconf_inherit_ini

Re: [PATCH] phy: mdio-mux: fix Kconfig dependencies

2019-03-04 Thread David Miller
From: Arnd Bergmann Date: Mon, 4 Mar 2019 21:35:10 +0100 > MDIO_BUS_MUX can only be selected if OF_MDIO is already turned on: > > WARNING: unmet direct dependencies detected for MDIO_BUS_MUX > Depends on [n]: NETDEVICES [=y] && MDIO_BUS [=m] && OF_MDIO [=n] > Selected by [m]: > - MDIO_BUS

Re: [PATCH net-next] net: phy: use phy_modify_mmd_changed in genphy_c45_an_config_aneg

2019-03-04 Thread David Miller
From: Heiner Kallweit Date: Mon, 4 Mar 2019 19:50:40 +0100 > As can be seen from the usage of the return value, we should use > phy_modify_mmd_changed() here. > > Fixes: 9a5dc8af4416 ("net: phy: add genphy_c45_an_config_aneg") > Signed-off-by: Heiner Kallweit Yep, this looks pretty straightfor

Re: [PATCH] net: dsa: mv88e6xxx: fix unused function warning

2019-03-04 Thread Arnd Bergmann
On Mon, Mar 4, 2019 at 9:42 PM Heiner Kallweit wrote: > > On 04.03.2019 21:36, Arnd Bergmann wrote: > > The newly introduced function is only used inside of an #ifdef > > and causes a warning when that is disabled: > > > > drivers/net/dsa/mv88e6xxx/chip.c:4623:13: error: unused function > > 'mv88

Re: [PATCH] net: ignore sysctl_devconf_inherit_init_net without SYSCTL

2019-03-04 Thread Christian Brauner
On Mon, Mar 04, 2019 at 10:07:17PM +0100, Arnd Bergmann wrote: > On Mon, Mar 4, 2019 at 10:00 PM Christian Brauner > wrote: > > > > On Mon, Mar 04, 2019 at 09:38:03PM +0100, Arnd Bergmann wrote: > > > When CONFIG_SYSCTL is turned off, we get a link failure for > > > the newly introduced tuning kn

Re: [PATCH] net: ignore sysctl_devconf_inherit_init_net without SYSCTL

2019-03-04 Thread Arnd Bergmann
On Mon, Mar 4, 2019 at 10:00 PM Christian Brauner wrote: > > On Mon, Mar 04, 2019 at 09:38:03PM +0100, Arnd Bergmann wrote: > > When CONFIG_SYSCTL is turned off, we get a link failure for > > the newly introduced tuning knob. > > > > net/ipv6/addrconf.o: In function `addrconf_init_net': > > addrco

Re: [PATCH net] net: dsa: mv88e6xxx: add call to mv88e6xxx_ports_cmode_init to probe for new DSA framework

2019-03-04 Thread David Miller
From: Heiner Kallweit Date: Mon, 4 Mar 2019 19:39:03 +0100 > In the original patch I missed to add mv88e6xxx_ports_cmode_init() > to the second probe function, the one for the new DSA framework. > > Fixes: ed8fe20205ac ("net: dsa: mv88e6xxx: prevent interrupt storm caused by > mv88e6390x_port_s

Re: [PATCH net-next] net: phy: improve handling link_change_notify callback

2019-03-04 Thread David Miller
From: Andrew Lunn Date: Mon, 4 Mar 2019 21:06:30 +0100 > On Mon, Mar 04, 2019 at 11:30:25AM -0800, David Miller wrote: >> Someone please review this. > > We should probably wait for a Tested-by: from Daniel Mack > and David Wu , or > equivalent. Ok.

Re: [PATCH bpf-next] bpf: fix memory leak in bpf_lwt_xmit_reroute

2019-03-04 Thread David Ahern
On 3/4/19 1:39 PM, Peter Oskolkov wrote: > I found the problem: skb->inner_protocol was not set, so software GSO > fallback failed. I have a patch that fixes the issue: IPIP+GRE+TCP > gso works! net-next is closed though... Will have to wait for net-next > to reopen. That's a bug fix. I suggest s

Re: [PATCH] net: ignore sysctl_devconf_inherit_init_net without SYSCTL

2019-03-04 Thread Christian Brauner
On Mon, Mar 04, 2019 at 09:38:03PM +0100, Arnd Bergmann wrote: > When CONFIG_SYSCTL is turned off, we get a link failure for > the newly introduced tuning knob. > > net/ipv6/addrconf.o: In function `addrconf_init_net': > addrconf.c:(.text+0x31dc): undefined reference to > `sysctl_devconf_inherit_

Re: [PATCH] bpf: fix sysctl.c warning

2019-03-04 Thread Song Liu
> On Mar 4, 2019, at 12:57 PM, Christian Brauner wrote: > > On Mon, Mar 04, 2019 at 09:34:12PM +0100, Arnd Bergmann wrote: >> When CONFIG_BPF_SYSCALL or CONFIG_SYSCTL is disabled, we get >> a warning about an unused function: >> >> kernel/sysctl.c:3331:12: error: 'proc_dointvec_minmax_bpf_sta

Re: [PATCH] bpf: fix sysctl.c warning

2019-03-04 Thread Christian Brauner
On Mon, Mar 04, 2019 at 09:34:12PM +0100, Arnd Bergmann wrote: > When CONFIG_BPF_SYSCALL or CONFIG_SYSCTL is disabled, we get > a warning about an unused function: > > kernel/sysctl.c:3331:12: error: 'proc_dointvec_minmax_bpf_stats' defined but > not used [-Werror=unused-function] > static int p

Re: [PATCH v5 perf,bpf 12/15] perf, bpf: enable annotation of bpf program

2019-03-04 Thread Song Liu
> On Mar 4, 2019, at 5:53 AM, Jiri Olsa wrote: > > On Wed, Feb 27, 2019 at 09:06:40PM -0800, Song Liu wrote: > > SNIP > >> + >> +disassemble_init_for_target(&info); >> + >> +#ifdef DISASM_FOUR_ARGS_SIGNATURE >> +disassemble = disassembler(info.arch, >> +

[PATCH] selftests/bpf: Add arm target register definitions

2019-03-04 Thread Adrian Ratiu
eBPF "restricted C" code can be compiled with LLVM/clang using target triplets like armv7l-unknown-linux-gnueabihf and loaded/run with small cross-compiled gobpf/elf [1] programs without requiring a full BCC port which is also undesirable on small embedded systems due to its size footprint. The onl

Re: net-next: new CL45 regression

2019-03-04 Thread Heiner Kallweit
On 04.03.2019 15:48, S-k, Shyam-sundar wrote: > Hi Heiner, > > We noticed that, the recent changes for CL45 in net-next tree causing > regression on AMD platforms. The following is the commit: > > 3ce2a02 net: phy: marvell10g: check for newly set aneg > > Now, I see that, this code is moved to

Re: [PATCH] bpf: fix sysctl.c warning

2019-03-04 Thread Kees Cook
On Mon, Mar 4, 2019 at 12:34 PM Arnd Bergmann wrote: > > When CONFIG_BPF_SYSCALL or CONFIG_SYSCTL is disabled, we get > a warning about an unused function: > > kernel/sysctl.c:3331:12: error: 'proc_dointvec_minmax_bpf_stats' defined but > not used [-Werror=unused-function] > static int proc_doin

Re: [PATCH v4 perf,bpf 14/15] perf: introduce side band thread

2019-03-04 Thread Song Liu
> On Mar 4, 2019, at 12:41 PM, Jiri Olsa wrote: > > On Mon, Mar 04, 2019 at 07:49:06PM +, Song Liu wrote: >> >> >>> On Mar 4, 2019, at 5:52 AM, Jiri Olsa wrote: >>> >>> On Wed, Feb 27, 2019 at 05:52:52PM +, Song Liu wrote: > On Feb 27, 2019, at 5:21 AM, Jiri Olsa w

Re: [PATCH v5 perf,bpf 12/15] perf, bpf: enable annotation of bpf program

2019-03-04 Thread Song Liu
> On Mar 4, 2019, at 12:37 PM, Jiri Olsa wrote: > > On Mon, Mar 04, 2019 at 07:45:00PM +, Song Liu wrote: >> >> >>> On Mar 4, 2019, at 5:53 AM, Jiri Olsa wrote: >>> >>> On Wed, Feb 27, 2019 at 09:06:40PM -0800, Song Liu wrote: >>> >>> SNIP >>> + fflush(s); + do { +

Re: [PATCH] net: dsa: mv88e6xxx: fix unused function warning

2019-03-04 Thread Heiner Kallweit
On 04.03.2019 21:36, Arnd Bergmann wrote: > The newly introduced function is only used inside of an #ifdef > and causes a warning when that is disabled: > > drivers/net/dsa/mv88e6xxx/chip.c:4623:13: error: unused function > 'mv88e6xxx_ports_cmode_init' [-Werror,-Wunused-function] > > Move it int

[PATCH] net/sched: avoid unused-label warning

2019-03-04 Thread Arnd Bergmann
The label is only used from inside the #ifdef and should be hidden the same way, to avoid this warning: net/sched/act_tunnel_key.c: In function 'tunnel_key_init': net/sched/act_tunnel_key.c:389:1: error: label 'release_tun_meta' defined but not used [-Werror=unused-label] release_tun_meta: Fixe

[PATCH] netfilter: nf_conntrack_sip: fix IPV6 dependency

2019-03-04 Thread Arnd Bergmann
With CONFIG_IPV6=m and CONFIG_NF_CONNTRACK_SIP=y, we now get a link failure: net/netfilter/nf_conntrack_sip.o: In function `process_sdp': nf_conntrack_sip.c:(.text+0x4344): undefined reference to `ip6_route_output_flags' Fix this by adding a dependency that forces CONFIG_NF_CONNTRACK_SIP to be =

Re: [PATCH v4 perf,bpf 14/15] perf: introduce side band thread

2019-03-04 Thread Jiri Olsa
On Mon, Mar 04, 2019 at 07:49:06PM +, Song Liu wrote: > > > > On Mar 4, 2019, at 5:52 AM, Jiri Olsa wrote: > > > > On Wed, Feb 27, 2019 at 05:52:52PM +, Song Liu wrote: > >> > >> > >>> On Feb 27, 2019, at 5:21 AM, Jiri Olsa wrote: > >>> > >>> On Mon, Feb 25, 2019 at 04:20:18PM -0800

[PATCH] iwlwifi: fix 64-bit division

2019-03-04 Thread Arnd Bergmann
do_div() expects unsigned operands and otherwise triggers a warning like: drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c:465:2: error: comparison of distinct pointer types ('typeof ((rtt_avg)) *' (aka 'long long *') and 'uint64_t *' (aka 'unsigned long long *')) [-Werror,-Wcompare-disti

Re: [PATCH bpf-next] bpf: fix memory leak in bpf_lwt_xmit_reroute

2019-03-04 Thread Peter Oskolkov
On Sun, Mar 3, 2019 at 6:55 PM Willem de Bruijn wrote: > > On Fri, Mar 1, 2019 at 9:27 PM David Ahern wrote: > > > > On 2/28/19 10:57 AM, Peter Oskolkov wrote: > > > David: I'm not sure how to test GSO (I assume we are talking about GSO > > > here) in > > > the selftest: the encapping code sets S

[PATCH] net: ignore sysctl_devconf_inherit_init_net without SYSCTL

2019-03-04 Thread Arnd Bergmann
When CONFIG_SYSCTL is turned off, we get a link failure for the newly introduced tuning knob. net/ipv6/addrconf.o: In function `addrconf_init_net': addrconf.c:(.text+0x31dc): undefined reference to `sysctl_devconf_inherit_init_net' Add an IS_ENABLED() check to fall back to the default behavior (

Re: [PATCH v5 perf,bpf 07/15] perf, bpf: save bpf_prog_info information as headers to perf.data

2019-03-04 Thread Jiri Olsa
On Mon, Mar 04, 2019 at 07:41:10PM +, Song Liu wrote: > > > > On Mar 4, 2019, at 5:52 AM, Jiri Olsa wrote: > > > > On Wed, Feb 27, 2019 at 09:06:35PM -0800, Song Liu wrote: > >> This patch enables perf-record to save bpf_prog_info information as > >> headers to perf.data. A new header type

[PATCH] phy: mdio-mux: fix Kconfig dependencies

2019-03-04 Thread Arnd Bergmann
MDIO_BUS_MUX can only be selected if OF_MDIO is already turned on: WARNING: unmet direct dependencies detected for MDIO_BUS_MUX Depends on [n]: NETDEVICES [=y] && MDIO_BUS [=m] && OF_MDIO [=n] Selected by [m]: - MDIO_BUS_MUX_MULTIPLEXER [=m] && NETDEVICES [=y] && MDIO_BUS [=m] && OF [=y] Fi

[PATCH] net: dsa: mv88e6xxx: fix unused function warning

2019-03-04 Thread Arnd Bergmann
The newly introduced function is only used inside of an #ifdef and causes a warning when that is disabled: drivers/net/dsa/mv88e6xxx/chip.c:4623:13: error: unused function 'mv88e6xxx_ports_cmode_init' [-Werror,-Wunused-function] Move it into the same #ifdef block to shut up the warning. Fixes:

Re: [PATCH v5 perf,bpf 12/15] perf, bpf: enable annotation of bpf program

2019-03-04 Thread Jiri Olsa
On Mon, Mar 04, 2019 at 07:45:00PM +, Song Liu wrote: > > > > On Mar 4, 2019, at 5:53 AM, Jiri Olsa wrote: > > > > On Wed, Feb 27, 2019 at 09:06:40PM -0800, Song Liu wrote: > > > > SNIP > > > >> + fflush(s); > >> + do { > >> + const struct bpf_line_info *linfo = NULL; > >> +

[PATCH] bpf: fix sysctl.c warning

2019-03-04 Thread Arnd Bergmann
When CONFIG_BPF_SYSCALL or CONFIG_SYSCTL is disabled, we get a warning about an unused function: kernel/sysctl.c:3331:12: error: 'proc_dointvec_minmax_bpf_stats' defined but not used [-Werror=unused-function] static int proc_dointvec_minmax_bpf_stats(struct ctl_table *table, int write, The CONF

Re: [PATCH v5 perf,bpf 07/15] perf, bpf: save bpf_prog_info information as headers to perf.data

2019-03-04 Thread Song Liu
> On Mar 4, 2019, at 12:23 PM, Jiri Olsa wrote: > > On Mon, Mar 04, 2019 at 07:36:14PM +, Song Liu wrote: >> >> >>> On Mar 4, 2019, at 5:52 AM, Jiri Olsa wrote: >>> >>> On Wed, Feb 27, 2019 at 09:06:35PM -0800, Song Liu wrote: >>> >>> SNIP >>> +static int process_bpf_prog_info(s

Re: [PATCH v5 perf,bpf 08/15] perf, bpf: save btf in a rbtree in perf_env

2019-03-04 Thread Jiri Olsa
On Mon, Mar 04, 2019 at 07:43:50PM +, Song Liu wrote: > > > > On Mar 4, 2019, at 5:52 AM, Jiri Olsa wrote: > > > > On Wed, Feb 27, 2019 at 09:06:36PM -0800, Song Liu wrote: > >> btf contains information necessary to annotate bpf programs. This patch > >> saves btf for bpf programs loaded in

[PATCH] net/bluetooth: Fix bound check in event handling

2019-03-04 Thread Tomas Bortoli
hci_inquiry_result_with_rssi_evt() can perform out of bound reads on skb->data as a bound check is missing. Signed-off-by: Tomas Bortoli Reported-by: syzbot+cec7a50c412a2c03f...@syzkaller.appspotmail.com Reported-by: syzbot+660883c56e2fa65d4...@syzkaller.appspotmail.com --- v2: - changed sizeof

Re: [PATCH v5 perf,bpf 07/15] perf, bpf: save bpf_prog_info information as headers to perf.data

2019-03-04 Thread Jiri Olsa
On Mon, Mar 04, 2019 at 07:36:14PM +, Song Liu wrote: > > > > On Mar 4, 2019, at 5:52 AM, Jiri Olsa wrote: > > > > On Wed, Feb 27, 2019 at 09:06:35PM -0800, Song Liu wrote: > > > > SNIP > > > >> +static int process_bpf_prog_info(struct feat_fd *ff, > >> + void *d

[PATCH bpf] bpf: fix replace_map_fd_with_map_ptr's ldimm64 second imm field

2019-03-04 Thread Daniel Borkmann
Non-zero imm value in the second part of the ldimm64 instruction for BPF_PSEUDO_MAP_FD is invalid, and thus must be rejected. The map fd only ever sits in the first instructions' imm field. None of the BPF loaders known to us are using it, so risk of regression is minimal. For clarity and consisten

Re: [PATCH net-next] net: phy: improve handling link_change_notify callback

2019-03-04 Thread Andrew Lunn
On Mon, Mar 04, 2019 at 11:30:25AM -0800, David Miller wrote: > From: Heiner Kallweit > Date: Sun, 3 Mar 2019 19:58:57 +0100 > > > Currently the Phy driver's link_change_notify callback is called > > whenever the state machine is run (every second if polling), no matter > > whether the state chan

Re: [PATCH] net/bluetooth: Fix bound check in event handling

2019-03-04 Thread Tomas Bortoli
Hi Dan, On 3/4/19 4:04 PM, Dan Carpenter wrote: > Hi Tomas, > > url: > https://github.com/0day-ci/linux/commits/Tomas-Bortoli/net-bluetooth-Fix-bound-check-in-event-handling/20190301-213647 > base: > https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git > master >

Re: [PATCH v4 perf,bpf 14/15] perf: introduce side band thread

2019-03-04 Thread Song Liu
> On Mar 4, 2019, at 5:52 AM, Jiri Olsa wrote: > > On Wed, Feb 27, 2019 at 05:52:52PM +, Song Liu wrote: >> >> >>> On Feb 27, 2019, at 5:21 AM, Jiri Olsa wrote: >>> >>> On Mon, Feb 25, 2019 at 04:20:18PM -0800, Song Liu wrote: >>> >>> SNIP >>> diff --git a/tools/perf/util/evlist

Re: [PATCH v5 perf,bpf 12/15] perf, bpf: enable annotation of bpf program

2019-03-04 Thread Song Liu
> On Mar 4, 2019, at 5:53 AM, Jiri Olsa wrote: > > On Wed, Feb 27, 2019 at 09:06:40PM -0800, Song Liu wrote: > > SNIP > >> +fflush(s); >> +do { >> +const struct bpf_line_info *linfo = NULL; >> +struct disasm_line *dl; >> +size_t prev_buf_size; >> +

Re: [PATCH v5 perf,bpf 08/15] perf, bpf: save btf in a rbtree in perf_env

2019-03-04 Thread Song Liu
> On Mar 4, 2019, at 5:52 AM, Jiri Olsa wrote: > > On Wed, Feb 27, 2019 at 09:06:36PM -0800, Song Liu wrote: >> btf contains information necessary to annotate bpf programs. This patch >> saves btf for bpf programs loaded in the system. >> >> Signed-off-by: Song Liu >> --- >> tools/perf/util/

Re: [PATCH v6 1/4] can: m_can: Create a m_can platform framework

2019-03-04 Thread Dan Murphy
On 3/4/19 10:56 AM, Wolfgang Grandegger wrote: > Hello Dan, > > the series already looks quite good. I still realized a few (minor) > issues while browsing the patch/code... > > Am 01.03.19 um 19:50 schrieb Dan Murphy: >> Create a m_can platform framework that peripherial >> devices can register

Re: [PATCH v5 perf,bpf 07/15] perf, bpf: save bpf_prog_info information as headers to perf.data

2019-03-04 Thread Song Liu
> On Mar 4, 2019, at 5:52 AM, Jiri Olsa wrote: > > On Wed, Feb 27, 2019 at 09:06:35PM -0800, Song Liu wrote: >> This patch enables perf-record to save bpf_prog_info information as >> headers to perf.data. A new header type HEADER_BPF_PROG_INFO is >> introduced for this data. >> >> Signed-off-

  1   2   3   >