Re: [PATCH bpf-next RFCv3 2/6] veth: support AF_XDP TX copy-mode.

2019-01-07 Thread Toshiaki Makita
On 2019/01/06 0:55, William Tu wrote: ... >>> + /* put into rq */ >>> + skb = veth_xdp_rcv_one(rq, xdpf, &inner_xdp_xmit); >>> + if (!skb) { >>> + /* Peer side has XDP program attached */ >>> + if (inner_xdp_xmit & VETH_XDP

general protection fault in ipcomp_init_state

2019-01-07 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:b71acb0e3721 Merge branch 'linus' of git://git.kernel.org/.. git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=17f383bb40 kernel config: https://syzkaller.appspot.com/x/.config?x=b03c5892bb940c76 da

general protection fault in ax25_send_control

2019-01-07 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:b71acb0e3721 Merge branch 'linus' of git://git.kernel.org/.. git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=174ccdbb40 kernel config: https://syzkaller.appspot.com/x/.config?x=b03c5892bb940c76 da

Re: [PATCH rdma-next v1 0/5] Cleanup of CONFIG_INFINIBAND_ON_DEMAND_PAGING usage

2019-01-07 Thread Leon Romanovsky
On Mon, Jan 07, 2019 at 11:31:28AM -0700, Jason Gunthorpe wrote: > On Sun, Dec 23, 2018 at 11:14:13AM +0200, Leon Romanovsky wrote: > > From: Leon Romanovsky > > > > Changelog v0->v1: > > * Don't set ODP caps always (patch #2) > > * Set invalidate_range callback based on device_cap only > > > >

[PATCH rdma-next v2 2/5] RDMA/core: Don't depend device ODP capabilities on kconfig option

2019-01-07 Thread Leon Romanovsky
From: Leon Romanovsky Device capability bits are exposing what specific device supports from HW perspective. Those bits are not dependent on kernel configurations and RDMA/core should ensure that proper interfaces to users will be disabled if CONFIG_INFINIBAND_ON_DEMAND_PAGING is not set. Fixes:

[PATCH rdma-next v2 3/5] RDMA/mlx5: Introduce and reuse helper to identify ODP MR

2019-01-07 Thread Leon Romanovsky
From: Leon Romanovsky Consolidate various checks if MR is ODP backed to one simple helper and update call sites to use it. Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/mlx5_ib.h | 10 ++ drivers/infiniband/hw/mlx5/mr.c | 19 +++ drivers/infiniband/

[PATCH rdma-next v2 5/5] RDMA/mlx5: Delete declaration of already removed function

2019-01-07 Thread Leon Romanovsky
From: Leon Romanovsky The implementation of mlx5_core_page_fault_resume() was removed in commit d5d284b829a6 ("{net,IB}/mlx5: Move Page fault EQ and ODP logic to RDMA"). This patch removes declaration too. Fixes: d5d284b829a6 ("{net,IB}/mlx5: Move Page fault EQ and ODP logic to RDMA") Signed-off

[PATCH rdma-next v2 4/5] RDMA/mlx5: Embed into the code flow the ODP config option

2019-01-07 Thread Leon Romanovsky
From: Leon Romanovsky Convert various places to more readable code, which embeds CONFIG_INFINIBAND_ON_DEMAND_PAGING into the code flow. Signed-off-by: Leon Romanovsky --- drivers/infiniband/core/uverbs_cmd.c | 3 -- drivers/infiniband/hw/mlx5/main.c| 41 ++-- drive

[PATCH rdma-next v2 1/5] RDMA: Clean structures from CONFIG_INFINIBAND_ON_DEMAND_PAGING

2019-01-07 Thread Leon Romanovsky
From: Leon Romanovsky CONFIG_INFINIBAND_ON_DEMAND_PAGING is used in general structures to micro-optimize the memory footprint. Remove it, so it will allow us to simplify various ODP device flows. Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 -- include/rdma/ib_ve

[PATCH rdma-next v2 0/5] Cleanup of CONFIG_INFINIBAND_ON_DEMAND_PAGING usage

2019-01-07 Thread Leon Romanovsky
From: Leon Romanovsky Changelog v1->v2: * Rebase on top v5.0-rc1 v0->v1: * Don't set ODP caps always (patch #2) * Set invalidate_range callback based on device_cap only --- Hi, As a followup to Jason's request to ret

[PATCH] bpf: fix shift overflow in ___bpf_prog_run

2019-01-07 Thread ZhangXiaoxu
From: Zhang Xiaoxu There is a UBSAN bug as blew: UBSAN: Undefined behaviour in kernel/bpf/core.c:1055:2 shift exponent 511 is too large for 32-bit type 'unsigned int' Reproduce program: #include #include #include #include #include #include

Re: [PATCH] PCI: Add no-D3 quirk for Mellanox ConnectX-[45]

2019-01-07 Thread Leon Romanovsky
On Mon, Jan 07, 2019 at 09:01:29PM -0700, Jason Gunthorpe wrote: > On Sun, Jan 06, 2019 at 09:43:46AM +1100, Benjamin Herrenschmidt wrote: > > On Sat, 2019-01-05 at 10:51 -0700, Jason Gunthorpe wrote: > > > > > > > Interesting. I've investigated this further, though I don't have as > > > > many ne

Re: [PATCH 1/1] net: bridge: fix a bug on using a neighbour cache entry without checking its state

2019-01-07 Thread kchen
From: David Miller Date: Mon, 07 Jan 2019 09:10:31 -0800 > From: David Miller > From: kchen Date: Sun, 6 Jan 2019 11:28:13 +0800 From: JianJhen Chen When handling DNAT'ed packets on a bridge device, the neighbour cache entry from lookup was used without checking its state. It means tha

[PATCH 0/3] net: y2038-safe socket timeout options

2019-01-07 Thread Deepa Dinamani
The series is aimed at adding y2038-safe timeout options: SO_RCVTIMEO_NEW and SO_SNDTIMEO_NEW. This is similar to the previous series adding y2038-safe SO_TIMESTAMP* options. The series needs to be applied after the socket timestamp series: https://lore.kernel.org/lkml/20190108032657.8331-1-deepa

[PATCH 3/3] sock: Add SO_RCVTIMEO_NEW and SO_SNDTIMEO_NEW

2019-01-07 Thread Deepa Dinamani
Add new socket timeout options that are y2038 safe. Signed-off-by: Deepa Dinamani Cc: ccaul...@redhat.com Cc: da...@davemloft.net Cc: del...@gmx.de Cc: pau...@samba.org Cc: r...@linux-mips.org Cc: r...@twiddle.net Cc: cluster-de...@redhat.com Cc: linuxppc-...@lists.ozlabs.org Cc: linux-al...@vger

[PATCH 1/3] socket: Use old_timeval types for socket timeouts

2019-01-07 Thread Deepa Dinamani
As part of y2038 solution, all internal uses of struct timeval are replaced by struct __kernel_old_timeval and struct compat_timeval by struct old_timeval32. Make socket timeouts use these new types. This is mainly to be able to verify that the kernel build is y2038 safe when such non y2038 safe t

[PATCH 2/3] socket: Rename SO_RCVTIMEO/ SO_SNDTIMEO with _OLD suffixes

2019-01-07 Thread Deepa Dinamani
SO_RCVTIMEO and SO_SNDTIMEO socket options use struct timeval as the time format. struct timeval is not y2038 safe. The subsequent patches in the series add support for new socket timeout options with _NEW suffix that are y2038 safe. Rename the existing options with _OLD suffix forms so that the ri

Re: [PATCH net 1/2] ptp: check that rsv field is zero in struct ptp_sys_offset_extended

2019-01-07 Thread Richard Cochran
On Mon, Jan 07, 2019 at 08:29:38AM -0800, David Miller wrote: > From: Eugene Syromiatnikov > Date: Mon, 7 Jan 2019 16:22:29 +0100 > > > Otherwise it is impossible to use it for something else, as it will break > > userspace that puts garbage there. > > > > The same check should be done in other

[PATCH] isdn: avm: Fix string plus integer warning from Clang

2019-01-07 Thread Nathan Chancellor
A recent commit in Clang expanded the -Wstring-plus-int warning, showing some odd behavior in this file. drivers/isdn/hardware/avm/b1.c:426:30: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int] cinfo->version[j] = "\0\0" + 1;

Re: [RFC PATCH net-next 2/5] net: 8021q: vlan_dev: add vid tag for uc and mc address lists

2019-01-07 Thread Florian Fainelli
Le 12/4/18 à 4:04 PM, Ivan Khoronzhuk a écrit : > On Tue, Dec 04, 2018 at 11:49:27AM -0800, Florian Fainelli wrote: > > ... > >>> >>> I was thinking also about pinned list of vlans to the address, but in >>> this case this information also has to be synced by members of device >>> chain, >>> beca

Re: [PATCH v3 1/8] arch: Use asm-generic/socket.h when possible

2019-01-07 Thread Max Filippov
On Mon, Jan 7, 2019 at 7:28 PM Deepa Dinamani wrote: > > Many architectures maintain an arch specific copy of the > file even though there are no differences with the asm-generic > one. Allow these architectures to use the generic one instead. > > Signed-off-by: Deepa Dinamani > Cc: ch...@zankel.

Re: [PATCH] PCI: Add no-D3 quirk for Mellanox ConnectX-[45]

2019-01-07 Thread Jason Gunthorpe
On Sun, Jan 06, 2019 at 09:43:46AM +1100, Benjamin Herrenschmidt wrote: > On Sat, 2019-01-05 at 10:51 -0700, Jason Gunthorpe wrote: > > > > > Interesting. I've investigated this further, though I don't have as > > > many new clues as I'd like. The problem occurs reliably, at least on > > > one p

Re: pull-request: bpf 2019-01-08

2019-01-07 Thread David Miller
From: Daniel Borkmann Date: Tue, 8 Jan 2019 01:41:16 +0100 > The following pull-request contains BPF updates for your *net* tree. > > The main changes are: > > 1) Fix BSD'ism in sendmsg(2) to rewrite unspecified IPv6 dst for >unconnected UDP sockets with [::1] _after_ cgroup BPF invocation

