Re: [PATCH net] fib_rules: return 0 directly if an exactly same rule exists when NLM_F_EXCL not supplied

2019-05-31 Thread Maciej Żenczykowski
FYI, this userspace visible change in behaviour breaks Android. We rely on being able to add a rule and either have a dup be created (in which case we'll remove it later) or have it fail with EEXIST (in which case we won't remove it later). Returning 0 makes atomically changing a rule difficult.

Re: [PATCH net] fib_rules: return 0 directly if an exactly same rule exists when NLM_F_EXCL not supplied

2019-06-06 Thread Maciej Żenczykowski
(side note: change was reverted in net stable) On Wed, Jun 5, 2019 at 8:33 AM David Ahern wrote: > On 6/4/19 10:58 PM, Lorenzo Colitti wrote: > > As for making this change in 5.3: we might be able to structure the > > code differently in a future Android release, assuming the same > > userspace c

[PATCH] net-ipv6-ndisc: add support for RFC7710 RA Captive Portal Identifier

2019-07-18 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This is trivial since we already have support for the entirely identical (from the kernel's point of view) RDNSS and DNSSL that also contain opaque data that needs to be passed down to userspace. As specified in RFC7710, Captive Portal option contains a URL.

Re: [PATCH] net-ipv6-ndisc: add support for RFC7710 RA Captive Portal Identifier

2019-07-23 Thread Maciej Żenczykowski
> Applied to net-next Any chance we could get this into LTS releases? I can trivially backport this into Android common kernels - which would get this into the kernel in time for devices that launch with Android R, but by getting it into LTS we'd get this support even on devices that upgrade to A

[PATCH netfilter] netfilter: xt_IDLETIMER: fix idletimer_tg_helper non-kosher casts

2021-04-02 Thread Maciej Żenczykowski
From: Maciej Żenczykowski The code is relying on the identical layout of the beginning of the v0 and v1 structs, but this can easily lead to code bugs if one were to try to extend this further... I use: char (*plabel)[MAX_IDLETIMER_LABEL_SIZE] instead of: char label[MAX_IDLETIMER_LABEL_SIZE

[PATCH iptables] fix build for missing ETH_ALEN definition

2021-04-02 Thread Maciej Żenczykowski
From: Maciej Żenczykowski (this is needed at least with bionic) Signed-off-by: Maciej Żenczykowski --- libxtables/xtables.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libxtables/xtables.c b/libxtables/xtables.c index bc42ba82..77bc18f6 100644 --- a/libxtables/xtables.c +++ b

Re: [PATCH netfilter] netfilter: xt_IDLETIMER: fix idletimer_tg_helper non-kosher casts

2021-04-02 Thread Maciej Żenczykowski
> > The code is relying on the identical layout of the beginning > > of the v0 and v1 structs, but this can easily lead to code bugs > > if one were to try to extend this further... > > What is the concern? These structs are part of ABI, they > cannot be changed. That is a reasonable point, but t

[PATCH] net-ipv6: bugfix - raw & sctp - switch to ipv6_can_nonlocal_bind()

2021-04-05 Thread Maciej Żenczykowski
From: Maciej Żenczykowski Found by virtue of ipv6 raw sockets not honouring the per-socket IP{,V6}_FREEBIND setting. Based on hits found via: git grep '[.]ip_nonlocal_bind' We fix both raw ipv6 sockets to honour IP{,V6}_FREEBIND and IP{,V6}_TRANSPARENT, and we fix sctp sockets to

[PATCH bpf] net-tun: add type safety to tun_xdp_to_ptr() and tun_ptr_to_xdp()

2020-08-18 Thread Maciej Żenczykowski
From: Maciej Żenczykowski Test: builds Signed-off-by: Maciej Żenczykowski --- drivers/net/tun.c | 6 +++--- include/linux/if_tun.h | 8 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 3c11a77f5709..5dd7f353eeef 100644

[PATCH bpf-next 1/2] net-tun: add type safety to tun_xdp_to_ptr() and tun_ptr_to_xdp()

2020-08-18 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This reduces likelihood of incorrect use. Test: builds Signed-off-by: Maciej Żenczykowski --- drivers/net/tun.c | 6 +++--- include/linux/if_tun.h | 8 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c

[PATCH bpf-next 2/2] net-tun: eliminate two tun/xdp related function calls from vhost-net

2020-08-18 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This provides a minor performance boost by virtue of inlining instead of cross module function calls. Test: builds Signed-off-by: Maciej Żenczykowski --- drivers/net/tun.c | 18 -- include/linux/if_tun.h | 15 --- 2 files changed, 12

[PATCH bpf-next] net-veth: add type safety to veth_xdp_to_ptr() and veth_ptr_to_xdp()

2020-08-18 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This reduces likelihood of incorrect use. Test: builds Signed-off-by: Maciej Żenczykowski --- drivers/net/veth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/veth.c b/drivers/net/veth.c index e56cd562a664..b80cbffeb88e 100644

[PATCH] net-ipv6: fix excessive RTF_ADDRCONF flag on ::1/128 local route (and others)

2019-09-01 Thread Maciej Żenczykowski
From: Maciej Żenczykowski There is a subtle change in behaviour introduced by: commit c7a1ce397adacaf5d4bb2eab0a738b5f80dc3e43 'ipv6: Change addrconf_f6i_alloc to use ip6_route_info_create' Before that patch /proc/net/ipv6_route includes: 0

Re: [PATCH] net-ipv6: fix excessive RTF_ADDRCONF flag on ::1/128 local route (and others)

2019-09-01 Thread Maciej Żenczykowski
Some background: This was found due to bad interactions with one of the few remaining Android common kernel networking patches. (The one that makes it possible for RA's to create routes in interface specific tables) The cleanup portion of it scours all tables and deletes all relevant ADDRCONF rou

[PATCH v2] net-ipv6: fix excessive RTF_ADDRCONF flag on ::1/128 local route (and others)

2019-09-02 Thread Maciej Żenczykowski
From: Maciej Żenczykowski There is a subtle change in behaviour introduced by: commit c7a1ce397adacaf5d4bb2eab0a738b5f80dc3e43 'ipv6: Change addrconf_f6i_alloc to use ip6_route_info_create' Before that patch /proc/net/ipv6_route includes: 0

Re: [PATCH] net-ipv6: fix excessive RTF_ADDRCONF flag on ::1/128 local route (and others)

2019-09-03 Thread Maciej Żenczykowski
Well, if you look at the commit my commit is fixing, ie. commit c7a1ce397adacaf5d4bb2eab0a738b5f80dc3e43 then you'll see this in the commit description: "- dst_nocount is handled by the RTF_ADDRCONF flag" and the patch diff itself is from "f6i->fib6_flags = RTF_UP | RTF_NONEXTHOP; f6i->dst

Re: [PATCH v2] bonding: fix PACKET_ORIGDEV regression

2019-02-19 Thread Maciej Żenczykowski
Signed-off-by: Maciej Żenczykowski It certainly seems like this should do the trick, but I do agree some sort of tests would be nice.

[PATCH] net: implement IP_RECVHDRS option to get full headers through recvmsg cmsg.

2018-03-31 Thread Maciej Żenczykowski
sockets. This is envisioned as a way to get GUE extension metadata for encapsulated packets, but implemented in a way to be much more future proof. (Implemented by Luigi, who asked me to send it upstream) Cc: Eric Dumazet Signed-off-by: Luigi Rizzo Signed-off-by: Maciej Żenczykowski

Re: [PATCH net] ipv6: Reflect MTU changes on PMTU of exceptions for MTU-less routes

2018-03-02 Thread Maciej Żenczykowski
Conceptually this is right. And I'm 100% fine with dev mtu change triggering pmtu decrease. I'm not so sold on the pmtu increase. PMTUD is one of those things that never ever works right in practice. There's too many icmp blackholes, rate limits, overloaded management cpus in switches, misconfig

[PATCH] net-ipv6: remove unused IP6_ECN_clear() function

2017-09-26 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This function is unused, and furthermore it is buggy since it suffers from the same issue that requires IP6_ECN_set_ce() to take a pointer to the skb so that it may (in case of CHECKSUM_COMPLETE) update skb->csum Instead of fixing it, let's just outright r

[PATCH] net-ipv6: add support for sockopt(SOL_IPV6, IPV6_FREEBIND)

2017-09-26 Thread Maciej Żenczykowski
From: Maciej Żenczykowski So far we've been relying on sockopt(SOL_IP, IP_FREEBIND) being usable even on IPv6 sockets. However, it turns out it is perfectly reasonable to want to set freebind on an AF_INET6 SOCK_RAW socket - but there is no way to set any SOL_IP socket option on such a s

[PATCH] net-tcp: extend tcp_tw_reuse sysctl to enable loopback only optimization

2018-06-03 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This changes the /proc/sys/net/ipv4/tcp_tw_reuse from a boolean to an integer. It now takes the values 0, 1 and 2, where 0 and 1 behave as before, while 2 enables timewait socket reuse only for sockets that we can prove are loopback connections: ie. bound to &#x

[PATCH] net: do not allow changing SO_REUSEADDR/SO_REUSEPORT on bound sockets

2018-06-03 Thread Maciej Żenczykowski
From: Maciej Żenczykowski It is not safe to do so because such sockets are already in the hash tables and changing these options can result in invalidating the tb->fastreuse(port) caching. This can have later far reaching consequences wrt. bind conflict checks which rely on these caches (

[PATCH] net-tcp: remove useless tw_timeout field

2018-06-05 Thread Maciej Żenczykowski
From: Maciej Żenczykowski Tested: 'git grep tw_timeout' comes up empty and it builds :-) Signed-off-by: Maciej Żenczykowski Cc: Eric Dumazet --- include/net/inet_timewait_sock.h | 1 - net/dccp/minisocks.c | 1 - net/ipv4/tcp_minisocks.c | 1 - 3 files

Re: net: do not allow changing SO_REUSEADDR/SO_REUSEPORT on bound sockets

2018-06-06 Thread Maciej Żenczykowski
Yes, it does, we found this internally last night and been debating what to do about it. Fundamentally what it points out is that prior to this patch CRIU could get the host into an inconsistent state. It inserts all the sockets into the hashtables with SO_REUSEADDR set, and then (potentially) cle

Re: net: do not allow changing SO_REUSEADDR/SO_REUSEPORT on bound sockets

2018-06-08 Thread Maciej Żenczykowski
I think we probably need to make sk->sk_reuse back into a boolean. (ie. eliminate SK_FORCE_REUSE) Then add a new tcp/udp sk->ignore_bind_conflicts boolean setting... (ie. not just for tcp, but sol_socket) [or perhaps SO_REPAIR, sk->repair or something] What I'm not certain of is exactly what sor

Re: [PATCH] net: do not allow changing SO_REUSEADDR/SO_REUSEPORT on bound sockets

2018-06-11 Thread Maciej Żenczykowski
> This change is a potential performance regression for us. Our > networking code sets up multiple sockets used by multiple threads to > listen on the same udp port. For the first socket, the bind is done > before setting SO_REUSEPORT so that we can get an error and detect > that the port is curr

Re: [PATCH] Revert "net: do not allow changing SO_REUSEADDR/SO_REUSEPORT on bound sockets"

2018-06-12 Thread Maciej Żenczykowski
Any ideas about how to fix the core issue of tb->fast* being effectively invalid? ie. currently any reader of tb->fastreuse(port) which isn't simply testing for it being >= 0 is basically a bug (-1 is the empty tb case, so that AFAICT keeps on working). For example sk_reuseport_match(tb, sk) can

Re: [PATCH] net: split sk_reuse into sk_reuse and sk_force_reuse

2018-06-13 Thread Maciej Żenczykowski
> #define SK_NO_REUSE0 > #define SK_CAN_REUSE 1 since it's a boolean now these should go away too I believe. should there simply/also be a separate privileged socket option to set/get force reuse?

Re: [PATCH] net: split sk_reuse into sk_reuse and sk_force_reuse

2018-06-13 Thread Maciej Żenczykowski
> Hi Andrey > > This commit was reverted, do we still need this patch ? I think it still makes things easier to understand...

[PATCH 2/2] netfilter: revert "conntrack: silent a memory leak warning"

2019-10-07 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This reverts commit 114aa35d06d4920c537b72f9fa935de5dd205260. By my understanding of kmemleak the reasoning for this patch is incorrect. If kmemleak couldn't handle rcu we'd have it reporting leaks all over the place. My belief is that this was instead pap

[PATCH 1/2] netfilter: fix a memory leak in nf_conntrack_in

2019-10-07 Thread Maciej Żenczykowski
From: Maciej Żenczykowski Cc: Cong Wang Cc: Eric Dumazet Cc: Pablo Neira Ayuso Signed-off-by: Maciej Żenczykowski --- net/netfilter/nf_conntrack_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter

Re: [PATCH 2/2] netfilter: revert "conntrack: silent a memory leak warning"

2019-10-07 Thread Maciej Żenczykowski
oc+rcu+kmemleak thing I'm missing. On Mon, Oct 7, 2019 at 10:35 PM Maciej Żenczykowski wrote: > > From: Maciej Żenczykowski > > This reverts commit 114aa35d06d4920c537b72f9fa935de5dd205260. > > By my understanding of kmemleak the reasoning for this patch > is incor

Re: [PATCH 2/2] netfilter: revert "conntrack: silent a memory leak warning"

2019-10-07 Thread Maciej Żenczykowski
95893>] init_conntrack+0x278/0x4a0 [<9e67654a>] nf_conntrack_in+0x2b4/0x7b4 [<ca4d0a3e>] ipv4_conntrack_local+0xa4/0xac [<81d01fa2>] nf_hook_slow+0x4c/0xdc [<97b73dfa>] __ip_local_out+0xfc/0x140 [<b21eaa8e>] i

Re: [PATCH 2/2] netfilter: revert "conntrack: silent a memory leak warning"

2019-10-08 Thread Maciej Żenczykowski
Here's my reasoning: old = ct->ext; //... stuff that doesn't change old. alloc = max(newlen, NF_CT_EXT_PREALLOC); <-- will be >= 128, so not zero kmemleak_not_leak(old); new = __krealloc(old, alloc, gfp); if (!new) return NULL; <-

Re: [PATCH net] af_packet: fix the tx skb protocol in raw sockets with ETH_P_ALL

2019-10-16 Thread Maciej Żenczykowski
> The Fixes tag is missing. Calling sendmsg on a packet socket bound to > ETH_P_ALL goes back a long way. It is a user, not kernel, bug to do > so. I would argue it's not a bug at all - at least not the way you phrased it. AFAIK it can/could be done correctly via specifying the protocol in the sl

Bunch of compiler warning fixes for ethtool.

2019-10-16 Thread Maciej Żenczykowski
You can merge them via: git fetch https://github.com/zenczykowski/ethtool.git fix-warnings git merge FETCH_HEAD and I'll follow up this email with the full set.

[PATCH 03/33] fix unused parameter warning in find_option()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/ethtool.c:5417:28: error: unused parameter 'argc' [-Werror,-Wunused-parameter] static int find_option(int argc, char **argp) Signed-off-by: Maciej Żenczykowski Change-Id: I7782cac5f58e217fc6032037a2f248b03573b9d4 --- eth

[PATCH 07/33] fix unused parameter warning in print_simple_table()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/sfc.c:3811:29: error: unused parameter 'revision' [-Werror,-Wunused-parameter] print_simple_table(unsigned revision, const struct efx_nic_reg_table *table, Signed-off-by: Maciej Żenczykowski

[PATCH 17/33] fix unused parameter warning in ixgbevf_dump_regs()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/ixgbevf.c:6:43: error: unused parameter 'info' [-Werror,-Wunused-parameter] ixgbevf_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) Signed-off-by: Maciej Żenczykowski

[PATCH 10/33] fix unused parameter warning in ixgbe_dump_regs()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/ixgbe.c:171:41: error: unused parameter 'info' [-Werror,-Wunused-parameter] ixgbe_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) Signed-off-by: Maciej Żenczykowski

[PATCH 01/33] fix arithmetic on pointer to void is a GNU extension warning

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/marvell.c:127:22: error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wpointer-arith] dump_timer("LED", p + 0x20); (and remove some spare whitespace while we're at it) Signed-off-by: Maciej Żenczyko

[PATCH 18/33] fix unused parameter warning in fec_8xx_dump_regs()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/fec_8xx.c:50:47: error: unused parameter 'info' [-Werror,-Wunused-parameter] int fec_8xx_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) Signed-off-by: Maciej Żenczykowski

