[PATCH v7 4/4] MIPS: Octeon: Add a global resource manager.

2017-12-12 Thread David Daney
From: Carlos Munoz Add a global resource manager to manage tagged pointers within bootmem allocated memory. This is used by various functional blocks in the Octeon core like the FPA, Ethernet nexus, etc. Signed-off-by: Carlos Munoz Signed-off-by: Steven J. Hill Signed-off-by: David Daney ---

[PATCH net-next 5/6] hv_netvsc: remove open_cnt reference count

2017-12-12 Thread Stephen Hemminger
There is only ever a single instance of network device object referencing the internal rndis object. Therefore the open_cnt atomic is not necessary. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/hyperv_net.h | 2 -- drivers/net/hyperv/netvsc.c | 2 +- drivers/net/hyperv/rndis

[PATCH net-next 2/6] hv_netvsc: track memory allocation failures in ethtool stats

2017-12-12 Thread Stephen Hemminger
When skb can not be allocated, update ethtool statisitics rather than rx_dropped which is intended for netif_receive. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/hyperv_net.h | 1 + drivers/net/hyperv/netvsc_drv.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --gi

[PATCH net-next 1/6] hv_netvsc: copy_to_send buf can be void

2017-12-12 Thread Stephen Hemminger
Since only caller does not care about return value. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index e4bcd202a56a..9407907c4

[PATCH v7 0/4] Prerequisites for Cavium OCTEON-III network driver.

2017-12-12 Thread David Daney
We want to add the Cavium OCTEON-III network driver. But since interacting with the input and output queues is done via special CPU local memory, we also need to add support to the MIPS/Octeon architecture code. Aren't SoCs nice in this way? These are the prerequisite patches that are needed bef

Re: [PATCH] drivers/staging/irda: fix max dup length for kstrndup

2017-12-12 Thread Ma Shimiao
On 12/13/2017 02:27 AM, Stephen Hemminger wrote: > On Tue, 12 Dec 2017 16:54:44 +0800 > Ma Shimiao wrote: > >> If source string longer than max, kstrndup will alloc max+1 space. >> So, we should make sure the result will not over limit. >> >> Signed-off-by: Ma Shimiao > > Did you read the TODO

Re: [RFC][PATCH] new byteorder primitives - ..._{replace,get}_bits()

2017-12-12 Thread Jakub Kicinski
On Wed, 13 Dec 2017 00:36:59 +, Al Viro wrote: > On Tue, Dec 12, 2017 at 03:59:33PM -0800, Jakub Kicinski wrote: > > > +static __always_inline __##type type##_replace_bits(__##type old, > > > \ > > > + base val, base mask)\ > > > +{

[PATCH v3 iproute2 net-next] gre6: add collect metadata support

2017-12-12 Thread William Tu
The patch adds 'external' option to support collect metadata gre6 tunnel. The 'external' keyword is already used to set the device into collect metadata mode such as vxlan, geneve, ipip, etc. This patch extends support for ipv6 gre and gretap. Examples of L3 and L2 gre device: bash:~# ip link add

Re: [PATCH net-next 1/3] net:tracepoint: replace tcp_set_state tracepoint with sock_set_state tracepoint

2017-12-12 Thread Song Liu
> On Dec 10, 2017, at 7:31 AM, Yafang Shao wrote: > > As sk_state is a common field for struct sock, so the state > transition should not be a TCP specific feature. > So I rename tcp_set_state tracepoint to sock_set_state tracepoint with > some minor changes and move it into file trace/events/so

Re: [RFC][PATCH] new byteorder primitives - ..._{replace,get}_bits()

2017-12-12 Thread Al Viro
On Tue, Dec 12, 2017 at 05:04:37PM -0800, Jakub Kicinski wrote: > On Wed, 13 Dec 2017 00:36:59 +, Al Viro wrote: > > On Tue, Dec 12, 2017 at 03:59:33PM -0800, Jakub Kicinski wrote: > > > > +static __always_inline __##type type##_replace_bits(__##type old, > > > > \ > > > > +

linux-next: build failure after merge of the bpf-next tree

