Re: [PATCH v2 10/19] ipv4: prevent bounds-check bypass via speculative execution

2018-01-13 Thread Greg KH
On Fri, Jan 12, 2018 at 10:47:44AM -0800, Dan Williams wrote: > On Thu, Jan 11, 2018 at 11:59 PM, Greg KH wrote: > >> Cc: "David S. Miller" > >> Cc: Alexey Kuznetsov > >> Cc: Hideaki YOSHIFUJI > >> Cc: netdev@vger.kernel.org > >> Signed-off-by: Elena Reshetova > >> Signed-off-by: Dan Williams

Re: dvb usb issues since kernel 4.9

2018-01-13 Thread Mauro Carvalho Chehab
Em Fri, 12 Jan 2018 13:48:46 -0800 Eric Dumazet escreveu: > On Fri, 2018-01-12 at 19:13 -0200, Mauro Carvalho Chehab wrote: > > > > > > The .config file used to build the Kernel is at: > > https://pastebin.com/wpZghann > > > > Hi Mauro > > Any chance you can try CONFIG_HZ_1000=y, CONFIG_

[PATCH net-next] net: dpaa: change while() to if() in dpaa_fq_setup()

2018-01-13 Thread yuan linyu
From: yuan linyu while loop is not needed, because list_for_each_entry() already check all fq. Signed-off-by: yuan linyu --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/driv

Re: [PATCH net-next] net: dpaa: change while() to if() in dpaa_fq_setup()

2018-01-13 Thread yuan linyu
i am wrong, ignore it. On 六, 2018-01-13 at 17:15 +0800, yuan linyu wrote: > From: yuan linyu > > while loop is not needed, because list_for_each_entry() already check all fq. > > Signed-off-by: yuan linyu > --- >  drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +- >  1 file changed, 1 inser

pull-request: wireless-drivers-next 2018-01-13

2018-01-13 Thread Kalle Valo
Hi Dave, this is a pull request to net-next tree for 4.16, more info in the signed tag below. I'm not expecting any problems but please let me know if you have any. Kalle The following changes since commit f66faae2f80a45feafc04ce63ef744ac4b6e8c05: Merge branch 'ipv6-ipv4-nexthop-align' (2018-

Re: dvb usb issues since kernel 4.9

2018-01-13 Thread Mauro Carvalho Chehab
Em Sat, 13 Jan 2018 07:09:20 -0200 Mauro Carvalho Chehab escreveu: > Em Fri, 12 Jan 2018 13:48:46 -0800 > Eric Dumazet escreveu: > > > On Fri, 2018-01-12 at 19:13 -0200, Mauro Carvalho Chehab wrote: > > > > > > > > > The .config file used to build the Kernel is at: > > > https://pastebin.co

bpf: Change structure passing and assignment

2018-01-13 Thread Karim Eshapa
I noticed that most of functions here have structure arguements and return structure, all these structures passed and returned are delt in passing and assignment like memcpy a structure.In addition it takes size in stack while passing. so why not we use pointers to structure as argumentsor there

Re: [PATCH bpf-next v5 5/5] error-injection: Support fault injection framework

2018-01-13 Thread Akinobu Mita
2018-01-13 2:56 GMT+09:00 Masami Hiramatsu : > Support in-kernel fault-injection framework via debugfs. > This allows you to inject a conditional error to specified > function using debugfs interfaces. > > Here is the result of test script described in > Documentation/fault-injection/fault-injectio

Re: bpf: Change structure passing and assignment

2018-01-13 Thread Alexei Starovoitov
On Sat, Jan 13, 2018 at 02:42:19PM +0200, Karim Eshapa wrote: > I noticed that most of functions here have structure arguements and return > structure, all these structures passed and returned are delt in passing and > assignment like memcpy a structure.In addition it takes size in stack while >

Re: [PATCH bpf] bpf: fix 32-bit divide by zero