[PATCH 14/33] fix unused parameter warning in dsa_dump_regs()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/dsa.c:677:43: error: unused parameter 'info' [-Werror,-Wunused-parameter] int dsa_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) Signed-off-by: Maciej Żenczykowski

[PATCH 12/33] fix unused parameter warning in lan78xx_dump_regs()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/lan78xx.c:5:47: error: unused parameter 'info' [-Werror,-Wunused-parameter] int lan78xx_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) Signed-off-by: Maciej Żenczykowski

[PATCH 08/33] fix unused parameter warning in natsemi_dump_regs()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/natsemi.c:326:43: error: unused parameter 'info' [-Werror,-Wunused-parameter] natsemi_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) Signed-off-by: Maciej Żenczykowski

[PATCH 11/33] fix unused parameter warning in realtek_dump_regs()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/realtek.c:244:43: error: unused parameter 'info' [-Werror,-Wunused-parameter] realtek_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) Signed-off-by: Maciej Żenczykowski

[PATCH 02/33] fix unused parameter warnings in do_version() and show_usage()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/ethtool.c:473:43: error: unused parameter 'ctx' [-Werror,-Wunused-parameter] static int do_version(struct cmd_context *ctx) external/ethtool/ethtool.c:5392:43: error: unused parameter 'ctx' [-Werror,-Wunused-par

[PATCH 16/33] fix unused parameter warning in st_{mac100,gmac}_dump_regs()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/stmmac.c:21:49: error: unused parameter 'info' [-Werror,-Wunused-parameter] int st_mac100_dump_regs(struct ethtool_drvinfo *info, external/ethtool/stmmac.c:54:47: error: unused parameter 'info' [-Werror,-Wunu

[PATCH 19/33] fix unused parameter warning in tg3_dump_{eeprom,regs}()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/tg3.c:8:41: error: unused parameter 'info' [-Werror,-Wunused-parameter] tg3_dump_eeprom(struct ethtool_drvinfo *info, struct ethtool_eeprom *ee) external/ethtool/tg3.c:27:39: error: unused parameter 'info'

[PATCH 29/33] fix unused parameter warning in et131x_dump_regs()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/et131x.c:5:46: error: unused parameter 'info' [-Werror,-Wunused-parameter] int et131x_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) Signed-off-by: Maciej Żenczykowski

[PATCH 32/33] fix unused parameter warning in fjes_dump_regs()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/fjes.c:5:44: error: unused parameter 'info' [-Werror,-Wunused-parameter] int fjes_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) Signed-off-by: Maciej Żenczykowski

[PATCH 15/33] fix unused parameter warning in vmxnet3_dump_regs()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/vmxnet3.c:6:43: error: unused parameter 'info' [-Werror,-Wunused-parameter] vmxnet3_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) Signed-off-by: Maciej Żenczykowski