[PATCH v3 2/8] sockopt: Rename SO_TIMESTAMP* to SO_TIMESTAMP*_OLD

2019-01-07 Thread Deepa Dinamani
SO_TIMESTAMP, SO_TIMESTAMPNS and SO_TIMESTAMPING options, the way they are currently defined, are not y2038 safe. Subsequent patches in the series add new y2038 safe versions of these options which provide 64 bit timestamps on all architectures uniformly. Hence, rename existing options with OLD tag

[PATCH v3 8/8] socket: Update timestamping Documentation

2019-01-07 Thread Deepa Dinamani
With the new y2038 safe timestamping options added, update the documentation to reflect the changes. Signed-off-by: Deepa Dinamani Acked-by: Willem de Bruijn --- Documentation/networking/timestamping.txt | 43 --- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git

[PATCH v3 3/8] arch: sparc: Override struct __kernel_old_timeval

2019-01-07 Thread Deepa Dinamani
struct __kernel_old_timeval is supposed to have the same layout as struct timeval. But, it was inadvarently missed that __kernel_suseconds has a different definition for sparc64. Provide an asm-specific override that fixes it. Reported-by: Arnd Bergmann Suggested-by: Arnd Bergmann Signed-off-by:

[PATCH v3 4/8] socket: Use old_timeval types for socket timestamps

