Re: [PATCH] wl1251: Fix possible buffer overflow in wl1251_cmd_scan

2021-04-17 Thread Kalle Valo
Lee Gibson writes: > Function wl1251_cmd_scan calls memcpy without checking the length. > A user could control that length and trigger a buffer overflow. > Fix by checking the length is within the maximum allowed size. > > Signed-off-by: Lee Gibson Please fix the commit log, the user cannot con

Re: [PATCH] wil6210: wmi: Remove useless code

2021-04-17 Thread Kalle Valo
Jiapeng Chong wrote: > Fix the following whitescan warning: > > An unsigned value can never be less than 0. > > Reported-by: Abaci Robot > Signed-off-by: Jiapeng Chong Patch applied to wireless-drivers-next.git, thanks. 5e6087559e85 wil6210: wmi: Remove useless code -- https://patchwork.k

Re: [PATCH] carl9170: remove get_tid_h

2021-04-17 Thread Kalle Valo
Christophe JAILLET wrote: > 'get_tid_h()' is the same as 'ieee80211_get_tid()'. > So this function can be removed to save a few lines of code. > > Signed-off-by: Christophe JAILLET > Acked-by: Christian Lamparter Patch applied to wireless-drivers-next.git, thanks. cf366b154704 carl9170: remo

Re: mwl8k: Fix a double Free in mwl8k_probe_hw

2021-04-17 Thread Kalle Valo
Lv Yunlong wrote: > In mwl8k_probe_hw, hw->priv->txq is freed at the first time by > dma_free_coherent() in the call chain: > if(!priv->ap_fw)->mwl8k_init_txqs(hw)->mwl8k_txq_init(hw, i). > > Then in err_free_queues of mwl8k_probe_hw, hw->priv->txq is freed > at the second time by mwl8k_txq_dein

Re: [1/4] brcmfmac: Remove duplicate struct declaration

2021-04-17 Thread Kalle Valo
Wan Jiabing wrote: > struct brcmf_bus is declared twice. One has been declared > at 37th line. Remove the duplicate. > > Signed-off-by: Wan Jiabing 2 patches applied to wireless-drivers-next.git, thanks. d663bc3317c9 brcmfmac: Remove duplicate struct declaration 444a9af68b5c wilc1000: Remove

Re: [2/2] wl3501: fix typo of 'Networks' in comment

2021-04-17 Thread Kalle Valo
Eric Lin wrote: > Signed-off-by: Eric Lin > Reported-by: Gustavo A. R. Silva Patch applied to wireless-drivers-next.git, thanks. 7f50ddc5d4fe wl3501: fix typo of 'Networks' in comment -- https://patchwork.kernel.org/project/linux-wireless/patch/20210331010418.1632816-2-dslin1...@gmail.com/

Re: [PATCH] rsi: Use resume_noirq for SDIO

2021-04-17 Thread Kalle Valo
Marek Vasut wrote: > The rsi_resume() does access the bus to enable interrupts on the RSI > SDIO WiFi card, however when calling sdio_claim_host() in the resume > path, it is possible the bus is already claimed and sdio_claim_host() > spins indefinitelly. Enable the SDIO card interrupts in resume

Re: libertas: struct lbs_private is declared duplicately

2021-04-17 Thread Kalle Valo
Wan Jiabing wrote: > struct lbs_private has been declared at 22nd line. > Remove the duplicate. > > Signed-off-by: Wan Jiabing Patch applied to wireless-drivers-next.git, thanks. d3240418a662 libertas: struct lbs_private is declared duplicately -- https://patchwork.kernel.org/project/linux-

Re: [PATCH] brcmfmac: A typo fix

2021-04-17 Thread Kalle Valo
Bhaskar Chowdhury wrote: > s/revsion/revision/ > > Signed-off-by: Bhaskar Chowdhury Patch applied to wireless-drivers-next.git, thanks. 705b5cfab183 brcmfmac: A typo fix -- https://patchwork.kernel.org/project/linux-wireless/patch/20210323043657.1466296-1-unixbhas...@gmail.com/ https://wir

Re: [PATCH v2] rsi: fix comment syntax in file headers

2021-04-17 Thread Kalle Valo
Aditya Srivastava wrote: > The opening comment mark '/**' is used for highlighting the beginning of > kernel-doc comments. > There are some files in drivers/net/wireless/rsi which follow this syntax > in their file headers, i.e. start with '/**' like comments, which causes > unexpected warnings f

Re: [PATCH] hostap: Fix memleak in prism2_config

2021-04-17 Thread Kalle Valo
Dinghao Liu wrote: > When prism2_hw_config() fails, we just return an error code > without any resource release, which may lead to memleak. > > Signed-off-by: Dinghao Liu Nobody reviewed this, so dropping the patch. Patch set to Changes Requested. -- https://patchwork.kernel.org/project/lin

Re: [PATCH] brcmsmac: fix shift on 4 bit masked value

2021-04-17 Thread Kalle Valo
Colin King wrote: > From: Colin Ian King > > The calculation of offtune_val seems incorrect, the u16 value in > pi->tx_rx_cal_radio_saveregs[2] is being masked with 0xf0 and then > shifted 8 places right so that always ends up as a zero result. I > believe the intended shift was 4 bits to the r

Re: [PATCH] rsi: fix error return code of rsi_load_9116_firmware()

2021-04-17 Thread Kalle Valo
Jia-Ju Bai wrote: > When kmemdup() returns NULL to ta_firmware, no error return code of > rsi_load_9116_firmware() is assigned. > To fix this bug, status is assigned with -ENOMEM in this case. > > Reported-by: TOTE Robot > Signed-off-by: Jia-Ju Bai Someone needs to review this. Patch set to

Re: [PATCH] ti: wlcore: fix error return code of wl1271_cmd_build_ps_poll()