[PATCH 33/33] fix unused parameter warning in e1000_get_mac_type()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/e1000.c:258:38: error: unused parameter 'revision_id' [-Werror,-Wunused-parameter] e1000_get_mac_type(u16 device_id, u8 revision_id) Signed-off-by: Maciej Żenczykowski Change-Id: I2469ef61996fd273cc3a2a6a7af0ae889c81b02b --

[PATCH 13/33] fix unused parameter warning in {skge,sky2}_dump_regs()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/marvell.c:262:44: error: unused parameter 'info' [-Werror,-Wunused-parameter] int skge_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) external/ethtool/marvell.c:382:44: error: unused parameter '

[PATCH 25/33] fix unused parameter warning in smsc911x_dump_regs()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/smsc911x.c:5:48: error: unused parameter 'info' [-Werror,-Wunused-parameter] int smsc911x_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) Signed-off-by: Maciej Żenczykowski

[PATCH 26/33] fix unused parameter warning in at76c50x_usb_dump_regs()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/at76c50x-usb.c:16:48: error: unused parameter 'info' [-Werror,-Wunused-parameter] at76c50x_usb_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) Signed-off-by: Maciej Żenczykowski

[PATCH 20/33] fix unused parameter warning in vioc_dump_regs()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/vioc.c:14:44: error: unused parameter 'info' [-Werror,-Wunused-parameter] int vioc_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) Signed-off-by: Maciej Żenczykowski