2019-01-07 Thread Deepa Dinamani
As part of y2038 solution, all internal uses of struct timeval are replaced by struct __kernel_old_timeval and struct compat_timeval by struct old_timeval32. Make socket timestamps use these new types. This is mainly to be able to verify that the kernel build is y2038 safe when such non y2038 safe

[PATCH v3 5/8] socket: Add struct __kernel_sock_timeval

2019-01-07 Thread Deepa Dinamani
The new type is meant to be used as a y2038 safe structure to be used as part of cmsg data. Presently the SO_TIMESTAMP socket option uses struct timeval for timestamps. This is not y2038 safe. Subsequent patches in the series add new y2038 safe socket option to be used in the place of SO_TIMESTAMP_

[PATCH v3 0/8] net: y2038-safe socket timestamps

2019-01-07 Thread Deepa Dinamani
The series introduces new socket timestamps that are y2038 safe. The time data types used for the existing socket timestamp options: SO_TIMESTAMP, SO_TIMESTAMPNS and SO_TIMESTAMPING are not y2038 safe. The series introduces SO_TIMESTAMP_NEW, SO_TIMESTAMPNS_NEW and SO_TIMESTAMPING_NEW to replace th

[PATCH v3 6/8] socket: Add SO_TIMESTAMP[NS]_NEW

2019-01-07 Thread Deepa Dinamani
Add SO_TIMESTAMP_NEW and SO_TIMESTAMPNS_NEW variants of socket timestamp options. These are the y2038 safe versions of the SO_TIMESTAMP_OLD and SO_TIMESTAMPNS_OLD for all architectures. Note that the format of scm_timestamping.ts[0] is not changed in this patch. Signed-off-by: Deepa Dinamani Cc:

[PATCH v3 7/8] socket: Add SO_TIMESTAMPING_NEW

2019-01-07 Thread Deepa Dinamani
Add SO_TIMESTAMPING_NEW variant of socket timestamp options. This is the y2038 safe versions of the SO_TIMESTAMPING_OLD for all architectures. Signed-off-by: Deepa Dinamani Cc: ch...@zankel.net Cc: fenghua...@intel.com Cc: r...@twiddle.net Cc: t...@linutronix.de Cc: ubr...@linux.ibm.com Cc: linux

[PATCH v3 1/8] arch: Use asm-generic/socket.h when possible

2019-01-07 Thread Deepa Dinamani
Many architectures maintain an arch specific copy of the file even though there are no differences with the asm-generic one. Allow these architectures to use the generic one instead. Signed-off-by: Deepa Dinamani Cc: ch...@zankel.net Cc: fenghua...@intel.com Cc: t...@linutronix.de Cc: schwidef...

Re: [PATCH v3] coding-style: Clarify the expectations around bool

2019-01-07 Thread Jason Gunthorpe
On Mon, Jan 07, 2019 at 04:38:50PM -0800, Joe Perches wrote: > On Mon, 2019-01-07 at 16:25 -0700, Jason Gunthorpe wrote: > > On Mon, Jan 07, 2019 at 02:10:22PM -0800, Joe Perches wrote: > > > On Mon, 2019-01-07 at 14:11 -0700, Jason Gunthorpe wrote: > > > > There has been some confusion since check

Clang warnings in net/phonet

2019-01-07 Thread Nathan Chancellor
Hi all, When building the kernel with Clang, this warning comes up in net/phonet. net/phonet/pep.c:224:16: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds] ph->data[0] = oph->data[1]; /* CTRL id */ ^ ~ include/n

Re: igb: Illegal context switch in RCU read-side critical section!

2019-01-07 Thread Cong Wang
On Mon, Jan 7, 2019 at 11:19 AM Dave Jones wrote: > > [ 32.845071] = > [ 32.845084] WARNING: suspicious RCU usage > [ 32.845098] 5.0.0-rc1-backup+ #1 Not tainted > [ 32.845111] - > [ 32.845124] ./include/linux/rcupdate.h:281 Illegal

Re: [PATCH net] tipc: fix uninit-value in tipc_nl_compat_link_set

2019-01-07 Thread Ying Xue
On 1/7/19 9:38 PM, David Miller wrote: > From: Ying Xue > Date: Mon, 7 Jan 2019 19:29:52 +0800 > >> This is because lc->name string is not validated before it's used. > > It looks like we have several situations like this, not just this one. > > For example, tipc_nl_compat_bearer_{enable,disabl

pull-request: bpf 2019-01-08

2019-01-07 Thread Daniel Borkmann
Hi David, The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix BSD'ism in sendmsg(2) to rewrite unspecified IPv6 dst for unconnected UDP sockets with [::1] _after_ cgroup BPF invocation, from Andrey. 2) Follow-up fix to the speculation fix wher

