[4.4] Security fixes (pinctrl, i40e, geneve)

2020-11-11 Thread Ben Hutchings
it message. Ben. -- Ben Hutchings, Software Developer Codethink Ltd https://www.codethink.co.uk/ Dale House, 35 Dale Street Manchester, M1 2HF, United Kingdom security-4.4.mbox Description: application/mbox

[4.9] Security fixes (pinctrl, i40e, geneve)

2020-11-10 Thread Ben Hutchings
it message. Ben. -- Ben Hutchings, Software Developer Codethink Ltd https://www.codethink.co.uk/ Dale House, 35 Dale Street Manchester, M1 2HF, United Kingdom security-4.9.mbox Description: application/mbox

Re: Bug#966459: linux: traffic class socket options (both IPv4/IPv6) inconsistent with docs/standards

2020-08-02 Thread Ben Hutchings
On Sun, 2020-08-02 at 22:44 +0200, Thorsten Glaser wrote: > On Sun, 2 Aug 2020, Ben Hutchings wrote: > > > The RFC says that the IPV6_TCLASS option's value is an int, and that > > for setsockopt (“option's”), not cmsg > > > No, the wording is *not* clear. &

Re: Bug#966459: linux: traffic class socket options (both IPv4/IPv6) inconsistent with docs/standards

2020-08-02 Thread Ben Hutchings
On Sun, 2020-08-02 at 19:29 +, Thorsten Glaser wrote: > Ben Hutchings dixit: > > >ip(7) also doesn't document IP_PKTOPIONS. > > Hmm, I don’t use IP_PKTOPIONS though. I’m not exactly sure I found > the correct place in the kernel for what I do. The first inst

Re: Bug#966459: linux: traffic class socket options (both IPv4/IPv6) inconsistent with docs/standards

2020-08-02 Thread Ben Hutchings
ity is to avoid breaking currently working user-space. That means that ugly and inconsistent APIs won't get fixed if it causes a regression for the programs people actually use. If the API never worked like it was supposed to on some architectures, that's not a regression, and is lower p

Re: [PATCH net] mlx4: Fix information leak on failure to read module EEPROM

2020-05-18 Thread Ben Hutchings
On Mon, 2020-05-18 at 16:47 +, Saeed Mahameed wrote: > On Sun, 2020-05-17 at 18:20 +0100, Ben Hutchings wrote: > > mlx4_en_get_module_eeprom() returns 0 even if it fails. This results > > in copying an uninitialised (or partly initialised) buffer back to > > user-space.

[PATCH net] mlx4: Fix information leak on failure to read module EEPROM

2020-05-17 Thread Ben Hutchings
avoid a regression when reading modules with this problem. * In other error cases, the error code is propagated. Reported-by: Yannis Aribaud References: https://bugs.debian.org/960702 Fixes: 7202da8b7f71 ("ethtool, net/mlx4_en: Cable info, get_module_info/...") Signed-off-by: Ben

Re: tc qdisc kernel crash

2019-02-10 Thread Ben Hutchings
04fd22200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 64.049993] == Ben. -- Ben Hutchings The world is coming to an end. Please log off. signature.asc Description: This is a digitally signed message part

GSO where gso_size is too big for hardware

2019-01-22 Thread Ben Hutchings
? If not, is every driver that does TSO expected to check this? Also, should these fixes go to stable? I'm not sure whether you're still handling stable patches for any of the unfixed versions (< 4.16) now. Ben. -- Ben Hutchings, Software Developer 

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

2018-12-15 Thread Ben Hutchings
ej Żenczykowski > --- > ethtool-copy.h | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/ethtool-copy.h b/ethtool-copy.h > index 6bfbb85f9402..7772a4970987 100644 > --- a/ethtool-copy.h > +++ b/ethtool-copy.h > @@ -14,6 +14,12 @@ > #ifndef _LINUX_ET

Re: [PATCH] ethtool: zero initialize coalesce struct

2018-12-15 Thread Ben Hutchings
+2076,7 @@ static int do_gchannels(struct cmd_context *ctx) > > static int do_gcoalesce(struct cmd_context *ctx) > { > - struct ethtool_coalesce ecoal; > + struct ethtool_coalesce ecoal = {}; > int err; > > if (ctx->argc != 0) -- Ben Hutchings I

Re: [PATCH 1/3] bpf/verifier: Log instruction patching when verbose logging is enabled

2018-11-29 Thread Ben Hutchings
On Fri, 2018-11-23 at 21:10 +0100, Daniel Borkmann wrote: > On 11/23/2018 07:34 PM, Ben Hutchings wrote: > > User-space does not have access to the patched eBPF code, but we > > need to be able to test that patches are being applied.  Therefore > > log distinct messages for ea

[PATCH 2/3] selftests/bpf: Add the ability to test for a log message on success

2018-11-23 Thread Ben Hutchings
This is needed to test that code is being patched when it should be. Signed-off-by: Ben Hutchings --- tools/testing/selftests/bpf/test_verifier.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/test_verifier.c b/tools/testing

[PATCH 3/3] selftests/bpf: Add test case for defence against SSB exploitation

2018-11-23 Thread Ben Hutchings
Test that the defence added by commit af86ca4e3088 "bpf: Prevent memory disambiguation attack" is actually being applied. Signed-off-by: Ben Hutchings --- tools/testing/selftests/bpf/test_verifier.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/tools/testing/sel

[PATCH 1/3] bpf/verifier: Log instruction patching when verbose logging is enabled

2018-11-23 Thread Ben Hutchings
User-space does not have access to the patched eBPF code, but we need to be able to test that patches are being applied. Therefore log distinct messages for each case that requires patching. Signed-off-by: Ben Hutchings --- kernel/bpf/verifier.c | 13 + 1 file changed, 13

[PATCH 0/3] bpf: Test defence against SSB exploitation

2018-11-23 Thread Ben Hutchings
This series adds log messages for all patching done by the verifier, and a test case to verify that the patch to defend against SSB exploitation is applied where needed. Ben. Ben Hutchings (3): bpf/verifier: Log instruction patching when verbose logging is enabled selftests/bpf: Add the

[RFC PATCH] skb: Define NET_IP_ALIGN based on CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS

2018-10-04 Thread Ben Hutchings
) define CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS, which seems to imply that NET_IP_ALIGN should be 0. Remove the overriding definitions for ppc64 and x86 and define NET_IP_ALIGN solely based on CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS. Signed-off-by: Ben Hutchings --- arch/powerpc/include/asm/processor.h