[PATCH 31/33] fix unused parameter warning in ixgb_dump_regs()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/ixgb.c:42:40: error: unused parameter 'info' [-Werror,-Wunused-parameter] ixgb_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) Signed-off-by: Maciej Żenczykowski Change-Id: I674e03805dc9a4633d0299d9f4e88b

[PATCH 30/33] fix unused parameter warning in ibm_emac_dump_regs()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/ibm_emac.c:317:48: error: unused parameter 'info' [-Werror,-Wunused-parameter] int ibm_emac_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) Signed-off-by: Maciej Żenczykowski

[PATCH 28/33] fix unused parameter warning in amd8111e_dump_regs()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/amd8111e.c:155:48: error: unused parameter 'info' [-Werror,-Wunused-parameter] int amd8111e_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) Signed-off-by: Maciej Żenczykowski

[PATCH 24/33] fix unused parameter warning in e1000_dump_regs()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/e1000.c:368:41: error: unused parameter 'info' [-Werror,-Wunused-parameter] e1000_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) Signed-off-by: Maciej Żenczykowski

[PATCH 05/33] fix unused parameter warning in altera_tse_dump_regs()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/tse.c:28:50: error: unused parameter 'info' [-Werror,-Wunused-parameter] int altera_tse_dump_regs(struct ethtool_drvinfo *info, Signed-off-by: Maciej Żenczykowski Change-Id: I555f0e3c55bba999aeb64f1e1435744590ea389d ---

[PATCH 21/33] fix unused parameter warning in e100_dump_regs()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/e100.c:40:40: error: unused parameter 'info' [-Werror,-Wunused-parameter] e100_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) Signed-off-by: Maciej Żenczykowski Change-Id: Idc6e3bb3fb837555425ddd6cc903e8

