RE: [PATCH net 2/2] r8152: rx descriptor check

2016-11-13 Thread Hayes Wang
Mark Lord [mailto:ml...@pobox.com] > Sent: Monday, November 14, 2016 4:34 AM [...] > Perhaps the driver > is somehow accessing the buffer space again after doing usb_submit_urb()? > That would certainly produce this kind of behaviour. I don't think so. First, the driver only read the received

Re: [PATCH net] net: stmmac: Fix lack of link transition for fixed PHYs

2016-11-13 Thread Giuseppe CAVALLARO
On 11/14/2016 2:50 AM, Florian Fainelli wrote: Commit 52f95bbfcf72 ("stmmac: fix adjust link call in case of a switch is attached") added some logic to avoid polling the fixed PHY and therefore invoking the adjust_link callback more than once, since this is a fixed PHY and link events won't be

Re: stmmac/RTL8211F/Meson GXBB: TX throughput problems

2016-11-13 Thread Giuseppe CAVALLARO
Hello Martin On 11/7/2016 6:37 PM, Martin Blumenstingl wrote: Hi Peppe, On Mon, Nov 7, 2016 at 11:59 AM, Giuseppe CAVALLARO wrote: In the meantime, I will read again the thread just to see if there is something I am missing. if you are re-reading this thread: please

PLEASE VIEW THE ATTACHED FILE AND CONTACT ME.

2016-11-13 Thread Dr. Felix Collins
FROM FIRST NATIONAL BANK OF SOUTH AFRICA (F.N.B)..rtf Description: MS-Word document

Re: [Intel-wired-lan] [PATCH v2] e1000e: free IRQ regardless of __E1000_DOWN

2016-11-13 Thread Neftin, Sasha
On 11/11/2016 12:35 AM, Baicar, Tyler wrote: > Hello Sasha, > > On 11/9/2016 11:19 PM, Neftin, Sasha wrote: >> On 11/9/2016 11:41 PM, Tyler Baicar wrote: >>> Move IRQ free code so that it will happen regardless of the >>> __E1000_DOWN bit. Currently the e1000e driver only releases its IRQ >>> if

Re: [net-next 1/2] net: ethernet: slicoss: add slicoss gigabit ethernet driver

