Re: [PATCH v2] wireless: mark expected switch fall-throughs

2018-10-23 Thread Johannes Berg
On Tue, 2018-10-23 at 12:58 +0200, Gustavo A. R. Silva wrote: > On 10/23/18 10:59 AM, Gustavo A. R. Silva wrote: > > > > On 10/23/18 9:01 AM, Johannes Berg wrote: > > > On Tue, 2018-10-23 at 02:13 +0200, Gustavo A. R. Silva wrote: > > > > In preparation to e

pull-request: mac80211 2018-09-27

2018-09-27 Thread Johannes Berg
): mac80211: fix pending queue hang due to TX_DROP Felix Fietkau (1): mac80211: allocate TXQs for active monitor interfaces Johannes Berg (1): mac80211: TDLS: fix skb queue/priority assignment Jouni Malinen (1): cfg80211: Address some corner cases in scan result channel

Re: [PATCH v3 0/5] netlink: nested policy validation

2018-09-27 Thread Johannes Berg
On Wed, 2018-09-26 at 10:21 -0700, David Miller wrote: > From: Johannes Berg > Date: Wed, 26 Sep 2018 11:15:29 +0200 > > > This adds nested policy validation, which lets you specify the > > nested attribute type, e.g. NLA_NESTED with sub-policy, or the > > new NL

[PATCH] netlink: fix typo in nla_parse_nested() comment

2018-09-26 Thread Johannes Berg
From: Johannes Berg Fix a simple typo: attribuets -> attributes Signed-off-by: Johannes Berg --- include/net/netlink.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net/netlink.h b/include/net/netlink.h index ddabc832febc..69866f5a97f2 100644 --- a/include/

[PATCH v3 3/5] netlink: move extack setting into validate_nla()

2018-09-26 Thread Johannes Berg
From: Johannes Berg This unifies the code between nla_parse() which sets the bad attribute pointer and an error message, and nla_validate() which only sets the bad attribute pointer. It also cleans up the code for NLA_REJECT and paves the way for nested policy validation, as it will allow us

[PATCH v3 5/5] netlink: add nested array policy validation

2018-09-26 Thread Johannes Berg
From: Johannes Berg Sometimes nested netlink attributes are just used as arrays, with the nla_type() of each not being used; we have this in nl80211 and e.g. NFTA_SET_ELEM_LIST_ELEMENTS. Add the ability to validate this type of message directly in the policy, by adding the type NLA_NESTED_ARRAY

[PATCH v3 1/5] netlink: remove NLA_NESTED_COMPAT

2018-09-26 Thread Johannes Berg
From: Johannes Berg This isn't used anywhere, so we might as well get rid of it. Reviewed-by: David Ahern Signed-off-by: Johannes Berg --- include/net/netlink.h | 2 -- lib/nlattr.c | 11 --- 2 files changed, 13 deletions(-) diff --git a/include/net/netlink.h b/include/net

[PATCH v3 2/5] netlink: make validation_data const

2018-09-26 Thread Johannes Berg
From: Johannes Berg The validation data is only used within the policy that should usually already be const, and isn't changed in any code that uses it. Therefore, make the validation_data pointer const. While at it, remove the duplicate variable in the bitfield validation that I'd otherwise

[PATCH v3 4/5] netlink: allow NLA_NESTED to specify nested policy to validate

2018-09-26 Thread Johannes Berg
From: Johannes Berg Now that we have a validation_data pointer, and the len field in the policy is unused for NLA_NESTED, we can allow using them both to have nested validation. This can be nice in code, although we still have to use nla_parse_nested() or similar which would also take a policy

[PATCH v3 0/5] netlink: nested policy validation

2018-09-26 Thread Johannes Berg
This adds nested policy validation, which lets you specify the nested attribute type, e.g. NLA_NESTED with sub-policy, or the new NLA_NESTED_ARRAY with sub-sub-policy. Changes in v2: * move setting the bad attr pointer/message into validate_nla() * remove the recursion patch since that's no

Re: [RFC 4/5] netlink: prepare validate extack setting for recursion

2018-09-20 Thread Johannes Berg
On Wed, 2018-09-19 at 18:10 -0300, Marcelo Ricardo Leitner wrote: > > FWIW, if you do think that there's a need for distinguishing this, then > > I'd argue that perhaps the right way to address this would be to extend > > this all the way to userspace and have two separate attributes for > >

[PATCH] smc: generic netlink family should be __ro_after_init

2018-09-20 Thread Johannes Berg
From: Johannes Berg The generic netlink family is only initialized during module init, so it should be __ro_after_init like all other generic netlink families. Signed-off-by: Johannes Berg --- net/smc/smc_pnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/smc

Re: [RFC 4/5] netlink: prepare validate extack setting for recursion

2018-09-19 Thread Johannes Berg
On Wed, 2018-09-19 at 15:46 -0300, Marcelo Ricardo Leitner wrote: > > NL_SET_ERR_MSG(extack, "warning: deprecated command"); > > err = nla_parse(..., extack); > > if (err) > > return err; > > /* do something */ > > return 0; > > > > Here you could consider the

