Just decided to take another look:
On Mon, 2017-10-09 at 13:58 +0200, Johannes Berg wrote:
> On Mon, 2017-10-09 at 13:56 +0200, Jason A. Donenfeld wrote:
>
> > @@ -2266,16 +2266,17 @@ int __netlink_dump_start(struct sock *ssk,
> > struct sk_buff *skb,
> > cb-&
ou do have a genl family with
parallel_ops, you'd better be prepared to handle parallel things, and
then this could also be in parallel :-)
> In testing this with several different pieces of tricky code to
> trigger
> these issues, this commit fixes all avenues that I'm aware of.
>
> Signed-off-by: Jason A. Donenfeld
Reviewed-by: Johannes Berg
johannes
On Tue, 2017-10-10 at 22:31 -0400, Xiang Gao wrote:
> Currently, the aes_ccm.c and aes_gcm.c are almost line by line copy
> of
> each other. This patch reduce code redundancy by moving the code in
> these
> two files to crypto/aead_api.c to make it a higher level aead api.
> The
> file aes_ccm.c an
late some sta parameters after insertion
Ilan peer (1):
mac80211: Simplify locking in ieee80211_sta_tear_down_BA_sessions()
Johannes Berg (12):
mac80211: avoid allocating TXQs that won't be used
mac80211: simplify and clarify IE splitting
mac80211: use offsetofend()
Hi,
Thanks for the report.
On Thu, 2017-10-12 at 14:19 +0800, kernel test robot wrote:
> FYI, we noticed the following commit (built with gcc-6):
>
> commit: cd1a0cdbf9ada9bb975d8730a375bc13824ef065 ("mac80211: aead api to
> reduce redundancy")
I guess the commit isn't actually an upstream com
Thanks, both applied.
johannes
-
Arnd Bergmann (2):
cfg80211: don't print log output for building shipped-certs
cfg80211: fix CFG80211_EXTRA_REGDB_KEYDIR typo
Johannes Berg (3):
mac80211: use crypto_aead_authsize()
cfg80211: remove set but never used variable cf_offset
mac80211: don&
Hi,
As we discussed in April already (it's really been that long...), I'd
wanted to allow using BPF to filter wireless monitor frames, to enable
new use cases and higher performance in monitoring. I have some code,
at
https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git/log/?h=
ey reinstall without changing anything (2017-10-16 13:02:03
+0200)
Just a single fix, for a WoWLAN-related part of CVE-2017-13080.
----
Johannes Berg (1):
mac80211: accept k
From: Johannes Berg
When netlink_ack() reports an allocation error to the sending
socket, there's no need to look up the sending socket since
it's available in the SKB's CB. Use that instead of going to
the trouble of looking it up.
Note that the pointer is only available since E
From: Johannes Berg
It seems that it's possible to toggle NETLINK_F_EXT_ACK
through setsockopt() while another thread/CPU is building
a message inside netlink_ack(), which could then trigger
the WARN_ON()s I added since if it goes from being turned
off to being turned on between allocatin
On Tue, 2017-10-17 at 01:30 +0200, Jason A. Donenfeld wrote:
> Mobile phone right now, so not able to write patch, but you probably
> should be using crypto_memneq for comparing those two keys, not
> memcmp.
I know that's a gut instinct, but I really don't see the point.
If you actually get this
Hi Alexei,
> > https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
> > .git/log/?h=bpf
>
> bpf bits looks pretty straightforward.
Thanks for looking at this!
> attach looks fine too. I'm assuming there is some rtnl or other lock,
> so multiple assigns cannot race?
Yes.
> It's
On Tue, 2017-10-17 at 20:32 +0200, Jason A. Donenfeld wrote:
> Otherwise we risk leaking information via timing side channel.
>
Applied.
johannes
Hi,
[quoting your other email:]
> This has been the least trivial timer conversion yet. Given the use of
> RCU and other things I may not even know about, I'd love to get a close
> look at this. I *think* this is correct, as it will re-lookup the tid
> entries when firing the timer.
I'm not real
On Wed, 2017-10-18 at 12:29 +0200, Johannes Berg wrote:
> Anyway, the change here looks correct to me, so I'll apply it and then
> perhaps clean up more. I've only changed "u16 tid" to "u8 tid" since
> the valid range is 0-15 (in theory, in practice 0-7).
On Wed, 2017-10-18 at 13:31 +0200, Johannes Berg wrote:
> On Wed, 2017-10-18 at 12:29 +0200, Johannes Berg wrote:
>
> > Anyway, the change here looks correct to me, so I'll apply it and then
> > perhaps clean up more. I've only changed "u16 tid" to "u8
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
introduce also 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
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 nothing
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 whole
ection
Felix Fietkau (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 bas
wsim: add generation 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 deau
On Thu, 2018-02-22 at 15:19 -0500, David Miller wrote:
> From: Johannes Berg
> 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 coming :-)
>
> I won
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 in
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.
> Un
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.
>
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
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 se
On Wed, 2017-09-20 at 13:11 +0300, Ville Syrjala wrote:
> --- a/net/mac80211/tx.c
> +++ b/net/mac80211/tx.c
> @@ -1770,15 +1770,21 @@ bool ieee80211_tx_prepare_skb(struct ieee80211_hw *hw,
> struct ieee80211_tx_data tx;
> struct sk_buff *skb2;
>
> - if (ieee80211_tx_prepare(sdata
On Wed, 2017-09-20 at 15:11 +0300, Ville Syrjälä wrote:
>
> > I guess since the outer pointer isn't protected, only the inner ...
>
> I think just the fact that even the pointers in ieee80211_tx_data
> don't have the __rcu annotation makes it rather hard to see what is
> really rcu protected and
On Wed, 2017-09-20 at 17:08 +0100, Colin Ian King wrote:
> Johannes,
>
> Static analysis with CoverityScan on linux-next today detected a null
> pointer dereference issue on commit:
>
> From 0fc4b3403d215ecd3c05505ec1f0028a227ed319 Mon Sep 17 00:00:00
> 2001
> From: Jo
On Wed, 2017-09-20 at 21:27 +0200, Christian Lamparter wrote:
> It seems this is caused as a result of:
> -> lock_map_acquire(&work->lockdep_map);
> lock_map_release(&work->lockdep_map);
>
> in flush_work() [0]
Agree.
> This was added by:
>
> commit 0976dfc1d0cd80a4e9df
On Thu, 2017-09-21 at 23:56 +0100, Colin King wrote:
> From: Colin Ian King
>
> Don't populate const array ac_to_fifo on the stack in an inlined
> function, instead make it static. Makes the object code smaller
> by over 800 bytes:
>
> text data bss dec hex
> filename
>
On Sat, 2017-09-23 at 21:37 +0200, Christian Lamparter wrote:
> But this also begs the question: Is this really working then?
> From what I can tell, if CONFIG_LOCKDEP is not set then there's no
> BUG no WARN, no other splat or any other odd system behaviour. Does
> [cancel | flush]_[delayed_]work
On Sun, 2017-09-24 at 01:40 -0400, Xiang Gao wrote:
> Currently, the aes_ccm.c and aes_gcm.c are almost line by line
> copy of each other. This patch reduce code redundancy by moving
> the code in these two files to crypto/aead_api.c to make it a
> higher level aead api. The aes_ccm.c and aes_gcm.c
On Sun, 2017-09-24 at 13:21 -0400, Xiang Gao wrote:
>
> Do you mean to put more characters each line in the description
>
Huh, sorry, no - my bad. I was thinking of the code, not the
description at all.
For example here:
> -int ieee80211_aes_gcm_encrypt(struct crypto_aead *tfm, u8 *j_0, u8 *aad
On Mon, 2017-09-25 at 12:56 +0800, Herbert Xu wrote:
> On Sun, Sep 24, 2017 at 07:42:46PM +0200, Johannes Berg wrote:
> >
> > Unrelated to this, I'm not sure whose tree this should go through -
> > probably Herbert's (or DaveM's with his ACK? not sure
Subject should say *not* initialized?
johannes
On Wed, 2017-09-27 at 14:50 +0200, Jason A. Donenfeld wrote:
> On Wed, Sep 27, 2017 at 2:39 PM, Jason A. Donenfeld
> wrote:
> > - if (cb->start)
> > - cb->start(cb);
> > + if (cb->start) {
> > + ret = cb->start(cb);
> > + if (ret)
>
> I need t
ce start() has always been a function with an int return type, it
> therefore makes sense to use it properly, rather than ignoring it.
> This
> patch thus returns early and does not call dumpit() when start()
> fails.
>
> Signed-off-by: Jason A. Donenfeld
Reviewed-by: Johannes
Please use "v2" tag or so in the subject line, having the same patch
again is really not helpful.
The next should be v3, obviously.
> +++ b/net/mac80211/aead_api.c
> @@ -1,7 +1,4 @@
> -/*
> - * Copyright 2014-2015, Qualcomm Atheros, Inc.
> - *
> - * This program is free software; you can redistri
Please don't send obviously broken patches.
johannes
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
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
mappe
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 da
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
mappe
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 a
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 l
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
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: Joh
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 a
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
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 that
the
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
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
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 y
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
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 mess
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
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
> > error
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 duplicate code in the
>
e sleep-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 fr
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 I
;ve just queued up the following revert, thanks!
>
>
> From 5047543928139184f060c8f3bccb788b3df4c1ea Mon Sep 17 00:00:00 2001
> From: "David S. Miller"
> Date: Tue, 2 Jan 2018 11:45:07 -0500
> Subject: [PATCH] Revert "net: core: dev_get_valid_name
ribute for existence
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/nl8021
R. Silva (1):
mac80211: mark 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 wa
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 result
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 usage"
> showed up in net/wi
On Sun, 2018-01-14 at 23:22 +0100, Dominik Brodowski wrote:
>
> + rcu_read_lock();
> ssid_ie = ieee80211_bss_get_ie(&wdev->current_bss->pub,
> WLAN_EID_SSID);
> if (!ssid_ie)
> - break;
nit-pi
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 mo
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 r
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.
Ca
() return value
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
From: Johannes Berg
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 since there can be no ope
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 was
From: Johannes Berg
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: implement IWRATE")
Signed-o
On Thu, 2019-10-10 at 20:04 +0200, Michal Kubecek wrote:
>
> The only thing I don't like about the genetlink infrastructure is the
> design decision that policy and corresponding maxattr is an attribute of
> the family rather than a command. This forces anyone who wants to use it
> to essentially
On Thu, 2019-10-10 at 19:04 -0700, Jakub Kicinski wrote:
> > if (reporter->auto_recover)
> > - return devlink_health_reporter_recover(reporter, priv_ctx);
> > + return devlink_health_reporter_recover(reporter,
> > + priv_ctx,
Hi all,
I've been looking at modem drivers, to see what the APIs are to interact
with them, and while I originally thought I had the story sorted out ...
not at all.
Here's the current things we seem to be doing:
(1) Channels are created/encoded as VLANs (cdc_mbim)
This is ... strange a
Hi,
> Thanks a lot for doing this! Being responsible for most of the issues
> you point out, I can only say that you have my full support if you want
> to change any of it.
:-)
> My pathetic excuses below are just meant to clarify why things are the
> way they are. They are not a defense for s
Hi,
> The normal mode of operation of rmnet is using the rmnet netdevices
> in an embedded device.
Sure. Can you say what driver this would typically live on top of? I'm
actually a bit surprised to find out this isn't really a driver :-)
In my view right now, I'd recommend splitting rmnet into t
On Thu, 2019-04-04 at 22:38 +0200, Johannes Berg wrote:
> > The bridge mode is used only for testing by sending frames
> > without de-muxing to some other driver such as a USB netdev so packets
> > can be parsed on a tethered PC.
>
> Yeah, I get it, it's just done
From: Johannes Berg
The nested policy here should be established using the
NLA_POLICY_NESTED() macro so the length is properly
filled in.
Fixes: 81e54d08d9d8 ("cfg80211: support FTM responder configuration/statistics")
Signed-off-by: Johannes Berg
---
net/wireless/nl80211.c | 6 ++--
Now that it's working, here's the first draft of the code to
expose the netlink policy to userspace.
One thing I didn't think I would do but did anyway now is to
map the NLA_* type to a new attribute, and translate it for
userspace. This may not be the most convenient, but I think we
would prefer
From: Johannes Berg
Add helpers to get the policy's signed/unsigned range
validation data.
Signed-off-by: Johannes Berg
---
include/net/netlink.h | 5 +++
lib/nlattr.c | 95 +--
2 files changed, 79 insertions(+), 21 deletions(-)
diff --
From: Johannes Berg
Use a validation type instead, so we can later expose
the NLA_* values to userspace for policy descriptions.
Signed-off-by: Johannes Berg
---
include/net/netlink.h | 15 ---
lib/nlattr.c | 16 ++--
2 files changed, 18 insertions(+), 13
From: Johannes Berg
In the netlink policy, we currently have a void *validation_data
that's pointing to different things:
* a u32 value for bitfield32,
* the netlink policy for nested/nested array
* the string for NLA_REJECT
Remove the pointer and place appropriate type-safe items i
From: Johannes Berg
Using a pointer to a struct indicating the min/max values,
extend the ability to do range validation for arbitrary
values. Small values in the s16 range can be kept in the
policy directly.
Signed-off-by: Johannes Berg
---
include/net/netlink.h | 45 +
lib
From: Johannes Berg
Add, and use in generic netlink, helpers to dump out a netlink
policy to userspace, including all the range validation data,
nested policies etc.
This lets userspace discover what the kernel understands.
For families/commands other than generic netlink, the helpers
need to
From: Johannes Berg
Since NLA_MSECS is really equivalent to NLA_U64, allow
it to have range validation as well.
Signed-off-by: Johannes Berg
---
include/net/netlink.h | 6 --
lib/nlattr.c | 2 ++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/include/net/netlink.h
From: Johannes Berg
Now that we have nested policies, we can theoretically
recurse forever parsing attributes if a (sub-)policy
refers back to a higher level one. This is a situation
that has happened in nl80211, and we've avoided it there
by not linking it.
Add some code to netlink parsi
On Thu, 2019-04-04 at 22:45 -0600, Subash Abhinov Kasiviswanathan wrote:
> On 2019-04-04 14:38, Johannes Berg wrote:
> > Hi,
> >
> > > The normal mode of operation of rmnet is using the rmnet netdevices
> > > in an embedded device.
> >
> > Sure. Can
On Sat, 2019-04-06 at 19:20 +0200, Daniele Palmas wrote:
>
> the qmi_wwan sysfs qmap feature, being very easy to use, is serving
> well for me and customers of the company I work for (mainly directly
> with libqmi, not ModemManager),
Yeah, I don't doubt this. In fact, we could arguably provide t
On Wed, 2019-04-10 at 21:54 -0600, Subash Abhinov Kasiviswanathan wrote:
> > > We need raw IP frames from a embedded device transmitted to a PC
> > > and vice versa.
> >
> > Sure. But you just need to encap them in some kind of ethernet frame to
> > transport them on the wire, but don't really ne
On Fri, 2019-04-12 at 16:27 +0200, Bjørn Mork wrote:
> Johannes Berg writes:
> > On Wed, 2019-04-10 at 21:54 -0600, Subash Abhinov Kasiviswanathan wrote:
> >
> > > These packets will be processed as raw IP muxed frames on the PC as
> > > well, not as ethernet
On Sun, 2019-04-14 at 13:09 -0600, Subash Abhinov Kasiviswanathan wrote:
> > Hmm, not sure I understand this. If you do RPS/RSS then that's a
> > hardware function, and the netdev doesn't really come into play
> > immediately? If the underlying driver directly deals with multiple
> > netdevs that'
On Mon, 2020-10-05 at 15:21 -0700, Jakub Kicinski wrote:
> > > Nice, easy & useful, maybe I'll code it up tomorrow.
> >
> > OK I thought about it a bit more and looked at the code, and it's not
> > actually possible to do easily right now, because we can't actually
> > point to the bad attribut
code. New type of policy
> is needed to validate masks (patch 6).
>
> Netlink as always staying a step ahead of all the other kernel
> API interfaces :)
>
> v2:
> - merge patches 1 & 2 -> 1
> - add patch 3 & 5
> - remove .max_attr from struct ethnl_request_ops
>
Looks good!
Reviewed-by: Johannes Berg
johannes
On Tue, 2020-10-06 at 08:37 +0200, Johannes Berg wrote:
> On Mon, 2020-10-05 at 15:21 -0700, Jakub Kicinski wrote:
>
> > > > Nice, easy & useful, maybe I'll code it up tomorrow.
> > >
> > > OK I thought about it a bit more and looked at the cod
201 - 300 of 1980 matches
Mail list logo