Re: [PATCH net] ipv6: no need to return rt->dst.error if it is not null entry.

2017-07-22 Thread Roopa Prabhu
On Thu, Jul 20, 2017 at 7:51 AM, Hangbin Liu wrote: > After commit 18c3a61c4264 ("net: ipv6: RTM_GETROUTE: return matched fib > result when requested"). When we get a prohibit ertry, we will return > -EACCES directly. > > Before: > + ip netns exec client ip -6 route get

Re: [PATCH net] ipv6: no need to return rt->dst.error if it is not null entry.

2017-07-22 Thread Roopa Prabhu
On Fri, Jul 21, 2017 at 2:53 PM, Roopa Prabhu wrote: > On Fri, Jul 21, 2017 at 11:42 AM, Cong Wang wrote: >> On Thu, Jul 20, 2017 at 8:23 AM, Hangbin Liu wrote: >>> 2017-07-20 23:06 GMT+08:00 Hangbin Liu

Re: af_packet: use after free in prb_retire_rx_blk_timer_expired

2017-07-22 Thread Ding Tianhong
On 2017/7/23 3:02, Cong Wang wrote: > Hello, > > On Sat, Jul 22, 2017 at 2:55 AM, liujian (CE) wrote: >> I also hit this issue with trinity test: >> >> The call trace: >> [exception RIP: prb_retire_rx_blk_timer_expired+70] >> RIP: 81633be6 RSP:

[PATCH net-next 11/11] sctp: remove the typedef sctp_abort_chunk_t

2017-07-22 Thread Xin Long
This patch is to remove the typedef sctp_abort_chunk_t, and replace with struct sctp_abort_chunk in the places where it's using this typedef. Signed-off-by: Xin Long --- include/linux/sctp.h| 4 ++-- net/sctp/sm_statefuns.c | 8 2 files changed, 6

[PATCH net-next 09/11] sctp: remove the typedef sctp_heartbeathdr_t

2017-07-22 Thread Xin Long
This patch is to remove the typedef sctp_heartbeathdr_t, and replace with struct sctp_heartbeathdr in the places where it's using this typedef. Signed-off-by: Xin Long --- include/linux/sctp.h| 6 +++--- net/sctp/sm_statefuns.c | 2 +- 2 files changed, 4 insertions(+),

[PATCH net-next 10/11] sctp: remove the typedef sctp_heartbeat_chunk_t

2017-07-22 Thread Xin Long
This patch is to remove the typedef sctp_heartbeat_chunk_t, and replace with struct sctp_heartbeat_chunk in the places where it's using this typedef. Signed-off-by: Xin Long --- include/linux/sctp.h| 4 ++-- net/sctp/sm_statefuns.c | 3 ++- 2 files changed, 4

[PATCH net-next 07/11] sctp: remove the typedef sctp_sackhdr_t

2017-07-22 Thread Xin Long
This patch is to remove the typedef sctp_sackhdr_t, and replace with struct sctp_sackhdr in the places where it's using this typedef. Signed-off-by: Xin Long --- include/linux/sctp.h | 6 +++--- include/net/sctp/command.h | 4 ++-- net/sctp/sm_statefuns.c| 2 +-

[PATCH net-next 08/11] sctp: remove the typedef sctp_sack_chunk_t

2017-07-22 Thread Xin Long
This patch is to remove the typedef sctp_sack_chunk_t, and replace with struct sctp_sack_chunk in the places where it's using this typedef. Signed-off-by: Xin Long --- include/linux/sctp.h| 4 ++-- net/sctp/chunk.c| 2 +- net/sctp/sm_statefuns.c | 4 ++-- 3

[PATCH net-next 02/11] sctp: remove the typedef sctp_cookie_param_t

2017-07-22 Thread Xin Long
This patch is to remove the typedef sctp_cookie_param_t, and replace with struct sctp_cookie_param in the places where it's using this typedef. Signed-off-by: Xin Long --- include/linux/sctp.h | 4 ++-- net/sctp/sm_make_chunk.c | 18 ++ 2 files

[PATCH net-next 06/11] sctp: remove the typedef sctp_sack_variable_t

2017-07-22 Thread Xin Long
This patch is to remove the typedef sctp_sack_variable_t, and replace with union sctp_sack_variable in the places where it's using this typedef. It is also to fix some indents in sctp_acked(). Signed-off-by: Xin Long --- include/linux/sctp.h | 6 +++---