Re: GPL compliance issue with liquidio/lio_23xx_vsw.bin firmware

2018-08-29 Thread Ben Hutchings
o this (only non-commercial distributors can do that). So the source needs to be published too. Adding the complete Linux kernel source code to linux-firmware.git doesn't seem like a sensible step, so maybe this particular firmware needs to live elsewhere. Ben. -- Ben Hutchings For every complex problem there is a solution that is simple, neat, and wrong. signature.asc Description: This is a digitally signed message part

Re: [linux-stable-3.16.y] tun: allow positive return values on dev_get_valid_name() call

2018-05-14 Thread Ben Hutchings
> [2] > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5c25f65fd1e42685f7ccd80e0621829c105785d9 > [3] > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0ad646c81b2182f7fa67ec0c8c825e0ee165696d > [4] https://www.spinics.net/lists/netdev/m

[PATCH 2/2] hns: Clean up string operations

2018-03-13 Thread Ben Hutchings
The driver-internal string operations are only ever used for statistics, so remove the stringset parameters and rename them accordingly. Signed-off-by: Ben Hutchings --- drivers/net/ethernet/hisilicon/hns/hnae.h | 13 drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c | 37

[PATCH net 1/2] hns: Fix string set validation in ethtool string operations

2018-03-13 Thread Ben Hutchings
r any stringset other than ETH_SS_STATS. Fixes: 511e6bc071db ("net: add Hisilicon Network Subsystem DSAF support") Fixes: 412b65d15a7f ("net: hns: fix ethtool_get_strings overflow ...") Signed-off-by: Ben Hutchings --- drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 17 +

[stable] dccp: CVE-2017-8824: use-after-free in DCCP code

2018-01-31 Thread Ben Hutchings
Please queue up this commit for stable: 69c64866ce07 dccp: CVE-2017-8824: use-after-free in DCCP code Ben. -- Ben Hutchings Software Developer, Codethink Ltd.

[PATCH net] ipv6: Fix getsockopt() for sockets with default IPV6_AUTOFLOWLABEL