[PATCH 04/33] fix unused parameter warning in dump_eeprom()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/ethtool.c:1271:70: error: unused parameter 'info' [-Werror,-Wunused-parameter] static int dump_eeprom(int geeprom_dump_raw, struct ethtool_drvinfo *info, Signed-off-by: Maciej Żenczykowski

[PATCH 27/33] fix unused parameter warning in fec_dump_regs()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/fec.c:197:43: error: unused parameter 'info' [-Werror,-Wunused-parameter] int fec_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) Signed-off-by: Maciej Żenczykowski

[PATCH 09/33] fix unused parameter warning in netsemi_dump_eeprom()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/natsemi.c:967:45: error: unused parameter 'info' [-Werror,-Wunused-parameter] natsemi_dump_eeprom(struct ethtool_drvinfo *info, struct ethtool_eeprom *ee) Signed-off-by: Maciej Żenczykowski

[PATCH 06/33] fix unused parameter warning in sfc_dump_regs()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/sfc.c:3894:39: error: unused parameter 'info' [-Werror,-Wunused-parameter] sfc_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) Signed-off-by: Maciej Żenczykowski Change-Id: Ia255a280742332c44b66bf8f5bb678

[PATCH 22/33] fix unused parameter warning in de2104[01]_dump_regs()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/de2104x.c:115:43: error: unused parameter 'info' [-Werror,-Wunused-parameter] de21040_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) external/ethtool/de2104x.c:421:43: error: unused parameter '