[PATCH net-next 05/11] sctp: remove the typedef sctp_dup_tsn_t

2017-07-22 Thread Xin Long
This patch is to remove the typedef sctp_dup_tsn_t, and replace with __be32 in the places where it's using this typedef. Signed-off-by: Xin Long --- include/linux/sctp.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/linux/sctp.h

[PATCH net-next 01/11] sctp: remove the typedef sctp_initack_chunk_t

2017-07-22 Thread Xin Long
This patch is to remove the typedef sctp_initack_chunk_t, and replace with struct sctp_initack_chunk in the places where it's using this typedef. It is also to use sizeof(variable) instead of sizeof(type). Signed-off-by: Xin Long --- include/linux/sctp.h| 5 -

[PATCH net-next 00/11] sctp: remove typedefs from structures part 3

2017-07-22 Thread Xin Long
As we know, typedef is suggested not to use in kernel, even checkpatch.pl also gives warnings about it. Now sctp is using it for many structures. All this kind of typedef's using should be removed. This patchset is the part 3 to remove it for another 11 basic structures from linux/sctp.h. Just

[PATCH net-next 03/11] sctp: remove the typedef sctp_unrecognized_param_t

2017-07-22 Thread Xin Long
This patch is to remove the typedef sctp_unrecognized_param_t, and replace with struct sctp_unrecognized_param in the places where it's using this typedef. It is also to fix some indents in sctp_sf_do_unexpected_init() and sctp_sf_do_5_1B_init(). Signed-off-by: Xin Long

[PATCH net-next 04/11] sctp: remove the typedef sctp_gap_ack_block_t

2017-07-22 Thread Xin Long
This patch is to remove the typedef sctp_gap_ack_block_t, and replace with struct sctp_gap_ack_block in the places where it's using this typedef. Signed-off-by: Xin Long --- include/linux/sctp.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

RE: [PATCH V3 net-next 2/8] net: hns3: Add support of the HNAE3 framework

2017-07-22 Thread Salil Mehta
Hi Stephen, > -Original Message- > From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: Monday, June 19, 2017 5:59 PM > To: Salil Mehta > Cc: da...@davemloft.net; Zhuangyuzeng (Yisen); huangdaode; lipeng (Y); > mehta.salil@gmail.com; netdev@vger.kernel.org; linux- >

RE: [PATCH V2 net-next 1/8] net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC

2017-07-22 Thread Salil Mehta
Hi Stephen, > -Original Message- > From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: Monday, June 19, 2017 4:48 PM > To: Salil Mehta > Cc: da...@davemloft.net; Zhuangyuzeng (Yisen); huangdaode; lipeng (Y); > mehta.salil@gmail.com; netdev@vger.kernel.org; linux- >

RE: [PATCH V3 net-next 6/8] net: hns3: Add MDIO support to HNS3 Ethernet driver for hip08 SoC

2017-07-22 Thread Salil Mehta
Hi Andrew, > -Original Message- > From: Andrew Lunn [mailto:and...@lunn.ch] > Sent: Monday, June 19, 2017 4:53 AM > To: Salil Mehta > Cc: da...@davemloft.net; Zhuangyuzeng (Yisen); huangdaode; lipeng (Y); > mehta.salil@gmail.com; netdev@vger.kernel.org; linux- >

RE: [PATCH V3 net-next 1/8] net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC

2017-07-22 Thread Salil Mehta
Hi Bo Yu, > -Original Message- > From: Bo Yu [mailto:tsu.y...@gmail.com] > Sent: Monday, June 19, 2017 1:57 AM > To: Salil Mehta > Cc: da...@davemloft.net; Zhuangyuzeng (Yisen); huangdaode; lipeng (Y); > mehta.salil@gmail.com; netdev@vger.kernel.org; linux- > ker...@vger.kernel.org;

RE: [PATCH V3 net-next 5/8] net: hns3: Add support of TX Scheduler & Shaper to HNS3 driver

2017-07-22 Thread Salil Mehta
Hi Richard, > -Original Message- > From: Richard Cochran [mailto:richardcoch...@gmail.com] > Sent: Sunday, June 18, 2017 5:45 PM > To: Salil Mehta > Cc: da...@davemloft.net; Zhuangyuzeng (Yisen); huangdaode; lipeng (Y); > mehta.salil@gmail.com; netdev@vger.kernel.org; linux- >