2018-01-22 Thread Ben Hutchings
ot updated, so it currently returns 0 for all sockets for which IPV6_AUTOFLOWLABEL is not explicitly enabled. Fix it to return the effective value, whether that has been set at the socket or net namespace level. Fixes: 513674b5a2c9 ("net: reevalulate autoflowlabel setting after sysctl ..."

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

2018-01-11 Thread Ben Hutchings
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 stack.  It also > > reordered clea

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

2018-01-09 Thread Ben Hutchings
or crash in some error cases. Reorder cleanup again to fix this. Fixes: 15e668070a64 ("ipv6: reorder icmpv6_init() and ip6_mr_init()") Signed-off-by: Ben Hutchings --- This fix is untested and based only on my review of the earlier commit. Ben. net/ipv6/af_inet6.c | 6 +++--- 1 file

[PATCH 4.9] bpf/verifier: Fix states_equal() comparison of pointer and UNKNOWN

2017-12-22 Thread Ben Hutchings
ode around here was largely rewritten in 4.14 by commit f1174f77b50c "bpf/verifier: rework value tracking". The bug can be detected by the bpf/verifier sub-test "pointer/scalar confusion in state equality check (way 1)". Signed-off-by: Ben Hutchings Cc: Edward Cree Cc: Jan

Re: pull request: Cavium Octeon III firmware

2017-11-28 Thread Ben Hutchings
On Tue, 2017-11-28 at 11:09 -0600, Steven J. Hill wrote: > On 11/22/2017 07:40 PM, Ben Hutchings wrote: > > On Tue, 2017-10-31 at 17:05 -0500, Steven J. Hill wrote: > > > Hello. > > > > > > Would like to add firmware for our Octeon III PKI driver. Thanks. >

Re: [PATCH linux-firmware 0/2] Mellanox: Add new mlxsw_spectrum firmware 13.1530.152

2017-11-22 Thread Ben Hutchings
ellanox/mlxsw_spectrum-13.1530.152.mfa2 Applied both of these, thanks. Ben. -- Ben Hutchings When in doubt, use brute force. - Ken Thompson signature.asc Description: This is a digitally signed message part

Re: pull-request Cavium LiquidIO firmware v1.7.0

2017-11-22 Thread Ben Hutchings
liquidio/lio_210sv_nic.bin | Bin 1159096 -> 1163128 bytes > liquidio/lio_23xx_nic.bin | Bin 1266528 -> 1271456 bytes > liquidio/lio_410nv_nic.bin | Bin 1261080 -> 1265368 bytes > 5 files changed, 4 insertions(+), 4 deletions(-) Pulled, thanks. Ben. -- Ben Hutchings When in d

Re: pull request: Cavium Octeon III firmware

2017-11-22 Thread Ben Hutchings
> 1 file changed, 0 insertions(+), 0 deletions(-) > create mode 100644 cavium/pki-cluster.bin When adding a file you also need to update WHENCE to include its copyright details. Ben. -- Ben Hutchings When in doubt, use brute force. - Ken Thompson signature.asc Description: This is a digitally signed message part

Re: [PATCH 1/1] qed: Add firmware 8.33.1.0

2017-11-22 Thread Ben Hutchings
00755 qed/qed_init_values_zipped-8.33.1.0.bin [...] Applied; sorry for the delay. Ben. -- Ben Hutchings When in doubt, use brute force. - Ken Thompson signature.asc Description: This is a digitally signed message part

Re: scheduling while atomic from vmci_transport_recv_stream_cb in 3.16 kernels

2017-11-21 Thread Ben Hutchings
Good to know. I will send all three patches cherry-picked on top of the > current 3.16 stable branch. Could you have a look please? I've now queued these all up. Ben. -- Ben Hutchings If you seem to know what you are doing, you'll be given more to do. signature.asc Description: This is a digitally signed message part

Re: [PATCH 4.4 27/56] cdc_ncm: Set NTB format again after altsetting switch for Huawei devices

2017-11-14 Thread Ben Hutchings
32_FORMAT) { [...] usbnet_read_cmd() doesn't do any byte-swapping, so it looks like curr_ntb_format will have little-endian byte order (__le16 not u16). The comparison will then need to be done using le16_to_cpu(curr_ntb_format). Ben. -- Ben Hutchings Software Developer, Codethink Ltd.

Re: [PATCH] net: recvmsg: Unconditionally zero struct sockaddr_storage

2017-10-31 Thread Ben Hutchings
g the per-protocol handler, which means by default nothing leaks. Only cases where msg_namelen is set but msg_name[] is not initialised up to that length are a problem. I would have thought they were not too hard to find and fix. Ben. > msg_sys->msg_name = &addr; > >

Re: [PATCH linux-firmware 1/1] qed: Add firmware 8.30.16.0

2017-10-09 Thread Ben Hutchings
> -Support flow ID in aRFS flow. > > Signed-off-by: Rahul Verma > --- > qed/qed_init_values_zipped-8.30.16.0.bin | Bin 0 -> 837008 bytes > 1 file changed, 0 insertions(+), 0 deletions(-) > create mode 100755 qed/qed_init_values_zipped-8.30.16.0.bin [...] The new fil

Re: pull request: linux-firmware: update cxgb4 firmware

2017-10-09 Thread Ben Hutchings
2cad88269ea704eb270d7ac6e69e8a544c: > > cxgb4: update firmware to revision 1.16.63.0 (2017-09-27 08:14:29 -0700) > > -------- -- Ben Hutchings Humour is the best antidote to reality. signature.asc Description: This is a digitally signed message part

Re: scheduling while atomic from vmci_transport_recv_stream_cb in 3.16 kernels

2017-09-15 Thread Ben Hutchings
to work through, but I will get to this eventually. Ben. -- Ben Hutchings Kids! Bringing about Armageddon can be dangerous. Do not attempt it in your own home. - Terry Pratchett and Neil Gaiman, `Good Omens' signature.asc Description: This is a digitally signed message part

Re: WARNING in dev_watchdog

2017-06-12 Thread Ben Hutchings
l.org/linus/d821a4c4d11ad160925dab2bb009b8444beff484 I think e1000 may still be unfixed, so this might be the same bug. Ben. -- Ben Hutchings Unix is many things to many people, but it's never been everything to anybody. signature.asc Description: This is a digitally signed message part

Leak in ipv6_gso_segment()?

2017-05-31 Thread Ben Hutchings
If I'm not mistaken, ipv6_gso_segment() now leaks segs if ip6_find_1stfragopt() fails. I'm not sure whether the fix would be as simple as adding a kfree_skb(segs) or whether more complex cleanup is needed. Ben. -- Ben Hutchings Lowery's Law: If it jams, force it. I

[PATCH net] ipv6: xfrm: Handle errors reported by xfrm6_find_1stfragopt()

2017-05-31 Thread Ben Hutchings
xfrm6_find_1stfragopt() may now return an error code and we must not treat it as a length. Fixes: 2423496af35d ("ipv6: Prevent overrun when parsing v6 header options") Signed-off-by: Ben Hutchings --- Commits 2423496af35d "ipv6: Prevent overrun when parsing v6 header options&qu

[stable] Networking security fixes

2017-04-24 Thread Ben Hutchings
uests for those older versions directly. Please can you also send the pending fixes to Greg soon, as the AF_PACKET issue is quite serious? Ben. -- Ben Hutchings Software Developer, Codethink Ltd.

Re: [PATCH net-stable] ipv4: keep skb->dst around in presence of IP options

2017-03-21 Thread Ben Hutchings
gt; +++ b/net/ipv4/ip_sockglue.c > @@ -1009,7 +1009,8 @@ e_inval: >   */ >  int ip_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) >  { > - if (!(inet_sk(sk)->cmsg_flags & IP_CMSG_PKTINFO)) > + if (!(inet_sk(sk)->cmsg_flags & IP_CMSG_PKTINFO) &&am

Re: PROBLEM: null-ptr deref in ip_options_echo may lead to denial of service

2017-03-20 Thread Ben Hutchings
On Tue, 2017-03-21 at 00:33 +, Ben Hutchings wrote: > On Sun, 2017-03-19 at 22:25 -0700, Eric Dumazet wrote: > > On Mon, 2017-03-20 at 12:59 +0800, Anarcheuz Fritz wrote: > > > Hi David, > > > > > > > > > While working on some lega

Re: PROBLEM: null-ptr deref in ip_options_echo may lead to denial of service

2017-03-20 Thread Ben Hutchings
mp; IP_CMSG_PKTINFO) && > + !IPCB(skb)->opt.optlen) >   skb_dst_drop(skb); >   return sock_queue_rcv_skb(sk, skb); >  } Thanks to both of you; I'll queue this up for 3.2. Ben. -- Ben Hutchings Power corrupts.  Absolute power is kind of neat.    - John Lehman, Secretary of the US Navy 1981-1987 signature.asc Description: This is a digitally signed message part

[PATCH 3.16 316/370] VSOCK: do not disconnect socket when peer has shutdown SEND only

2017-03-10 Thread Ben Hutchings
Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- net/vmw_vsock/af_vsock.c | 21 + 1 file changed, 1 insertion(+), 20 deletions(-) --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -1796,27 +1796,8 @@ vsock_stream_recvmsg(struct kiocb *kiocb

[PATCH 3.16 330/370] net: sctp, forbid negative length

2017-03-10 Thread Ben Hutchings
-s...@vger.kernel.org Cc: netdev@vger.kernel.org Acked-by: Neil Horman Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- net/sctp/socket.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -4280,7 +4280,7 @@ static int sctp_gets

[PATCH 3.2 167/199] net: sctp, forbid negative length

2017-03-10 Thread Ben Hutchings
-s...@vger.kernel.org Cc: netdev@vger.kernel.org Acked-by: Neil Horman Signed-off-by: David S. Miller [bwh: Backported to 3.2: adjust context] Signed-off-by: Ben Hutchings --- net/sctp/socket.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) --- a/net/sctp/socket.c +++ b/net/sctp/socket.c

Re: Bug#855153: linux-image-4.9.0-1-amd64: kernel 4.9 does not check route protocol when deleting ipv6 routes

2017-02-14 Thread Ben Hutchings
: > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c2ed1880fd61a998e3ce40254a99a2ad000f1a7d [...] -- Ben Hutchings Reality is just a crutch for people who can't handle science fiction. signature.asc Description: This is a digitally signed message part

Re: [PATCH net 2/4] rtl8150: Use heap buffers for all register access

2017-02-06 Thread Ben Hutchings
On Mon, Feb 06, 2017 at 04:09:18PM +, David Laight wrote: > From: Ben Hutchings [...] > > + ret = usb_control_msg(dev->udev, usb_rcvctrlpipe(dev->udev, 0), > > + RTL8150_REQ_GET_REGS, RTL8150_REQT_READ, > > +

[PATCH net 3/4] catc: Combine failure cleanup code in catc_probe()

2017-02-04 Thread Ben Hutchings
Signed-off-by: Ben Hutchings --- drivers/net/usb/catc.c | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/drivers/net/usb/catc.c b/drivers/net/usb/catc.c index 3daa41bdd4ea..985909eab72c 100644 --- a/drivers/net/usb/catc.c +++ b/drivers/net

[PATCH net 4/4] catc: Use heap buffer for memory size test

2017-02-04 Thread Ben Hutchings
Allocating USB buffers on the stack is not portable, and no longer works on x86_64 (with VMAP_STACK enabled as per default). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Ben Hutchings --- drivers/net/usb/catc.c | 25 ++--- 1 file changed, 18 insert

[PATCH net 2/4] rtl8150: Use heap buffers for all register access

2017-02-04 Thread Ben Hutchings
Allocating USB buffers on the stack is not portable, and no longer works on x86_64 (with VMAP_STACK enabled as per default). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Ben Hutchings --- drivers/net/usb/rtl8150.c | 34 +++--- 1 file changed, 27

[PATCH net 1/4] pegasus: Use heap buffers for all register access

2017-02-04 Thread Ben Hutchings
án Nicanor Pérez Meyer Signed-off-by: Ben Hutchings --- drivers/net/usb/pegasus.c | 29 + 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c index 24e803fe9a53..36674484c6fb 100644 --- a/drivers/net/usb

[PATCH net 0/4] Fix on-stack USB buffers

2017-02-04 Thread Ben Hutchings
Allocating USB buffers on the stack is not portable, and no longer works on x86_64 (with VMAP_STACK enabled as per default). This series fixes all the instances I could find where USB networking drivers do that. Ben. Ben Hutchings (4): pegasus: Use heap buffers for all register access

Re: [PATCH net v2] tipc: check minimum bearer MTU

2016-12-01 Thread Ben Hutchings
to me. I haven't tested any version as I don't know how to use TIPC. Ben. -- Ben Hutchings A free society is one where it is safe to be unpopular. - Adlai Stevenson signature.asc Description: This is a digitally signed message part

Re: [PATCH net] tipc: check minimum bearer MTU

2016-11-30 Thread Ben Hutchings
ks, a buffer overflow can occur if MTU is too short for > > even tipc headers. As anyone can set device MTU in a user/net namespace, > > this issue can be abused by a regular user. > > > > As agreed in the discussion on Ben Hutchings' original patch, we should > >

Re: linux kernel 4.6 and 4.7 from backports have bug in congestion module refcount

2016-11-16 Thread Ben Hutchings
above mentioned server is a 10g SFP+ > server with more than 4 Gbps traffic at certain times of day). I didn't see any bug fixes relating to congestion control refcounts after 4.7, so I'm guessing this bug is still present upstream. Ben. > I will test with a different congestion module (tcp_highspeed) to see if > the issue is only htcp related or it is general issue of using congestion > tcp modules. > > Panagiotis Malakoudis -- Ben Hutchings Time is nature's way of making sure that everything doesn't happen at once. signature.asc Description: This is a digitally signed message part

Re: [PATCH net] tipc: Guard against tiny MTU in tipc_msg_build()

2016-10-21 Thread Ben Hutchings
On Fri, 2016-10-21 at 14:57 +, Jon Maloy wrote: > > -Original Message- > > > > From: Ben Hutchings [mailto:b...@decadent.org.uk] > > Sent: Thursday, 20 October, 2016 12:40 > > > > To: Jon Maloy ; Ying Xue > > > > > > Cc: netdev@v

Re: [PATCH net] tipc: Guard against tiny MTU in tipc_msg_build()

2016-10-20 Thread Ben Hutchings
you are in reality testing for whether we have an > mtu < 84 bytes. > You won't find any interfaces or protocols that come even close to this > limitation, so to me this test is redundant. But I can easily create such an interface: $ unshare -n -U -r # ip l set lo mtu 1

Re: [PATCH net] tipc: Guard against tiny MTU in tipc_msg_build()

2016-10-20 Thread Ben Hutchings
On Thu, 2016-10-20 at 17:30 +0800, Ying Xue wrote: > On 10/19/2016 10:16 AM, Ben Hutchings wrote: > > Qian Zhang (张谦) reported a potential socket buffer overflow in > > tipc_msg_build().  The minimum fragment length needs to be checked > > against the maximum packet size,

[PATCH net] tipc: Guard against tiny MTU in tipc_msg_build()

2016-10-18 Thread Ben Hutchings
Qian Zhang (张谦) reported a potential socket buffer overflow in tipc_msg_build(). The minimum fragment length needs to be checked against the maximum packet size, which is based on the link MTU. Reported-by: Qian Zhang (张谦) Signed-off-by: Ben Hutchings --- This is untested, but I think it fixes

Re: [PATCH V2] rtl_bt: Add firmware and config file for RTL8822BE

2016-08-30 Thread Ben Hutchings
You missed this wildcard, but I fixed it up.  Applied and pushed, thanks. Ben. -- Ben Hutchings Anthony's Law of Force: Don't force it, get a larger hammer. signature.asc Description: This is a digitally signed message part

Re: [PATCH] rtl_bt: Add firmware and config file for RTL8822BE

2016-08-30 Thread Ben Hutchings
 File: rtl_bt/rtl8821a_fw.bin > +File: rtl_bt/rtl8822e_fw.bin > +File: rtl_bt/rtl8822e_config.bin [...] Should the filenames begin with "rtl822b" or "rtl822e"? Ben. -- Ben Hutchings All the simple programs have been written, and all the good names taken. signature.asc Description: This is a digitally signed message part

Re: CVE-2014-9900 fix is not upstream

2016-08-23 Thread Ben Hutchings
ows it not > initializing the structure I will not apply this patch because I know > that it faithfully does. On some versions and architectures.  Can you guarantee that you will notice when an exception appears? Ben. -- Ben Hutchings The program is absolutely right; therefore, the

Re: net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol()

2016-08-23 Thread Ben Hutchings
. Unfortunately the C standard does not guarantee that padding bytes are initialised (at least not for automatic storage). [...] > If we can not rely on such constructs, we have hundreds of similar > patches to submit. [...] Many such patches have been applied and can be found with:     git log --author=kangji...@gmail.com Ben. -- Ben Hutchings The program is absolutely right; therefore, the computer must be wrong. signature.asc Description: This is a digitally signed message part

Re: [net-next PATCH] ethtool: Add support for SCTP verification tag in Rx NFC

2016-08-22 Thread Ben Hutchings
On Sat, 2016-08-20 at 18:56 -0700, Alexander Duyck wrote: > > On Sat, Aug 20, 2016 at 5:21 PM, Ben Hutchings wrote: > > > > On Fri, 2016-08-19 at 14:32 -0700, Alexander Duyck wrote: > > > > > > The i40e hardware has support for SCTP filtering via Rx NFC how

Re: [net-next PATCH] ethtool: Add support for SCTP verification tag in Rx NFC

2016-08-20 Thread Ben Hutchings
ng for SCTP using the previously specified structure, but have you checked that that is the case? Ben. -- Ben Hutchings It's easier to fight for one's principles than to live up to them. signature.asc Description: This is a digitally signed message part

Re: [PATCH net-next V2] net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)

2016-07-07 Thread Ben Hutchings
   return -EOPNOTSUPP; > +   } [...] > +static const struct ethtool_ops ena_ethtool_ops = { > +   .get_settings   = ena_get_settings, [...] get_settings is now deprecated in favour of get_link_ksettings. Ben. Ben. -- Ben Hutchings For every action, there is an equal and opposite criticism. - Harrison signature.asc Description: This is a digitally signed message part

Re: [PATCH 2/2] net: ethernet: bcmgenet: use phy_ethtool_{get|set}_link_ksettings

2016-07-05 Thread Ben Hutchings
than that, actually put the check in the generic > functions, because if the link is down, aka netif_running() returns > false, link parameters cannot be reliably queried and they are invalid. Either the hardware or the driver needs to remember: - Is auto-negotiation enabled - If so

Re: ethtool needs a new maintainer

2016-07-04 Thread Ben Hutchings
On Fri, 2016-07-01 at 10:33 +0800, zhuyj wrote: > I am interested in this, too. You didn't say anything about your experience with Linux networking, and I couldn't find many contributions from you.  So you are welcome to help with ethtool but I've selected John as the maintaine

Re: ethtool needs a new maintainer

2016-07-04 Thread Ben Hutchings
On Thu, 2016-06-30 at 14:37 -0500, Jorge Alberto Garcia wrote: > El 30/06/2016 02:32 p.m., "Ben Hutchings" escribió: > > > > On Thu, 2016-06-30 at 14:27 -0500, Jorge Alberto Garcia wrote: > > > On Thu, Jun 30, 2016 at 1:15 PM, John W. Linville > > > w

Re: ethtool needs a new maintainer

2016-07-04 Thread Ben Hutchings
On Mon, 2016-06-27 at 09:51 -0400, John W. Linville wrote: > On Sun, Jun 26, 2016 at 06:11:41PM +0200, Ben Hutchings wrote: > > I've become steadily less enthusiastic and less responsive as a > > maintainer over the past year or so.  I no longer work on networking > > re

Re: ethtool needs a new maintainer

2016-06-30 Thread Ben Hutchings
On Thu, 2016-06-30 at 14:27 -0500, Jorge Alberto Garcia wrote: > On Thu, Jun 30, 2016 at 1:15 PM, John W. Linville > wrote: > > On Mon, Jun 27, 2016 at 09:51:47AM -0400, John W. Linville wrote: > > > On Sun, Jun 26, 2016 at 06:11:41PM +0200, Ben Hutchings wrote: > > &g

Re: [ethtool PATCH v1 2/2] ethtool:QSFP Plus/QSFP28 Diagnostics Information Support

2016-06-26 Thread Ben Hutchings
On Mon, 2016-06-27 at 00:02 +0200, Ben Hutchings wrote: > On Sun, 2016-06-26 at 09:40 -0700, Vidya Sagar Ravipati wrote: > > On Sun, Jun 26, 2016 at 2:33 AM, Ben Hutchings wrote: > [...] > > > This looks very similar to sff8472_diags, only with the actual values > > >

Re: [ethtool PATCH v1 2/2] ethtool:QSFP Plus/QSFP28 Diagnostics Information Support

2016-06-26 Thread Ben Hutchings
On Sun, 2016-06-26 at 09:40 -0700, Vidya Sagar Ravipati wrote: > On Sun, Jun 26, 2016 at 2:33 AM, Ben Hutchings wrote: [...] > > This looks very similar to sff8472_diags, only with the actual values > > separated from the arrays of thresholds. > > > > Can the structur

ethtool needs a new maintainer

2016-06-26 Thread Ben Hutchings
onventional sub-command syntax, i.e. no '-'/'--' prefix   - More consistent output formatting Ben. -- Ben Hutchings compatible: Gracefully accepts erroneous data from any source signature.asc Description: This is a digitally signed message part

ethtool 4.6 released

2016-06-26 Thread Ben Hutchings
not available Ben. -- Ben Hutchings compatible: Gracefully accepts erroneous data from any source signature.asc Description: This is a digitally signed message part

[PATCH ethtool 2/2] ethtool.8.in, ethtool.c: Add myself to authors and copyright notices

2016-06-26 Thread Ben Hutchings
Signed-off-by: Ben Hutchings --- ethtool.8.in | 3 ++- ethtool.c| 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ethtool.8.in b/ethtool.8.in index 9dc5e252a1dc..e08c9a714551 100644 --- a/ethtool.8.in +++ b/ethtool.8.in @@ -947,7 +947,8 @@ Scott Feldman, Andi Kleen

[PATCH ethtool 1/2] configure.ac: Remove feature test for

2016-06-26 Thread Ben Hutchings
has been a hard dependency for as back as git history goes (2005, shortly after version 3). Signed-off-by: Ben Hutchings --- I spotted this while reviewing David Decotigny's patch to use netlink sockets. Ben. configure.ac | 1 - 1 file changed, 1 deletion(-) diff --git a/configure

Re: [PATCH 2/5] ethtool: move cmdline_coalesce out of do_scoalesce

2016-06-26 Thread Ben Hutchings
rames_low }, > - { "rx-usecs-high", CMDL_S32, &coal_rx_usec_high_wanted, > -   &ecoal.rx_coalesce_usecs_high }, > - { "rx-frames-high", CMDL_S32, &coal_rx_frames_high_wanted, > -   &ecoal.rx_max_co

Re: [ethtool PATCH v1 2/2] ethtool:QSFP Plus/QSFP28 Diagnostics Information Support

2016-06-26 Thread Ben Hutchings
sff8636_channel_diags scd[MAX_CHANNEL_NUM]; > +}; [...] > --- /dev/null > +++ b/sff-common.c [...] > +double convert_mw_to_dbm(double mw) > +{ > + return (10. * log10(mw / 1000.)) + 30.; > +} [...] This is copied from sfpdiag.c, so you should make that file use it rather than a duplicate definition. Ben. -- Ben Hutchings compatible: Gracefully accepts erroneous data from any source signature.asc Description: This is a digitally signed message part

Re: [ethtool 0/3][pull request] Intel Wired LAN Driver Updates 2016-05-03

2016-06-26 Thread Ben Hutchings
++--------- >  1 file changed, 95 insertions(+), 78 deletions(-) > -- Ben Hutchings compatible: Gracefully accepts erroneous data from any source signature.asc Description: This is a digitally signed message part

Re: [PATCH ethtool] ethtool.c: fix memory leaks

2016-06-26 Thread Ben Hutchings
return 1; >   } >   if (strings->len > 32) { > @@ -3836,6 +3862,7 @@ static int do_sprivflags(struct cmd_context > *ctx) >   cmdline = calloc(strings->len, sizeof(*cmdline)); >   if (!cmdline) { >   perror("Cannot parse arguments"); > + free(strings); >   return 1; >   } >   for (i = 0; i < strings->len; i++) { > @@ -3852,6 +3879,7 @@ static int do_sprivflags(struct cmd_context > *ctx) >   flags.cmd = ETHTOOL_GPFLAGS; >   if (send_ioctl(ctx, &flags)) { >   perror("Cannot get private flags"); > + free(strings); >   return 1; >   } >   > @@ -3859,9 +3887,11 @@ static int do_sprivflags(struct cmd_context > *ctx) >   flags.data = (flags.data & ~seen_flags) | wanted_flags; >   if (send_ioctl(ctx, &flags)) { >   perror("Cannot set private flags"); > + free(strings); >   return 1; >   } >   > + free(strings); >   return 0; >  } >   -- Ben Hutchings compatible: Gracefully accepts erroneous data from any source signature.asc Description: This is a digitally signed message part

Re: [ethtool PATCH v7 2/2] ethtool: use netlink socket when AF_INET not available

2016-06-26 Thread Ben Hutchings
 #define MAX_ADDR_LEN 32 > @@ -4645,6 +4648,10 @@ opt_found: >   >   /* Open control socket. */ >   ctx.fd = socket(AF_INET, SOCK_DGRAM, 0); > +#ifdef HAVE_LINUX_NETLINK_H > + if (ctx.fd < 0) > + ctx.fd = socket(AF_NETLINK, SOCK_

Re: [ethtool PATCH v7 1/2] ethtool.c: add support for ETHTOOL_xLINKSETTINGS ioctls

2016-06-26 Thread Ben Hutchings
t; commit 793cf87de9d1 ("Set cmd field in ETHTOOL_GLINKSETTINGS response to > wrong nwords"). [...] Applied, with some style changes. Thanks for your patience. Ben. -- Ben Hutchings compatible: Gracefully accepts erroneous data from any source signature.asc Description: This is a digitally signed message part

Re: [PATCH v2 ethtool 0/2] IPv6 RXNFC

2016-06-25 Thread Ben Hutchings
just make the documentation harder to read. Signed-off-by: Ben Hutchings --- ethtool.8.in | 2 +- ethtool.c| 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ethtool.8.in b/ethtool.8.in index 36da10ed6c87..9dc5e252a1dc 100644 --- a/ethtool.8.in +++ b/ethtool.8.in @@ -54,7

[PATCH net-next] of_mdio: Enable fixed PHY support if driver is a module

2016-06-20 Thread Ben Hutchings
The fixed_phy driver doesn't have to be built-in, and it's important that of_mdio supports it even if it's a module. Signed-off-by: Ben Hutchings --- Re-sending with the proper subject prefix. Ben. --- a/drivers/of/of_mdio.c +++ b/drivers/of/of_mdio.c @@ -274,7 +274,7 @@ st

[PATCH net-next] ti_cpsw: Check for disabled child nodes

2016-06-20 Thread Ben Hutchings
Dual MAC devices don't necessarily have both MACs wired up, so ignore those that are disabled. Signed-off-by: Ben Hutchings --- --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -2023,7 +2023,7 @@ static int cpsw_probe_dt(struct cpsw_pri if

of_mdio: Enable fixed PHY support if driver is a module

2016-06-20 Thread Ben Hutchings
The fixed_phy driver doesn't have to be built-in, and it's important that of_mdio supports it even if it's a module. Signed-off-by: Ben Hutchings --- --- a/drivers/of/of_mdio.c +++ b/drivers/of/of_mdio.c @@ -274,7 +274,7 @@ struct phy_device *of_phy_attach(struct } EXPORT_SYMBO

Re: [PATCH net-next] net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)

2016-06-16 Thread Ben Hutchings
na_store_small_copy_len); > > This is what many other drivers call (rx_)copybreak. Perhaps it's time > to add it to ethtool as well? [...] There is the 'tunable' ethtool API for random parameters like rx_copybreak.  The ethtool utility doesn't su

Re: [PATCH net-next v4 5/7] vmxnet3: add support for get_coalesce, set_coalesce ethtool operations

2016-06-14 Thread Ben Hutchings
On Tue, 2016-06-14 at 11:52 -0700, Shrikrishna Khare wrote: > Signed-off-by: Keyong Sun > Signed-off-by: Manoj Tammali > Signed-off-by: Shrikrishna Khare Reviewed-by: Ben Hutchings > --- > v1-v2: v1 patch used special values of rx-usecs to differentiate between > coalesc

Re: [PATCH net-next v3 5/7] vmxnet3: add support for get_coalesce, set_coalesce ethtool operations

2016-06-14 Thread Ben Hutchings
0, sizeof(struct ethtool_coalesce)); [...] The ethtool core already clears the structure, and it sets the cmd field properly.  This memset() should be removed. Otherwise I think this is fine. Ben.   -- Ben Hutchings We get into the habit

Re: [PATCH net-next] ethtool: Macro definition for SFF-8436/8636 Memory map max sizes

2016-06-12 Thread Ben Hutchings
the eeprom request. > > Putting endless values for each and every eeprom type a device has is > just rediculous. > > I'm not going to continue promoting this broken and unscalable scheme, > we have to fix this. I don't think there's nothing broken here.  ethtool

Re: [PATCH net-next] ethtool: Macro definition for SFF-8436/8636 Memory map max sizes

2016-06-12 Thread Ben Hutchings
be the size by repeated eeprom calls, increasing > the buffer size each time as needed until success. But really it should use ETHTOOL_GMODULEINFO first. Ben. -- Ben Hutchings The program is absolutely right; therefore, the computer must be wrong. signature.asc Description: This is a di

Re: [RFC net-next 1/1] ethtool: Add support for set eeprom metadata.

2016-06-05 Thread Ben Hutchings
ll EEPROM. > I agree we can go and do everything via MTD; The reason we've tried using this > API was mainly... because it was there. And thus we thought this is the RIGHT > method for providing users the way of reading their flash. [...] I think tha

Re: [RFC net-next 1/1] ethtool: Add support for set eeprom metadata.

2016-06-05 Thread Ben Hutchings
g MTD instead.  These can be enumerated (through /proc/mtd or sysfs) and they can be read and written through block devices. Ben. -- Ben Hutchings Everything should be made as simple as possible, but not simpler.    - Albert Einstein signature.asc Description: This is a digitally signed message part

Re: [PATCH net-next 2/2] bgmac: Add support for ethtool statistics

2016-06-03 Thread Ben Hutchings
; + val = (u64)bgmac_read(bgmac, s->offset + 4); Isn't this missing a << 32? Does reading the high 32 bits latch the value of the low 32 bits?  If not, you need to read the high bits again after the low bits and retry if they changed. > + val |=

Re: [PATCH] ethtool: fix a kernel infoleak in ethtool_get_pauseparam

2016-06-01 Thread Ben Hutchings
t_device *dev, void > __user *useraddr) >  { > - struct ethtool_pauseparam pauseparam = { ETHTOOL_GPAUSEPARAM > }; > + struct ethtool_pauseparam pauseparam; > + > + memset(&pauseparam, 0, sizeof(pauseparam)); > + pauseparam.cmd = ETHTOOL_GPAUSEPARAM; >   >   if

Re: [RESEND] Re: updating carl9170-1.fw in linux-firmware.git

2016-05-25 Thread Ben Hutchings
t realise that. > So, why is there no source in the tree, but just the link to it? An oversight which we need to fix. > Because, I would like to do basically the same > for carl9170fw and just add a link to the carl9170fw repository and > save everyone this source update "song and dan

Re: [ethtool 0/3][pull request] Intel Wired LAN Driver Updates 2016-05-03

2016-05-25 Thread Ben Hutchings
ntainer. Ben. > I know we discussed last netconf that we should look at possibly a new tool > to address the shortcomings of ethtool, but I was not aware we had > abandoned maintaining the current ethtool already before any replacement > tool has been developed. -- Ben Hutchings Time is nature's way of making sure that everything doesn't happen at once. signature.asc Description: This is a digitally signed message part

  1   2   3   >