2021-04-17 Thread Kalle Valo
Jia-Ju Bai wrote: > When ieee80211_pspoll_get() returns NULL to skb, no error return code of > wl1271_cmd_build_ps_poll() is assigned. > To fix this bug, ret is assigned with -ENOMEM in this case. > > Reported-by: TOTE Robot > Signed-off-by: Jia-Ju Bai Someone needs to review this. Patch set

Re: [PATCH] ti: wlcore: fix error return code of wl1271_suspend()

2021-04-17 Thread Kalle Valo
Jia-Ju Bai wrote: > When wl is NULL, no error return code of wl1271_suspend() is assigned. > To fix this bug, ret is assigned with -EINVAL in this case. > > Reported-by: TOTE Robot > Signed-off-by: Jia-Ju Bai Someone needs to review this. Patch set to Changes Requested. -- https://patchwor

Re: [PATCH] marvell: libertas_tf: fix error return code of if_usb_prog_firmware()

2021-04-17 Thread Kalle Valo
Jia-Ju Bai wrote: > When check_fwfile_format() fails, no error return code of > if_usb_prog_firmware() is assigned. > To fix this bug, ret is assigned with -EINVAL as error return code. > > Reported-by: TOTE Robot > Signed-off-by: Jia-Ju Bai Someone needs to review this. Patch set to Changes

Re: PROBLEM: DoS Attack on Fragment Cache