2017-12-12 Thread Stephen Rothwell
/tracing: allow user space to query prog array on the same tp") CONFIG_BPF_SYSCALL is not set for this build. I have used the bpf-next tree from next-20171212 for today. -- Cheers, Stephen Rothwell

Re: [RFC][PATCH] new byteorder primitives - ..._{replace,get}_bits()

2017-12-12 Thread Jakub Kicinski
On Wed, 13 Dec 2017 01:30:56 +, Al Viro wrote: > On Tue, Dec 12, 2017 at 05:04:37PM -0800, Jakub Kicinski wrote: > > On Wed, 13 Dec 2017 00:36:59 +, Al Viro wrote: > > > On Tue, Dec 12, 2017 at 03:59:33PM -0800, Jakub Kicinski wrote: > > > > > +static __always_inline __##type type##_rep

Re: [PATCH v3 iproute2 net-next] gre6: add collect metadata support

2017-12-12 Thread Stephen Hemminger
On Tue, 12 Dec 2017 17:07:23 -0800 William Tu wrote: > +.RB external > +- make this tunnel externally controlled (or not, which is the default). > +This is also known as collect_metadata mode for tunnels. Much better. The man page still needs some work. The phrase "is also known as" is a little

Re: [PATCH v3 iproute2 net-next] gre6: add collect metadata support

2017-12-12 Thread William Tu
On Tue, Dec 12, 2017 at 5:40 PM, Stephen Hemminger wrote: > On Tue, 12 Dec 2017 17:07:23 -0800 > William Tu wrote: > >> +.RB external >> +- make this tunnel externally controlled (or not, which is the default). >> +This is also known as collect_metadata mode for tunnels. > > Much better. > The ma

Re: linux-next: build failure after merge of the bpf-next tree