[PATCH 23/33] fix unused parameter warning in igb_dump_regs()

2019-10-17 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: external/ethtool/igb.c:92:39: error: unused parameter 'info' [-Werror,-Wunused-parameter] igb_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) Signed-off-by: Maciej Żenczykowski Change-Id: If2e175d1b1bd3976d760dc359b52c3

Re: [PATCH 2/2] netfilter: revert "conntrack: silent a memory leak warning"

2019-10-17 Thread Maciej Żenczykowski
> So you conclude as it is not leak too? Then what are you trying to > fix? I conclude there is no easily *visible* leak. At least not at first glance - not with single threaded code. > I am becoming more confused after this. :-/ I think adding kmemleak_not_leak() is hiding the fact that there a

Re: [PATCH 02/33] fix unused parameter warnings in do_version() and show_usage()

2019-10-21 Thread Maciej Żenczykowski
> Considering how frequent this pattern (a callback where not all > instances use all parameters) is, maybe we could consider disabling the > warning with -Wno-unused-parameter instead of marking all places where > it is issued. Once you fix it... it stays fixed. There's no cost to carrying aroun

[PATCH 1/2] net: enable IPv6 iff IPv4

2019-04-01 Thread Maciej Żenczykowski
From: Maciej Żenczykowski IPv6 is 20 years old and IPv4 has run out of IP addresses and is deprecated. It is time to make IPv6 a first class citizen. As such we remove the ability to compile IPv6 as a module, and IPv4 support now implies IPv6 support. This has the nice benefit of allowing

[PATCH 2/2] net: configs - remove CONFIG_IPV6 references

2019-04-01 Thread Maciej Żenczykowski
From: Maciej Żenczykowski Signed-off-by: Maciej Żenczykowski --- arch/alpha/defconfig | 1 - arch/arc/configs/axs101_defconfig | 1 - arch/arc/configs/axs103_defconfig | 1 - arch/arc/configs/axs103_smp_defconfig | 1

Re: [PATCH 1/2] net: enable IPv6 iff IPv4

2019-04-01 Thread Maciej Żenczykowski
> Things are modular because we don't unilaterally make decisions for > people on this level. We do unilaterally make various decisions - some of them quite big in scope. Although perhaps not this one. > This is why I'm very much not too motivated to integrate changes like > this, even though I u

[PATCH 1/2] net/ipv6: always honour route mtu during forwarding

2020-10-07 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This matches the new ipv4 behaviour as of commit: commit 02a1b175b0e92d9e0fa5df3957ade8d733ceb6a0 Author: Maciej Żenczykowski Date: Wed Sep 23 13:18:15 2020 -0700 net/ipv4: always honour route mtu during forwarding The reasoning is similar: There doesn&#

[PATCH 2/2] net/ipv6: ensure ip6_dst_mtu_forward() returns at least IPV6_MIN_MTU

2020-10-07 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This is basically just a refactor. But it does affect (a presumably buggy) call site in: net/netfilter/nf_flow_table_core.c flow_offload_fill_route() Signed-off-by: Maciej Żenczykowski --- include/net/ip6_route.h | 4 ++-- net/ipv6/ip6_output.c | 2 -- 2 files

Re: [PATCH 1/2] net/ipv6: always honour route mtu during forwarding