Re: [RFC 4/5] netlink: prepare validate extack setting for recursion

2018-09-19 Thread Johannes Berg
On Wed, 2018-09-19 at 11:28 +0200, Jiri Benc wrote: > > It might be possible to do this differently, in theory, but all the ways > > I've tried to come up with so far made the code vastly more complex. > > Wouldn't still make sense to store the flag in the struct > netlink_ext_ack, though? Does

Re: [RFC 4/5] netlink: prepare validate extack setting for recursion

2018-09-19 Thread Johannes Berg
On Wed, 2018-09-19 at 00:37 -0300, Marcelo Ricardo Leitner wrote: > Did you consider indicating the message level, and only overwrite the > message that is already in there if the new message level is higher > than the current one? Hmm, no, I guess I didn't - I'm not even sure I understand what

Re: [RFC 4/5] netlink: prepare validate extack setting for recursion

2018-09-19 Thread Johannes Berg
On Wed, 2018-09-19 at 11:10 +0200, Jiri Benc wrote: > On Tue, 18 Sep 2018 15:12:11 +0200, Johannes Berg wrote: > > static int validate_nla(const struct nlattr *nla, int maxtype, > > const struct nla_policy *policy, > > - c

Re: [RFC 2/5] netlink: set extack error message in nla_validate()

2018-09-18 Thread Johannes Berg
On Tue, 2018-09-18 at 10:18 -0700, David Ahern wrote: > On 9/18/18 6:12 AM, Johannes Berg wrote: > > diff --git a/lib/nlattr.c b/lib/nlattr.c > > index 120ad569e13d..efbd6c1aff29 100644 > > --- a/lib/nlattr.c > > +++ b/lib/nlattr.c > > @@ -181,9 +181,13 @@ int

[RFC 4/5] netlink: prepare validate extack setting for recursion

2018-09-18 Thread Johannes Berg
From: Johannes Berg In one of my previous patches in this area I introduced code to pass out just the error message to store in the extack, for use in NLA_REJECT. Change this code now to set both the error message and the bad attribute pointer, and carry around a boolean indicating

[RFC 2/5] netlink: set extack error message in nla_validate()

2018-09-18 Thread Johannes Berg
From: Johannes Berg In nla_parse() we already set this, but it makes sense to also do it in nla_validate() which already also sets the bad attribute pointer. CC: David Ahern Signed-off-by: Johannes Berg --- lib/nlattr.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git

[RFC 5/5] netlink: allow NLA_NESTED to specify nested policy to validate

2018-09-18 Thread Johannes Berg
From: Johannes Berg Now that we have a validation_data pointer, and the len field in the policy is unused for NLA_NESTED, we can allow using them both to have nested validation. This can be nice in code, although we still have to use nla_parse_nested() or similar which would also take a policy

[RFC 1/5] netlink: remove NLA_NESTED_COMPAT

2018-09-18 Thread Johannes Berg
From: Johannes Berg This isn't used anywhere, so we might as well get rid of it. Signed-off-by: Johannes Berg --- include/net/netlink.h | 2 -- lib/nlattr.c | 11 --- 2 files changed, 13 deletions(-) diff --git a/include/net/netlink.h b/include/net/netlink.h index

[RFC 3/5] netlink: combine validate/parse functions

2018-09-18 Thread Johannes Berg
From: Johannes Berg The parse function of course contains validate, but it's implemented a second time, sharing just the validation of a single attribute. Introduce nla_validate_parse() that can be used for both parsing/validation and only validation, to share code. Signed-off-by: Johannes

[PATCH v2 2/2] netlink: add ethernet address policy types

2018-09-17 Thread Johannes Berg
From: Johannes Berg Commonly, ethernet addresses are just using a policy of { .len = ETH_ALEN } which leaves userspace free to send more data than it should, which may hide bugs. Introduce NLA_EXACT_LEN which checks for exact size, rejecting the attribute if it's not exactly that length

[PATCH v2 1/2] netlink: add NLA_REJECT policy type

2018-09-17 Thread Johannes Berg
From: Johannes Berg In some situations some netlink attributes may be used for output only (kernel->userspace) or may be reserved for future use. It's then helpful to be able to prevent userspace from using them in messages sent to the kernel, since they'd otherwise be ignored and any fut

[PATCH v2] socket: fix struct ifreq size in compat ioctl

2018-09-13 Thread Johannes Berg
From: Johannes Berg As reported by Reobert O'Callahan, since Viro's commit to kill dev_ifsioc() we attempt to copy too much data in compat mode, which may lead to EFAULT when the 32-bit version of struct ifreq sits at/near the end of a page boundary, and the next page isn't mapped. Fix

Re: [PATCH] socket: fix struct ifreq size in compat ioctl

2018-09-13 Thread Johannes Berg
On Thu, 2018-09-13 at 13:13 +0100, Al Viro wrote: > On Thu, Sep 13, 2018 at 01:49:09PM +0200, Johannes Berg wrote: > > From: Johannes Berg > > > > As reported by Reobert O'Callahan, since Viro's commit to kill > > dev_ifsioc() we attempt to copy too much data in comp

[PATCH] socket: fix struct ifreq size in compat ioctl

2018-09-13 Thread Johannes Berg
From: Johannes Berg As reported by Reobert O'Callahan, since Viro's commit to kill dev_ifsioc() we attempt to copy too much data in compat mode, which may lead to EFAULT when the 32-bit version of struct ifreq sits at/near the end of a page boundary, and the next page isn't mapped. Fix

Re: [RFC v2 2/2] netlink: add ethernet address policy types

2018-09-12 Thread Johannes Berg
On Wed, 2018-09-12 at 10:49 +0200, Arend van Spriel wrote: > On 9/12/2018 10:36 AM, Johannes Berg wrote: > > From: Johannes Berg > > > > Commonly, ethernet addresses are just using a policy of > > { .len = ETH_ALEN } > > which leaves userspace free to send mo

Re: [PATCH v6 13/18] wireless/lib80211: Convert from ahash to shash

2018-07-25 Thread Johannes Berg
On Tue, 2018-07-24 at 09:49 -0700, Kees Cook wrote: > In preparing to remove all stack VLA usage from the kernel[1], this > removes the discouraged use of AHASH_REQUEST_ON_STACK in favor of > the smaller SHASH_DESC_ON_STACK by converting from ahash-wrapped-shash > to direct shash. By removing a

[PATCH v5 1/3] bitfield: fix *_encode_bits()

2018-06-18 Thread Johannes Berg
u8 helpers. The tests don't compile without the fix, showing that it's necessary. Fixes: 00b0c9b82663 ("Add primitives for manipulating bitfields both in host- and fixed-endian.") Reviewed-by: Andy Shevchenko Signed-off-by: Johannes Berg --- v2: replace stray tab by space v3: u8 help

[PATCH v5 3/3] bitfield: add tests

2018-06-18 Thread Johannes Berg
ifdef. Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Signed-off-by: Johannes Berg --- lib/Kconfig.debug | 7 +++ lib/Makefile| 1 + lib/test_bitfield.c | 168 3 files changed, 176 insertions(+) create mode 100644 lib

pull-request: mac80211-next 2018-05-23

2018-05-23 Thread Johannes Berg
dd api to set CSA counter in mac80211 Haim Dreyfuss (1): nl80211: Add wmm rule attribute to NL80211_CMD_GET_WIPHY dump command Ilan Peer (1): mac80211: Support adding duration for prepare_tx() callback Johannes Berg (9): mac80211: rename rtap_vendor_space to rtap_space mac

Re: [v8, bpf-next, 4/9] net/wireless/iwlwifi: fix iwlwifi_dev_ucode_error tracepoint

2018-05-23 Thread Johannes Berg
On Wed, 2018-03-28 at 12:05 -0700, Alexei Starovoitov wrote: > fix iwlwifi_dev_ucode_error tracepoint to pass pointer to a table > instead of all 17 arguments by value. > dvm/main.c and mvm/utils.c have 'struct iwl_error_event_table' > defined with very similar yet subtly different fields and

pull-request: mac80211 2018-05-23

2018-05-23 Thread Johannes Berg
Hi Dave, Just another handful of fixes as we wind down towards the merge window. Please pull and let me know if there's any problem. Thanks, johannes The following changes since commit 6caf9fb3bda17df59de4ed6ed4950c43ca1361e3: Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf

Re: About the alx WoL feature

2018-05-22 Thread Johannes Berg
+netdev Hi, > Sorry to write to you directly, I'm not sure if I should CC some > public lists, please feel free to add them if that's the right way to > do. I think it is, adding netdev. > I would like to add back the alx WoL feature which is reverted by you > 5 years ago, and we have some

Re: pull-request: mac80211-next 2018-05-09

2018-05-09 Thread Johannes Berg
Hi, Sorry, scratch that. I forgot that this commit: > Toke Høiland-Jørgensen (3): > cfg80211: Expose TXQ stats and parameters to userspace caused a bunch of "too much stack" warnings - I should put in at least the non-driver fix for that first, and then coordinate with Kalle to send the

pull-request: mac80211-next 2018-05-09

2018-05-09 Thread Johannes Berg
api to set CSA counter in mac80211 Haim Dreyfuss (1): nl80211: Add wmm rule attribute to NL80211_CMD_GET_WIPHY dump command Johannes Berg (4): mac80211: rename rtap_vendor_space to rtap_space mac80211: clean up rate info bandwidth setting mac80211: ethtool: memset

pull-request: mac80211 2018-05-09

2018-05-09 Thread Johannes Berg
Peer (2): mac80211: Fix condition validating WMM IE mac80211: Adjust SAE authentication timeout Johan Hovold (1): rfkill: gpio: fix memory leak in probe error path Johannes Berg (1): cfg80211: limit wiphy names to 128 bytes Randy Dunlap (1): mac80211: fix kernel-doc

Re: [PATCH 09/18] net: mac80211.h: fix a bad comment line

2018-05-09 Thread Johannes Berg
On Wed, 2018-05-09 at 09:04 -0300, Mauro Carvalho Chehab wrote: > Em Mon, 07 May 2018 14:38:26 +0200 > Johannes Berg <johan...@sipsolutions.net> escreveu: > > > On Mon, 2018-05-07 at 15:37 +0300, Kalle Valo wrote: > > > Mauro Carvalho Chehab <m

Re: [PATCH] mac80211: ethtool: avoid 32 bit multiplication overflow

2018-05-08 Thread Johannes Berg
On Tue, 2018-05-08 at 13:57 +0100, Colin King wrote: > From: Colin Ian King > > The multiplication of 10 * cfg80211_calculate_bitrate() is a 32 bit > operation and can overflow if cfg80211_calculate_bitrate is greater > than 42949. Although I don't believe this is

Re: [PATCH 09/18] net: mac80211.h: fix a bad comment line

2018-05-07 Thread Johannes Berg
On Mon, 2018-05-07 at 15:37 +0300, Kalle Valo wrote: > Mauro Carvalho Chehab writes: > > > Sphinx produces a lot of errors like this: > > ./include/net/mac80211.h:2083: warning: bad line: > > > > > Signed-off-by: Mauro Carvalho Chehab

Re: WARNING in kernfs_add_one

2018-05-07 Thread Johannes Berg
On Mon, 2018-05-07 at 11:33 +0200, Dmitry Vyukov wrote: > On Mon, May 7, 2018 at 10:43 AM, Johannes Berg > <johan...@sipsolutions.net> wrote: > > On Sat, 2018-05-05 at 15:07 -0700, Greg KH wrote: > > > > > > > > syzbot found the following crash on: >

Re: WARNING in kernfs_add_one

2018-05-07 Thread Johannes Berg
On Sat, 2018-05-05 at 15:07 -0700, Greg KH wrote: > > > > syzbot found the following crash on: Maybe it should learn to differentiate warnings, if it's going to set panic_on_warn :-) I get why, but still, at least differentiating in the emails wouldn't be bad. > > > > kernfs: ns required in

Re: [PATCH 1/3] ethtool: Support ETHTOOL_GSTATS2 command.

2018-04-19 Thread Johannes Berg
On Thu, 2018-04-19 at 08:25 -0700, Ben Greear wrote: > > In order to efficiently parse lots of stats over and over again, I probe > the stat names once on startup, map them to the variable I am trying to use > (since different drivers may have different names for the same basic stat), > and then

Re: [PATCH 1/3] ethtool: Support ETHTOOL_GSTATS2 command.

2018-04-19 Thread Johannes Berg
On Wed, 2018-04-18 at 14:51 -0700, Ben Greear wrote: > > It'd be pretty hard to know which flags are firmware stats? > > Yes, it is, but ethtool stats are difficult to understand in a generic > manner anyway, so someone using them is already likely aware of low-level > details of the driver(s)

Re: [PATCH 1/3] ethtool: Support ETHTOOL_GSTATS2 command.

2018-04-18 Thread Johannes Berg
On Tue, 2018-04-17 at 18:49 -0700, gree...@candelatech.com wrote: > > + * @get_ethtool_stats2: Return extended statistics about the device. > + * This is only useful if the device maintains statistics not > + * included in rtnl_link_stats64. > + * Takes a flags argument: 0 means all

Re: WARNING in add_uevent_var

2018-04-03 Thread Johannes Berg
On Sun, 2018-04-01 at 23:01 -0700, syzbot wrote: > So far this crash happened 5 times on net-next, upstream. > C reproducer: https://syzkaller.appspot.com/x/repro.c?id=6614377067184128 > Huh, fun. Looks like you're basically creating a new HWSIM radio with an insanely long name (4k!) and

pull-request: mac80211-next 2018-03-29

2018-03-29 Thread Johannes Berg
params to comply with ETSI requirements cfg80211: Add API to allow querying regdb for wmm_rule Johannes Berg (4): mac80211_hwsim: fix secondary MAC address assignment cfg80211: don't require RTNL held for regdomain reads mac80211: remove shadowing duplicated variable

Re: [PATCH] mac80211: aes-cmac: remove VLA usage

2018-03-21 Thread Johannes Berg
On Wed, 2018-03-21 at 08:57 -0500, Gustavo A. R. Silva wrote: > > SHA_DESC_ON_STACK is currently being used in multiple places. But, yeah, > I think we can define multiple macros of the same kind and adjust to the > characteristics of each the component. > > How big do you think tfm can get?

Re: [PATCH] mac80211: aes-cmac: remove VLA usage

2018-03-21 Thread Johannes Berg
On Wed, 2018-03-21 at 08:42 -0500, Gustavo A. R. Silva wrote: > In preparation to enabling -Wvla, remove VLAs and replace them > with dynamic memory allocation instead. > > The use of stack Variable Length Arrays needs to be avoided, as they > can be a vector for stack exhaustion, which can be

pull-request: mac80211 2018-03-21

2018-03-21 Thread Johannes Berg
: add ieee80211_hw flag for QoS NDP support Johannes Berg (1): ath9k_htc: use non-QoS NDP for AP probing drivers/net/wireless/ath/ath9k/htc_drv_init.c | 1 + drivers/net/wireless/mac80211_hwsim.c | 1 + include/net/mac80211.h| 4 net/mac80211/debugfs.c

pull-request: mac80211 2018-03-02

2018-03-02 Thread Johannes Berg
Hi Dave, Just a few more patches, but I'll be travelling over the next week and probably won't be able to send things to you then. Please pull and let me know if there's any problem. Thanks, johannes The following changes since commit 93c62c45ed5fad1b87e3a45835b251cd68de9c46: rxrpc: Fix

pull-request: mac80211-next 2018-03-02

2018-03-02 Thread Johannes Berg
Hi Dave, Like before... Thanks for pulling net into net-next, the Add-BA patch below would otherwise not really be possible :-) The only sort of interesting thing is the fast-RX improvements from Felix, they help on routers where these things (A-MSDU and 4-addr mode) are more important and where

