From: wangyunjian
Date: Wed, 6 May 2020 20:10:28 +0800
> From: Yunjian Wang
>
> The method ndo_start_xmit() returns a value of type netdev_tx_t. Fix
> the ndo function to use the correct type.
>
> Signed-off-by: Yunjian Wang
Applied.
On 5/5/2020 2:23 PM, Vivien Didelot wrote:
> On Tue, 5 May 2020 14:02:53 -0700, Florian Fainelli
> wrote:
>> If we are probed through platform_data we would be intentionally
>> dropping the reference count on master after dev_to_net_device()
>> incremented it. If we are probed through Device
From: wangyunjian
Date: Wed, 6 May 2020 20:55:52 +0800
> From: Yunjian Wang
>
> The method ndo_start_xmit() returns a value of type netdev_tx_t. Fix
> the ndo function to use the correct type.
>
> Signed-off-by: Yunjian Wang
Applied, thanks.
From: Dave Ertman
The RDMA block does not have its own PCI function, instead it must utilize
the ice driver to gain access to the PCI device. Create a virtual bus
device so the irdma driver can register a virtual bus driver to bind to it
and receive device data. The device data contains all of th
Fix following sparse checker warning:-
net/hsr/hsr_slave.c:38:18: warning: incorrect type in assignment (different
base types)
net/hsr/hsr_slave.c:38:18:expected unsigned short [unsigned] [usertype]
protocol
net/hsr/hsr_slave.c:38:18:got restricted __be16 [usertype] h_proto
net/hsr/hsr_s
While at some point it might have made sense to be running these tests
on ppc64 with 4k stacks, the kernel hasn't actually used 4k stacks on
64-bit powerpc in a long time, and more interesting things that we test
don't really work when we deviate from the default (16k). So, we stop
pushing our luck
It's very unlikely that send will become true. It's nearly always false
between 0 and 120 seconds of a session, and in most cases becomes true
only between 120 and 121 seconds before becoming false again. So,
unlikely(send) is clearly the right option here.
What happened before was that we had thi
Without setting these to NULL, clang complains in certain
configurations that have CONFIG_IPV6=n:
In file included from drivers/net/wireguard/ratelimiter.c:223:
drivers/net/wireguard/selftest/ratelimiter.c:173:34: error: variable 'skb6' is
uninitialized when used here [-Werror,-Wuninitialized]
On Wed, May 6, 2020 at 1:54 PM Ian Rogers wrote:
>
> Don't include libbpf_internal.h as it is unused and has conflicting
> definitions, for example, with tools/perf/util/debug.h.
> Fix a non-glibc include path.
>
> Signed-off-by: Ian Rogers
> ---
> tools/lib/bpf/hashmap.h | 3 +--
> 1 file chang
It's already possible to create two different interfaces and loop
packets between them. This has always been possible with tunnels in the
kernel, and isn't specific to wireguard. Therefore, the networking stack
already needs to deal with that. At the very least, the packet winds up
exceeding the MT
Users with pathological hardware reported CPU stalls on CONFIG_
PREEMPT_VOLUNTARY=y, because the ringbuffers would stay full, meaning
these workers would never terminate. That turned out not to be okay on
systems without forced preemption, which Sultan observed. This commit
adds a cond_resched() to
Hi Dave,
With Ubuntu and Debian having backported this into their kernels, we're
finally seeing testing from places we hadn't seen prior, which is nice.
With that comes more fixes:
1) The CI for PPC64 was running with extremely small stacks for 64-bit,
causing spurious crashes in surprising pl
On Wed, May 6, 2020 at 1:55 PM Ian Rogers wrote:
>
> hashmap_find_entry assumes that if buckets is NULL then there are no
> entries. NULL the buckets in clear to ensure this.
> Free hashmap entries and not just the bucket array.
>
> Signed-off-by: Ian Rogers
> ---
This is already fixed in bpf-ne
Hi Florian,
On Thu, 7 May 2020 at 00:24, Florian Fainelli wrote:
>
>
>
> On 5/5/2020 2:23 PM, Vivien Didelot wrote:
> > On Tue, 5 May 2020 14:02:53 -0700, Florian Fainelli
> > wrote:
> >> If we are probed through platform_data we would be intentionally
> >> dropping the reference count on mast
On 5/6/20 10:37 AM, Andrii Nakryiko wrote:
On Sun, May 3, 2020 at 11:26 PM Yonghong Song wrote:
Two helpers bpf_seq_printf and bpf_seq_write, are added for
writing data to the seq_file buffer.
bpf_seq_printf supports common format string flag/width/type
fields so at least I can get identic
On 5/6/20 10:38 AM, Andrii Nakryiko wrote:
On Sun, May 3, 2020 at 11:28 PM Yonghong Song wrote:
This specifically to handle the case like below:
// ptr below is a socket ptr identified by PTR_TO_BTF_ID
u64 param[2] = { ptr, val };
bpf_seq_printf(seq, fmt, sizeof(fmt), param, siz
From: Antoine Tenart
Date: Wed, 6 May 2020 15:58:30 +0200
> netdev_update_features() must be called with the rtnl lock taken. Not
> doing so triggers a warning, as ASSERT_RTNL() is used in
> __netdev_update_features(), the first function called by
> netdev_update_features(). Fix this.
>
> Fixes
Alexei,
Thomas Gleixner writes:
> Alexei Starovoitov writes:
>>
>> I'd like to pull
>> commit 980737282232 ("capabilities: Introduce CAP_PERFMON to kernel
>> and user space")
>> into bpf-next to base my CAP_BPF work on top of it.
>> could you please prepare a stable tag for me to pull ?
>> Last
From: Ayush Sawal
Date: Wed, 6 May 2020 20:17:19 +0530
> This reverts commit 27c6feb0fb33a665a746346e76714826a5be5d10.
>
> For ipsec offload the chelsio's ethernet driver expects a single mtu
> sized packet.
>
> But when ipsec traffic is running using iperf, most of the packets in
> that traff
From: Michael Walle
Date: Wed, 6 May 2020 16:53:12 +0200
> Introduce the concept of a shared PHY storage which can be used by some
> QSGMII PHYs to ease initialization and access to global per-package
> registers.
>
> Changes since v2:
> - restore page to standard after reading the base addres
On Tue, May 5, 2020 at 11:52 PM Huang Qijun wrote:
>
> When compiling netfilter, there will be an error
> "No rule to make target 'net/netfilter/xt_TCPMSS.o'",
> because the xt_TCPMSS.c in the makefile is uppercase,
> and the file name of the source file (xt_tcpmss.c) is lowercase.
> Therefore, ch
On Wed, May 6, 2020 at 2:47 PM Ian Rogers wrote:
>
> On Wed, May 6, 2020 at 2:33 PM Andrii Nakryiko
> wrote:
> >
> > On Wed, May 6, 2020 at 1:54 PM Ian Rogers wrote:
> > >
> > > Don't include libbpf_internal.h as it is unused and has conflicting
> > > definitions, for example, with tools/perf/ut
From: Murali Karicheri
Date: Wed, 6 May 2020 11:41:07 -0400
> Fix following sparse checker warning:-
>
> net/hsr/hsr_slave.c:38:18: warning: incorrect type in assignment (different
> base types)
> net/hsr/hsr_slave.c:38:18:expected unsigned short [unsigned] [usertype]
> protocol
> net/hsr/
From: Eric Dumazet
Date: Wed, 6 May 2020 09:21:15 -0700
> Since chunk_size is no longer an integer, we can not
> use it directly as an argument of setsockopt().
>
> This patch should fix tcp_mmap for Big Endian kernels.
>
> Fixes: 597b01edafac ("selftests: net: avoid ptl lock contention in tcp
From: Eric Dumazet
Date: Wed, 6 May 2020 09:21:15 -0700
> Since chunk_size is no longer an integer, we can not
> use it directly as an argument of setsockopt().
>
> This patch should fix tcp_mmap for Big Endian kernels.
>
> Fixes: 597b01edafac ("selftests: net: avoid ptl lock contention in tcp
From: Vladimir Oltean
Date: Wed, 6 May 2020 20:48:13 +0300
> From: Vladimir Oltean
>
> It looks like the sja1105 external timestamping input is not as generic
> as we thought. When fed a signal with 50% duty cycle, it will timestamp
> both the rising and the falling edge. When fed a short puls
On Wed, May 06, 2020 at 10:03:52PM +0800, Jason Yan wrote:
> The '==' expression itself is bool, no need to convert it to bool again.
> This fixes the following coccicheck warning:
Make sense.
It may belong to bpf-next instead.
Acked-by: Martin KaFai Lau
On 5/6/2020 2:40 PM, Vladimir Oltean wrote:
> Hi Florian,
>
> On Thu, 7 May 2020 at 00:24, Florian Fainelli wrote:
>>
>>
>>
>> On 5/5/2020 2:23 PM, Vivien Didelot wrote:
>>> On Tue, 5 May 2020 14:02:53 -0700, Florian Fainelli
>>> wrote:
If we are probed through platform_data we would b
On 5/5/20 11:04 PM, Andrii Nakryiko wrote:
On Sun, May 3, 2020 at 11:30 PM Yonghong Song wrote:
Two bpf programs are added in this patch for netlink and ipv6_route
target. On my VM, I am able to achieve identical
results compared to /proc/net/netlink and /proc/net/ipv6_route.
$ cat /pro
From: Maciej Żenczykowski
__bpf_skb_max_len(skb) is used from:
bpf_skb_adjust_room
__bpf_skb_change_tail
__bpf_skb_change_head
but in the case of forwarding we're likely calling these functions
during receive processing on ingress and bpf_redirect()'ing at
a later point in time to egress o
On Thu, 7 May 2020 at 01:45, Florian Fainelli wrote:
>
>
>
> On 5/6/2020 2:40 PM, Vladimir Oltean wrote:
> > Hi Florian,
> >
> > On Thu, 7 May 2020 at 00:24, Florian Fainelli wrote:
> >>
> >>
> >>
> >> On 5/5/2020 2:23 PM, Vivien Didelot wrote:
> >>> On Tue, 5 May 2020 14:02:53 -0700, Florian Fa
For this device tree with new binding, there was no crash with 4.19.16
kernel on an NXP imx6 device but there is with 5.4.36.
eth0: igb0 {
compatible = "intel,igb";
/* SC: New binding for the Marvell 6176 switch
attached to the Intel Gigabit
> MDIO bus. Followed example in
> Documentation/devicetree/bindings/dsa/marvell.txt */
> compatible = "marvell,mv88e6xxx-mdio-external";
6176 does not have an external MDIO bus. Only the 6390 family
does. The 6176 has just one bus, which is both internal and external.
On Wed, 6 May 2020 16:32:59 -0700 Maciej Żenczykowski wrote:
> From: Maciej Żenczykowski
>
> __bpf_skb_max_len(skb) is used from:
> bpf_skb_adjust_room
> __bpf_skb_change_tail
> __bpf_skb_change_head
>
> but in the case of forwarding we're likely calling these functions
> during receive p
On Wed, May 06, 2020 at 07:35:50PM -0400, Sriram Chadalavada wrote:
> For this device tree with new binding, there was no crash with 4.19.16
> kernel on an NXP imx6 device but there is with 5.4.36.
> eth0: igb0 {
> compatible = "intel,igb";
>
From: Fernando Gont
Date: Fri, 1 May 2020 00:51:47 -0300
> Implement the upcoming rev of RFC4941 (IPv6 temporary addresses):
> https://tools.ietf.org/html/draft-ietf-6man-rfc4941bis-09
>
> * Reduces the default Valid Lifetime to 2 days
> The number of extra addresses employed when Valid Lifeti
From: Heiner Kallweit
Date: Fri, 1 May 2020 23:26:21 +0200
> Sleeping for a certain amount of time requires use of different
> functions, depending on the time period.
> Documentation/timers/timers-howto.rst explains when to use which
> function, and also checkpatch checks for some potentially
>
On Wed, May 06, 2020 at 04:19:45PM -0500, Josh Poimboeuf wrote:
> On Wed, May 06, 2020 at 09:45:01AM -0700, Alexei Starovoitov wrote:
> > On Wed, May 6, 2020 at 8:53 AM Josh Poimboeuf wrote:
> > >
> > > On Tue, May 05, 2020 at 04:59:39PM -0700, Alexei Starovoitov wrote:
> > > > As far as workaroun
From: Vladimir Oltean
Date: Mon, 4 May 2020 01:20:25 +0300
> From: Vladimir Oltean
>
> This series fixes the following problems:
> - Dynamically learnt addresses never expiring (neither for Ocelot nor
> for Felix)
> - Half of the FDB not visible in 'bridge fdb show' (for Felix only)
Series
From: Ahmed Abdelsalam
Date: Mon, 4 May 2020 14:42:11 +
> The Segment Routing Header (SRH) which defines the SRv6 dataplane is defined
> in RFC8754.
>
> RFC8754 (section 4.1) defines the SR source node behavior which encapsulates
> packets into an outer IPv6 header and SRH. The SR source no
From: Willem de Bruijn
Date: Mon, 4 May 2020 12:48:54 -0400
> From: Willem de Bruijn
>
> Syzkaller again found a path to a kernel crash through bad gso input:
> a packet with transport header extending beyond skb_headlen(skb).
>
> Tighten validation at kernel entry:
>
> - Verify that the tra
On Wed, May 6, 2020 at 2:51 PM Thomas Gleixner wrote:
>
> Alexei,
>
> Thomas Gleixner writes:
> > Alexei Starovoitov writes:
> >>
> >> I'd like to pull
> >> commit 980737282232 ("capabilities: Introduce CAP_PERFMON to kernel
> >> and user space")
> >> into bpf-next to base my CAP_BPF work on top
From: Alex Elder
Date: Mon, 4 May 2020 13:13:50 -0500
> Add an "iommus" property to the IPA node in "sdm845.dtsi". It is
> required because there are two regions of memory the IPA accesses
> through an SMMU. The next few patches define and map those regions.
>
> Signed-off-by: Alex Elder
Ap
From: Eric Dumazet
Date: Mon, 4 May 2020 11:27:48 -0700
> After pacing horizon addition, we have to adjust how we arm rto
> timer, otherwise we might freeze very low pacing rate flows.
Series applied, thanks Eric.
From: Vladimir Oltean
Date: Mon, 4 May 2020 22:58:56 +0300
> From: Vladimir Oltean
>
> This was caused by a poor merge conflict resolution on my side. The
> "act = &cls->rule->action.entries[0];" assignment was already present in
> the code prior to the patch mentioned below.
>
> Fixes: e13c2
From: Florian Fainelli
Date: Mon, 4 May 2020 13:18:06 -0700
> When ndo_get_phys_port_name() for the CPU port was added we introduced
> an early check for when the DSA master network device in
> dsa_master_ndo_setup() already implements ndo_get_phys_port_name(). When
> we perform the teardown ope
From: Alex Elder
Date: Mon, 4 May 2020 18:30:01 -0500
> Some special handling done during channel reset should only be done
> for IPA hardare version 3.5.1. This series generalizes the meaning
> of a flag passed to indicate special behavior, then has the special
> handling be used only when app
From: Alex Elder
Date: Mon, 4 May 2020 18:37:10 -0500
> A "delay mode" feature was put in place to work around a problem
> where packets could passed to the modem before it was ready to
> handle them. That problem no longer exists, and we don't need the
> workaround any more so get rid of it.
From: Alex Elder
Date: Mon, 4 May 2020 18:53:40 -0500
> It turns out that a workaround that performs a small DMA operation
> between retried attempts to stop a GSI channel is not needed for any
> supported hardware. The hardware quirk that required the extra DMA
> operation was fixed after IPA
From: Devulapally Shiva Krishna
Date: Tue, 5 May 2020 08:42:52 +0530
> The following series of patches fixes the issues which came during
> self-tests with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS enabled.
>
> Patch 1: Fixes gcm(aes) hang issue and rfc4106-gcm encryption issue.
> Patch 2: Fixes ctr, c
From: Arnd Bergmann
Date: Tue, 5 May 2020 17:38:19 +0200
> The addition of sja1105_port_status_ether structure into the
> statistics causes the frame size to go over the warning limit:
>
> drivers/net/dsa/sja1105/sja1105_ethtool.c:421:6: error: stack frame size of
> 1104 bytes in function 'sja
From: Geert Uytterhoeven
Date: Tue, 5 May 2020 15:28:09 +0200
> Currently bool ionic_cq.done_color is exported using
> debugfs_create_u8(), which requires a cast, preventing further compiler
> checks.
>
> Fix this by switching to debugfs_create_bool(), and dropping the cast.
>
> Signed-off-by:
From: Oleksij Rempel
Date: Tue, 5 May 2020 08:35:04 +0200
> changes v6:
> - use NL_SET_ERR_MSG_ATTR in ethnl_update_linkmodes
> - add sanity checks in the ioctl interface
> - use bool for ethnl_validate_master_slave_cfg()
...
Series applied, thank you.
> I thought we have established that checking device MTU (m*T*u)
> at ingress makes a very limited amount of sense, no?
>
> Shooting from the hip here, but won't something like:
>
> if (!skb->dev || skb->tc_at_ingress)
> return SKB_MAX_ALLOC;
> return skb->dev->mtu + skb->dev->hard_
> -Original Message-
> From: David Miller
> Sent: Wednesday, May 6, 2020 14:03
> To: yanai...@huawei.com
> Cc: Kirsher, Jeffrey T ; Azarewicz, Piotr
> ; intel-wired-...@lists.osuosl.org;
> netdev@vger.kernel.org; linux-ker...@vger.kernel.org
> Subject: Re: [PATCH net-next] i40e: Make i40e_
From: Grygorii Strashko
Date: Tue, 5 May 2020 19:31:26 +0300
> The K3 INTA driver, which is source TX/RX IRQs for CPSW NUSS, defines IRQs
> triggering type as EDGE by default, but triggering type for CPSW NUSS TX/RX
> IRQs has to be LEVEL as the EDGE triggering type may cause unnecessary IRQs
> t
The NL_SET_ERR_MSG_MOD macro is used to report a string describing an
error message to userspace via the netlink extended ACK structure. It
should not have a trailing newline.
Add a cocci script which catches cases where the newline marker is
present. Using this script, fix the handful of cases wh
The current code for BPF_{AND,OR,XOR,JSET} BPF_K loads the immediate to
a temporary register before use.
This patch changes the code to avoid using a temporary register
when the BPF immediate is encodable using an arm64 logical immediate
instruction. If the encoding fails (due to the immediate not
The current code for BPF_{ADD,SUB} BPF_K loads the BPF immediate to a
temporary register before performing the addition/subtraction. Similarly,
BPF_JMP BPF_K cases load the immediate to a temporary register before
comparison.
This patch introduces optimizations that use arm64 immediate add, sub,
c
This patch fixes two issues present in the current function for encoding
arm64 logical immediates when using the 32-bit variants of instructions.
First, the code does not correctly reject an all-ones 32-bit immediate
and returns an undefined instruction encoding, which can crash the kernel.
The fi
This patch series introduces several optimizations to the arm64 BPF JIT.
The optimizations make use of arm64 immediate instructions to avoid
loading BPF immediates to temporary registers, when possible.
In the process, we discovered two bugs in the logical immediate encoding
function in arch/arm64
On 5/5/20 11:01 PM, Andrii Nakryiko wrote:
On Sun, May 3, 2020 at 11:30 PM Yonghong Song wrote:
Two bpf programs are added in this patch for netlink and ipv6_route
target. On my VM, I am able to achieve identical
results compared to /proc/net/netlink and /proc/net/ipv6_route.
$ cat /pro
Hi Davide,
> -Original Message-
> From: Davide Caratti
> Sent: 2020年5月6日 20:54
> To: Po Liu ; dsah...@gmail.com; linux-
> ker...@vger.kernel.org; netdev@vger.kernel.org
> Cc: vinicius.go...@intel.com; step...@networkplumber.org;
> da...@davemloft.net; v...@buslov.dev; Claudiu Manoil
> ;
> > I thought we have established that checking device MTU (m*T*u)
> > at ingress makes a very limited amount of sense, no?
> >
> > Shooting from the hip here, but won't something like:
> >
> > if (!skb->dev || skb->tc_at_ingress)
> > return SKB_MAX_ALLOC;
> > return skb->dev->mtu +
On 5/17/18 4:36 PM, Stephen Hemminger wrote:
> On Thu, 17 May 2018 16:22:37 -0600
> dsah...@kernel.org wrote:
>
>> From: David Ahern
>>
>> Using iproute2 to create a bridge and add 4094 vlans to it can take from
>> 2 to 3 *minutes*. The reason is the extraneous call to ll_name_to_index.
>> ll_nam
From: Maciej Żenczykowski
__bpf_skb_max_len(skb) is used from:
bpf_skb_adjust_room
__bpf_skb_change_tail
__bpf_skb_change_head
but in the case of forwarding we're likely calling these functions
during receive processing on ingress and bpf_redirect()'ing at
a later point in time to egress o
On 5/5/20 9:05 AM, William Tu wrote:
> The Type I ERSPAN frame format is based on the barebones
> IP + GRE(4-byte) encapsulation on top of the raw mirrored frame.
> Both type I and II use 0x88BE as protocol type. Unlike type II
> and III, no sequence number or key is required.
> To creat a type
Hi Stephen,
> -Original Message-
> From: Stephen Hemminger
> Sent: 2020年5月6日 23:22
> To: Po Liu
> Cc: dsah...@gmail.com; linux-ker...@vger.kernel.org;
> netdev@vger.kernel.org; vinicius.go...@intel.com;
> da...@davemloft.net; v...@buslov.dev; Claudiu Manoil
> ; Vladimir Oltean ;
> Alexa
From: "Jason A. Donenfeld"
Date: Wed, 6 May 2020 15:33:01 -0600
> With Ubuntu and Debian having backported this into their kernels, we're
> finally seeing testing from places we hadn't seen prior, which is nice.
> With that comes more fixes:
...
Series applied.
> Patches (2) and (3) have Fixe
From: Pablo Neira Ayuso
Date: Wed, 6 May 2020 20:34:50 +0200
> This patch adds FLOW_ACTION_HW_STATS_DONT_CARE which tells the driver
> that the frontend does not need counters, this hw stats type request
> never fails. The FLOW_ACTION_HW_STATS_DISABLED type explicitly requests
> the driver to di
1) Fix reference count leaks in various parts of batman-adv, from
Xiyu Yang.
2) Update NAT checksum even when it is zero, from Guillaume Nault.
3) sk_psock reference count leak in tls code, also from Xiyu Yang.
4) Sanity check TCA_FQ_CODEL_DROP_BATCH_SIZE netlink attribute in
fq_codel, f
so tcp_is_sack/reno checks are removed from tcp_mark_head_lost.
Signed-off-by: zhang kai
---
net/ipv4/tcp_input.c | 32 +++-
1 file changed, 7 insertions(+), 25 deletions(-)
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index b996dc106..c306becf6 100644
--
The pull request you sent on Wed, 06 May 2020 20:40:39 -0700 (PDT):
> git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git refs/heads/master
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/a811c1fa0a02c062555b54651065899437bacdbe
Thank you!
--
Deet-doot-dot,
The current codebase makes use of the zero-length array language
extension to the C90 standard, but the preferred mechanism to declare
variable-length types such as these ones is a flexible array member[1][2],
introduced in C99:
struct foo {
int stuff;
struct boo array[];
};
By ma
Both of you are right.
I neglected, and this patch is wrong.
Thanks.
On 2020/5/6 23:15, Joe Perches wrote:
On Wed, 2020-05-06 at 16:51 +0300, Luciano Coelho wrote:
On Tue, 2020-05-05 at 20:19 -0700, Joe Perches wrote:
On Wed, 2020-05-06 at 11:07 +0800, Samuel Zou wrote:
This silences the fol
Kalle,
On 5/5/20 02:51, Kalle Valo wrote:
>
> Fails to apply, please rebase on top of ath.git master branch.
>
> error: patch failed: drivers/net/wireless/ath/ath10k/pci.h:182
> error: drivers/net/wireless/ath/ath10k/pci.h: patch does not apply
> stg import: Diff does not apply cleanly
>
> Pat
In case of error, 'qcom_wcnss_open_channel()' must be undone by a call to
'rpmsg_destroy_ept()', as already done in the remove function.
Fixes: 5052de8deff5 ("soc: qcom: smd: Transition client drivers from smd to
rpmsg")
Signed-off-by: Christophe JAILLET
---
Not 100% sure of the commit for Fixes
Hi Grygorii,
thank you for you patches!
On Wed, May 06, 2020 at 10:08:35PM +0300, Grygorii Strashko wrote:
> Since commit bcf3440c6dd7 ("net: phy: micrel: add phy-mode support for the
> KSZ9031 PHY") the networking is broken on boards:
> am437x-gp-evm
> am437x-sk-evm
> am437x-idk-evm
>
> All
On Wed 06 May 21:36 PDT 2020, Christophe JAILLET wrote:
> In case of error, 'qcom_wcnss_open_channel()' must be undone by a call to
> 'rpmsg_destroy_ept()', as already done in the remove function.
>
> Fixes: 5052de8deff5 ("soc: qcom: smd: Transition client drivers from smd to
> rpmsg")
It seems
On Wed, May 06, 2020 at 12:01:32PM -0700, Linus Torvalds wrote:
> Oh, absolutely. I did *NOT* mean that you'd use "unsafe_get_user()" as
> the actual interface. I just meant that as an implementation detail on
> x86, using "unsafe_get_user()" instead of "__get_user_size()"
> internally both simplif
Motivation:
The current way to dump kernel data structures mostly:
1. /proc system
2. various specific tools like "ss" which requires kernel support.
3. drgn
The dropback for the first two is that whenever you want to dump more, you
need change the kernel. For example, Martin want
Currently, only one command is supported
bpftool iter pin
It will pin the trace/iter bpf program in
the object file to the
where should be on a bpffs mount.
For example,
$ bpftool iter pin ./bpf_iter_ipv6_route.o \
/sys/fs/bpf/my_route
User can then do a `cat` to print out the result
The target can call bpf_iter_reg_target() to register itself.
The needed information:
target: target name
seq_ops: the seq_file operations for the target
init_seq_private target callback to initialize seq_priv during file open
fini_seq_private target callback to clean u
A bpf_iter program is a tracing program with attach type
BPF_TRACE_ITER. The load attribute
attach_btf_id
is used by the verifier against a particular kernel function,
which represents a target, e.g., __bpf_iter__bpf_map
for target bpf_map which is implemented later.
The program return value mus
Two bpf programs are added in this patch for netlink and ipv6_route
target. On my VM, I am able to achieve identical
results compared to /proc/net/netlink and /proc/net/ipv6_route.
$ cat /proc/net/netlink
sk Eth PidGroups Rmem Wmem Dump Locks
DropsInode
bpf iterator uses seq_file to provide a lossless
way to transfer data to user space. But we want to call
bpf program after all objects have been traversed, and
bpf program may write additional data to the
seq_file buffer. The current seq_read() does not work
for this use case.
Besides allowing sto
Only the tasks belonging to "current" pid namespace
are enumerated.
For task/file target, the bpf program will have access to
struct task_struct *task
u32 fd
struct file *file
where fd/file is an open file for the task.
Signed-off-by: Yonghong Song
---
kernel/bpf/Makefile| 2 +-
ker
In /proc/net/ipv6_route, we have
struct fib6_info {
struct fib6_table *fib6_table;
...
struct fib6_nh fib6_nh[0];
}
struct fib6_nh {
struct fib_nh_common nh_common;
struct rt6_info **rt6i_pcpu;
struct rt6_exception_bucket *rt6i_exception_bucket;
};
struct fib_nh_co
This specifically to handle the case like below:
// ptr below is a socket ptr identified by PTR_TO_BTF_ID
u64 param[2] = { ptr, val };
bpf_seq_printf(seq, fmt, sizeof(fmt), param, sizeof(param));
In this case, the 16 bytes stack for "param" contains:
8 bytes for ptr with spilled PTR_TO
Macro DEFINE_BPF_ITER_FUNC is implemented so target
can define an init function to capture the BTF type
which represents the target.
The bpf_iter_meta is a structure holding meta data, common
to all targets in the bpf program.
Additional marker functions are called before or after
bpf_seq_read()
Two helpers bpf_seq_printf and bpf_seq_write, are added for
writing data to the seq_file buffer.
bpf_seq_printf supports common format string flag/width/type
fields so at least I can get identical results for
netlink and ipv6_route targets.
For bpf_seq_printf and bpf_seq_write, return value -EOVE
Added BPF_LINK_UPDATE support for tracing/iter programs.
This way, a file based bpf iterator, which holds a reference
to the link, can have its bpf program updated without
creating new files.
Acked-by: Andrii Nakryiko
Signed-off-by: Yonghong Song
---
kernel/bpf/bpf_iter.c | 31 +
Add bpf_reg_type PTR_TO_BTF_ID_OR_NULL support.
For tracing/iter program, the bpf program context
definition, e.g., for previous bpf_map target, looks like
struct bpf_iter__bpf_map {
struct bpf_iter_meta *meta;
struct bpf_map *map;
};
The kernel guarantees that meta is not NULL, but
ma
The added test includes the following subtests:
- test verifier change for btf_id_or_null
- test load/create_iter/read for
ipv6_route/netlink/bpf_map/task/task_file
- test anon bpf iterator
- test anon bpf iterator reading one char at a time
- test file bpf iterator
- test overflow
Two new libbpf APIs are added to support bpf_iter:
- bpf_program__attach_iter
Given a bpf program and additional parameters, which is
none now, returns a bpf_link.
- bpf_iter_create
syscall level API to create a bpf iterator.
The macro BPF_SEQ_PRINTF are also introduced. The format
This patch added netlink and ipv6_route targets, using
the same seq_ops (except show() and minor changes for stop())
for /proc/net/{netlink,ipv6_route}.
The net namespace for these targets are the current net
namespace at file open stage, similar to
/proc/net/{netlink,ipv6_route} reference countin
The implementation is arbitrary, just to show how the bpf programs
can be written for bpf_map/task/task_file. They can be costomized
for specific needs.
For example, for bpf_map, the iterator prints out:
$ cat /sys/fs/bpf/my_bpf_map
id refcnt usercnt locked_vm
32
A new bpf command BPF_ITER_CREATE is added.
The anonymous bpf iterator is seq_file based.
The seq_file private data are referenced by targets.
The bpf_iter infrastructure allocated additional space
at seq_file->private before the space used by targets
to store some meta data, e.g.,
prog: p
These two helpers will be used later in bpf_iter bpf program
bpf_iter_netlink.c. Put them in bpf_helpers.h since they could
be useful in other cases.
Signed-off-by: Yonghong Song
---
tools/lib/bpf/bpf_helpers.h | 14 ++
1 file changed, 14 insertions(+)
diff --git a/tools/lib/bpf/bpf
To produce a file bpf iterator, the fd must be
corresponding to a link_fd assocciated with a
trace/iter program. When the pinned file is
opened, a seq_file will be generated.
Acked-by: Andrii Nakryiko
Signed-off-by: Yonghong Song
---
include/linux/bpf.h | 2 ++
kernel/bpf/bpf_iter.c | 17 +++
301 - 400 of 411 matches
Mail list logo