Re: [PATCH v3] coding-style: Clarify the expectations around bool

2019-01-07 Thread Joe Perches
On Mon, 2019-01-07 at 16:25 -0700, Jason Gunthorpe wrote: > On Mon, Jan 07, 2019 at 02:10:22PM -0800, Joe Perches wrote: > > On Mon, 2019-01-07 at 14:11 -0700, Jason Gunthorpe wrote: > > > There has been some confusion since checkpatch started warning about bool > > > use in structures, and people

Re: [PATCH iproute2-next 3/3] Improve batch times by caching link lookups

2019-01-07 Thread David Ahern
On 1/7/19 5:05 PM, Stephen Hemminger wrote: > On Mon, 7 Jan 2019 14:55:52 -0800 > David Ahern wrote: > >> +idx = ll_link_get(name); >> +if (idx == 0) >> +idx = if_nametoindex(name); > > What is advantage of using netlink, other than not having to open > a socket. > As ment

Re: [PATCH iproute2-next 2/3] ip link: Drop cache entry on name changes

2019-01-07 Thread David Ahern
On 1/7/19 5:06 PM, Stephen Hemminger wrote: > On Mon, 7 Jan 2019 14:55:51 -0800 > David Ahern wrote: > >> +int iplink_parse(int argc, char **argv, struct iplink_req *req, char **type, >> + bool *name_change); > > Not a real fan of adding another by reference return value flag. > It

Re: [PATCH iproute2-next 2/3] ip link: Drop cache entry on name changes

2019-01-07 Thread Stephen Hemminger
On Mon, 7 Jan 2019 14:55:51 -0800 David Ahern wrote: > +int iplink_parse(int argc, char **argv, struct iplink_req *req, char **type, > + bool *name_change); Not a real fan of adding another by reference return value flag. It makes the logic flow more complex. Is there another way?

Re: [PATCH iproute2-next 3/3] Improve batch times by caching link lookups

2019-01-07 Thread Stephen Hemminger
On Mon, 7 Jan 2019 14:55:52 -0800 David Ahern wrote: > + idx = ll_link_get(name); > + if (idx == 0) > + idx = if_nametoindex(name); What is advantage of using netlink, other than not having to open a socket.

Re: [PATCH bpf 0/2] Two minor bpf doc updates

2019-01-07 Thread Alexei Starovoitov
On Mon, Jan 07, 2019 at 10:57:16PM +0100, Daniel Borkmann wrote: > Two trivial doc follow-ups to i) remove deprecated kern_version > mentioning in the design qa and ii) to mention stand-alone build > and license of libbpf. Thanks! Applied, Thanks

[PATCH] net: cxgb4: fix various indentation issues

2019-01-07 Thread Colin King
From: Colin Ian King There are some lines that have indentation issues, fix these. Signed-off-by: Colin Ian King --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c | 8 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c | 2 +- drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 2 +- 3 file

[PATCH] net: cxgb3: fix various indentation issues

2019-01-07 Thread Colin King
From: Colin Ian King There are handful of lines that have indentation issues, fix these. Signed-off-by: Colin Ian King --- drivers/net/ethernet/chelsio/cxgb3/sge.c | 12 +++- drivers/net/ethernet/chelsio/cxgb3/t3_hw.c | 6 +++--- 2 files changed, 10 insertions(+), 8 deletions(-) di

Re: [PATCH iproute2] configure: fix typo in check_xt_old_internal_h

2019-01-07 Thread Stephen Hemminger
On Tue, 8 Jan 2019 01:37:15 +0300 "Dmitry V. Levin" wrote: > Fixes: 377a09902a57 ("configure: Minor code cleanup") > Signed-off-by: Dmitry V. Levin > --- Applied

Re: [PATCH v3] coding-style: Clarify the expectations around bool

2019-01-07 Thread Jason Gunthorpe
On Mon, Jan 07, 2019 at 02:10:22PM -0800, Joe Perches wrote: > On Mon, 2019-01-07 at 14:11 -0700, Jason Gunthorpe wrote: > > There has been some confusion since checkpatch started warning about bool > > use in structures, and people have been avoiding using it. > > > > Many people feel there is st

Re: [PATCH iproute2] xfrm: add option to hide keys in state output

2019-01-07 Thread Benedict Wong
(Accidentally sent previously as direct reply. Re-sending as reply-all) > ... would not it be better to not request the > kernel not to dump the keys to begin with ... I think it's still valid to have it in iproute2, since it does allow for backward compatibility against older kernels. Adding it

[PATCH] i40e: clean up several indentation issues

2019-01-07 Thread Colin King
From: Colin Ian King There are several statements that have incorrect levels of indentation, fix these. Signed-off-by: Colin Ian King --- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 8 drivers/net/ethernet/intel/i40e/i40e_main.c| 6 +++--- drivers/net/ethernet/intel/i

[PATCH iproute2-next 3/3] Improve batch times by caching link lookups

2019-01-07 Thread David Ahern
From: David Ahern ip route (for example) uses ll_name_to_index to convert the user given device name to an index. At the moment ll_name_to_index uses if_nametoindex which is ioctl based and does not cache the result. When using a batch file this means the same device lookups can be done repeatedl

[PATCH iproute2-next 2/3] ip link: Drop cache entry on name changes