Re: KASAN: use-after-free Read in mac80211_hwsim_del_radio

2018-03-01 Thread Johannes Berg
On Thu, 2018-03-01 at 13:32 +0100, Benjamin Beichler wrote: > > Could you give me a link to or forward the original email ? I googled > "KASAN: use-after-free Read in mac80211_hwsim_del_radio", but only your > answer (without the logs) appears. I try to have a look then in the next > few days. >

Re: KASAN: use-after-free Read in mac80211_hwsim_del_radio

2018-03-01 Thread Johannes Berg
Hi, > syzbot hit the following crash on upstream commit > f3afe530d644488a074291da04a69a296ab63046 (Tue Feb 27 22:02:39 2018 +) > Merge branch 'fixes-v4.16-rc4' of > git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security > > So far this crash happened 4 times on upstream. >

Re: pull-request: mac80211-next 2018-02-22

2018-02-23 Thread Johannes Berg
On Thu, 2018-02-22 at 15:19 -0500, David Miller wrote: > > Pulled, thank you! Thanks. I just realized that I have a patch pending for -next that depends another commit in net/mac80211 (or would otherwise conflict badly while applying, and again while merging later), could I ask you to pull net

Re: pull-request: mac80211-next 2018-02-22

2018-02-22 Thread Johannes Berg
On Thu, 2018-02-22 at 15:19 -0500, David Miller wrote: > From: Johannes Berg <johan...@sipsolutions.net> > Date: Thu, 22 Feb 2018 21:16:18 +0100 > > > Wireless is slow ... but we're preparing for HE (802.11ax), > > so I guess soon we'll have a big chunk of work comin