2020-10-07 Thread Maciej Żenczykowski
> On Thu, Oct 8, 2020 at 12:31 PM Maciej Żenczykowski > wrote: > > diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h > > index 2a5277758379..598415743f46 100644 > > --- a/include/net/ip6_route.h > > +++ b/include/net/ip6_route.h > > @@ -

[PATCH] net/ipv4: always honour route mtu during forwarding

2020-09-22 Thread Maciej Żenczykowski
From: Maciej Żenczykowski Documentation/networking/ip-sysctl.txt:46 says: ip_forward_use_pmtu - BOOLEAN By default we don't trust protocol path MTUs while forwarding because they could be easily forged and can lead to unwanted fragmentation by the router. You only ne

[PATCH v2] net/ipv4: always honour route mtu during forwarding

2020-09-22 Thread Maciej Żenczykowski
From: Maciej Żenczykowski Documentation/networking/ip-sysctl.txt:46 says: ip_forward_use_pmtu - BOOLEAN By default we don't trust protocol path MTUs while forwarding because they could be easily forged and can lead to unwanted fragmentation by the router. You only ne

[PATCH v3] net/ipv4: always honour route mtu during forwarding

2020-09-23 Thread Maciej Żenczykowski
From: Maciej Żenczykowski Documentation/networking/ip-sysctl.txt:46 says: ip_forward_use_pmtu - BOOLEAN By default we don't trust protocol path MTUs while forwarding because they could be easily forged and can lead to unwanted fragmentation by the router. You only ne

[PATCH] net-udp: deprioritize cpu match for udp socket lookup

2018-12-05 Thread Maciej Żenczykowski
From: Maciej Żenczykowski During udp socket lookup cpu match should be lowest priority, hence it should increase score by only 1. The next priority is delivering v4 to v4 sockets, and v6 to v6 sockets. The v6 code path doesn't have to deal with this so it always gets a score of '4

Re: [PATCH] net-udp: deprioritize cpu match for udp socket lookup

2018-12-07 Thread Maciej Żenczykowski
> This doesn't apply to the current net tree. > > Also "net-udp: " is a weird subsystem prefix, just use "udp: ". > > Thank you. Interesting... this patch was on top of net-next/master, and it still rebases cleanly on current net-next/master. Would you like it on net/master instead? It indeed do

Re: [PATCH net 1/1] bonding: fix PACKET_ORIGDEV regression on bonding masters

2019-01-13 Thread Maciej Żenczykowski
So I don't remember the specifics... (note I'm writing this all from memory without looking it up/testing it - I may be utterly wrong or dreaming) But I seem to recall that the core problem we were trying to solve was that a daemon listening on an AF_PACKET ethertype 88CC [LLDP] socket not bound

Re: [PATCH bpf-next] bpf: bpf_setsockopt: reset sock dst on SO_MARK changes

2019-01-16 Thread Maciej Żenczykowski
On Wed, Jan 16, 2019 at 10:09 AM Martin Lau wrote: > > In sock_setsockopt() (net/core/sock.h), when SO_MARK option is used > > to change sk_mark, sk_dst_reset(sk) is called. The same should be done > > in bpf_setsockopt. > > > > Reported-by: Maciej Żenczykowski >

Re: [PATCH net 1/1] bonding: fix PACKET_ORIGDEV regression on bonding masters

2019-01-17 Thread Maciej Żenczykowski
her reasons... Comments welcome. I think this continues to be in line with my proposal from earlier in the thread? On Thu, Jan 17, 2019 at 4:27 PM Michal Soltys wrote: > > On 19/01/14 03:01, Maciej Żenczykowski wrote: > > So I don't remember the specifics... > > > >

Re: [PATCH] net-xfrm: add build time cfg option to PF_KEY SHA256 to use RFC4868-compliant truncation

2018-10-16 Thread Maciej Żenczykowski
I'm afraid it's nothing we're using. It's what people are using. I guess we'll just carry this patch for a few more years.

Re: [PATCH nf] netfilter: ipv6: fix oops when defragmenting locally generated fragments

2018-10-23 Thread Maciej Żenczykowski
On Tue, Oct 23, 2018 at 7:47 AM, Florian Westphal wrote: > Unlike ipv4 and normal ipv6 defrag, netfilter ipv6 defragmentation did > not save/restore skb->dst. > > This causes oops when handling locally generated ipv6 fragments, as > output path needs a valid dst. >

Re: [PATCH net v2] net: udp: fix handling of CHECKSUM_COMPLETE packets

2018-10-26 Thread Maciej Żenczykowski
Possibly worth mentioning that without this fix you can also end up with valid udp packets being dropped (ie. the reverse of the commit description which talks about receiving invalid ones). The (approximate?) requirement is: (a) nic generates CHECKSUM_COMPLETE, but gets the actual checksum wrong