2019-01-07 Thread David Ahern
From: David Ahern If a link's name is changed remove any entry from the link cache. Signed-off-by: David Ahern --- ip/ip_common.h| 3 ++- ip/iplink.c | 10 -- ip/iplink_vxcan.c | 3 ++- ip/link_veth.c| 3 ++- 4 files changed, 14 insertions(+), 5 deletions(-) diff --gi

[PATCH iproute2-next 0/3] Improve batch times by caching link lookups

2019-01-07 Thread David Ahern
From: David Ahern Many commands convert device names to an index using ll_name_to_index. ll_name_to_index calls if_nametoindex which is ioctl based and the result is not cached. When using a batch file this means the same device lookups can be done repeatedly adding unnecessary overhead (socket +

[PATCH iproute2-next 1/3] ll_map: Add function to remove link cache entry by index

2019-01-07 Thread David Ahern
From: David Ahern Add ll_drop_by_index to remove an entry from the link cache. Signed-off-by: David Ahern --- include/ll_map.h | 1 + lib/ll_map.c | 14 ++ 2 files changed, 15 insertions(+) diff --git a/include/ll_map.h b/include/ll_map.h index 511fe00b8567..4de1041e2746 1006

Re: [PATCH v3] coding-style: Clarify the expectations around bool

2019-01-07 Thread Bart Van Assche
On Mon, 2019-01-07 at 14:10 -0800, Joe Perches wrote: > On Mon, 2019-01-07 at 14:11 -0700, Jason Gunthorpe wrote: > > There has been some confusion since checkpatch started warning about bool > > use in structures, and people have been avoiding using it. > > > > Many people feel there is still a l

Re: [RFC PATCH V3 0/5] Hi:

2019-01-07 Thread Dan Williams
On Mon, Jan 7, 2019 at 2:25 PM Michael S. Tsirkin wrote: > > On Mon, Jan 07, 2019 at 01:39:15PM -0800, Dan Williams wrote: > > On Mon, Jan 7, 2019 at 6:11 AM Michael S. Tsirkin wrote: > > > > > > On Sun, Jan 06, 2019 at 11:15:20PM -0800, Dan Williams wrote: > > > > On Sun, Jan 6, 2019 at 8:17 PM

Re: possible deadlock in nr_destroy_socket

2019-01-07 Thread Cong Wang
syzbot confirmed the latest net tree is fine, so: #syz fix: netrom: fix locking in nr_find_socket()

Re: [PATCH net v2 2/2] tun: always set skb->dev to tun->dev

2019-01-07 Thread Stanislav Fomichev
On 01/07, Willem de Bruijn wrote: > On Mon, Jan 7, 2019 at 4:41 PM Stanislav Fomichev wrote: > > > > While debugging previous issue I noticed that commit 90e33d459407 ("tun: > > enable napi_gro_frags() for TUN/TAP driver") started conditionally > > (!frags) calling eth_type_trans(skb, tun->dev) fo

[PATCH iproute2] configure: fix typo in check_xt_old_internal_h

2019-01-07 Thread Dmitry V. Levin
Fixes: 377a09902a57 ("configure: Minor code cleanup") Signed-off-by: Dmitry V. Levin --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index b85eb58b..45fcffb6 100755 --- a/configure +++ b/configure @@ -115,7 +115,7 @@ EOF check_xt_old_intern

Re: [PATCH net v2 2/2] tun: always set skb->dev to tun->dev

2019-01-07 Thread Willem de Bruijn
On Mon, Jan 7, 2019 at 4:41 PM Stanislav Fomichev wrote: > > While debugging previous issue I noticed that commit 90e33d459407 ("tun: > enable napi_gro_frags() for TUN/TAP driver") started conditionally > (!frags) calling eth_type_trans(skb, tun->dev) for IFF_TAP case. Since > eth_type_trans sets

Re: [RFC PATCH V3 0/5] Hi:

2019-01-07 Thread Michael S. Tsirkin
On Mon, Jan 07, 2019 at 01:39:15PM -0800, Dan Williams wrote: > On Mon, Jan 7, 2019 at 6:11 AM Michael S. Tsirkin wrote: > > > > On Sun, Jan 06, 2019 at 11:15:20PM -0800, Dan Williams wrote: > > > On Sun, Jan 6, 2019 at 8:17 PM Michael S. Tsirkin wrote: > > > > > > > > On Mon, Jan 07, 2019 at 11:

Re: [PATCH iproute2] xfrm: add option to hide keys in state output

2019-01-07 Thread Florian Fainelli
On 1/7/19 1:31 PM, Benedict Wong wrote: > ip xfrm state show currently dumps keys unconditionally. This limits its > use in logging, as security information can be leaked. > > This patch adds a nokeys option to ip xfrm ( state show | monitor ), which > prevents the printing of keys. This allows ip

Re: [PATCH v3] coding-style: Clarify the expectations around bool

2019-01-07 Thread Joe Perches
On Mon, 2019-01-07 at 14:11 -0700, Jason Gunthorpe wrote: > There has been some confusion since checkpatch started warning about bool > use in structures, and people have been avoiding using it. > > Many people feel there is still a legitimate place for bool in structures, > so provide some guidan

Re: [PATCH v2 0/4] doc: network: integrate offload documents into doc tree

2019-01-07 Thread Jonathan Corbet
On Mon, 07 Jan 2019 07:30:29 -0800 (PST) David Miller wrote: > Jon, do you want to integrate these? I'm fine with that and I don't > anticiapte > any serious conflicts. I'll do that shortly, thanks. jon

[PATCH bpf 0/2] Two minor bpf doc updates

2019-01-07 Thread Daniel Borkmann
Two trivial doc follow-ups to i) remove deprecated kern_version mentioning in the design qa and ii) to mention stand-alone build and license of libbpf. Thanks! Daniel Borkmann (2): bpf, doc: update design qa to reflect kern_version requirement bpf, doc: add note for libbpf's stand-alone build