2018-01-13 Thread Alexei Starovoitov
On Fri, Jan 12, 2018 at 06:59:52PM -0800, Alexei Starovoitov wrote: > due to some JITs doing if (src_reg == 0) check in 64-bit mode > for div/mod opreations mask upper 32-bits of src register > before doing the check > > Fixes: 622582786c9e ("net: filter: x86: internal BPF JIT") > Fixes: 7a12b5031

[PATCH] net: delete /proc THIS_MODULE references

2018-01-13 Thread Alexey Dobriyan
/proc has been ignoring struct file_operations::owner field for ages. Signed-off-by: Alexey Dobriyan --- net/8021q/vlanproc.c |2 -- net/appletalk/aarp.c |1 - net/appletalk/atalk_proc.c |3 --- net/atm/br2684.c |1 - net/atm

[PATCH] sh_eth: dix dumping ARSTR

2018-01-13 Thread Sergei Shtylyov
ARSTR is always located at the start of the TSU register region, thus using add_reg() instead of add_tsu_reg() in __sh_eth_get_regs() to dump it causes EDMR or EDSR (depending on the register layout) to be dumped instead of ARSTR. Use the correct condition/macro there... Fixes: 6b4b4fead342 ("s

Re: [PATCH] sh_eth: dix dumping ARSTR

2018-01-13 Thread Sergei Shtylyov
Forgot to say that the patch was against net.git.

Linux 4.6: VRF clarification for egress Broadcast Pk

2018-01-13 Thread Sukumar Gopalakrishnan
Hi, VRF egress processing routine does not process multicast packet but broadcast packet is not diverted. I added code changes to not to process broadcast packet by the VRF driver.. Is my assumption correct ? static struct sk_buff *vrf_ip_out(struct net_device *vrf_dev, struct sock *sk, str

Re: [Patch net v2] tun: fix a memory leak for tfile->tx_array

2018-01-13 Thread Cong Wang
On Thu, Jan 11, 2018 at 2:16 AM, Jason Wang wrote: > > It looks to me what is actual missed is the cleanups tun_detach_all(). For > me the only case that could leak is > > open > attach > ip link del link dev tap0 > close or another set_iff() > > So in this case, clean during close is not sufficie

Re: [PATCH net] ipv6: Fix cleanup ordering on inet6_init() error path

2018-01-13 Thread Cong Wang
On Thu, Jan 11, 2018 at 8:48 AM, Ben Hutchings wrote: > On Wed, 2018-01-10 at 14:25 -0800, Cong Wang wrote: >> On Tue, Jan 9, 2018 at 10:21 AM, Ben Hutchings >> wrote: >> > Commit 15e668070a64 reordered the initialisation in inet6_init() to >> > fix a crash on an error path further down the call

Re: [PATCH net] ipv6: Fix cleanup ordering on inet6_init() error path

2018-01-13 Thread Cong Wang
On Tue, Jan 9, 2018 at 10:21 AM, Ben Hutchings wrote: > Commit 15e668070a64 reordered the initialisation in inet6_init() to > fix a crash on an error path further down the call stack. It also > reordered cleanup on the error path in inet6_init(), but the result > is not the reverse of the initial

Linux 4.6: VRF clarification for egress Broadcast Pk

2018-01-13 Thread Sukumar Gopalakrishnan
Hi, VRF egress processing routine does not process multicast packet but broadcast packet is not diverted. I added code changes to not to process broadcast packet by the VRF driver.. Is my assumption correct ? static struct sk_buff *vrf_ip_out(struct net_device *vrf_dev, struct sock *sk, struc

Re: [PATCH] sh_eth: dix dumping ARSTR

2018-01-13 Thread Sergei Shtylyov
Umm, s/dix/fix/ in the subject. Do I need to repost?

[PATCH] Remove structure passing and assignment to save stack and no coping structures.

2018-01-13 Thread Karim Eshapa
Signed-off-by: Karim Eshapa Thanks, Karim --- include/linux/tnum.h | 2 +- kernel/bpf/tnum.c | 13 +++-- kernel/bpf/verifier.c | 12 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/include/linux/tnum.h b/include/linux/tnum.h index 0d2d3da..ddb1250 1006

Re: [PATCH v2 00/19] prevent bounds-check bypass via speculative execution

2018-01-13 Thread Linus Torvalds
On Fri, Jan 12, 2018 at 4:15 PM, Tony Luck wrote: > > Here there isn't any reason for speculation. The core has the > value of 'x' in a register and the upper bound encoded into the > "cmp" instruction. Both are right there, no waiting, no speculation. So this is an argument I haven't seen befor

Re: [PATCH] net/mlx4_en: ensure rx_desc updating reaches HW before prod db updating

2018-01-13 Thread Jason Gunthorpe
On Fri, Jan 12, 2018 at 01:01:56PM -0800, Saeed Mahameed wrote: > Simply putting a memory barrier on the top or the bottom of a functions, > means nothing unless you are looking at the whole picture, of all the > callers of that function to understand why is it there. When I review code I want t

[PATCH] l2tp: Use seq_putc() in l2tp_dfs_seq_session_show()

2018-01-13 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 13 Jan 2018 20:11:01 +0100 Two single characters (line breaks) should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- net/l2tp/l2tp_debugfs.c | 4

[PATCH] Remove structure passing and assignment to save stack and no coping structures.

2018-01-13 Thread Karim Eshapa
Signed-off-by: Karim Eshapa Thanks, Karim --- include/linux/tnum.h | 2 +- kernel/bpf/tnum.c | 13 +++-- kernel/bpf/verifier.c | 12 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/include/linux/tnum.h b/include/linux/tnum.h index 0d2d3da..ddb1250 1006

[PATCH] sunrpc: Use seq_putc() in unix_gid_show()

2018-01-13 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 13 Jan 2018 20:33:05 +0100 A single character (line break) should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- net/sunrpc/svcauth_unix.c | 2 +

Re: [PATCH 4.4-stable 0/6] bpf: prevent out-of-bounds speculation

2018-01-13 Thread Greg KH
On Fri, Jan 12, 2018 at 05:17:15PM +0100, Jiri Slaby wrote: > Hi, > > this is a backport of these patches which I did for our kernels: > c237ee5eb33b bpf: add bpf_patch_insn_single helper > 3df126f35f88 bpf: don't (ab)use instructions to store state > e245c5c6a565 bpf: move fixup_bpf_calls() funct

[PATCH] [net-next] net: netsec: use dma_addr_t for storing dma address

2018-01-13 Thread Arnd Bergmann
On targets that have different sizes for phys_addr_t and dma_addr_t, we get a type mismatch error: drivers/net/ethernet/socionext/netsec.c: In function 'netsec_alloc_dring': drivers/net/ethernet/socionext/netsec.c:970:9: error: passing argument 3 of 'dma_zalloc_coherent' from incompatible pointer

Re: [PATCH] [net-next] net: netsec: use dma_addr_t for storing dma address

2018-01-13 Thread Ard Biesheuvel
On 13 January 2018 at 21:13, Arnd Bergmann wrote: > On targets that have different sizes for phys_addr_t and dma_addr_t, > we get a type mismatch error: > > drivers/net/ethernet/socionext/netsec.c: In function 'netsec_alloc_dring': > drivers/net/ethernet/socionext/netsec.c:970:9: error: passing ar

[PATCH] kernel:bpf Remove structure passing and assignment to save stack and no coping structures

2018-01-13 Thread Karim Eshapa
Use pointers to structure as arguments to function instead of coping structures and less stack size. Also transfer TNUM(_v, _m) to tnum.h file to be used in differnet files for creating anonymous structures statically. Signed-off-by: Karim Eshapa Thanks, Karim --- include/linux/tnum.h | 4 +++

[PATCH v5 13/14] nubus: Add expansion_type values for various Mac models

2018-01-13 Thread Finn Thain
Add an expansion slot attribute to allow drivers to properly handle cards like Comm Slot cards and PDS cards without declaration ROMs. This clarifies the logic for the Centris 610 model which has no Comm Slot but has an optional on-board SONIC device. Cc: "David S. Miller" Tested-by: Stan Johnson

[PATCH v5 12/14] nubus: Adopt standard linked list implementation

2018-01-13 Thread Finn Thain
This increases code re-use and improves readability. Cc: "David S. Miller" Cc: Bartlomiej Zolnierkiewicz Acked-by: Bartlomiej Zolnierkiewicz Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/net/ethernet/8390/mac8390.c | 7 +++-- drivers/net/ethernet/cirrus/mac89x0.c | 6

[PATCH v5 11/14] nubus: Rename struct nubus_dev

2018-01-13 Thread Finn Thain
It is misleading to call a functional resource a "device". In adopting the Linux Driver Model, the struct device will be embedded in struct nubus_board. That will compound the terminlogy problem because drivers will bind with boards, not with functional resources. Avoid this by renaming struct nubu

[PATCH 0/2] ipv4: Make neigh lookup keys for loopback/point-to-point devices be INADDR_ANY

2018-01-13 Thread Jim Westfall
This used to be the previous behavior in older kernels but became broken in a263b3093641f (ipv4: Make neigh lookups directly in output packet path) and then later removed because it was broken in 0bb4087cbec0 (ipv4: Fix neighlookup keying over loopback/point-to-point devices) Not having this resu

[PATCH 1/2] net: Allow neigh contructor functions ability to modify the primary_key

2018-01-13 Thread Jim Westfall
Use n->primary_key instead of pkey to account for the possibility that a neigh constructor function may have modified the primary_key value. Signed-off-by: Jim Westfall --- net/core/neighbour.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/core/neighbour.c b/net/cor

[PATCH 2/2] ipv4: Make neigh lookup keys for loopback/point-to-point devices be INADDR_ANY

2018-01-13 Thread Jim Westfall
Map all lookup neigh keys to INADDR_ANY for loopback/point-to-point devices to avoid making an entry for every remote ip the device needs to talk to. This used the be the old behavior but became broken in a263b3093641f (ipv4: Make neigh lookups directly in output packet path) and later removed in

Re: KASAN: slab-out-of-bounds Read in map_lookup_elem

2018-01-13 Thread Daniel Borkmann
On 01/13/2018 02:58 AM, syzbot wrote: > Hello, > > syzkaller hit the following crash on 19d28fbd306e7ae7c1acf05c3e6968b56f0d196b > git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console output is attached. >

Re: divide error in ___bpf_prog_run

2018-01-13 Thread Daniel Borkmann
On 01/13/2018 02:58 AM, syzbot wrote: > Hello, > > syzkaller hit the following crash on 19d28fbd306e7ae7c1acf05c3e6968b56f0d196b > git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console output is attached. >

Re: general protection fault in __bpf_map_put

2018-01-13 Thread Daniel Borkmann
On 01/13/2018 08:16 AM, Dmitry Vyukov wrote: > On Wed, Jan 10, 2018 at 1:58 PM, syzbot > wrote: >> Hello, >> >> syzkaller hit the following crash on >> b4464bcab38d3f7fe995a7cb960eeac6889bec08 >> git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master >> compiler: gcc (GCC) 7.1.1

Re: BUG: unable to handle kernel paging request in check_memory_region

2018-01-13 Thread Daniel Borkmann
On 01/13/2018 08:29 AM, Dmitry Vyukov wrote: > On Fri, Jan 12, 2018 at 11:58 PM, syzbot > wrote: >> Hello, >> >> syzkaller hit the following crash on >> c92a9a461dff6140c539c61e457aa97df29517d6 >> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/master >> compiler: gcc (GCC) 7.1.1

Re: [PATCH] kernel:bpf Remove structure passing and assignment to save stack and no coping structures

2018-01-13 Thread Alexei Starovoitov
On Sun, Jan 14, 2018 at 12:03:42AM +0200, Karim Eshapa wrote: > Use pointers to structure as arguments to function instead of coping > structures and less stack size. Also transfer TNUM(_v, _m) to > tnum.h file to be used in differnet files for creating anonymous structures > statically. > > Signe

Re: [PATCH bpf-next v5 5/5] error-injection: Support fault injection framework

2018-01-13 Thread Masami Hiramatsu
On Sat, 13 Jan 2018 22:28:29 +0900 Akinobu Mita wrote: > 2018-01-13 2:56 GMT+09:00 Masami Hiramatsu : > > Support in-kernel fault-injection framework via debugfs. > > This allows you to inject a conditional error to specified > > function using debugfs interfaces. > > > > Here is the result of te

[PATCH net-next 0/2] mv88e6xxx: ATU and VTU interrupts

2018-01-13 Thread Andrew Lunn
Both the ATU and VTU of Mavell switches can generate interrupts when violations occur. Trap this interrupts and print what violation occurred. Andrew Lunn (2): net: dsa: mv88e6xxx: Decode ATU problem interrupt net: dsa: mv888e6xxx: Decode VTU problem interrupt drivers/net/dsa/mv88e6xxx/chip

[PATCH net-next 1/2] net: dsa: mv88e6xxx: Decode ATU problem interrupt

2018-01-13 Thread Andrew Lunn
When there is a problem with the ATU, an interrupt can be generated. Trap this interrupt and decode the registers to determine what the problem was, then log the error. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c| 9 +++- drivers/net/dsa/mv88e6xxx/chip.h| 1

[PATCH net-next 2/2] net: dsa: mv888e6xxx: Decode VTU problem interrupt

2018-01-13 Thread Andrew Lunn
When there is a problem with the VTU, an interrupt can be generated. Trap this interrupt and decode the registers to determine what the problem was, then log the error. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c| 9 +++- drivers/net/dsa/mv88e6xxx/chip.h| 1

Re: [PATCH] net/mlx4_en: ensure rx_desc updating reaches HW before prod db updating

2018-01-13 Thread jianchao.wang
Dear all Thanks for the kindly response and reviewing. That's really appreciated. On 01/13/2018 12:46 AM, Eric Dumazet wrote: >> Does this need to be dma_wmb(), and should it be in >> mlx4_en_update_rx_prod_db ? >> > +1 on dma_wmb() > > On what architecture bug was observed ? This issue was obse

Re: Linux 4.6: VRF clarification for egress Broadcast Pk

2018-01-13 Thread David Ahern
On 1/13/18 11:18 AM, Sukumar Gopalakrishnan wrote: > Hi, > > VRF egress processing routine does not process multicast packet but > broadcast packet is not diverted. I added code changes to not to > process broadcast packet by the VRF driver.. Is my assumption correct > ? > 4.6 is not a releas

Re: KASAN: slab-out-of-bounds Read in map_lookup_elem

2018-01-13 Thread Dmitry Vyukov
On Sun, Jan 14, 2018 at 1:13 AM, Daniel Borkmann wrote: > On 01/13/2018 02:58 AM, syzbot wrote: >> Hello, >> >> syzkaller hit the following crash on 19d28fbd306e7ae7c1acf05c3e6968b56f0d196b >> git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/master >> compiler: gcc (GCC) 7.1.1 2017

[PATCH 0/2] ixgbe: ipsec offload and sparc support

2018-01-13 Thread Shannon Nelson
These are a couple of tweaks I found while making sure that the ipsec offload would work on SPARC. Shannon Nelson (2): ixgbe: ipsec offload for sparc ixgbe: use compiler constants in Rx path drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 14 +++--- 1 file changed, 7 insertions(+),