[PATCH] net: dev_is_mac_header_xmit() true for ARPHRD_RAWIP

2019-01-24 Thread Maciej Żenczykowski
From: Maciej Żenczykowski __bpf_redirect() and act_mirred checks this boolean to determine whether to prefix an ethernet header. Signed-off-by: Maciej Żenczykowski --- include/linux/if_arp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/if_arp.h b/include/linux/if_arp.h

eBPF equivalent of SKF_AD_HATYPE / skb->dev->type

2019-01-24 Thread Maciej Żenczykowski
In classic BPF 'SKF_AD_HATYPE' can be used to fetch skb->dev->type. Are my eyes deceiving me, or is there a similar way to get at it from eBPF? (while we're at it, skb->dev->mtu would probably be useful too) Cheers, Maciej

Re: eBPF equivalent of SKF_AD_HATYPE / skb->dev->type

2019-01-24 Thread Maciej Żenczykowski
wrote: > > On 01/24/2019 12:27 PM, Maciej Żenczykowski wrote: > > In classic BPF 'SKF_AD_HATYPE' can be used to fetch skb->dev->type. > > > > Are my eyes deceiving me, or is there a similar way to get at it from eBPF? > > > > (while we're at i

Re: [PATCH net 1/1] bonding: fix PACKET_ORIGDEV regression on bonding masters

2019-01-29 Thread Maciej Żenczykowski
Sounds good to me. On Mon, Jan 28, 2019 at 5:47 PM Michal Soltys wrote: > > On 19/01/18 07:58, Maciej Żenczykowski wrote: > > I'm not sure there's a truly good answer. > > > > Also note, that there's subtle differences between af_packet sockets > &

Re: ethtool - manual changes in ethtool-copy.h

2019-01-29 Thread Maciej Żenczykowski
On Tue, Jan 29, 2019 at 1:00 PM John W. Linville wrote: > > On Tue, Jan 29, 2019 at 09:28:42PM +0100, Michal Kubecek wrote: > > Hello, > > > > I'm sorry I didn't notice earlier but ethtool commit 4df55c81996d > > ("ethtool: change to new sane powerpc64 kernel headers") adds changes to > > ethtool-

Re: ethtool - manual changes in ethtool-copy.h

2019-01-29 Thread Maciej Żenczykowski
' and avoid compile warnings * when printing __u64 with %llu. */ #define __SANE_USERSPACE_TYPES__ ... which came in: commit c0a2c04b3cbf6d399a2551654401957ddb529a50 Author: Maciej Żenczykowski Date: Fri Mar 11 09:58:14 2016 -0800 internal.h: change to new sane kernel headers on 64

[PATCH] Revert "ethtool: change to new sane powerpc64 kernel headers"

2019-01-29 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This reverts commit 4df55c81996dfb1dbe98c93ee62d8067ed5073a9. It turns out this is not needed due to: commit c0a2c04b3cbf6d399a2551654401957ddb529a50 internal.h: change to new sane kernel headers on 64-bit archs which I apparently entirely forgot about while

Re: [xfrm, backport request] Request backport of e2612cd496e7 - set-mark backwards compatibility

2019-02-05 Thread Maciej Żenczykowski
> I propose backporting commit e2612cd496e7 ("xfrm: Make set-mark default > behavior backward compatible") to 4.19 and 4.20 kernels to fix a backwards > compatibility bug introduced in 9b42c1f179a6 (“xfrm: Extend the > output_mark to support input direction and masking”). > > The fix is small, rela

[PATCH] ethtool: zero initialize coalesce struct

2018-12-14 Thread Maciej Żenczykowski
From: Maciej Żenczykowski prior to fetching it from kernel. Otherwise we run the risk of very tail portion of it (dmac field) being left entirely uninitialized, and likely containing some sort of stale data. It seems to likely be some sort of time (a second's counter). Tested: '

[PATCH] ethtool: change to new sane powerpc64 kernel headers

2018-12-14 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This fixes: In file included from ethtool-copy.h:22:0, from internal.h:32, from ethtool.c:29: .../include/linux/types.h:32:25: error: conflicting types for '__be64' typedef __u64 __bitw

Re: [PATCH] ethtool: zero initialize coalesce struct

2018-12-14 Thread Maciej Żenczykowski
> The dmac member of struct ethtool_coalesce was removed by commit > c0b078ce7e88 ("Revert "ethtool: Add DMA Coalescing support"") because it > has never been added in kernel (as that would break compatibility with > older ethtool versions). Hmm, well, it doesn't hurt to zero init either way...

  1   2   3   >