[PATCH bpf 2/2] bpf, doc: add note for libbpf's stand-alone build

2019-01-07 Thread Daniel Borkmann
Given this came up couple of times, add a note to libbpf's readme about the semi-automated mirror for a stand-alone build which is officially managed by BPF folks. While at it, also explicitly state the libbpf license in the readme file. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov

[PATCH bpf 1/2] bpf, doc: update design qa to reflect kern_version requirement

2019-01-07 Thread Daniel Borkmann
Update the bpf_design_QA.rst to also reflect recent changes in 6c4fc209fcf9 ("bpf: remove useless version check for prog load"). Suggested-by: Quentin Monnet Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov --- Documentation/bpf/bpf_design_QA.rst | 11 +-- 1 file changed, 5

Re: [PATCH iproute2-next] Improve batch times by caching link lookups

2019-01-07 Thread David Ahern
On 1/7/19 2:31 PM, Stephen Hemminger wrote: > > What if a ip command in the batch does a rename? > Simplest action (meaning least overhead for non-batch) is to drop any entry from the cache. If a later command needs it, the cache entry can be re-created.

[PATCH net] ip: on queued skb use skb_header_pointer instead of pskb_may_pull

2019-01-07 Thread Willem de Bruijn
From: Willem de Bruijn Commit 2efd4fca703a ("ip: in cmsg IP(V6)_ORIGDSTADDR call pskb_may_pull") avoided a read beyond the end of the skb linear segment by calling pskb_may_pull. That function can trigger a BUG_ON in pskb_expand_head if the skb is shared, which it is when when peeking. It can al

Re: [RFC PATCH V3 0/5] Hi:

2019-01-07 Thread Dan Williams
On Mon, Jan 7, 2019 at 6:11 AM Michael S. Tsirkin wrote: > > On Sun, Jan 06, 2019 at 11:15:20PM -0800, Dan Williams wrote: > > On Sun, Jan 6, 2019 at 8:17 PM Michael S. Tsirkin wrote: > > > > > > On Mon, Jan 07, 2019 at 11:53:41AM +0800, Jason Wang wrote: > > > > > > > > On 2019/1/7 上午11:28, Mich

[PATCH net v2 2/2] tun: always set skb->dev to tun->dev

2019-01-07 Thread Stanislav Fomichev
While debugging previous issue I noticed that commit 90e33d459407 ("tun: enable napi_gro_frags() for TUN/TAP driver") started conditionally (!frags) calling eth_type_trans(skb, tun->dev) for IFF_TAP case. Since eth_type_trans sets skb->dev, some skbs can now have NULL skb->dev. Fix that by always s

[PATCH net v2 1/2] tun: publish tfile after it's fully initialized

2019-01-07 Thread Stanislav Fomichev
BUG: unable to handle kernel NULL pointer dereference at 00d1 Call Trace: ? napi_gro_frags+0xa7/0x2c0 tun_get_user+0xb50/0xf20 tun_chr_write_iter+0x53/0x70 new_sync_write+0xff/0x160 vfs_write+0x191/0x1e0 __x64_sys_write+0x5e/0xd0 do_syscall_64+0x47/0xf0 entry_SYSCALL_64_after_hw

Re: [PATCH iproute2-next] Improve batch times by caching link lookups

2019-01-07 Thread Stephen Hemminger
On Mon, 7 Jan 2019 12:41:30 -0800 David Ahern wrote: > From: David Ahern > > ip route uses ll_name_to_index to convert the user given device name to an > index. At the moment ll_name_to_index uses if_nametoindex which is ioctl > based and does not cache the result. When using a batch file this

[PATCH iproute2] xfrm: add option to hide keys in state output

2019-01-07 Thread Benedict Wong
ip xfrm state show currently dumps keys unconditionally. This limits its use in logging, as security information can be leaked. This patch adds a nokeys option to ip xfrm ( state show | monitor ), which prevents the printing of keys. This allows ip xfrm state show to be used in logging without exp

Re: [PATCH net 1/2] tun: hold napi_mutex for all napi operations

2019-01-07 Thread Stanislav Fomichev
On 01/07, Eric Dumazet wrote: > > > On 01/07/2019 01:02 PM, Stanislav Fomichev wrote: > > On 01/07, Eric Dumazet wrote: > >> On Mon, Jan 7, 2019 at 12:02 PM Stanislav Fomichev wrote: > >>> > >>> BUG: unable to handle kernel NULL pointer dereference at 00d1 > >>> Call Trace: > >>> ?

Re: [PATCH bpf v2] selftests/bpf: fix incorrect users of create_and_get_cgroup

2019-01-07 Thread Alexei Starovoitov
On Mon, Jan 07, 2019 at 09:46:46AM -0800, Stanislav Fomichev wrote: > We have some tests that assume create_and_get_cgroup returns -1 on error > which is incorrect (it returns 0 on error). Since fd might be zero in > general case, change create_and_get_cgroup to return -1 on error > and fix the use

Re: [PATCH iproute2-next] Improve batch times by caching link lookups