2017-12-12 Thread Alexei Starovoitov
0x98c4): undefined reference to `bpf_event_query_prog_array' > > Caused by commit > > f371b304f12e ("bpf/tracing: allow user space to query prog array on the > same tp") > > CONFIG_BPF_SYSCALL is not set for this build. > > I have used the bpf-next tree from next

Re: [RFC][PATCH] new byteorder primitives - ..._{replace,get}_bits()

2017-12-12 Thread Al Viro
On Tue, Dec 12, 2017 at 05:35:28PM -0800, Jakub Kicinski wrote: > It used to be __always_inline, but apparently LLVM/clang doesn't > propagate constants :( > > 4e59532541c8 ("nfp: don't depend on compiler constant propagation") Doesn't propagate constants or doesn't have exact same set of rule

Re: [PATCH v3 09/33] nds32: Cache and TLB routines

2017-12-12 Thread Guo Ren
On Fri, Dec 08, 2017 at 05:11:52PM +0800, Greentime Hu wrote: > From: Greentime Hu [...] > diff --git a/arch/nds32/mm/cacheflush.c b/arch/nds32/mm/cacheflush.c [...] > +#ifndef CONFIG_CPU_CACHE_ALIASING > +void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, > +

RE: [PATCH net-next v5 0/4] net: fec: fix refclk enable for SMSC LAN8710/20

2017-12-12 Thread Andy Duan
From: Richard Leitner Sent: Monday, December 11, 2017 8:17 PM >This patch series fixes the use of the SMSC LAN8710/20 with a Freescale ETH >when the refclk is generated by the FSL. > >This patchset depends on the "phylib: Add device reset GPIO support" patch >submitted by Geert Uytterhoeven/Sergei

[PATCH net] tcp: refresh tcp_mstamp from timers callbacks

2017-12-12 Thread Eric Dumazet
From: Eric Dumazet Only the retransmit timer currently refreshes tcp_mstamp We should do the same for delayed acks and keepalives. Even if RFC 7323 does not request it, this is consistent to what linux did in the past, when TS values were based on jiffies. Fixes: 385e20706fac ("tcp: use tp->tc

[PATCH v4 iproute2 net-next] gre6: add collect metadata support

2017-12-12 Thread William Tu
The patch adds 'external' option to support collect metadata gre6 tunnel. The 'external' keyword is already used to set the device into collect metadata mode such as vxlan, geneve, ipip, etc. This patch extends support for ipv6 gre and gretap. Example of L3 and L2 gre device: bash:~# ip link add

Re: [PATCH net] tcp: refresh tcp_mstamp from timers callbacks

2017-12-12 Thread Neal Cardwell
On Tue, Dec 12, 2017 at 9:22 PM, Eric Dumazet wrote: > From: Eric Dumazet > > Only the retransmit timer currently refreshes tcp_mstamp > > We should do the same for delayed acks and keepalives. > > Even if RFC 7323 does not request it, this is consistent to what linux > did in the past, when TS v

Re: [Intel-wired-lan] [PATCH v2 next-queue 08/10] ixgbe: process the Tx ipsec offload

2017-12-12 Thread Alexander Duyck
On Tue, Dec 12, 2017 at 3:37 PM, Shannon Nelson wrote: > If the skb has a security association referenced in the skb, then > set up the Tx descriptor with the ipsec offload bits. While we're > here, we fix an oddly named field in the context descriptor struct. > > Signed-off-by: Shannon Nelson >

[PATCH AUTOSEL for 4.9 057/100] net: ipconfig: fix ic_close_devs() use-after-free

2017-12-12 Thread alexander . levin
From: Mark Rutland [ Upstream commit ffefb6f4d6ad699a2b5484241bc46745a53235d0 ] Our chosen ic_dev may be anywhere in our list of ic_devs, and we may free it before attempting to close others. When we compare d->dev and ic_dev->dev, we're potentially dereferencing memory returned to the allocator

Re: [PATCH net] tcp: refresh tcp_mstamp from timers callbacks

2017-12-12 Thread Soheil Hassas Yeganeh
On Tue, Dec 12, 2017 at 9:26 PM, Neal Cardwell wrote: > On Tue, Dec 12, 2017 at 9:22 PM, Eric Dumazet wrote: >> From: Eric Dumazet >> >> Only the retransmit timer currently refreshes tcp_mstamp >> >> We should do the same for delayed acks and keepalives. >> >> Even if RFC 7323 does not request i

Re: [RFC][PATCH] new byteorder primitives - ..._{replace,get}_bits()

2017-12-12 Thread Jakub Kicinski
On Wed, 13 Dec 2017 01:51:25 +, Al Viro wrote: > On Tue, Dec 12, 2017 at 05:35:28PM -0800, Jakub Kicinski wrote: > > > It used to be __always_inline, but apparently LLVM/clang doesn't > > propagate constants :( > > > > 4e59532541c8 ("nfp: don't depend on compiler constant propagation") >

Re: [BUG] skge: a possible sleep-in-atomic bug in skge_remove

2017-12-12 Thread David Miller
From: Stephen Hemminger Date: Tue, 12 Dec 2017 10:22:40 -0800 > On Tue, 12 Dec 2017 08:34:45 -0500 (EST) > David Miller wrote: > >> From: Jia-Ju Bai >> Date: Tue, 12 Dec 2017 16:38:12 +0800 >> >> > According to drivers/net/ethernet/marvell/skge.c, the driver may sleep >> > under a spinlock. >

[BUG] b44: two possible sleep-in-atomic bugs in b44_set_link_ksettings and b44_ioctl

2017-12-12 Thread Jia-Ju Bai
The driver may sleep under a spinlock. The function call paths are: b44_set_link_ksettings (acquire the spinlock) phy_ethtool_ksettings_set phy_start_aneg phy_start_aneg_priv mutex_lock --> may sleep b44_ioctl (acquire the spinlock) phy_mii_ioctl mdiobus_read mutex

[BUG] renesas/sh_eth: two possible sleep-in-atomic bugs in sh_eth_set_link_ksettings and sh_eth_nway_reset

2017-12-12 Thread Jia-Ju Bai
Accoring to drivers/net/ethernet/renesas/sh_eth.c, the driver may sleep under a spinlock. The function call paths are: sh_eth_set_link_ksettings (acquire the spinlock) phy_ethtool_ksettings_set phy_start_aneg phy_start_aneg_priv mutex_lock --> may sleep sh_eth_nway_reset (acq

[BUG] renesas/ravb: two possible sleep-in-atomic bugs in ravb_set_link_ksettings and ravb_nway_reset

2017-12-12 Thread Jia-Ju Bai
Accoring to drivers/net/ethernet/renesas/ravb_main.c, the driver may sleep under a spinlock. The function call paths are: ravb_set_link_ksettings (acquire the spinlock) phy_ethtool_ksettings_set phy_start_aneg phy_start_aneg_priv mutex_lock --> may sleep ravb_nway_reset (acqu

[PATCH v2 net-next 1/3] net: dsa: mediatek: add VLAN support for MT7530

2017-12-12 Thread sean.wang
From: Sean Wang MT7530 can treat each port as either VLAN-unaware port or VLAN-aware port through the implementation of port matrix mode or port security mode on the ingress port, respectively. On one hand, Each port has been acting as the VLAN-unaware one whenever the device is created in the in

[PATCH v2 net-next 3/3] net: dsa: mediatek: update MAINTAINERS entry with MediaTek switch driver

2017-12-12 Thread sean.wang
From: Sean Wang I work for MediaTek and maintain SoC targeting to home gateway and also will keep extending and testing the function from MediaTek switch. Signed-off-by: Sean Wang Reviewed-by: Andrew Lunn --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b

[PATCH v2 net-next 2/3] net: dsa: mediatek: combine MediaTek tag with VLAN tag

2017-12-12 Thread sean.wang
From: Sean Wang In order to let MT7530 switch can recognize well those egress packets having both special tag and VLAN tag, the information about the special tag should be carried on the existing VLAN tag. On the other hand, it's unnecessary for extra handling for ingress packets when VLAN tag is

[PATCH v2 net-next 0/3] add VLAN support to DSA MT7530

2017-12-12 Thread sean.wang
From: Sean Wang Changes since v1: - fix up the typo - prefer ordering declarations longest to shortest - update that vlan_prepare callback should not change any state - use lower case letter for function naming The patchset extends DSA MT7530 to VLAN support through filling required callbacks in

[PATCH net] dwc-xlgmac: Add co-maintainer

2017-12-12 Thread Jie Deng
Jose Abreu will join to maintain dwc-xlgmac. He will help with new feature development for this driver. Thanks Jose and welcome on board! Signed-off-by: Jie Deng --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 9e0045e..51497dc 100644 --- a/MAIN

[PATCH] ethtool: fix MFLCN register dump for 82599 and newer

2017-12-12 Thread tjbroadroad
From: Broadroad Use MFLCN for 82599 and X540 HW instead of FCTRL. Signed-off-by: Zhang Kang Signed-off-by: Gao Wayne Signed-off-by: Wei Net --- ixgbe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ixgbe.c b/ixgbe.c index ff0e769..c632137 100644 --- a/ixgbe.c +++

Re: KASAN: stack-out-of-bounds Read in xfrm_state_find (3)

2017-12-12 Thread Steffen Klassert
On Tue, Dec 12, 2017 at 01:00:31PM -0800, Eric Biggers wrote: > Hi Steffen, > > On Fri, Dec 01, 2017 at 08:27:43AM +0100, Steffen Klassert wrote: > > On Wed, Nov 22, 2017 at 08:05:00AM -0800, syzbot wrote: > > > syzkaller has found reproducer for the following crash on > > > 0c86a6bd85ff0629cd2c51

Re: [BUG] skge: a possible sleep-in-atomic bug in skge_remove

2017-12-12 Thread Stephen Hemminger
On Tue, 12 Dec 2017 20:57:01 -0500 (EST) David Miller wrote: > From: Stephen Hemminger > Date: Tue, 12 Dec 2017 10:22:40 -0800 > > > On Tue, 12 Dec 2017 08:34:45 -0500 (EST) > > David Miller wrote: > > > >> From: Jia-Ju Bai > >> Date: Tue, 12 Dec 2017 16:38:12 +0800 > >> > >> > Accordin

Re: [PATCH v3 09/33] nds32: Cache and TLB routines

2017-12-12 Thread Greentime Hu
2017-12-13 10:16 GMT+08:00 Guo Ren : > On Fri, Dec 08, 2017 at 05:11:52PM +0800, Greentime Hu wrote: >> From: Greentime Hu > [...] >> diff --git a/arch/nds32/mm/cacheflush.c b/arch/nds32/mm/cacheflush.c > [...] >> +#ifndef CONFIG_CPU_CACHE_ALIASING >> +void update_mmu_cache(struct vm_area_struct

Re: [Intel-wired-lan] [PATCH v2 next-queue 08/10] ixgbe: process the Tx ipsec offload

2017-12-12 Thread Shannon Nelson
On 12/12/2017 5:59 PM, Alexander Duyck wrote: On Tue, Dec 12, 2017 at 3:37 PM, Shannon Nelson wrote: If the skb has a security association referenced in the skb, then set up the Tx descriptor with the ipsec offload bits. While we're here, we fix an oddly named field in the context descriptor s

Re: [PATCH ipsec net] xfrm: put policies when reusing pcpu xdst entry

2017-12-12 Thread Steffen Klassert
On Mon, Dec 11, 2017 at 06:23:09PM +0100, Florian Westphal wrote: > We need to put the policies when re-using the pcpu xdst entry, else > this leaks the reference. > > Fixes: ec30d78c14a813db39a647b6a348b428 ("xfrm: add xdst pcpu cache") > Signed-off-by: Florian Westphal Applied, thanks Florian!

Re: [PATCH v5 1/3] clocksource/drivers/atcpit100: Add andestech atcpit100 timer

2017-12-12 Thread Greentime Hu
Hi, Daniel: 2017-12-12 18:05 GMT+08:00 Daniel Lezcano : > On 12/12/2017 06:46, Rick Chen wrote: >> ATCPIT100 is often used on the Andes architecture, >> This timer provide 4 PIT channels. Each PIT channel is a >> multi-function timer, can be configured as 32,16,8 bit timers >> or PWM as well. >> >

selftests: net: config: need extra kernel config fragments ?

2017-12-12 Thread Naresh Kamboju
Hi, I am planning to update selftests/net/config. Before submitting a patch upstream i would like to get your opinion, Test cases added to selftests/net - do "reuseport_bpf_numa.c" need CONFIG_NUMA=y ? - do "reuseport_bpf_cpu.c" need CONFIG_USE_PERCPU_NUMA_NODE_ID=y ? Thank you in advance. Be

Re: [RFC PATCH 5/9] ethtool: implement GET_DRVINFO message

2017-12-12 Thread Jiri Pirko
Wed, Dec 13, 2017 at 12:54:39AM CET, mkube...@suse.cz wrote: >On Mon, Dec 11, 2017 at 05:16:01PM +0100, Jiri Pirko wrote: >> Mon, Dec 11, 2017 at 02:54:01PM CET, mkube...@suse.cz wrote: >> >+ >> >+ETHA_DRVINFO_DRIVER(string)driver name >> >+ETHA_DRVINFO_VERSION (string

Re: general protection fault in page_mapping

2017-12-12 Thread Vlastimil Babka
On 12/12/2017 06:03 PM, syzbot wrote: > Hello, > > syzkaller hit the following crash on > 82bcf1def3b5f1251177ad47c44f7e17af039b4b > git://git.cmpxchg.org/linux-mmots.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console output is attached. > C reproducer is attache

[PATCH net-next] bpf/tracing: fix kernel/events/core.c compilation error

2017-12-12 Thread Yonghong Song
Commit f371b304f12e ("bpf/tracing: allow user space to query prog array on the same tp") introduced a perf ioctl command to query prog array attached to the same perf tracepoint. The commit introduced a compilation error when either CONFIG_BPF_SYSCALL or CONFIG_EVENT_TRACING is not defined: kerne

Re: [BUG] skge: a possible sleep-in-atomic bug in skge_remove

2017-12-12 Thread Jia-Ju Bai
On 2017/12/13 13:18, Stephen Hemminger wrote: On Tue, 12 Dec 2017 20:57:01 -0500 (EST) David Miller wrote: From: Stephen Hemminger Date: Tue, 12 Dec 2017 10:22:40 -0800 On Tue, 12 Dec 2017 08:34:45 -0500 (EST) David Miller wrote: From: Jia-Ju Bai Date: Tue, 12 Dec 2017 16:38:12 +080

<    1   2   3