RE: [PATCH V3 net-next 2/8] net: hns3: Add support of the HNAE3 framework

2017-07-22 Thread Salil Mehta
Hi Bo Yu, > -Original Message- > From: Bo Yu [mailto:tsu.y...@gmail.com] > Sent: Monday, June 19, 2017 1:40 AM > To: Salil Mehta > Cc: da...@davemloft.net; Zhuangyuzeng (Yisen); huangdaode; lipeng (Y); > mehta.salil@gmail.com; netdev@vger.kernel.org; linux- > ker...@vger.kernel.org;

RE: [PATCH V3 net-next 1/8] net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC

2017-07-22 Thread Salil Mehta
Hi Bo Yu, > -Original Message- > From: Bo Yu [mailto:tsu.y...@gmail.com] > Sent: Monday, June 19, 2017 1:18 AM > To: Salil Mehta > Cc: da...@davemloft.net; Zhuangyuzeng (Yisen); huangdaode; lipeng (Y); > mehta.salil@gmail.com; netdev@vger.kernel.org; linux- > ker...@vger.kernel.org;

RE: [PATCH V3 net-next 2/8] net: hns3: Add support of the HNAE3 framework

2017-07-22 Thread Salil Mehta
Hi Andrew, > -Original Message- > From: Andrew Lunn [mailto:and...@lunn.ch] > Sent: Sunday, June 18, 2017 4:02 PM > To: Salil Mehta > Cc: da...@davemloft.net; Zhuangyuzeng (Yisen); huangdaode; lipeng (Y); > mehta.salil@gmail.com; netdev@vger.kernel.org; linux- > ker...@vger.kernel.org;

RE: [PATCH V2 net-next 2/8] net: hns3: Add support of the HNAE3 framework

2017-07-22 Thread Salil Mehta
> -Original Message- > From: Andrew Lunn [mailto:and...@lunn.ch] > Sent: Sunday, June 18, 2017 3:53 PM > To: Salil Mehta > Cc: da...@davemloft.net; Zhuangyuzeng (Yisen); huangdaode; lipeng (Y); > mehta.salil@gmail.com; netdev@vger.kernel.org; linux- > ker...@vger.kernel.org; Linuxarm

RE: [PATCH V3 net-next 2/8] net: hns3: Add support of the HNAE3 framework

2017-07-22 Thread Salil Mehta
Hi Andrew, > -Original Message- > From: Andrew Lunn [mailto:and...@lunn.ch] > Sent: Saturday, June 17, 2017 8:46 PM > To: Salil Mehta > Cc: da...@davemloft.net; Zhuangyuzeng (Yisen); huangdaode; lipeng (Y); > mehta.salil@gmail.com; netdev@vger.kernel.org; linux- >

[PATCH iproute2 master v2 0/2] Minor BPF updates

2017-07-22 Thread Daniel Borkmann
Two minor updates to the BPF code, first one makes use of the recently exposed owner_jited in fdinfo to report whether a load issue related to tail calls occured, and second one fixes up custom mount of bpf fs when passed via env. Thanks! v1 -> v2: - Moved bpf_derive_prog_from_fdinfo() under

[PATCH iproute2 master v2 1/2] bpf: improve error reporting around tail calls

2017-07-22 Thread Daniel Borkmann
Currently, it's still quite hard to figure out if a prog passed the verifier, but later gets rejected due to different tail call ownership. Figure out whether that is the case and provide appropriate error messages to the user. Signed-off-by: Daniel Borkmann --- lib/bpf.c

[PATCH iproute2 master v2 2/2] bpf: fix mnt path when from env

2017-07-22 Thread Daniel Borkmann
When bpf fs mount path is from env, behavior is currently broken as we continue to search in default paths, thus fix this up. Signed-off-by: Daniel Borkmann --- lib/bpf.c | 55 +-- 1 file changed, 45 insertions(+), 10

RE: [PATCH V3 net-next 1/8] net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC

2017-07-22 Thread Salil Mehta
Hi Andrew > -Original Message- > From: Andrew Lunn [mailto:and...@lunn.ch] > Sent: Saturday, June 17, 2017 6:54 PM > To: Salil Mehta > Cc: da...@davemloft.net; Zhuangyuzeng (Yisen); huangdaode; lipeng (Y); > mehta.salil@gmail.com; netdev@vger.kernel.org; linux- >