2019-01-07 Thread David Ahern
On 1/7/19 2:06 PM, Eric Dumazet wrote: > > > On 01/07/2019 12:58 PM, David Ahern wrote: >> On 1/7/19 1:57 PM, Eric Dumazet wrote: >>> >>> >>> On 01/07/2019 12:41 PM, David Ahern wrote: From: David Ahern ip route uses ll_name_to_index to convert the user given device name to an >>>

Re: Handling of EAGAIN from BPF verifier

2019-01-07 Thread Alexei Starovoitov
On Mon, Jan 07, 2019 at 03:07:09PM +, Lorenz Bauer wrote: > Hi, > > Commit "bpf: check pending signals while verifying programs" makes the > bpf syscall return EAGAIN for BPF_PROG_LOAD. How should user space > react to this? The error sounds like it should retry, but I couldn't > find the corr

[PATCH v3] coding-style: Clarify the expectations around bool

2019-01-07 Thread Jason Gunthorpe
There has been some confusion since checkpatch started warning about bool use in structures, and people have been avoiding using it. Many people feel there is still a legitimate place for bool in structures, so provide some guidance on bool usage derived from the entire thread that spawned the che

Re: [PATCH net 1/2] tun: hold napi_mutex for all napi operations

2019-01-07 Thread Eric Dumazet
On 01/07/2019 01:02 PM, Stanislav Fomichev wrote: > On 01/07, Eric Dumazet wrote: >> On Mon, Jan 7, 2019 at 12:02 PM Stanislav Fomichev wrote: >>> >>> BUG: unable to handle kernel NULL pointer dereference at 00d1 >>> Call Trace: >>> ? napi_gro_frags+0xa7/0x2c0 >>> tun_get_user+0xb

Re: [PATCH iproute2-next] Improve batch times by caching link lookups

2019-01-07 Thread Eric Dumazet
On 01/07/2019 12:58 PM, David Ahern wrote: > On 1/7/19 1:57 PM, Eric Dumazet wrote: >> >> >> On 01/07/2019 12:41 PM, David Ahern wrote: >>> From: David Ahern >>> >>> ip route uses ll_name_to_index to convert the user given device name to an >>> index. At the moment ll_name_to_index uses if_name

Re: [PATCH net 1/2] tun: hold napi_mutex for all napi operations

2019-01-07 Thread Stanislav Fomichev
On 01/07, Eric Dumazet wrote: > On Mon, Jan 7, 2019 at 12:02 PM Stanislav Fomichev wrote: > > > > BUG: unable to handle kernel NULL pointer dereference at 00d1 > > Call Trace: > > ? napi_gro_frags+0xa7/0x2c0 > > tun_get_user+0xb50/0xf20 > > tun_chr_write_iter+0x53/0x70 > > new_sync

Re: [PATCH iproute2-next] Improve batch times by caching link lookups

2019-01-07 Thread David Ahern
On 1/7/19 1:57 PM, Eric Dumazet wrote: > > > On 01/07/2019 12:41 PM, David Ahern wrote: >> From: David Ahern >> >> ip route uses ll_name_to_index to convert the user given device name to an >> index. At the moment ll_name_to_index uses if_nametoindex which is ioctl >> based and does not cache th

Re: [PATCH iproute2-next] Improve batch times by caching link lookups

2019-01-07 Thread Eric Dumazet
On 01/07/2019 12:41 PM, David Ahern wrote: > From: David Ahern > > ip route uses ll_name_to_index to convert the user given device name to an > index. At the moment ll_name_to_index uses if_nametoindex which is ioctl > based and does not cache the result. When using a batch file this means > t

Re: [PATCH 3/4] sch_api: Allow reducing queue backlog by a negative value

2019-01-07 Thread Eric Dumazet
On 01/07/2019 11:47 AM, Toke Høiland-Jørgensen wrote: > From: Toke Høiland-Jørgensen > > With GSO splitting in sch_cake, we can decrease as well as increase the > qlen. To make it possible to signal this up the qdisc tree, change > qdisc_tree_reduce_backlog() to accept signed integer values as

Re: [RFC iproute2] xfrm: add option to hide keys in state output

2019-01-07 Thread Stephen Hemminger
On Mon, 7 Jan 2019 12:37:41 -0800 Benedict Wong wrote: > Noted. Should I wait until xfrm is converted to JSON output formatting? > > Or if there are no structural and stylistic issues, should I re-send > this as a patch? > No the patch should go in now.

[PATCH net] r8169: load Realtek PHY driver module before r8169

2019-01-07 Thread Heiner Kallweit
This soft dependency works around an issue where sometimes the genphy driver is used instead of the dedicated PHY driver. The root cause of the issue isn't clear yet. People reported the unloading/re-loading module r8169 helps, and also configuring this soft dependency in the modprobe config files.

[PATCH iproute2-next] Improve batch times by caching link lookups

2019-01-07 Thread David Ahern
From: David Ahern ip route uses ll_name_to_index to convert the user given device name to an index. At the moment ll_name_to_index uses if_nametoindex which is ioctl based and does not cache the result. When using a batch file this means the same device lookups can be done repeatedly adding unnec

Re: [RFC iproute2] xfrm: add option to hide keys in state output

2019-01-07 Thread Benedict Wong
Noted. Should I wait until xfrm is converted to JSON output formatting? Or if there are no structural and stylistic issues, should I re-send this as a patch? On Fri, Jan 4, 2019 at 4:21 PM Stephen Hemminger wrote: > > On Fri, 4 Jan 2019 15:19:10 -0800 > Benedict Wong wrote: > > > ip xfrm state