2021-04-17 Thread Willy Tarreau
On Sat, Apr 17, 2021 at 10:26:30PM -0400, Matt Corallo wrote: > Sure, there are better ways to handle the reassembly cache overflowing, but > that is pretty unrelated to the fact that waiting 30 full seconds for a > fragment to come in doesn't really make sense in today's networks (the 30 > second

Re: [PATCH rdma-next v2 0/5] Get rid of custom made module dependency

2021-04-17 Thread Leon Romanovsky
On Sun, Apr 18, 2021 at 12:09:16AM +0530, Devesh Sharma wrote: > On Sat, Apr 17, 2021 at 1:44 PM Leon Romanovsky wrote: > > > > On Wed, Apr 14, 2021 at 07:15:37PM +0530, Devesh Sharma wrote: > > > On Mon, Apr 12, 2021 at 1:10 PM Leon Romanovsky wrote: > > > > > > > > On Thu, Apr 08, 2021 at 08:42

[PATCH iproute2] ip: drop 2-char command assumption

2021-04-17 Thread Tony Ambardar
The 'ip' utility hardcodes the assumption of being a 2-char command, where any follow-on characters are passed as an argument: $ ./ip-full help Object "-full" is unknown, try "ip help". This confusing behaviour isn't seen with 'tc' for example, and was added in a 2005 commit without documenta

Re: PROBLEM: DoS Attack on Fragment Cache

2021-04-17 Thread Matt Corallo
Sure, there are better ways to handle the reassembly cache overflowing, but that is pretty unrelated to the fact that waiting 30 full seconds for a fragment to come in doesn't really make sense in today's networks (the 30 second delay that is used today appears to even be higher than RFC 791 sugg

Re: PROBLEM: DoS Attack on Fragment Cache

2021-04-17 Thread Keyu Man
Willy's words make sense to me and I agree that the existing fragments should be evicted when the new one comes in and the cache is full. Though the attacker can still leverage this to flush the victim's cache, as mentioned previously, since fragments are likely to be assembled in a very short time

Re: PROBLEM: DoS Attack on Fragment Cache

2021-04-17 Thread Matt Corallo
See-also "[PATCH] Reduce IP_FRAG_TIME fragment-reassembly timeout to 1s, from 30s" (and the two resends of it) - given the size of the default cache (4MB) and the time that it takes before we flush the cache (30 seconds) you only need about 1Mbps of fragments to hit this issue. While DoS attacks

[RESEND 2] [PATCH net] Reduce IP_FRAG_TIME fragment-reassembly timeout to 1s, from 30s

2021-04-17 Thread Matt Corallo
The default IP reassembly timeout of 30 seconds predates git history (and cursory web searches turn up nothing related to it). The only relevant source cited in net/ipv4/ip_fragment.c is RFC 791 defining IPv4 in 1981. RFC 791 suggests allowing the timer to increase on the receipt of each fragment

Re: [PATCH RESEND][next] rtl8xxxu: Fix fall-through warnings for Clang

2021-04-17 Thread Joe Perches
On Sat, 2021-04-17 at 14:30 -0400, Jes Sorensen wrote: > On 4/17/21 1:52 PM, Kalle Valo wrote: > > "Gustavo A. R. Silva" wrote: > > > > > In preparation to enable -Wimplicit-fallthrough for Clang, fix > > > multiple warnings by replacing /* fall through */ comments with > > > the new pseudo-keywo

Re: [RFC iproute2-next v2] seg6: add counters support for SRv6 Behaviors

2021-04-17 Thread Paolo Lungaroni
Quoting Stephen Hemminger : On Thu, 15 Apr 2021 20:06:43 +0200 Paolo Lungaroni wrote: + if (is_json_context()) + open_json_object("stats64"); + + if (tb[SEG6_LOCAL_CNT_PACKETS]) { + packets = rta_getattr_u64(tb[SEG6_LOCAL_CNT_PACKETS]); +

Re: [PATCH 1/2] mm: Fix struct page layout on 32-bit systems

2021-04-17 Thread Matthew Wilcox
On Sat, Apr 17, 2021 at 09:18:57PM +, David Laight wrote: > Ugly as well. Thank you for expressing your opinion. Again.

Re: [PATCH 2/2] mm: Indicate pfmemalloc pages in compound_head

2021-04-17 Thread Matthew Wilcox
On Sat, Apr 17, 2021 at 09:13:45PM +, David Laight wrote: > > struct {/* page_pool used by netstack */ > > - /** > > -* @dma_addr: might require a 64-bit value on > > -* 32-bit architectures. > > -

RE: [PATCH 1/2] mm: Fix struct page layout on 32-bit systems

2021-04-17 Thread David Laight
From: Matthew Wilcox > Sent: 17 April 2021 03:45 > > Replacement patch to fix compiler warning. ... > static inline dma_addr_t page_pool_get_dma_addr(struct page *page) > { > - return page->dma_addr; > + dma_addr_t ret = page->dma_addr[0]; > + if (sizeof(dma_addr_t) > sizeof(unsigne

RE: [PATCH 2/2] mm: Indicate pfmemalloc pages in compound_head

2021-04-17 Thread David Laight
From: Matthew Wilcox (Oracle) > Sent: 17 April 2021 00:07 > > The net page_pool wants to use a magic value to identify page pool pages. > The best place to put it is in the first word where it can be clearly a > non-pointer value. That means shifting dma_addr up to alias with ->index, > which me

Re: [PATCH 1/2] mm: Fix struct page layout on 32-bit systems

2021-04-17 Thread Matthew Wilcox
On Sat, Apr 17, 2021 at 09:32:06PM +0300, Ilias Apalodimas wrote: > > +static inline void page_pool_set_dma_addr(struct page *page, dma_addr_t > > addr) > > +{ > > + page->dma_addr[0] = addr; > > + if (sizeof(dma_addr_t) > sizeof(unsigned long)) > > + page->dma_addr[1] = addr >> 16 >

Re: [PATCH net-next v2 3/9] ethtool: add a new command for reading standard stats

2021-04-17 Thread Michal Kubecek
On Sat, Apr 17, 2021 at 12:18:08PM -0700, Jakub Kicinski wrote: > On Sat, 17 Apr 2021 12:15:20 -0700 Jakub Kicinski wrote: > > On Sat, 17 Apr 2021 21:53:40 +0300 Ido Schimmel wrote: > > > On Sat, Apr 17, 2021 at 11:13:51AM -0700, Jakub Kicinski wrote: > > > > On Sat, 17 Apr 2021 10:57:42 -0700 Ja

Re: [PATCH RESEND][next] rtl8xxxu: Fix fall-through warnings for Clang

2021-04-17 Thread Gustavo A. R. Silva
On 4/17/21 13:29, Jes Sorensen wrote: > On 3/10/21 3:59 PM, Kees Cook wrote: >> On Wed, Mar 10, 2021 at 02:51:24PM -0500, Jes Sorensen wrote: >>> On 3/10/21 2:45 PM, Kees Cook wrote: On Wed, Mar 10, 2021 at 02:31:57PM -0500, Jes Sorensen wrote: > On 3/10/21 2:14 PM, Kees Cook wrote: >>>

Re: [RFC ethtool 6/6] netlink: add support for standard stats

2021-04-17 Thread Jakub Kicinski
On Sat, 17 Apr 2021 22:22:57 +0300 Ido Schimmel wrote: > > > So you will have something like: > > > > > > ETHTOOL_A_STATS_GRP_HIST_BKT_UNITS_BYTES > > > > Histogram has two dimensions, what's the second dimension for bytes? > > Time? Packet arrival? > > Not sure what you mean. Here you are c

Re: [PATCH net-next v2 3/9] ethtool: add a new command for reading standard stats

2021-04-17 Thread Ido Schimmel
On Sat, Apr 17, 2021 at 12:18:08PM -0700, Jakub Kicinski wrote: > On Sat, 17 Apr 2021 12:15:20 -0700 Jakub Kicinski wrote: > > On Sat, 17 Apr 2021 21:53:40 +0300 Ido Schimmel wrote: > > > On Sat, Apr 17, 2021 at 11:13:51AM -0700, Jakub Kicinski wrote: > > > > On Sat, 17 Apr 2021 10:57:42 -0700 Ja

Re: [RFC ethtool 6/6] netlink: add support for standard stats

2021-04-17 Thread Ido Schimmel
On Sat, Apr 17, 2021 at 11:47:28AM -0700, Jakub Kicinski wrote: > On Sat, 17 Apr 2021 21:14:40 +0300 Ido Schimmel wrote: > > > + if (!is_json_context()) { > > > + fprintf(stdout, "rmon-%s-etherStatsPkts", > > > + mnl_attr_get_type(hist) == ETHTOOL_A_STATS_GRP_HIST_RX ? > > >

Re: [PATCH net-next v2 3/9] ethtool: add a new command for reading standard stats

2021-04-17 Thread Jakub Kicinski
On Sat, 17 Apr 2021 12:15:20 -0700 Jakub Kicinski wrote: > On Sat, 17 Apr 2021 21:53:40 +0300 Ido Schimmel wrote: > > On Sat, Apr 17, 2021 at 11:13:51AM -0700, Jakub Kicinski wrote: > > > On Sat, 17 Apr 2021 10:57:42 -0700 Jakub Kicinski wrote: > > > > > > FWIW ethnl_parse_bit() -> ETHTOOL_A_

Re: [PATCH net-next v2 3/9] ethtool: add a new command for reading standard stats

2021-04-17 Thread Jakub Kicinski
On Sat, 17 Apr 2021 21:53:40 +0300 Ido Schimmel wrote: > On Sat, Apr 17, 2021 at 11:13:51AM -0700, Jakub Kicinski wrote: > > On Sat, 17 Apr 2021 10:57:42 -0700 Jakub Kicinski wrote: > > > Um, yes and now. The only places the user space puts those names > > > is the help message and man page. > >

Re: [PATCH net-next v2 3/9] ethtool: add a new command for reading standard stats

2021-04-17 Thread Ido Schimmel
On Sat, Apr 17, 2021 at 11:13:51AM -0700, Jakub Kicinski wrote: > On Sat, 17 Apr 2021 10:57:42 -0700 Jakub Kicinski wrote: > > > I tried to understand how you add new groups without user space > > > changes and I think this statement is not entirely accurate. > > > > > > At minimum, user space nee

Re: [RFC ethtool 6/6] netlink: add support for standard stats

2021-04-17 Thread Jakub Kicinski
On Sat, 17 Apr 2021 21:14:40 +0300 Ido Schimmel wrote: > > + if (!is_json_context()) { > > + fprintf(stdout, "rmon-%s-etherStatsPkts", > > + mnl_attr_get_type(hist) == ETHTOOL_A_STATS_GRP_HIST_RX ? > > + "rx" : "tx"); > > + > > + if (low &&

Re: [PATCH rdma-next v2 0/5] Get rid of custom made module dependency

2021-04-17 Thread Devesh Sharma
On Sat, Apr 17, 2021 at 1:44 PM Leon Romanovsky wrote: > > On Wed, Apr 14, 2021 at 07:15:37PM +0530, Devesh Sharma wrote: > > On Mon, Apr 12, 2021 at 1:10 PM Leon Romanovsky wrote: > > > > > > On Thu, Apr 08, 2021 at 08:42:57PM +0530, Devesh Sharma wrote: > > > > On Thu, Apr 8, 2021 at 5:14 PM Le

Re: [PATCH 1/2] mm: Fix struct page layout on 32-bit systems

2021-04-17 Thread Ilias Apalodimas
Hi Matthew, On Sat, Apr 17, 2021 at 03:45:22AM +0100, Matthew Wilcox wrote: > > Replacement patch to fix compiler warning. > > From: "Matthew Wilcox (Oracle)" > Date: Fri, 16 Apr 2021 16:34:55 -0400 > Subject: [PATCH 1/2] mm: Fix struct page layout on 32-bit systems > To: bro...@redhat.com > Cc

Re: [PATCH RESEND][next] rtl8xxxu: Fix fall-through warnings for Clang

2021-04-17 Thread Jes Sorensen
On 4/17/21 1:52 PM, Kalle Valo wrote: > "Gustavo A. R. Silva" wrote: > >> In preparation to enable -Wimplicit-fallthrough for Clang, fix >> multiple warnings by replacing /* fall through */ comments with >> the new pseudo-keyword macro fallthrough; instead of letting the >> code fall through to t

Re: [PATCH RESEND][next] rtl8xxxu: Fix fall-through warnings for Clang

2021-04-17 Thread Jes Sorensen
On 3/10/21 3:59 PM, Kees Cook wrote: > On Wed, Mar 10, 2021 at 02:51:24PM -0500, Jes Sorensen wrote: >> On 3/10/21 2:45 PM, Kees Cook wrote: >>> On Wed, Mar 10, 2021 at 02:31:57PM -0500, Jes Sorensen wrote: On 3/10/21 2:14 PM, Kees Cook wrote: > Hm, this conversation looks like a miscommun

Re: [RFC ethtool 6/6] netlink: add support for standard stats

2021-04-17 Thread Ido Schimmel
On Fri, Apr 16, 2021 at 09:02:52AM -0700, Jakub Kicinski wrote: > # ethtool -S eth0 --groups eth-phy eth-mac rmon > Stats for eth0: > eth-phy-SymbolErrorDuringCarrier: 1 > eth-mac-FramesTransmittedOK: 1 > eth-mac-FrameTooLongErrors: 1 > rmon-etherStatsUndersizePkts: 1 > rmon-etherStatsJabbers: 1 >

Re: [PATCH net-next v2 3/9] ethtool: add a new command for reading standard stats

2021-04-17 Thread Jakub Kicinski
On Sat, 17 Apr 2021 10:57:42 -0700 Jakub Kicinski wrote: > > I tried to understand how you add new groups without user space > > changes and I think this statement is not entirely accurate. > > > > At minimum, user space needs to know the names of these groups, but > > currently there is no way to

Re: rtlwifi/rtl8192cu AP mode broken with PS STA

2021-04-17 Thread Maciej S. Szmigiero
On 08.04.2021 21:04, Maciej S. Szmigiero wrote: On 08.04.2021 06:42, Pkshih wrote: -Original Message- From: Maciej S. Szmigiero [mailto:m...@maciej.szmigiero.name] Sent: Thursday, April 08, 2021 4:53 AM To: Larry Finger; Pkshih Cc: linux-wirel...@vger.kernel.org; netdev@vger.kernel.org;

Re: [PATCH net-next] airo: work around stack usage warning

2021-04-17 Thread Kalle Valo
Arnd Bergmann wrote: > From: Arnd Bergmann > > gcc-11 with KASAN on 32-bit arm produces a warning about a function > that needs a lot of stack space: > > drivers/net/wireless/cisco/airo.c: In function 'setup_card.constprop': > drivers/net/wireless/cisco/airo.c:3960:1: error: the frame size of

Re: [PATCH net-next] wlcore: fix overlapping snprintf arguments in debugfs

2021-04-17 Thread Kalle Valo
Arnd Bergmann wrote: > From: Arnd Bergmann > > gcc complains about undefined behavior in calling snprintf() > with the same buffer as input and output: > > drivers/net/wireless/ti/wl18xx/debugfs.c: In function > 'diversity_num_of_packets_per_ant_read': > drivers/net/wireless/ti/wl18xx/../wlco

Re: [PATCH net-next 4/5] libertas: avoid -Wempty-body warning

2021-04-17 Thread Kalle Valo
Arnd Bergmann wrote: > From: Arnd Bergmann > > Building without mesh supports shows a couple of warnings with > 'make W=1': > > drivers/net/wireless/marvell/libertas/main.c: In function 'lbs_start_card': > drivers/net/wireless/marvell/libertas/main.c:1068:37: error: suggest braces > around em

Re: [PATCH net-next v2 3/9] ethtool: add a new command for reading standard stats

2021-04-17 Thread Jakub Kicinski
On Sat, 17 Apr 2021 20:15:11 +0300 Ido Schimmel wrote: > On Fri, Apr 16, 2021 at 12:27:39PM -0700, Jakub Kicinski wrote: > > Add an interface for reading standard stats, including > > stats which don't have a corresponding control interface. > > > > Start with IEEE 802.3 PHY stats. There seems to

Re: [PATCH] rtl8xxxu: Simplify locking of a skb list accesses

2021-04-17 Thread Kalle Valo
Christophe JAILLET wrote: > The 'c2hcmd_lock' spinlock is only used to protect some __skb_queue_tail() > and __skb_dequeue() calls. > Use the lock provided in the skb itself and call skb_queue_tail() and > skb_dequeue(). These functions already include the correct locking. > > Signed-off-by: Chr

Re: [PATCH] mwifiex: Remove unneeded variable: "ret"

2021-04-17 Thread Kalle Valo
zuoqil...@163.com wrote: > From: zuoqilin > > Remove unneeded variable: "ret" > > Signed-off-by: zuoqilin Patch applied to wireless-drivers-next.git, thanks. c81852a48e13 mwifiex: Remove unneeded variable: "ret" -- https://patchwork.kernel.org/project/linux-wireless/patch/20210317063353.10

Re: [PATCH RESEND][next] rtl8xxxu: Fix fall-through warnings for Clang

2021-04-17 Thread Kalle Valo
"Gustavo A. R. Silva" wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix > multiple warnings by replacing /* fall through */ comments with > the new pseudo-keyword macro fallthrough; instead of letting the > code fall through to the next case. > > Notice that Clang doesn't r

Re: [PATCH net-next] rtlwifi: rtl8192de: Use DEFINE_SPINLOCK() for spinlock

2021-04-17 Thread Kalle Valo
Huang Guobin wrote: > From: Guobin Huang > > spinlock can be initialized automatically with DEFINE_SPINLOCK() > rather than explicitly calling spin_lock_init(). > > Reported-by: Hulk Robot > Signed-off-by: Guobin Huang Patch applied to wireless-drivers-next.git, thanks. e9642be26a37 rtlwif

Re: [PATCH v2] qtnfmac: remove meaningless goto statement and labels

2021-04-17 Thread Kalle Valo
samirweng1979 wrote: > From: wengjianfeng > > some function's label meaningless, the label statement follows > the goto statement, no other statements, so just remove it. > > Reported-by: kernel test robot > Signed-off-by: wengjianfeng Patch applied to wireless-drivers-next.git, thanks. fb

Re: [PATCH] rtlwifi: Simplify locking of a skb list accesses

2021-04-17 Thread Kalle Valo
Christophe JAILLET wrote: > The 'c2hcmd_lock' spinlock is only used to protect some __skb_queue_tail() > and __skb_dequeue() calls. > Use the lock provided in the skb itself and call skb_queue_tail() and > skb_dequeue(). These functions already include the correct locking. > > Signed-off-by: Chr

Re: [PATCH] rtlwifi: remove rtl_get_tid_h

2021-04-17 Thread Kalle Valo
Christophe JAILLET wrote: > 'rtl_get_tid_h()' is the same as 'ieee80211_get_tid()'. > So this function can be removed to save a line of code. > > Signed-off-by: Christophe JAILLET Patch applied to wireless-drivers-next.git, thanks. 987e9bcdd0b7 rtlwifi: remove rtl_get_tid_h -- https://patch

Re: [PATCH] rtlwifi: rtl8188ee: remove redundant assignment of variable rtlpriv->btcoexist.reg_bt_sco

2021-04-17 Thread Kalle Valo
Yang Li wrote: > Assigning value "3" to "rtlpriv->btcoexist.reg_bt_sco" here, but that > stored value is overwritten before it can be used. > > Coverity reports this problem as > CWE563: A value assigned to a variable is never used. > drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c: > rtl818

Re: [PATCH 1/1] mm: Fix struct page layout on 32-bit systems

2021-04-17 Thread Arnd Bergmann
On Sat, Apr 17, 2021 at 3:58 PM Matthew Wilcox wrote: > I wouldn't like to make that assumption. I've come across IOMMUs (maybe > on parisc? powerpc?) that like to encode fun information in the top > few bits. So we could get it down to 52 bits, but I don't think we can > get all the way down t

Re: [PATCH] rtlwifi: remove redundant assignment to variable err

2021-04-17 Thread Kalle Valo
Colin King wrote: > From: Colin Ian King > > Variable err is assigned -ENODEV followed by an error return path > via label error_out that does not access the variable and returns > with the -ENODEV error return code. The assignment to err is > redundant and can be removed. > > Addresses-Coveri

Re: [PATCH] rtlwifi: Few mundane typo fixes

2021-04-17 Thread Kalle Valo
Bhaskar Chowdhury wrote: > s/resovle/resolve/ > s/broadcase/broadcast/ > s/sytem/system/ > > Signed-off-by: Bhaskar Chowdhury > Acked-by: Randy Dunlap Patch applied to wireless-drivers-next.git, thanks. 2377b1c49d48 rtlwifi: Few mundane typo fixes -- https://patchwork.kernel.org/project/li

Re: [PATCH] qtnfmac: remove meaningless labels

2021-04-17 Thread Kalle Valo
samirweng1979 wrote: > From: wengjianfeng > > some function's label meaningless, the return statement follows > the goto statement, so just remove it. > > Signed-off-by: wengjianfeng > Reviewed-by: Sergey Matyukevich Patch applied to wireless-drivers-next.git, thanks. a221d0afbf39 qtnfmac:

Re: [PATCH] cw1200: Remove unused function pointer typedef wsm_*

2021-04-17 Thread Kalle Valo
Chen Lin wrote: > From: Chen Lin > > Remove the 'wsm_*' typedef as it is not used. > > Signed-off-by: Chen Lin Patch applied to wireless-drivers-next.git, thanks. 9dc5fdc8c4f8 cw1200: Remove unused function pointer typedef wsm_* -- https://patchwork.kernel.org/project/linux-wireless/patch

Re: [PATCH] cw1200: Remove unused function pointer typedef cw1200_wsm_handler

2021-04-17 Thread Kalle Valo
Chen Lin wrote: > From: Chen Lin > > Remove the 'cw1200_wsm_handler' typedef as it is not used. > > Signed-off-by: Chen Lin Patch applied to wireless-drivers-next.git, thanks. 1c22233a745e cw1200: Remove unused function pointer typedef cw1200_wsm_handler -- https://patchwork.kernel.org/pr

Re: [PATCH] qtnfmac: Fix possible buffer overflow in qtnf_event_handle_external_auth

2021-04-17 Thread Kalle Valo
Lee Gibson wrote: > Function qtnf_event_handle_external_auth calls memcpy without > checking the length. > A user could control that length and trigger a buffer overflow. > Fix by checking the length is within the maximum allowed size. > > Signed-off-by: Lee Gibson Please use clamp_val() inste

Re: [PATCH net-next v2 3/9] ethtool: add a new command for reading standard stats

2021-04-17 Thread Ido Schimmel
On Fri, Apr 16, 2021 at 12:27:39PM -0700, Jakub Kicinski wrote: > Add an interface for reading standard stats, including > stats which don't have a corresponding control interface. > > Start with IEEE 802.3 PHY stats. There seems to be only > one stat to expose there. > > Define API to not requir

Re: [PATCH bpf-next 11/15] bpf: Add bpf_sys_close() helper.

2021-04-17 Thread Alexei Starovoitov
On Sat, Apr 17, 2021 at 04:48:53PM +, Al Viro wrote: > On Sat, Apr 17, 2021 at 07:36:39AM -0700, Alexei Starovoitov wrote: > > > The kernel will perform the same work with FDs. The same locks are held > > and the same execution conditions are in both cases. The LSM hooks, > > fsnotify, etc wil

Re: [GIT PULL] Networking for 5.12-rc8

2021-04-17 Thread pr-tracker-bot
The pull request you sent on Fri, 16 Apr 2021 22:07:03 -0700: > git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git tags/net-5.12-rc8 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/88a5af943985fb43b4c9472b5abd9c0b9705533d Thank you! -- Deet-doot-dot, I am a

Re: [PATCH bpf-next 11/15] bpf: Add bpf_sys_close() helper.

2021-04-17 Thread Al Viro
On Sat, Apr 17, 2021 at 07:36:39AM -0700, Alexei Starovoitov wrote: > The kernel will perform the same work with FDs. The same locks are held > and the same execution conditions are in both cases. The LSM hooks, > fsnotify, etc will be called the same way. > It's no different if new syscall was in

Re: [PATCH v2] tools: do not include scripts/Kbuild.include

2021-04-17 Thread Masahiro Yamada
On Fri, Apr 16, 2021 at 10:01 PM Masahiro Yamada wrote: > > Since commit d9f4ff50d2aa ("kbuild: spilt cc-option and friends to > scripts/Makefile.compiler"), some kselftests fail to build. > > The tools/ directory opted out Kbuild, and went in a different > direction. They copy any kind of files t

Re: [PATCH bpf-next 11/15] bpf: Add bpf_sys_close() helper.

2021-04-17 Thread Alexei Starovoitov
On Fri, Apr 16, 2021 at 10:01:43PM -0700, Alexei Starovoitov wrote: > On Fri, Apr 16, 2021 at 9:04 PM Al Viro wrote: > > > > On Fri, Apr 16, 2021 at 08:46:05PM -0700, Alexei Starovoitov wrote: > > > On Fri, Apr 16, 2021 at 8:42 PM Al Viro wrote: > > > > > > > > On Fri, Apr 16, 2021 at 08:32:20PM

Re: [PATCH 1/1] mm: Fix struct page layout on 32-bit systems

2021-04-17 Thread Matthew Wilcox
On Sat, Apr 17, 2021 at 12:31:37PM +0200, Arnd Bergmann wrote: > On Fri, Apr 16, 2021 at 5:27 PM Matthew Wilcox wrote: > > diff --git a/include/net/page_pool.h b/include/net/page_pool.h > > index b5b195305346..db7c7020746a 100644 > > --- a/include/net/page_pool.h > > +++ b/include/net/page_pool.h

Re: [PATCH V3 5/5] arm64: dts: renesas: beacon kits: Setup AVB refclk

2021-04-17 Thread Adam Ford
On Thu, Mar 4, 2021 at 2:04 AM Geert Uytterhoeven wrote: > > On Wed, Feb 24, 2021 at 12:52 PM Adam Ford wrote: > > The AVB refererence clock assumes an external clock that runs > > reference > > > automatically. Because the Versaclock is wired to provide the > > AVB refclock, the device tree nee

[PATCH] net: ethernet: ravb: Fix release of refclk

2021-04-17 Thread Adam Ford
The call to clk_disable_unprepare() can happen before priv is initialized. This means moving clk_disable_unprepare out of out_release into a new label. Fixes: 8ef7adc6beb2("net: ethernet: ravb: Enable optional refclk") Signed-off-by: Adam Ford diff --git a/drivers/net/ethernet/renesas/ravb_main.

RE: Bogus struct page layout on 32-bit

2021-04-17 Thread David Laight
From: Grygorii Strashko > Sent: 16 April 2021 10:27 ... > Sry, for delayed reply. > > The TI platforms am3/4/5 (cpsw) and Keystone 2 (netcp) can do only 32bit DMA > even in case of LPAE > (dma-ranges are used). > Originally, as I remember, CONFIG_ARCH_DMA_ADDR_T_64BIT has not been selected > for

Re: [PATCH] net: fix a data race when get vlan device

2021-04-17 Thread zhudi (J)
> On 2021/4/16 11:27, zhudi (J) wrote: > >> dependencyOn 2021/4/15 11:35, zhudi wrote: > >>> From: Di Zhu > >>> > >>> We encountered a crash: in the packet receiving process, we got an > >>> illegal VLAN device address, but the VLAN device address saved in > >>> vmcore is correct. After checking t

Re: [PATCHv7 bpf-next 1/4] bpf: run devmap xdp_prog on flush instead of bulk enqueue

2021-04-17 Thread Toke Høiland-Jørgensen
"Paul E. McKenney" writes: > On Fri, Apr 16, 2021 at 11:22:52AM -0700, Martin KaFai Lau wrote: >> On Fri, Apr 16, 2021 at 03:45:23PM +0200, Jesper Dangaard Brouer wrote: >> > On Thu, 15 Apr 2021 17:39:13 -0700 >> > Martin KaFai Lau wrote: >> > >> > > On Thu, Apr 15, 2021 at 10:29:40PM +0200, To

[PATCH net-next] netlink: simplify nl_set_extack_cookie_u64(), nl_set_extack_cookie_u32()

2021-04-17 Thread Alexey Dobriyan
Taking address of a function argument directly works just fine. Signed-off-by: Alexey Dobriyan --- include/linux/netlink.h | 12 1 file changed, 4 insertions(+), 8 deletions(-) --- a/include/linux/netlink.h +++ b/include/linux/netlink.h @@ -129,23 +129,19 @@ struct netlink_ext_a

RE: [PATCH net-next v2 0/3] introduce skb_for_each_frag()

2021-04-17 Thread David Laight
From: Matteo Croce > Sent: 16 April 2021 23:44 ... > > A more interesting change would be something that generated: > > unsigned int nr_frags = skb_shinfo(skb)->nr_frags; > > for (i = 0; i < nr_frags; i++) { > > since that will run faster for most loops. > > But that is ~impossible

RE: [PATCH 1/1] mm: Fix struct page layout on 32-bit systems

2021-04-17 Thread David Laight
From: Matthew Wilcox > Sent: 16 April 2021 16:28 > > On Thu, Apr 15, 2021 at 08:08:32PM +0200, Jesper Dangaard Brouer wrote: > > See below patch. Where I swap32 the dma address to satisfy > > page->compound having bit zero cleared. (It is the simplest fix I could > > come up with). > > I think t

Re: [PATCH 1/1] mm: Fix struct page layout on 32-bit systems

2021-04-17 Thread Arnd Bergmann
On Fri, Apr 16, 2021 at 5:27 PM Matthew Wilcox wrote: > diff --git a/include/net/page_pool.h b/include/net/page_pool.h > index b5b195305346..db7c7020746a 100644 > --- a/include/net/page_pool.h > +++ b/include/net/page_pool.h > @@ -198,7 +198,17 @@ static inline void page_pool_recycle_direct(struct

Re: [PATCH v19 6/7] KVM: arm64: Add support for the KVM PTP service

2021-04-17 Thread Zenghui Yu
On 2021/4/17 17:10, Marc Zyngier wrote: On Sat, 17 Apr 2021 09:59:39 +0100, Zenghui Yu wrote: On 2021/3/30 22:54, Marc Zyngier wrote: +PTP_KVM support for arm/arm64 += + +PTP_KVM is used for high precision time sync between host and guests. +It relies on transferri

Re: [PATCH v5 net-next 10/10] dt-bindings: net: korina: Add DT bindings for IDT 79RC3243x SoCs

2021-04-17 Thread Sergei Shtylyov
On 16.04.2021 16:35, Thomas Bogendoerfer wrote: On Fri, Apr 16, 2021 at 12:29:46PM +0300, Sergei Shtylyov wrote: On 16.04.2021 11:52, Thomas Bogendoerfer wrote: Add device tree bindings for ethernet controller integrated into IDT 79RC3243x SoCs. Signed-off-by: Thomas Bogendoerfer --- .../

Re: [PATCH v19 1/7] arm/arm64: Probe for the presence of KVM hypervisor

2021-04-17 Thread Zenghui Yu
On 2021/3/30 22:54, Marc Zyngier wrote: #define SMCCC_ARCH_WORKAROUND_RET_UNAFFECTED 1 I think it'd be better to keep this definition together with other wa Function IDs. It's only a cosmetic comment anyway. Zenghui

Re: [PATCH v19 4/7] time: Add mechanism to recognize clocksource in time_get_snapshot

2021-04-17 Thread Zenghui Yu
On 2021/3/30 22:54, Marc Zyngier wrote: - u64 cycles; - ktime_t real; - ktime_t raw; - unsigned intclock_was_set_seq; - u8 cs_was_changed_seq; + u64 cycles; + ktime_t real; +

Re: [PATCH v19 6/7] KVM: arm64: Add support for the KVM PTP service

2021-04-17 Thread Marc Zyngier
On Sat, 17 Apr 2021 09:59:39 +0100, Zenghui Yu wrote: > > On 2021/3/30 22:54, Marc Zyngier wrote: > > +PTP_KVM support for arm/arm64 > > += > > + > > +PTP_KVM is used for high precision time sync between host and guests. > > +It relies on transferring the wall clock an

Re: [PATCH v19 7/7] ptp: arm/arm64: Enable ptp_kvm for arm/arm64

2021-04-17 Thread Marc Zyngier
On Sat, 17 Apr 2021 09:42:37 +0100, Zenghui Yu wrote: > > On 2021/3/30 22:54, Marc Zyngier wrote: > > +int kvm_arch_ptp_init(void) > > +{ > > + int ret; > > + > > + ret = kvm_arm_hyp_service_available(ARM_SMCCC_KVM_FUNC_PTP); > > + if (ret <= 0) > > kvm_arm_hyp_service_available() returns

Re: [PATCH v19 6/7] KVM: arm64: Add support for the KVM PTP service

2021-04-17 Thread Zenghui Yu
On 2021/3/30 22:54, Marc Zyngier wrote: +PTP_KVM support for arm/arm64 += + +PTP_KVM is used for high precision time sync between host and guests. +It relies on transferring the wall clock and counter value from the +host to the guest using a KVM-specific hypercall. +

Re: [PATCH v19 7/7] ptp: arm/arm64: Enable ptp_kvm for arm/arm64

2021-04-17 Thread Zenghui Yu
On 2021/3/30 22:54, Marc Zyngier wrote: +int kvm_arch_ptp_init(void) +{ + int ret; + + ret = kvm_arm_hyp_service_available(ARM_SMCCC_KVM_FUNC_PTP); + if (ret <= 0) kvm_arm_hyp_service_available() returns boolean. Maybe write as ? bool ret; ret = kvm_arm_hyp_s

Re: [PATCH bpf-next 1/2] bpf: Remove bpf_jit_enable=2 debugging mode

2021-04-17 Thread Christophe Leroy
Le 16/04/2021 à 01:49, Alexei Starovoitov a écrit : On Thu, Apr 15, 2021 at 8:41 AM Quentin Monnet wrote: 2021-04-15 16:37 UTC+0200 ~ Daniel Borkmann On 4/15/21 11:32 AM, Jianlin Lv wrote: For debugging JITs, dumping the JITed image to kernel log is discouraged, "bpftool prog dump jited"

Re: [PATCH rdma-next v2 0/5] Get rid of custom made module dependency

2021-04-17 Thread Leon Romanovsky
On Wed, Apr 14, 2021 at 07:15:37PM +0530, Devesh Sharma wrote: > On Mon, Apr 12, 2021 at 1:10 PM Leon Romanovsky wrote: > > > > On Thu, Apr 08, 2021 at 08:42:57PM +0530, Devesh Sharma wrote: > > > On Thu, Apr 8, 2021 at 5:14 PM Leon Romanovsky wrote: > > > > > > > > On Thu, Apr 08, 2021 at 05:06:

Re: [PATCH v2 5/6] kunit: mptcp: adhear to KUNIT formatting standard

2021-04-17 Thread Matthieu Baerts
Hi David, Nico, On 17/04/2021 06:24, David Gow wrote: Hi Matt, Like patch 1/6, I can apply it in MPTCP tree and send it later to net-next with other patches. Except if you guys prefer to apply it in KUnit tree and send it to linux-next? Given 1/6 is going to net-next, it makes sense to send

[PATCH v3] brcmfmac: support parse country code map from DT

2021-04-17 Thread Shawn Guo
With any regulatory domain requests coming from either user space or 802.11 IE (Information Element), the country is coded in ISO3166 standard. It needs to be translated to firmware country code and revision with the mapping info in settings->country_codes table. Support populate country_codes tab

Re: PROBLEM: DoS Attack on Fragment Cache

2021-04-17 Thread Willy Tarreau
On Sat, Apr 17, 2021 at 12:42:39AM -0700, Keyu Man wrote: > How about at least allow the existing queue to finish? Currently a tiny new > fragment would potentially invalid all previous fragments by letting them > timeout without allowing the fragments to come in to finish the assembly. Because th

Re: [PATCH v2 2/2] brcmfmac: support parse country code map from DT

2021-04-17 Thread Shawn Guo
On Fri, Apr 16, 2021 at 2:00 PM Arend Van Spriel wrote: > > On 4/15/2021 12:47 PM, Shawn Guo wrote: > > With any regulatory domain requests coming from either user space or > > 802.11 IE (Information Element), the country is coded in ISO3166 > > standard. It needs to be translated to firmware cou

Re: [PATCH v2 net-next] net: ethernet: mediatek: fix a typo bug in flow offloading

2021-04-17 Thread Frank Wunderlich
Tested on Bananapi-r2 (please see my mt7623 patch for supporting offloading) with ~300 iperf3 iterations and uptime >6h Tested-by: Frank Wunderlich regards Frank

Re: [PATCH 1/2] mm: Fix struct page layout on 32-bit systems

2021-04-17 Thread Jesper Dangaard Brouer
On Sat, 17 Apr 2021 00:07:23 +0100 "Matthew Wilcox (Oracle)" wrote: > 32-bit architectures which expect 8-byte alignment for 8-byte integers > and need 64-bit DMA addresses (arc, arm, mips, ppc) had their struct > page inadvertently expanded in 2019. When the dma_addr_t was added, > it forced th

[PATCH v2 net-next] net: ethernet: mediatek: fix a typo bug in flow offloading

2021-04-17 Thread DENG Qingfang
Issue was traffic problems after a while with increased ping times if flow offload is active. It turns out that key_offset with cookie is needed in rhashtable_params but was re-assigned to head_offset. Fix the assignment. Fixes: 502e84e2382d ("net: ethernet: mtk_eth_soc: add flow offloading suppor

Re: PROBLEM: DoS Attack on Fragment Cache

2021-04-17 Thread Willy Tarreau
On Sat, Apr 17, 2021 at 06:44:40AM +0200, Eric Dumazet wrote: > On Sat, Apr 17, 2021 at 2:31 AM David Ahern wrote: > > > > [ cc author of 648700f76b03b7e8149d13cc2bdb3355035258a9 ] > > I think this has been discussed already. There is no strategy that > makes IP reassembly units immune to DDOS at

[PATCH] net/mlx5: Use kasprintf instead of hand-writing it

2021-04-17 Thread Christophe JAILLET
'kasprintf()' can replace a kmalloc/strcpy/strcat sequence. It is less verbose and avoid the use of a magic number (64). Anyway, the underlying 'alloc_workqueue()' would only keep the 24 first chars (i.e. sizeof(struct workqueue_struct->name) = WQ_NAME_LEN). Signed-off-by: Christophe JAILLET ---

  1   2   >