pull-request: mac80211-next 2018-02-22

2018-02-22 Thread Johannes Berg
count for netlink dump operation Colin Ian King (1): mac80211: remove redundant initialization to pointer 'hdr' Denis Kenzior (1): uapi: Add 802.11 Preauthentication to if_ether Ilan Peer (1): mac80211: Call mgd_prep_tx before transmitting deauthentication Johannes Berg (2

pull-request: mac80211 2018-02-22

2018-02-22 Thread Johannes Berg
ietkau (1): mac80211: round IEEE80211_TX_STATUS_HEADROOM up to multiple of 4 Ilan Peer (2): mac80211: Do not disconnect on invalid operating class mac80211: Fix sending ADDBA response for an ongoing session Johannes Berg (3): cfg80211: use only 1Mbps for basic rates in mes

Re: nla_put_string() vs NLA_STRING

2018-02-22 Thread Johannes Berg
On Tue, 2018-02-20 at 22:00 -0800, Kees Cook wrote: > It seems that in at least one case[1], nla_put_string() is being used > on an NLA_STRING, which lacks a NULL terminator, which leads to > silliness when nla_put_string() uses strlen() to figure out the size: Fun! I'm not a big fan of the

Re: WARNING in check_flush_dependency

2018-02-19 Thread Johannes Berg
On Mon, 2018-02-19 at 19:58 +0100, Dmitry Vyukov wrote: > > > Yeah, we clearly shouldn't have WQ_RECLAIM set on this workqueue... > > Hi Johannes, > > Do you mind to send a patch to fix this? Yeah, sorry, I've been behind on patches a bit. I just applied it today, and once I've let it sit for

Re: WARNING in check_flush_dependency

2018-01-23 Thread Johannes Berg
On Mon, 2018-01-22 at 23:39 -0800, syzbot wrote: > Hello, > > syzbot hit the following crash on upstream commit > 0d665e7b109d512b7cae3ccef6e8654714887844 (Fri Jan 19 12:49:24 2018 +) > mm, page_vma_mapped: Drop faulty pointer arithmetics in check_pte() > > So far this crash happened 23

Re: pull-request: mac80211-next 2018-01-22

2018-01-22 Thread Johannes Berg
On Mon, 2018-01-22 at 10:17 -0500, David Miller wrote: > From: Johannes Berg <johan...@sipsolutions.net> > Date: Mon, 22 Jan 2018 14:15:00 +0100 > > > A few more (only four, really) changes have come in, so I figured > > since the merge window hasn't opened yes

pull-request: mac80211-next 2018-01-22

2018-01-22 Thread Johannes Berg
Hi Dave, A few more (only four, really) changes have come in, so I figured since the merge window hasn't opened yesterday, I'd still send them to you. Please pull and let me know if there's any problem. Thanks, johannes The following changes since commit

[PATCH] cfg80211: fix station info handling bugs

2018-01-16 Thread Johannes Berg
From: Johannes Berg <johannes.b...@intel.com> Fix two places where the structure isn't initialized to zero, and thus can't be filled properly by the driver. Fixes: 4a4b8169501b ("cfg80211: Accept multiple RSSI thresholds for CQM") Fixes: 9930380f0bd8 ("cfg80211: implemen

Re: WARNING in rfkill_alloc

2018-01-15 Thread Johannes Berg
On Mon, 2018-01-15 at 10:12 +0100, Dmitry Vyukov wrote: > However, there can be some surprising things, for example, executing > one ioctl/setsockopt with data meant for another one, or these > 0x are actually mean 0 (for involved reasons), I think those fff was actually what

[PATCH] netlink: extack: avoid parenthesized string constant warning

2018-01-15 Thread Johannes Berg
From: Johannes Berg <johannes.b...@intel.com> NL_SET_ERR_MSG() and NL_SET_ERR_MSG_ATTR() lead to the following warning in newer versions of gcc: warning: array initialized from parenthesized string constant Just remove the parentheses, they're not needed in this context since anyway

pull-request: mac80211 2018-01-15

2018-01-15 Thread Johannes Berg
Benjamin Beichler (1): mac80211_hwsim: add workqueue to wait for deferred radio deletion on mod unload Dominik Brodowski (1): nl80211: take RCU read lock when calling ieee80211_bss_get_ie() Johannes Berg (3): cfg80211: fully initialize old channel for event mac80211_hwsim

Re: WARNING in rfkill_alloc

2018-01-15 Thread Johannes Berg
Hi, > RIP: 0010:rfkill_alloc+0x2c0/0x380 net/rfkill/core.c:930 This seems pretty obvious - there's no name given. > wiphy_new_nm+0x159c/0x21d0 net/wireless/core.c:487 > ieee80211_alloc_hw_nm+0x4b4/0x2140 net/mac80211/main.c:531 which is strange, because we try to validate the name here.

Re: WARNING in wiphy_register

2018-01-15 Thread Johannes Berg
Hi syzbot maintainers, Thanks for the report. > hwsim_new_radio_nl+0x5b7/0x7c0 drivers/net/wireless/mac80211_hwsim.c:3152 > genl_family_rcv_msg+0x7b7/0xfb0 net/netlink/genetlink.c:599 > genl_rcv_msg+0xb2/0x140 net/netlink/genetlink.c:624 You're getting into the kernel via generic netlink

Re: [PATCH v3] nl80211: take RCU read lock when calling ieee80211_bss_get_ie()

2018-01-15 Thread Johannes Berg
On Mon, 2018-01-15 at 08:12 +0100, Dominik Brodowski wrote: > As ieee80211_bss_get_ie() derefences an RCU to return ssid_ie, both > the call to this function and any operation on this variable need > protection by the RCU read lock. > > Fixes: 44905265bc15 ("nl80211: don't expose wdev->ssid for

Re: [PATCH v2] nl80211: take RCU read lock when calling ieee80211_bss_get_ie()

2018-01-14 Thread Johannes Berg
On Sun, 2018-01-14 at 23:22 +0100, Dominik Brodowski wrote: > > + rcu_read_lock(); > ssid_ie = ieee80211_bss_get_ie(>current_bss->pub, > WLAN_EID_SSID); > if (!ssid_ie) > - break; nit-picking

Re: [PATCH] nl80211: take RCU read lock when calling ieee80211_bss_get_ie()

2018-01-14 Thread Johannes Berg
Hi, > Fixes: 44905265bc15 ("nl80211: don't expose wdev->ssid for most interfaces") > Signed-off-by: Dominik Brodowski > --- > > This patch fixes the regression I reported in the last couple of weeks for > various v4.15-rcX revisions to netdev, where a "suspicious RCU

Re: [PATCH] nl80211: Check for the required netlink attribute presence

2018-01-04 Thread Johannes Berg
On Wed, 2018-01-03 at 11:00 +0800, Hao Chen wrote: > nl80211_nan_add_func() does not check if the required attribute > NL80211_NAN_FUNC_FOLLOW_UP_DEST is present when processing > NL80211_CMD_ADD_NAN_FUNCTION request. This request can be issued > by users with CAP_NET_ADMIN privilege and may

pull-request: mac80211-next 2018-01-04

2018-01-04 Thread Johannes Berg
expected switch fall-throughs Johannes Berg (6): mac80211: avoid looking up tid_tx/tid_rx from timers mac80211: make __ieee80211_start_rx_ba_session static nl80211: add a few extended error strings to key parsing mac80211: don't warn on AID field without top two MSBs set

pull-request: mac80211 2018-01-04

2018-01-04 Thread Johannes Berg
Hao Chen (1): nl80211: Check for the required netlink attribute presence Johannes Berg (1): mac80211: mesh: drop frames appearing to be from us net/mac80211/rx.c | 2 ++ net/wireless/nl80211.c | 3 ++- 2 files

Re: [net] Revert "net: core: maybe return -EEXIST in __dev_alloc_name"

2018-01-02 Thread Johannes Berg
. > > I've just queued up the following revert, thanks! > > > From 5047543928139184f060c8f3bccb788b3df4c1ea Mon Sep 17 00:00:00 2001 > From: "David S. Miller" <da...@davemloft.net> > Date: Tue, 2 Jan 2018 11:45:07 -0500 > Subject: [PATCH

Re: [net] Revert "net: core: maybe return -EEXIST in __dev_alloc_name"

2017-12-19 Thread Johannes Berg
Hi, > This revert seems to have broken networking on one of my powerpc > machines, according to git bisect. Fun! TBH, I only looked at the immediate problem we ran into, and reverted what was causing it. I don't think we saw the follow-up problem you're seeing. > The symptom is DHCP fails and

pull-request: mac80211 2017-12-19

2017-12-19 Thread Johannes Berg
-in-atomic bug in hwsim_get_radio_nl Johannes Berg (2): nl80211: fix nl80211_send_iface() error paths cfg80211: ship certificates as hex files Jonathan Corbet (1): nl80211: Remove obsolete kerneldoc line Thierry Reding (1): cfg80211: always rewrite generated files from scratch

Re: [PATCH] wireless: Always rewrite generated files from scratch

2017-12-19 Thread Johannes Berg
On Thu, 2017-12-14 at 14:33 +0100, Thierry Reding wrote: > From: Thierry Reding > > Currently the certs C code generation appends to the generated files, > which is most likely a leftover from commit 715a12334764 ("wireless: > don't write C files on failures"). This causes

Re: linux-next: build failure after merge of the mac80211-next tree

2017-12-12 Thread Johannes Berg
Hi Stephen, Thanks! Felix made me aware of this yesterday evening and said he's going to work out the required changes to mt76. Kalle and I will make sure to submit the trees to Dave one by one so he doesn't have to deal with it :) Unfortunately, this might take a few days to resolve. > -void

Re: 76f43b4 fix for stable

2017-12-11 Thread Johannes Berg
On Mon, 2017-12-11 at 14:51 +0100, Richard Schütz wrote: > Hello, > > as per netdev-FAQ.txt I'm requesting the submission of commit > 57629915d568c522ac1422df7bba4bee5b5c7a7c ("mac80211: Fix addition of > mesh configuration element") to stable. Because of automatic selection > commit

pull-request: mac80211 2017-12-11

2017-12-11 Thread Johannes Berg
Johannes Berg (3): wireless: replace usage of hexdump with od/sed wireless: don't write C files on failures mac80211: fix locking in ieee80211_sta_tear_down_BA_sessions net/mac80211/ht.c | 5 ++--- net/wireless/Makefile

Re: Wireless regressions in v4.15-rc1

2017-12-09 Thread Johannes Berg
On Sat, 2017-12-02 at 14:59 +0200, Kalle Valo wrote: > > net: netlink: Update attr validation to require exact length for some types > https://git.kernel.org/linus/28033ae4e0f5 This was reverted, more or less, to print only a warning:

Re: [net] netlink: Relax attr validation for fixed length types

2017-12-06 Thread Johannes Berg
pdate the comment now :-) And the comment on nla_attr_len as well. With the comments fixed, this looks fine to me. Reviewed-by: Johannes Berg <johan...@sipsolutions.net> Since we already have two tables now and may want to add attribute types with exact enforcement in the future (like the BITFI

Re: [PATCH net 1/2] netlink: add NLA_U8_BUGGY attribute type

2017-12-05 Thread Johannes Berg
On Tue, 2017-12-05 at 11:41 -0500, David Miller wrote: > > There is no reasonable interpretation for what that application is > doing, so I think we can safely call that case as buggy. > > We are only trying to handle the situation where a U8 attribute > is presented as a bonafide U32 or a

Re: [PATCH net 1/2] netlink: add NLA_U8_BUGGY attribute type

2017-12-05 Thread Johannes Berg
On Tue, 2017-12-05 at 11:31 -0500, David Miller wrote: > > > We could try to fix up the big endian problem here, but we > > don't know *how* userspace misbehaved - if using nla_put_u32 > > then we could, but we also found a debug tool (which we'll > > ignore for the purposes of this regression)

[PATCH net 1/2] netlink: add NLA_U8_BUGGY attribute type

2017-12-02 Thread Johannes Berg
From: Johannes Berg <johannes.b...@intel.com> This netlink type is used only for backwards compatibility with broken userspace that used the wrong size for a given u8 attribute, which is now rejected. It would've been wrong before already, since on big endian the wrong value (always zero)

[PATCH net 2/2] nl80211: use NLA_U8_BUGGY for two attributes

2017-12-02 Thread Johannes Berg
From: Johannes Berg <johannes.b...@intel.com> We discovered that these are set incorrectly by the corresponding userspace code, so keep compatible with their bugs even if they'd always set the value to 0. Reported-by: Jouni Malinen <j...@w1.fi> Fixes: 28033ae4e0f5 ("net: net

[PATCH net] Revert "net: core: maybe return -EEXIST in __dev_alloc_name"

2017-12-01 Thread Johannes Berg
From: Johannes Berg <johannes.b...@intel.com> This reverts commit d6f295e9def0; some userspace (in the case we noticed it's wpa_supplicant), is relying on the current error code to determine that a fixed name interface already exists. Reported-by: Jouni Malinen <j...@w1.fi>

pull-request: mac80211 2017-11-27

2017-11-27 Thread Johannes Berg
frame Johannes Berg (2): cfg80211: select CRYPTO_SHA256 if needed mac80211: use QoS NDP for AP probing Sara Sharon (1): mac80211: tear down RX aggregations first drivers/net/wireless/ath/ath9k/channel.c | 2 +- drivers/net/wireless/st/cw1200/sta.c | 4 ++-- drivers/net

Re: kernel BUG at crypto/asymmetric_keys/public_key.c:80

2017-11-23 Thread Johannes Berg
On Thu, 2017-11-23 at 09:47 -0800, Florian Fainelli wrote: > Absolutely, please find it enclosed. Thanks. This is a bit odd. I didn't think the most likely reason is that you have CONFIG_CRYPTO_SHA256=m but everything else built-in. Thus, when loading the certificate, there's no way to

Re: kernel BUG at crypto/asymmetric_keys/public_key.c:80

2017-11-23 Thread Johannes Berg
On Wed, 2017-11-22 at 15:07 -0800, Florian Fainelli wrote: > On 11/22/2017 10:42 AM, Johannes Berg wrote: > > On Wed, 2017-11-22 at 19:29 +0100, Arend van Spriel wrote: > > > + Johannes > > > > > > >>> BUG_ON(!sig->digest); > > >

Re: kernel BUG at crypto/asymmetric_keys/public_key.c:80

2017-11-22 Thread Johannes Berg
On Wed, 2017-11-22 at 19:29 +0100, Arend van Spriel wrote: > + Johannes > > >>> BUG_ON(!sig->digest); > BUG_ON(!sig->s); I *think* this is the same bug that was reported before, then this should fix it:

Re: pull-request: mac80211 2017-11-20

2017-11-21 Thread Johannes Berg
On Tue, 2017-11-21 at 20:17 +0900, David Miller wrote: > From: Johannes Berg <johan...@sipsolutions.net> > Date: Mon, 20 Nov 2017 17:06:44 +0100 > > > ssh://korg/pub/scm/linux/kernel/git/jberg/mac80211.git > > tags/mac80211-for-davem-2017-11-20 > > That's

pull-request: mac80211 2017-11-20

2017-11-20 Thread Johannes Berg
in hwsim_new_radio_nl() Johannes Berg (3): nl80211: don't expose wdev->ssid for most interfaces cfg80211: initialize regulatory keys/database later mac80211: properly free requested-but-not-started TX agg sessions Kees Cook (2): mac80211: Convert timers to use timer_se

Re: [PATCH net] genetlink: fix genlmsg_nlhdr()

2017-11-15 Thread Johannes Berg
note, family->hdrsize is 0 for all the families calling this right now. Reviewed-by: Johannes Berg <johan...@sipsolutions.net> johannes

[PATCH] netlink: remove unused NETLINK SKB flags

2017-11-13 Thread Johannes Berg
From: Johannes Berg <johannes.b...@intel.com> These flags are unused, remove them to be less confusing. Signed-off-by: Johannes Berg <johannes.b...@intel.com> --- include/linux/netlink.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/linux/netlink.h b/include/lin

[PATCH] netlink: remove unnecessary forward declaration

2017-11-13 Thread Johannes Berg
From: Johannes Berg <johannes.b...@intel.com> netlink_skb_destructor() is actually defined before the first usage in the file, so remove the unnecessary forward declaration. Signed-off-by: Johannes Berg <johannes.b...@intel.com> --- net/netlink/af_netlink.c | 1 - 1 file changed

Re: [net-next] tcp: allow drivers to tweak TSQ logic

2017-11-13 Thread Johannes Berg
On Sat, 2017-11-11 at 15:38 -0800, Eric Dumazet wrote: > > Hm. I wish we wouldn't have to do this on every skb, but perhaps it > > doesn't matter that much. > > Yes, it does not matter, even at 40Gbit ;) :) > Same cache line already ;) Hah. It seemed so far away, but actually looking at the

  1   2   3   4   5   6   7   8   9   10   >