[PATCH] ip route: replace exits with returns

2017-07-22 Thread elie
From: Élie Bouttier This patch replaces exits with returns in ip route commands. Allows to continue when invoked with ip -batch. Signed-off-by: Élie Bouttier --- ip/iproute.c | 47 ++- 1 file changed, 26

[PATCH V4 net-next 0/8] Hisilicon Network Subsystem 3 Ethernet Driver

2017-07-22 Thread Salil Mehta
This patch-set contains the support of the HNS3 (Hisilicon Network Subsystem 3) Ethernet driver for hip08 family of SoCs and future upcoming SoCs. Hisilicon's new hip08 SoCs have integrated ethernet based on PCI Express and hence there was a need of new driver over the previous HNS driver which

[PATCH V4 net-next 3/8] net: hns3: Add HNS3 IMP(Integrated Mgmt Proc) Cmd Interface Support

2017-07-22 Thread Salil Mehta
This patch adds the support of IMP (Integrated Management Processor) command interface to the HNS3 driver. Each PF/VF has support of CQP(Command Queue Pair) ring interface. Each CQP consis of send queue CSQ and receive queue CRQ. There are various commands a PF/VF may support, like for Flow Table

[PATCH V4 net-next 1/8] net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC

2017-07-22 Thread Salil Mehta
This patch adds the support of Hisilicon Network Subsystem 3 Ethernet driver to hip08 family of SoCs. This driver includes basic Rx/Tx functionality. It also includes the client registration code with the HNAE3(Hisilicon Network Acceleration Engine 3) framework. This work provides the initial

[PATCH V4 net-next 2/8] net: hns3: Add support of the HNAE3 framework

2017-07-22 Thread Salil Mehta
This patch adds the support of the HNAE3 (Hisilicon Network Acceleration Engine 3) framework support to the HNS3 driver. Framework facilitates clients like ENET(HNS3 Ethernet Driver), RoCE and user-space Ethernet drivers (like ODP etc.) to register with HNAE3 devices and their associated

[PATCH V4 net-next 4/8] net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support

2017-07-22 Thread Salil Mehta
This patch adds the support of Hisilicon Network Subsystem Accceleration Engine and common operations to access it. This layer provides access to the hardware configuration, hardware statistics. This layer is also responsible for triggering the initialization of the PHY layer through the below

[PATCH V4 net-next 6/8] net: hns3: Add MDIO support to HNS3 Ethernet driver for hip08 SoC

2017-07-22 Thread Salil Mehta
This patch adds the support of MDIO bus interface for HNS3 driver. Code provides various interfaces to start and stop the PHY layer and to read and write the MDIO bus or PHY. Signed-off-by: Daode Huang Signed-off-by: lipeng Signed-off-by: Salil

[PATCH V4 net-next 8/8] net: hns3: Add HNS3 driver to kernel build framework & MAINTAINERS

2017-07-22 Thread Salil Mehta
This patch updates the MAINTAINERS file with HNS3 Ethernet driver maintainers names and other details. This also introduces the new Makefiles required to build the HNS3 Ethernet driver and updates the existing Kconfig file in the hisilicon folder. Signed-off-by: Salil Mehta

[PATCH V4 net-next 5/8] net: hns3: Add support of TX Scheduler & Shaper to HNS3 driver

2017-07-22 Thread Salil Mehta
THis patch adds the support of the Scheduling and Shaping functionalities during the transmit leg. This also adds the support of Pause at MAC level. (Pause at per-priority level shall be added later along with the DCB feature). Hardware as such consists of two types of cofiguration of 6 level

[PATCH V4 net-next 7/8] net: hns3: Add Ethtool support to HNS3 driver

2017-07-22 Thread Salil Mehta
This patch adds the support of the Ethtool interface to the HNS3 Ethernet driver. Various commands to read the statistics, configure the offloading, loopback selftest etc. are supported. Signed-off-by: Daode Huang Signed-off-by: lipeng

Re: [PATCH net-next] bpf: dev_map_alloc() shouldn't return NULL