Re: [PATCH v1 net] lan743x: Remove phy_read from link status change function

2019-01-07 Thread Andrew Lunn
On Mon, Jan 07, 2019 at 02:00:09PM -0500, Bryan Whitehead wrote: > It has been noticed that some phys do not have the registers > required by the previous implementation. > > To fix this, instead of using phy_read, the required information > is extracted from the phy_device structure. > > fixes:

Re: [PATCH net 1/2] tun: hold napi_mutex for all napi operations

2019-01-07 Thread Eric Dumazet
On Mon, Jan 7, 2019 at 12:02 PM Stanislav Fomichev wrote: > > BUG: unable to handle kernel NULL pointer dereference at 00d1 > Call Trace: > ? napi_gro_frags+0xa7/0x2c0 > tun_get_user+0xb50/0xf20 > tun_chr_write_iter+0x53/0x70 > new_sync_write+0xff/0x160 > vfs_write+0x191/0x1e0 >

[PATCH net 2/2] tun: always set skb->dev to tun->dev

2019-01-07 Thread Stanislav Fomichev
While debugging previous issue I noticed that commit 90e33d459407 ("tun: enable napi_gro_frags() for TUN/TAP driver") started conditionally (!frags) calling eth_type_trans(skb, tun->dev) for IFF_TAP case. Since eth_type_trans sets skb->dev, some skbs can now have NULL skb->dev. Fix that by always s

[PATCH net 1/2] tun: hold napi_mutex for all napi operations

2019-01-07 Thread Stanislav Fomichev
BUG: unable to handle kernel NULL pointer dereference at 00d1 Call Trace: ? napi_gro_frags+0xa7/0x2c0 tun_get_user+0xb50/0xf20 tun_chr_write_iter+0x53/0x70 new_sync_write+0xff/0x160 vfs_write+0x191/0x1e0 __x64_sys_write+0x5e/0xd0 do_syscall_64+0x47/0xf0 entry_SYSCALL_64_after_hw

[PATCH 4/4] sch_cake: Correctly update parent qlen when splitting GSO packets

2019-01-07 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen To ensure parent qdiscs have the same notion of the number of enqueued packets even after splitting a GSO packet, update the qdisc tree with the number of packets that was added due to the split. Signed-off-by: Toke Høiland-Jørgensen --- net/sched/sch_cake.c | 5 ++

[PATCH 2/4] sched: Fix detection of empty queues in child qdiscs

2019-01-07 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen Several qdiscs check on enqueue whether the packet was enqueued to a class with an empty queue, in which case the class is activated. This is done by checking if the qlen is exactly 1 after enqueue. However, if GSO splitting is enabled in the child qdisc, a single pac

[PATCH 3/4] sch_api: Allow reducing queue backlog by a negative value

2019-01-07 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen With GSO splitting in sch_cake, we can decrease as well as increase the qlen. To make it possible to signal this up the qdisc tree, change qdisc_tree_reduce_backlog() to accept signed integer values as the number of packets and bytes to reduce the backlog by. Signed-

[PATCH 1/4] sched: Avoid dereferencing skb pointer after child enqueue

2019-01-07 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen Parent qdiscs may dereference the pointer to the enqueued skb after enqueue. However, both CAKE and TBF call consume_skb() on the original skb when splitting GSO packets, leading to a potential use-after-free in the parent. Fix this by avoiding dereferencing the skb p

[PATCH 0/4] sched: Fix qdisc interactions exposed by using sch_cake as a leaf qdisc

2019-01-07 Thread Toke Høiland-Jørgensen
This series fixes a couple of issues exposed by running sch_cake as a leaf qdisc in an HFSC tree, which were discovered and reported by Pete Heist. The interaction between CAKE's GSO splitting and the parent qdisc's notion of its own queue length could cause queue stalls. While investigating the re

Re: [Patch net] smc: move unhash as early as possible in smc_release()

2019-01-07 Thread David Miller
From: Cong Wang Date: Mon, 7 Jan 2019 11:25:12 -0800 > Isn't Myungho's patch already merged as commit 78abe3d0dfad? :) > > So I believe the syzbot reported this bug on top of that commit. Aha, now it makes sense. Yeah I'll apply your patch Cong.

Re: [Patch net] smc: move unhash as early as possible in smc_release()

2019-01-07 Thread Cong Wang
On Mon, Jan 7, 2019 at 7:12 AM David Miller wrote: > > From: Cong Wang > Date: Sat, 5 Jan 2019 23:45:26 -0800 > > > In smc_release() we release smc->clcsock before unhash the smc > > sock, but a parallel smc_diag_dump() may be still reading > > smc->clcsock, therefore this could cause a use-afte

Re: [PATCH RFC 3/4] barriers: convert a control to a data dependency

2019-01-07 Thread Paul E. McKenney
On Mon, Jan 07, 2019 at 02:13:29PM -0500, Michael S. Tsirkin wrote: > On Mon, Jan 07, 2019 at 11:02:36AM -0800, Paul E. McKenney wrote: > > On Mon, Jan 07, 2019 at 08:36:36AM -0500, Michael S. Tsirkin wrote: > > > On Mon, Jan 07, 2019 at 10:46:10AM +0100, Peter Zijlstra wrote: > > > > On Sun, Jan 0

  1   2   3   >