2016-11-13 Thread kbuild test robot
Hi Lino, [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Lino-Sanfilippo/net-ethernet-slicoss-add-slicoss-gigabit-ethernet-driver/20161113-125131 config: powerpc-allyesconfig (attached as .config) compiler: powerpc64-linux-gnu-gcc (Debian 6.1.1-9

Re: [Intel-wired-lan] [PATCH v2] e1000e: free IRQ regardless of __E1000_DOWN

2016-11-13 Thread Neftin, Sasha
On 11/13/2016 10:34 AM, Neftin, Sasha wrote: > On 11/11/2016 12:35 AM, Baicar, Tyler wrote: >> Hello Sasha, >> >> On 11/9/2016 11:19 PM, Neftin, Sasha wrote: >>> On 11/9/2016 11:41 PM, Tyler Baicar wrote: Move IRQ free code so that it will happen regardless of the __E1000_DOWN bit.

Re: [PATCH] Fixup packets with incorrect ethertype sent by ZTE MF821D

2016-11-13 Thread David Miller
From: Bjørn Mork Date: Sun, 13 Nov 2016 17:12:57 +0100 > In any case, if we're going to add a fix like this, then I want it way > more generic. The only valid ethertypes expected from the modem is IP, > IPV6 or ARP. Testing against those three, resetting anything else to IP, >

Re: [PATCH v2 net] tcp: take care of truncations done by sk_filter()

2016-11-13 Thread David Miller
From: Eric Dumazet Date: Thu, 10 Nov 2016 13:12:35 -0800 > From: Eric Dumazet > > With syzkaller help, Marco Grassi found a bug in TCP stack, > crashing in tcp_collapse() > > Root cause is that sk_filter() can truncate the incoming skb, > but TCP

Re: [PATCH net 0/2] bnxt_en: 2 bug fixes.

2016-11-13 Thread David Miller
From: Michael Chan Date: Fri, 11 Nov 2016 00:11:41 -0500 > Bug fixes in bnxt_setup_tc() and VF vitual link state. Series applied, thanks Michael.

Re: [patch net v2 0/2] mlxsw: Couple of fixes

2016-11-13 Thread David Miller
From: Jiri Pirko Date: Fri, 11 Nov 2016 16:34:24 +0100 > From: Jiri Pirko > > Please, queue-up both for stable. Thanks! Just to be clear I did make sure to take v2 rather than v1.

Re: [PATCH] net: ioctl SIOCSIFADDR minor cleanup

2016-11-13 Thread David Miller
Your patch was mangled by your email client, chopping up long lines and turning TAB characters into spaces. Please fix this, email a test patch to yourself, and do not resubmit your change until you can successfully apply the patch you receive in a test email. Also, do not try using attachments

Re: [PATCH] r8152: Fix error path in open function

2016-11-13 Thread David Miller
From: Guenter Roeck Date: Wed, 9 Nov 2016 19:51:25 -0800 > If usb_submit_urb() called from the open function fails, the following > crash may be observed. ... > Clean up error handling to avoid registering the notifier if the open > function is going to fail. > >

Re: [PATCH] net: phy: marvell: optimize logic for page changing during init

2016-11-13 Thread David Miller
From: Uwe Kleine-König Date: Thu, 10 Nov 2016 15:03:01 +0100 > Instead of remembering if the page was changed, just compare the current > page to the saved one. This is easier and has the advantage to save a > register write if the page was already restored. > >

Re: [PATCH] genetlink: fix unsigned int comparison with less than zero

2016-11-13 Thread David Miller
From: Colin King Date: Thu, 10 Nov 2016 15:57:58 + > From: Colin Ian King > > family->id is unsigned, so the less than zero check for > failure return from idr_alloc is never true and so the error exit > is never handled. Instead, assign

[PATCH] net: atheros: atl1: use new api ethtool_{get|set}_link_ksettings

2016-11-13 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. The previous implementation of set_settings was modifying the value of advertising, but with the new API, it's not possible. The structure ethtool_link_ksettings is defined as const.

Re: [PATCH net-next v7 03/10] dpaa_eth: add option to use one buffer pool set

2016-11-13 Thread David Miller
From: Madalin Bucur Date: Fri, 11 Nov 2016 10:20:00 +0200 > @@ -8,3 +8,12 @@ menuconfig FSL_DPAA_ETH > supporting the Freescale QorIQ chips. > Depends on Freescale Buffer Manager and Queue Manager > driver and Frame Manager Driver. > + > +if

Re: [PATCH] Revert "include/uapi/linux/atm_zatm.h: include linux/time.h"

2016-11-13 Thread David Miller
From: Mike Frysinger Date: Thu, 10 Nov 2016 19:08:39 -0500 > This reverts commit cf00713a655d ("include/uapi/linux/atm_zatm.h: include > linux/time.h"). > > This attempted to fix userspace breakage that no longer existed when > the patch was merged. Almost one year earlier,

Re: [patch net 0/2] mlxsw: Couple of fixes

2016-11-13 Thread David Miller
From: Jiri Pirko Date: Fri, 11 Nov 2016 11:20:40 +0100 > Please, queue-up both for stable. Thanks! Series applied and queued up for -stable, thanks.

[PATCH] net: atheros: atl2: use new api ethtool_{get|set}_link_ksettings

2016-11-13 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. The previous implementation of set_settings was modifying the value of advertising, but with the new API, it's not possible. The structure ethtool_link_ksettings is defined as const.

Re: [PATCH] Fixup packets with incorrect ethertype sent by ZTE MF821D

2016-11-13 Thread Bjørn Mork
Jussi Peltola writes: > This brokenness appears reliably after running "rdisc6 wwan0" but I have > not debugged if this is related to timing or the format of the router > solicitation. Before receiving a router solicitation, v4 is received > correctly and v6 does not work. After

Re: [mm PATCH v3 17/23] arch/sparc: Add option to skip DMA sync as a part of map and unmap

2016-11-13 Thread David Miller
From: Alexander Duyck Date: Thu, 10 Nov 2016 06:35:45 -0500 > This change allows us to pass DMA_ATTR_SKIP_CPU_SYNC which allows us to > avoid invoking cache line invalidation if the driver will just handle it > via a sync_for_cpu or sync_for_device call. > >

Re: [PATCH net 2/2] r8152: rx descriptor check

2016-11-13 Thread David Miller
From: Hayes Wang Date: Fri, 11 Nov 2016 15:15:41 +0800 > For some platforms, the data in memory is not the same with the one > from the device. That is, the data of memory is unbelievable. The > check is used to find out this situation. > > Signed-off-by: Hayes Wang

Re: [RFC v4 00/18] Landlock LSM: Unprivileged sandboxing

2016-11-13 Thread Alexei Starovoitov
On Sun, Nov 13, 2016 at 6:23 AM, Mickaël Salaün wrote: > Hi, > > After the BoF at LPC last week, we came to a multi-step roadmap to > upstream Landlock. > > A first patch series containing the basic properties needed for a > "minimum viable product", which means being able to

Re: [PATCH] net: ethernet: ti: davinci_cpdma: don't stop ctlr if it was stopped

2016-11-13 Thread David Miller
From: Ivan Khoronzhuk Date: Fri, 11 Nov 2016 16:10:47 +0200 > No need to stop ctlr if it was already stopped. It can cause timeout > warns. Steps: > - ifconfig eth0 down > - ethtool -l eth0 rx 8 tx 8 > - ethtool -l eth0 rx 1 tx 1 > > Signed-off-by: Ivan Khoronzhuk

[PATCH net-next v1] bpf: Use u64_to_user_ptr()

2016-11-13 Thread Mickaël Salaün
Replace the custom u64_to_ptr() function with the u64_to_user_ptr() macro. Signed-off-by: Mickaël Salaün Cc: Alexei Starovoitov Cc: Arnd Bergmann Cc: Daniel Borkmann --- kernel/bpf/syscall.c | 29

Re: Kernel 4.8.7 crashing down cleanup_net()

2016-11-13 Thread Borislav Petkov
Hmm, there's cleanup_net() namespaces fun in there, adding netdev@. On Sat, Nov 12, 2016 at 02:17:03PM -0800, Ashton Holmes wrote: > I upgraded to 4.8.7 and the system boots and my root partition gets > decrypted but right after that both of my monitors turn off and > looking at syslog from 4.8.6

Re: [PATCH] ip6_output: ensure flow saddr actually belongs to device

2016-11-13 Thread David Ahern
On 11/13/16 6:23 AM, Jason A. Donenfeld wrote: > This puts the IPv6 routing functions in parity with the IPv4 routing > functions. Namely, we now check in v6 that if a flowi6 requests an > saddr, the returned dst actually corresponds to a net device that has > that saddr. This mirrors the v4 logic

Re: [PATCH net,v2] ipv4: use new_gw for redirect neigh lookup

2016-11-13 Thread David Miller
From: Stephen Suryaputra Lin Date: Thu, 10 Nov 2016 11:16:15 -0500 > In v2.6, ip_rt_redirect() calls arp_bind_neighbour() which returns 0 > and then the state of the neigh for the new_gw is checked. If the state > isn't valid then the redirected route is

Re: [PATCH] Fixup packets with incorrect ethertype sent by ZTE MF821D

2016-11-13 Thread Jussi Peltola
On Sun, Nov 13, 2016 at 05:12:57PM +0100, Bjørn Mork wrote: > In any case, if we're going to add a fix like this, then I want it way > more generic. The only valid ethertypes expected from the modem is IP, > IPV6 or ARP. Testing against those three, resetting anything else to IP, > will at least

Re: [patch net-next] mlxsw: reg: Fix pwm_frequency field size in MFCR register

2016-11-13 Thread David Miller
From: Jiri Pirko Date: Fri, 11 Nov 2016 11:22:53 +0100 > From: Jiri Pirko > > The field is 7bit long. Fix it. > > Signed-off-by: Jiri Pirko Applied.

[net-next:master 664/670] drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c:1421:7-9: WARNING: possible condition with no effect (if == else)

2016-11-13 Thread Julia Lawall
It looks like the code on lines 1422 and 1424 is the same, so either the test may be unnecessary, or one of the branches is wrong. Coccinelle is also comparing about a comparison on an unsigned value in line 1900, but the code for that is not listed in the report below. julia tree:

Re: [PATCH v2] net: ethernet: ti: davinci_cpdma: fix fixed prio cpdma ctlr configuration

2016-11-13 Thread David Miller
From: Ivan Khoronzhuk Date: Fri, 11 Nov 2016 15:45:24 +0200 > The dma ctlr is reseted to 0 while cpdma soft reset, thus cpdma ctlr > cannot be configured after cpdma is stopped. So restoring content > of cpdma ctlr while off/on procedure is needed. The cpdma ctlr

Re: [PATCH net-next] sfc: clear napi_hash state when copying channels

2016-11-13 Thread David Miller
From: Bert Kenward Date: Fri, 11 Nov 2016 15:56:51 + > efx_copy_channel() doesn't correctly clear the napi_hash related state. > This means that when napi_hash_add is called for that channel nothing is > done, and we are left with a copy of the napi_hash_node from

Re: [PATCH] net: stmmac: Add support for ethtool::nway_reset

2016-11-13 Thread kbuild test robot
Hi Florian, [auto build test WARNING on net-next/master] [also build test WARNING on next-2016] [cannot apply to v4.9-rc5] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

[PATCH 09/39] netfilter: merge nf_iterate() into nf_hook_slow()

2016-11-13 Thread Pablo Neira Ayuso
nf_iterate() has become rather simple, we can integrate this code into nf_hook_slow() to reduce the amount of LOC in the core path. However, we still need nf_iterate() around for nf_queue packet handling, so move this function there where we only need it. I think it should be possible to refactor

[PATCH 30/39] netfilter: ipset: Make sure element data size is a multiple of u32

2016-11-13 Thread Pablo Neira Ayuso
From: Jozsef Kadlecsik Data for hashing required to be array of u32. Make sure that element data always multiple of u32. Ported from a patch proposed by Sergey Popovich . Signed-off-by: Jozsef Kadlecsik ---

[PATCH 21/39] netfilter: ipset: Split extensions into separate files

2016-11-13 Thread Pablo Neira Ayuso
From: Jozsef Kadlecsik Cleanup to separate all extensions into individual files. Ported from a patch proposed by Sergey Popovich . Suggested-by: Sergey Popovich Signed-off-by: Jozsef Kadlecsik

[PATCH 18/39] netfilter: ipset: Headers file cleanup

2016-11-13 Thread Pablo Neira Ayuso
From: Jozsef Kadlecsik Group counter helper functions together. Ported from a patch proposed by Sergey Popovich . Suggested-by: Sergey Popovich Signed-off-by: Jozsef Kadlecsik ---

[PATCH 03/39] netfilter: kill NF_HOOK_THRESH() and state->tresh

2016-11-13 Thread Pablo Neira Ayuso
Patch c5136b15ea36 ("netfilter: bridge: add and use br_nf_hook_thresh") introduced br_nf_hook_thresh(). Replace NF_HOOK_THRESH() by br_nf_hook_thresh from br_nf_forward_finish(), so we have no more callers for this macro. As a result, state->thresh and explicit thresh parameter in the hook state

[PATCH 22/39] netfilter: ipset: Separate memsize calculation code into dedicated function

2016-11-13 Thread Pablo Neira Ayuso
From: Jozsef Kadlecsik Hash types already has it's memsize calculation code in separate functions. Clean up and do the same for *bitmap* and *list* sets. Ported from a patch proposed by Sergey Popovich . Suggested-by: Sergey Popovich

[PATCH 39/39] netfilter: x_tables: simplify IS_ERR_OR_NULL to NULL test

2016-11-13 Thread Pablo Neira Ayuso
From: Julia Lawall Since commit 7926dbfa4bc1 ("netfilter: don't use mutex_lock_interruptible()"), the function xt_find_table_lock can only return NULL on an error. Simplify the call sites and update the comment before the function. The semantic patch that change the code

[PATCH 33/39] netfilter: ipset: Collapse same condition body to a single one

2016-11-13 Thread Pablo Neira Ayuso
From: Jozsef Kadlecsik The set full case (with net_ratelimit()-ed pr_warn()) is already handled, simply jump there. Signed-off-by: Jozsef Kadlecsik --- net/netfilter/ipset/ip_set_hash_gen.h | 8 +--- 1 file changed, 1 insertion(+), 7

[PATCH 26/39] netfilter: ipset: Count non-static extension memory for userspace

2016-11-13 Thread Pablo Neira Ayuso
From: Jozsef Kadlecsik Non-static (i.e. comment) extension was not counted into the memory size. A new internal counter is introduced for this. In the case of the hash types the sizes of the arrays are counted there as well so that we can avoid to scan the whole set

[PATCH 28/39] netfilter: ipset: Simplify mtype_expire() for hash types

2016-11-13 Thread Pablo Neira Ayuso
From: Jozsef Kadlecsik Remove one leve of intendation by using continue while iterating over elements in bucket. Ported from a patch proposed by Sergey Popovich . Signed-off-by: Jozsef Kadlecsik ---

[PATCH 29/39] netfilter: ipset: Make NLEN compile time constant for hash types

2016-11-13 Thread Pablo Neira Ayuso
From: Jozsef Kadlecsik Hash types define HOST_MASK before inclusion of ip_set_hash_gen.h and the only place where NLEN needed to be calculated at runtime is *_create() method. Ported from a patch proposed by Sergey Popovich . Signed-off-by:

[PATCH 00/39] Netfilter updates for net-next

2016-11-13 Thread Pablo Neira Ayuso
Hi David, The following patchset contains a second batch of Netfilter updates for your net-next tree. This includes a rework of the core hook infrastructure that improves Netfilter performance by ~15% according to synthetic benchmarks. Then, a large batch with ipset updates, including a new

[PATCH 23/39] netfilter: ipset: Regroup ip_set_put_extensions and add extern

2016-11-13 Thread Pablo Neira Ayuso
From: Jozsef Kadlecsik Cleanup: group ip_set_put_extensions and ip_set_get_extensions together and add missing extern. Signed-off-by: Jozsef Kadlecsik --- include/linux/netfilter/ipset/ip_set.h | 6 ++ 1 file changed, 2 insertions(+), 4

[PATCH 38/39] netfilter: conntrack: remove unused netns_ct member

2016-11-13 Thread Pablo Neira Ayuso
From: Florian Westphal since 23014011ba420 ('netfilter: conntrack: support a fixed size of 128 distinct labels') this isn't needed anymore. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso --- include/net/netns/conntrack.h

[PATCH 13/39] netfilter: conntrack: simplify init/uninit of L4 protocol trackers

2016-11-13 Thread Pablo Neira Ayuso
From: Davide Caratti modify registration and deregistration of layer-4 protocol trackers to facilitate inclusion of new elements into the current list of builtin protocols. Both builtin (TCP, UDP, ICMP) and non-builtin (DCCP, GRE, SCTP, UDPlite) layer-4 protocol trackers

[PATCH 06/39] netfilter: nf_tables: use hook state from xt_action_param structure

2016-11-13 Thread Pablo Neira Ayuso
Don't copy relevant fields from hook state structure, instead use the one that is already available in struct xt_action_param. This patch also adds a set of new wrapper functions to fetch relevant hook state structure fields. Signed-off-by: Pablo Neira Ayuso ---

[PATCH 02/39] netfilter: remove comments that predate rcu days

2016-11-13 Thread Pablo Neira Ayuso
We cannot block/sleep on nf_iterate because netfilter runs under rcu read lock these days, where blocking is well-known to be illegal. So let's remove these old comments. Signed-off-by: Pablo Neira Ayuso --- net/netfilter/core.c | 7 --- 1 file changed, 7 deletions(-)

[PATCH 36/39] netfilter: ipset: use setup_timer() and mod_timer().

2016-11-13 Thread Pablo Neira Ayuso
From: Jozsef Kadlecsik Use setup_timer() and instead of init_timer(), being the preferred way of setting up a timer. Also, quoting the mod_timer() function comment: -> mod_timer() is a more efficient way to update the expire field of an active timer (if the timer is

[PATCH 17/39] netfilter: ipset: Mark some helper args as const.

2016-11-13 Thread Pablo Neira Ayuso
From: Jozsef Kadlecsik Mark some of the helpers arguments as const. Ported from a patch proposed by Sergey Popovich . Suggested-by: Sergey Popovich Signed-off-by: Jozsef Kadlecsik ---

[PATCH 07/39] netfilter: use switch() to handle verdict cases from nf_hook_slow()

2016-11-13 Thread Pablo Neira Ayuso
Use switch() for verdict handling and add explicit handling for NF_STOLEN and other non-conventional verdicts. Signed-off-by: Pablo Neira Ayuso --- net/netfilter/core.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git

[PATCH 04/39] netfilter: deprecate NF_STOP

2016-11-13 Thread Pablo Neira Ayuso
NF_STOP is only used by br_netfilter these days, and it can be emulated with a combination of NF_STOLEN plus explicit call to the ->okfn() function as Florian suggests. To retain binary compatibility with userspace nf_queue application, we have to keep NF_STOP around, so libnetfilter_queue

[PATCH 01/39] netfilter: get rid of useless debugging from core

2016-11-13 Thread Pablo Neira Ayuso
This patch remove compile time code to catch inconventional verdicts. We have better ways to handle this case these days, eg. pr_debug() but even though I don't think this is useful at all, so let's remove this. Signed-off-by: Pablo Neira Ayuso --- net/netfilter/core.c | 9

[PATCH 05/39] netfilter: x_tables: move hook state into xt_action_param structure

2016-11-13 Thread Pablo Neira Ayuso
Place pointer to hook state in xt_action_param structure instead of copying the fields that we need. After this change xt_action_param fits into one cacheline. This patch also adds a set of new wrapper functions to fetch relevant hook state structure fields. Signed-off-by: Pablo Neira Ayuso

[PATCH 16/39] netfilter: ipset: Remove extra whitespaces in ip_set.h

2016-11-13 Thread Pablo Neira Ayuso
From: Jozsef Kadlecsik Remove unnecessary whitespaces. Ported from a patch proposed by Sergey Popovich . Suggested-by: Sergey Popovich Signed-off-by: Jozsef Kadlecsik ---

[PATCH 14/39] udp: provide udp{4,6}_lib_lookup for nf_socket_ipv{4,6}

2016-11-13 Thread Pablo Neira Ayuso
From: Arnd Bergmann Since commit ca065d0cf80f ("udp: no longer use SLAB_DESTROY_BY_RCU") the udp6_lib_lookup and udp4_lib_lookup functions are only provided when it is actually possible to call them. However, moving the callers now caused a link error: net/built-in.o: In

[PATCH 32/39] netfilter: ipset: Make struct htype per ipset family

2016-11-13 Thread Pablo Neira Ayuso
From: Jozsef Kadlecsik Before this patch struct htype created at the first source of ip_set_hash_gen.h and it is common for both IPv4 and IPv6 set variants. Make struct htype per ipset family and use NLEN to make nets array fixed size to simplify struct htype

[PATCH 15/39] netfilter: conntrack: fix NF_REPEAT handling

2016-11-13 Thread Pablo Neira Ayuso
From: Arnd Bergmann gcc correctly identified a theoretical uninitialized variable use: net/netfilter/nf_conntrack_core.c: In function 'nf_conntrack_in': net/netfilter/nf_conntrack_core.c:1125:14: error: 'l4proto' may be used uninitialized in this function

[PATCH 31/39] netfilter: ipset: Optimize hash creation routine

2016-11-13 Thread Pablo Neira Ayuso
From: Jozsef Kadlecsik Exit as easly as possible on error and use RCU_INIT_POINTER() as set is not seen at creation time. Signed-off-by: Jozsef Kadlecsik --- net/netfilter/ipset/ip_set_hash_gen.h | 63 --- 1

[PATCH 08/39] netfilter: remove hook_entries field from nf_hook_state

2016-11-13 Thread Pablo Neira Ayuso
This field is only useful for nf_queue, so store it in the nf_queue_entry structure instead, away from the core path. Pass hook_head to nf_hook_slow(). Since we always have a valid entry on the first iteration in nf_iterate(), we can use 'do { ... } while (entry)' loop instead. Signed-off-by:

[PATCH 35/39] netfilter: ipset: hash:ipmac type support added to ipset

2016-11-13 Thread Pablo Neira Ayuso
From: Tomasz Chilinski Introduce the hash:ipmac type. Signed-off-by: Tomasz Chili??ski Signed-off-by: Jozsef Kadlecsik --- net/netfilter/ipset/Kconfig | 9 + net/netfilter/ipset/Makefile

[PATCH 12/39] netfilter: nf_tables: simplify the basic expressions' init routine

2016-11-13 Thread Pablo Neira Ayuso
From: Liping Zhang Some basic expressions are built into nf_tables.ko, such as nft_cmp, nft_lookup, nft_range and so on. But these basic expressions' init routine is a little ugly, too many goto errX labels, and we forget to call nft_range_module_exit in the exit routine,

[PATCH 25/39] netfilter: ipset: Add element count to all set types header

2016-11-13 Thread Pablo Neira Ayuso
From: Jozsef Kadlecsik It is better to list the set elements for all set types, thus the header information is uniform. Element counts are therefore added to the bitmap and list types. Signed-off-by: Jozsef Kadlecsik ---

[PATCH 37/39] netfilter: ipset: hash: fix boolreturn.cocci warnings

2016-11-13 Thread Pablo Neira Ayuso
From: kbuild test robot net/netfilter/ipset/ip_set_hash_ipmac.c:70:8-9: WARNING: return of 0/1 in function 'hash_ipmac4_data_list' with return type bool net/netfilter/ipset/ip_set_hash_ipmac.c:178:8-9: WARNING: return of 0/1 in function 'hash_ipmac6_data_list' with

[PATCH 11/39] netfilter: nft_hash: get random bytes if seed is not specified

2016-11-13 Thread Pablo Neira Ayuso
If the user doesn't specify a seed, generate one at configuration time. Signed-off-by: Pablo Neira Ayuso --- net/netfilter/nft_hash.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/netfilter/nft_hash.c b/net/netfilter/nft_hash.c index

[PATCH 10/39] netfilter: handle NF_REPEAT from nf_conntrack_in()

2016-11-13 Thread Pablo Neira Ayuso
NF_REPEAT is only needed from nf_conntrack_in() under a very specific case required by the TCP protocol tracker, we can handle this case without returning to the core hook path. Handling of NF_REPEAT from the nf_reinject() is left untouched. Signed-off-by: Pablo Neira Ayuso

[PATCH 34/39] netfilter: ipset: Fix reported memory size for hash:* types

2016-11-13 Thread Pablo Neira Ayuso
From: Jozsef Kadlecsik The calculation of the full allocated memory did not take into account the size of the base hash bucket structure at some places. Signed-off-by: Jozsef Kadlecsik --- net/netfilter/ipset/ip_set_hash_gen.h | 16

[PATCH 24/39] netfilter: ipset: Add element count to hash headers

2016-11-13 Thread Pablo Neira Ayuso
From: Eric B Munson It would be useful for userspace to query the size of an ipset hash, however, this data is not exposed to userspace outside of counting the number of member entries. This patch uses the attribute IPSET_ATTR_ELEMENTS to indicate the size in the the header

[PATCH 27/39] netfilter: ipset: Remove redundant mtype_expire() arguments

2016-11-13 Thread Pablo Neira Ayuso
From: Jozsef Kadlecsik Remove redundant parameters nets_length and dsize, because they can be get from other parameters. Ported from a patch proposed by Sergey Popovich . Signed-off-by: Jozsef Kadlecsik ---

[PATCH 19/39] netfilter: ipset: Improve skbinfo get/init helpers

2016-11-13 Thread Pablo Neira Ayuso
From: Jozsef Kadlecsik Use struct ip_set_skbinfo in struct ip_set_ext instead of open coded fields and assign structure members in get/init helpers instead of copying members one by one. Explicitly note that struct ip_set_skbinfo must be padded to prevent non-aligned

[PATCH 20/39] netfilter: ipset: Use kmalloc() in comment extension helper

2016-11-13 Thread Pablo Neira Ayuso
From: Jozsef Kadlecsik Allocate memory with kmalloc() rather than kzalloc(): the string is immediately initialized so it is unnecessary to zero out the allocated memory area. Ported from a patch proposed by Sergey Popovich . Suggested-by:

[PATCH v3] ip6_output: ensure flow saddr actually belongs to device

2016-11-13 Thread Jason A. Donenfeld
This puts the IPv6 routing functions in parity with the IPv4 routing functions. Namely, we now check in v6 that if a flowi6 requests an saddr, the returned dst actually corresponds to a net device that has that saddr. This mirrors the v4 logic with __ip_dev_find in __ip_route_output_key_hash. In

Re: [PATCH net-next v1] bpf: Use u64_to_user_ptr()

2016-11-13 Thread Daniel Borkmann
On 11/13/2016 07:44 PM, Mickaël Salaün wrote: Replace the custom u64_to_ptr() function with the u64_to_user_ptr() macro. Signed-off-by: Mickaël Salaün Cc: Alexei Starovoitov Cc: Arnd Bergmann Cc: Daniel Borkmann Looks

Re: [PATCH net-next 04/11] net: dsa: mv88e6xxx: Abstract stats_snapshot into ops structure

2016-11-13 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > +static int mv88e6320_stats_snapshot(struct mv88e6xxx_chip *chip, int port) > +{ > + port = (port + 1) << 5; > + > + return _mv88e6xxx_stats_snapshot(chip, port); > +} Please move the above helper in its internal SMI file (port, global1

[PATCH net-next 1/1] driver: macvlan: Replace integer number with bool value

2016-11-13 Thread fgao
From: Gao Feng The return value of function macvlan_addr_busy is used as bool value, so use bool value instead of integer number "1" and "0". Signed-off-by: Gao Feng --- drivers/net/macvlan.c | 10 +- 1 file changed, 5 insertions(+), 5

[PATCH] net: bnx2: use new api ethtool_{get|set}_link_ksettings

2016-11-13 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes --- drivers/net/ethernet/broadcom/bnx2.c | 74 +++--- 1 files changed, 41 insertions(+), 33 deletions(-)

Re: [PATCH] Fixup packets with incorrect ethertype sent by ZTE MF821D

2016-11-13 Thread Jussi Peltola
So here's another stab. The comments and the current implementation are not in sync: any non-multicast address starting with a null octet gets rewritten, while the comment specifically mentions 00:a0:c6:00:00:00. It is certainly not elegant but re-writing all unicast destinations with our address

[PATCH net 0/3] Couple of BPF refcount fixes for mlx5

2016-11-13 Thread Daniel Borkmann
Various mlx5 bugs on eBPF program and refcount handling I found during review. Since these kind of bugs happened multiple times here, I'll add a __must_check to the bpf_prog_inc()/bpf_prog_add()/etc functions for net-next, so these things will let the compiler (and thus kbuild bot) bark early

[PATCH net 2/3] bpf, mlx5: fix various refcount/prog issues in mlx5e_xdp_set

2016-11-13 Thread Daniel Borkmann
There are multiple issues in mlx5e_xdp_set(): 1) prog can be NULL, so calling unconditionally into bpf_prog_add(prog, priv->params.num_channels) can end badly. 2) The batched bpf_prog_add() should be done at an earlier point in time. This makes sure that we cannot fail anymore at the time

[PATCH net 1/3] bpf, mlx5: fix mlx5e_create_rq taking reference on prog

2016-11-13 Thread Daniel Borkmann
In mlx5e_create_rq(), when creating a new queue, we call bpf_prog_add() but without checking the return value. bpf_prog_add() can fail, so we really must check it. Take the reference right when we assign it to the rq from priv->xdp_prog, and just drop the reference on error path. Destruction in

[PATCH net 3/3] bpf, mlx5: drop priv->xdp_prog reference on netdev cleanup

2016-11-13 Thread Daniel Borkmann
mlx5e_xdp_set() is currently the only place where we drop reference on the prog sitting in priv->xdp_prog when it's exchanged by a new one. We also need to make sure that we eventually release that reference, for example, in case the netdev is dismantled. Fixes: 86994156c736 ("net/mlx5e: XDP fast

Re: [PATCH net-next 01/11] net: dsa: mv88e6xxx: Take switch out of reset before probe

2016-11-13 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > The switch needs to be taken out of reset before we can read its ID > register on the MDIO bus. > > Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Thanks, Vivien

Re: [PATCH net-next 02/11] net: dsa: mv88e6xxx: Fix unused variable warning by using variable

2016-11-13 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > _mv88e6xxx_stats_wait() did not check the return value from > mv88e6xxx_g1_read(), so the compiler complained about set but unused > err. > > Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot

[PATCH] ip6_output: ensure flow saddr actually belongs to device

2016-11-13 Thread Jason A. Donenfeld
This puts the IPv6 routing functions in parity with the IPv4 routing functions. Namely, we now check in v6 that if a flowi6 requests an saddr, the returned dst actually corresponds to a net device that has that saddr. This mirrors the v4 logic with __ip_dev_find in __ip_route_output_key_hash. In

[PATCH 4.4 23/34] net: sctp, forbid negative length

2016-11-13 Thread Greg Kroah-Hartman
4.4-stable review patch. If anyone has any objections, please let me know. -- From: Jiri Slaby [ Upstream commit a4b8e71b05c27bae6bad3bdecddbc6b68a3ad8cf ] Most of getsockopt handlers in net/sctp/socket.c check len against sizeof some structure like:

[PATCH] Fixup packets with incorrect ethertype sent by ZTE MF821D

2016-11-13 Thread Jussi Peltola
This brokenness appears reliably after running "rdisc6 wwan0" but I have not debugged if this is related to timing or the format of the router solicitation. Before receiving a router solicitation, v4 is received correctly and v6 does not work. After sending the MF821D a router solicitation with

Re: linux-next: manual merge of the net-next tree with the net tree

2016-11-13 Thread Or Gerlitz
On Thu, Nov 10, 2016 at 1:50 AM, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the net-next tree got a conflict in: > > drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c > > between commit: > ee39fbc4447d ("net/mlx5: E-Switch, Set the

Re: [RFC v4 00/18] Landlock LSM: Unprivileged sandboxing

2016-11-13 Thread Mickaël Salaün
Hi, After the BoF at LPC last week, we came to a multi-step roadmap to upstream Landlock. A first patch series containing the basic properties needed for a "minimum viable product", which means being able to test it, without full features. The idea is to set in place the main components which

[PATCH 4.8 24/35] net: sctp, forbid negative length

2016-11-13 Thread Greg Kroah-Hartman
4.8-stable review patch. If anyone has any objections, please let me know. -- From: Jiri Slaby [ Upstream commit a4b8e71b05c27bae6bad3bdecddbc6b68a3ad8cf ] Most of getsockopt handlers in net/sctp/socket.c check len against sizeof some structure like:

[PATCH net] sctp: change sk state only when it has assocs in sctp_shutdown

2016-11-13 Thread Xin Long
Now when users shutdown a sock with SEND_SHUTDOWN in sctp, even if this sock has no connection (assoc), sk state would be changed to SCTP_SS_CLOSING, which is not as we expect. Besides, after that if users try to listen on this sock, kernel could even panic when it dereference

Re: [PATCH] net: ethernet: ixp4xx_eth: fix spelling mistake in debug message

2016-11-13 Thread David Miller
From: Colin King Date: Sat, 12 Nov 2016 17:44:06 + > From: Colin Ian King > > Trivial fix to spelling mistake "successed" to "succeeded" > in debug message. Also unwrap multi-line literal string. > > Signed-off-by: Colin Ian King

Re: [PATCH] net: atheros: atl1e: use new api ethtool_{get|set}_link_ksettings

2016-11-13 Thread David Miller
From: Philippe Reynes Date: Sat, 12 Nov 2016 23:16:51 +0100 > The ethtool api {get|set}_settings is deprecated. > We move this driver to new api {get|set}_link_ksettings. > > The previous implementation of set_settings was modifying > the value of advertising, but with the

Re: [PATCH net 1/2] ibmvnic: Unmap ibmvnic_statistics structure

2016-11-13 Thread David Miller
From: Thomas Falcon Date: Fri, 11 Nov 2016 11:00:45 -0600 > This structure was mapped but never subsequently unmapped. > > Signed-off-by: Thomas Falcon Applied.

Re: [PATCH net 2/2] ibmvnic: Fix size of debugfs name buffer

2016-11-13 Thread David Miller
From: Thomas Falcon Date: Fri, 11 Nov 2016 11:00:46 -0600 > This mistake was causing debugfs directory creation > failures when multiple ibmvnic devices were probed. > > Signed-off-by: Thomas Falcon Applied.

[PATCH v2] ip6_output: ensure flow saddr actually belongs to device

2016-11-13 Thread Jason A. Donenfeld
This puts the IPv6 routing functions in parity with the IPv4 routing functions. Namely, we now check in v6 that if a flowi6 requests an saddr, the returned dst actually corresponds to a net device that has that saddr. This mirrors the v4 logic with __ip_dev_find in __ip_route_output_key_hash. In

Re: stmmac/RTL8211F/Meson GXBB: TX throughput problems

2016-11-13 Thread André Roth
> Andre, the 3.14 kernel you are talking, is it this one ? :  > https://github.com/hardkernel/linux/tree/odroidc2-3.14.y yes > Because in drivers/net/phy/realtek.c, they disable EEE, but > also 1000Base-T Full Duplex advertisement ? > > + /* disable 1000m adv*/ > + val =

  1   2   >