2017-07-22 Thread John Fastabend
On 07/22/2017 12:40 AM, Dan Carpenter wrote: > We forgot to set the error code on two error paths which means that we > return ERR_PTR(0) which is NULL. The caller, find_and_alloc_map(), is > not expecting that and will have a NULL dereference. > > Fixes: 546ac1ffb70d ("bpf: add devmap, a map

Re: af_packet: use after free in prb_retire_rx_blk_timer_expired

2017-07-22 Thread Cong Wang
Hello, On Sat, Jul 22, 2017 at 2:55 AM, liujian (CE) wrote: > I also hit this issue with trinity test: > > The call trace: > [exception RIP: prb_retire_rx_blk_timer_expired+70] > RIP: 81633be6 RSP: 8801bec03dc0 RFLAGS: 00010246 > RAX:

[IRDA PATCH] mcs7780: Fix initialization when CONFIG_VMAP_STACK is enabled

2017-07-22 Thread Thomas Jarosch
DMA transfers are not allowed to buffers that are on the stack. Therefore allocate a buffer to store the result of usb_control_message(). Fixes these bugreports: https://bugzilla.kernel.org/show_bug.cgi?id=195217 https://bugzilla.redhat.com/show_bug.cgi?id=1421387

Re: [PATCH] NFC: fix device-allocation error return

2017-07-22 Thread Johan Hovold
On Sun, Jul 09, 2017 at 01:08:58PM +0200, Johan Hovold wrote: > A recent change fixing NFC device allocation itself introduced an > error-handling bug by returning an error pointer in case device-id > allocation failed. This is clearly broken as the callers still expected > NULL to be returned on

[PATCH v2 net] net: ethernet: mediatek: avoid potential invalid memory access

2017-07-22 Thread sean.wang
From: Sean Wang Potential dangerous invalid memory might be accessed if invalid mac value reflected from the forward port field in rxd4 caused by possible potential hardware defects. So added a simple sanity checker to avoid the kind of situation happening.

Re: [PATCH net] net: ethernet: mediatek: avoid potential invalid memory access

2017-07-22 Thread kbuild test robot
Hi Sean, [auto build test WARNING on net/master] url: https://github.com/0day-ci/linux/commits/sean-wang-mediatek-com/net-ethernet-mediatek-avoid-potential-invalid-memory-access/20170722-155541 config: arm-allmodconfig (attached as .config) compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9

Re: [PATCH net-next] bpf: dev_map_alloc() shouldn't return NULL

2017-07-22 Thread Daniel Borkmann
On 07/22/2017 09:40 AM, Dan Carpenter wrote: We forgot to set the error code on two error paths which means that we return ERR_PTR(0) which is NULL. The caller, find_and_alloc_map(), is not expecting that and will have a NULL dereference. Fixes: 546ac1ffb70d ("bpf: add devmap, a map for

RE: af_packet: use after free in prb_retire_rx_blk_timer_expired

2017-07-22 Thread liujian (CE)
I also hit this issue with trinity test: The call trace: [exception RIP: prb_retire_rx_blk_timer_expired+70] RIP: 81633be6 RSP: 8801bec03dc0 RFLAGS: 00010246 RAX: RBX: 8801b49d0948 RCX: RDX: 8801b31057a0 RSI:

Re: [PATCH iproute2 master 1/2] bpf: improve error reporting around tail calls

2017-07-22 Thread Daniel Borkmann
On 07/22/2017 01:28 AM, Stephen Hemminger wrote: On Fri, 21 Jul 2017 21:13:06 +0200 Daniel Borkmann wrote: Currently, it's still quite hard to figure out if a prog passed the verifier, but later gets rejected due to different tail call ownership. Figure out whether that

[PATCH net-next] bpf: dev_map_alloc() shouldn't return NULL

2017-07-22 Thread Dan Carpenter
We forgot to set the error code on two error paths which means that we return ERR_PTR(0) which is NULL. The caller, find_and_alloc_map(), is not expecting that and will have a NULL dereference. Fixes: 546ac1ffb70d ("bpf: add devmap, a map for storing net device references") Signed-off-by: Dan

Re: [PATCH net-next 1/3] bluetooth: 6lowpan dev_close never returns error

2017-07-22 Thread Marcel Holtmann
Hi Stephen, > [auto build test WARNING on net-next/master] > > url: > https://github.com/0day-ci/linux/commits/Stephen-Hemminger/net-make-dev_close-void/20170720-090123 > config: x86_64-randconfig-a0-07211734 (attached as .config) > compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7 > reproduce: >