Re: [PATCH v6 net-next 14/15] net: bonding: ensure .ndo_get_stats64 can sleep

2021-01-12 Thread Vladimir Oltean
On Mon, Jan 11, 2021 at 03:38:49PM -0800, Saeed Mahameed wrote: > GFP_ATOMIC is a little bit aggressive especially when user daemons are > periodically reading stats. This can be avoided. > > You can pre-allocate with GFP_KERNEL an array with an "approximate" > size. > then fill the array up with w

Re: [PATCH net-next v4 1/4] net: phy: mdio-i2c: support I2C MDIO protocol for RollBall SFP modules

2021-01-12 Thread Heiner Kallweit
On 12.01.2021 15:02, Andrew Lunn wrote: >> I'd think that mdio-i2c.c is for generic code. When adding a >> vendor-specific protocol, wouldn't it make sense to use a dedicated >> source file for it? > > Hi Heiner > > There is no standardised way to access MDIO over i2c. So the existing > code is v

Re: [PATCH 2/2] selftests/bpf: add verifier test for PTR_TO_MEM spill

2021-01-12 Thread KP Singh
On Tue, Jan 12, 2021 at 10:16 AM Gilad Reti wrote: > > Add test to check that the verifier is able to recognize spilling of > PTR_TO_MEM registers. > It would be nice to have some explanation of what the test does to recognize the spilling of the PTR_TO_MEM registers in the commit log as well. W

Re: [PATCH bpf 1/2] bpf: support PTR_TO_MEM{,_OR_NULL} register spilling

2021-01-12 Thread KP Singh
On Tue, Jan 12, 2021 at 3:24 PM Gilad Reti wrote: > > On Tue, Jan 12, 2021 at 3:57 PM KP Singh wrote: > > > > On Tue, Jan 12, 2021 at 10:14 AM Gilad Reti wrote: > > > > > > Add support for pointer to mem register spilling, to allow the verifier > > > to track pointer to valid memory addresses. S

Re: [PATCH v10 1/1] can: usb: etas_es58X: add support for ETAS ES58X CAN USB interfaces

2021-01-12 Thread Vincent MAILHOL
On Tue. 12 Jan 2021 at 22:05, Vincent Mailhol wrote: > > This driver supports the ES581.4, ES582.1 and ES584.1 interfaces from > ETAS GmbH (https://www.etas.com/en/products/es58x.php). > > Co-developed-by: Arunachalam Santhanam > Signed-off-by: Arunachalam Santhanam > Signed-off-by: Vincent Mail

[PATCH ghak90 v11 01/11] audit: collect audit task parameters

2021-01-12 Thread Richard Guy Briggs
The audit-related parameters in struct task_struct should ideally be collected together and accessed through a standard audit API and the audit structures made opaque to other kernel subsystems. Collect the existing loginuid, sessionid and audit_context together in a new opaque struct audit_task_i

[PATCH ghak90 v11 02/11] audit: add container id

2021-01-12 Thread Richard Guy Briggs
Implement the proc fs write to set the audit container identifier of a process, emitting an AUDIT_CONTAINER_OP record to document the event. This is a write from the container orchestrator task to a proc entry of the form /proc/PID/audit_containerid where PID is the process ID of the newly created

[PATCH ghak90 v11 03/11] audit: log container info of syscalls

2021-01-12 Thread Richard Guy Briggs
Create a new audit record AUDIT_CONTAINER_ID to document the audit container identifier of a process if it is present. Called from audit_log_exit(), syscalls are covered. Include target_cid references from ptrace and signal. A sample raw event: time->Thu Nov 26 10:24:40 2020 type=PROCTITLE m

[PATCH ghak90 v11 00/11] audit: implement container identifier

2021-01-12 Thread Richard Guy Briggs
Implement kernel audit container identifier. This patchset is an eighth based on the proposal document (V4) posted: https://www.redhat.com/archives/linux-audit/2019-September/msg00052.html The first patch was the last patch from ghak81 that was absorbed into this patchset since its primar

[PATCH ghak90 v11 04/11] audit: add contid support for signalling the audit daemon

2021-01-12 Thread Richard Guy Briggs
Add audit container identifier support to the action of signalling the audit daemon. Since this would need to add an element to the audit_sig_info struct, a new record type AUDIT_SIGNAL_INFO2 was created with a new audit_sig_info2 struct. Corresponding support is required in the userspace code to

[PATCH ghak90 v11 06/11] audit: add containerid support for user records

2021-01-12 Thread Richard Guy Briggs
Add audit container identifier auxiliary record to user event standalone records. Signed-off-by: Richard Guy Briggs Acked-by: Neil Horman Reviewed-by: Ondrej Mosnacek --- kernel/audit.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/kernel/audit.c b/kernel/aud

[PATCH ghak90 v11 05/11] audit: add support for non-syscall auxiliary records

2021-01-12 Thread Richard Guy Briggs
Standalone audit records have the timestamp and serial number generated on the fly and as such are unique, making them standalone. This new function audit_alloc_local() generates a local audit context that will be used only for a standalone record and its auxiliary record(s). The context is disca

[PATCH ghak90 v11 11/11] audit: add capcontid to set contid outside init_user_ns

2021-01-12 Thread Richard Guy Briggs
Provide a mechanism similar to CAP_AUDIT_CONTROL to explicitly give a process in a non-init user namespace the capability to set audit container identifiers of individual children. Provide the /proc/$PID/audit_capcontid interface to capcontid. Valid values are: 1==enabled, 0==disabled Writing a "

[PATCH ghak90 v11 09/11] audit: contid check descendancy and nesting

2021-01-12 Thread Richard Guy Briggs
Require the target task to be a descendant of the container orchestrator/engine. You would only change the audit container ID from one set or inherited value to another if you were nesting containers. If changing the contid, the container orchestrator/engine must be a descendant and not same orch

[PATCH ghak90 v11 10/11] audit: track container nesting

2021-01-12 Thread Richard Guy Briggs
Track the parent container of a container to be able to filter and report nesting. Now that we have a way to track and check the parent container of a container, modify the contid field format to be able to report that nesting using a carrat ("^") modifier to indicate nesting. The original field

[PATCH ghak90 v11 08/11] audit: add support for containerid to network namespaces

2021-01-12 Thread Richard Guy Briggs
This also adds support to qualify NETFILTER_PKT records. Audit events could happen in a network namespace outside of a task context due to packets received from the net that trigger an auditing rule prior to being associated with a running task. The network namespace could be in use by multiple c

[PATCH ghak90 v11 07/11] audit: add containerid filtering

2021-01-12 Thread Richard Guy Briggs
Implement audit container identifier filtering using the AUDIT_CONTID field name to send an 8-character string representing a u64 since the value field is only u32. Sending it as two u32 was considered, but gathering and comparing two fields was more complex. The feature indicator is AUDIT_FEATUR

[PATCH net] rxrpc: Fix handling of an unsupported token type in rxrpc_read()

2021-01-12 Thread David Howells
Clang static analysis reports the following: net/rxrpc/key.c:657:11: warning: Assigned value is garbage or undefined toksize = toksizes[tok++]; ^ ~~~ rxrpc_read() contains two consecutive loops. The first loop calculates the token sizes and sto

Re: [net-next 15/19] can: tcan4x5x: rework SPI access

2021-01-12 Thread Marc Kleine-Budde
On 1/7/21 11:38 PM, Jakub Kicinski wrote: > On Thu, 7 Jan 2021 22:17:15 +0100 Marc Kleine-Budde wrote: >>> +struct __packed tcan4x5x_buf_cmd { >>> + u8 cmd; >>> + __be16 addr; >>> + u8 len; >>> +}; >> >> This has to be packed, as I assume the compiler would add some space after >> the

Re: [PATCH v10 1/1] can: usb: etas_es58X: add support for ETAS ES58X CAN USB interfaces

2021-01-12 Thread kernel test robot
umented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Vincent-Mailhol/add-support-for-ETAS-ES58X-CAN-USB-interfaces/20210112-211624 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a0d54b4f5b219fb31f0776e9f53aa137e78ae

Re: [PATCH 2/2] selftests/bpf: add verifier test for PTR_TO_MEM spill

2021-01-12 Thread Gilad Reti
On Tue, Jan 12, 2021 at 4:56 PM KP Singh wrote: > > On Tue, Jan 12, 2021 at 10:16 AM Gilad Reti wrote: > > > > Add test to check that the verifier is able to recognize spilling of > > PTR_TO_MEM registers. > > > > It would be nice to have some explanation of what the test does to > recognize the

Re: [net-next 15/19] can: tcan4x5x: rework SPI access

2021-01-12 Thread Marc Kleine-Budde
On 1/8/21 10:53 PM, David Laight wrote: >> On 1/7/21 8:06 PM, Jakub Kicinski wrote: >>> On Thu, 7 Jan 2021 11:00:35 -0800 Jakub Kicinski wrote: On Thu, 7 Jan 2021 10:48:56 +0100 Marc Kleine-Budde wrote: > +struct __packed tcan4x5x_map_buf { > + struct tcan4x5x_buf_cmd cmd; > + u8

[PATCH v1 1/1] time64.h: Consolidated PSEC_PER_SEC definition

2021-01-12 Thread Andy Shevchenko
We have currently three users of the PSEC_PER_SEC each of them defining it individually. Instead, move it to time64.h to be available for everyone. There is a new user coming with the same constant in use. It will also make its life easier. Signed-off-by: Andy Shevchenko --- drivers/net/etherne

Re: [PATCH v1 2/2] sfp: add support for 100 base-x SFPs

2021-01-12 Thread Andrew Lunn
> Not sure what you mean, the patch is above the comment (line 265 vs > 345). The patch is on top of 5.10, is that the issue? All networking patches for the next merge window should be against net-next. Please see: https://www.kernel.org/doc/html/latest/networking/netdev-FAQ.html which talks ab

Re: [PATCH v1 1/1] time64.h: Consolidated PSEC_PER_SEC definition

2021-01-12 Thread Heiko Stübner
Am Dienstag, 12. Januar 2021, 16:37:09 CET schrieb Andy Shevchenko: > We have currently three users of the PSEC_PER_SEC each of them defining it > individually. Instead, move it to time64.h to be available for everyone. > > There is a new user coming with the same constant in use. It will also > m

Re: [PATCH 2/2] selftests/bpf: add verifier test for PTR_TO_MEM spill

2021-01-12 Thread Daniel Borkmann
On 1/12/21 4:35 PM, Gilad Reti wrote: On Tue, Jan 12, 2021 at 4:56 PM KP Singh wrote: On Tue, Jan 12, 2021 at 10:16 AM Gilad Reti wrote: Add test to check that the verifier is able to recognize spilling of PTR_TO_MEM registers. It would be nice to have some explanation of what the test doe

Re: regression in iwlwifi: page fault in iwl_dbg_tlv_alloc_region() (commit ba8f6f4ae254)

2021-01-12 Thread Kalle Valo
Takashi Iwai writes: > On Tue, 12 Jan 2021 13:45:33 +0100, > Kalle Valo wrote: >> >> Takashi Iwai writes: >> >> > On Tue, 12 Jan 2021 12:33:14 +0100, >> > Kalle Valo wrote: >> >> >> >> (adding luca) >> >> >> >> Michal Kubecek writes: >> >> >> >> > FYI, there is a regression in iwlwifi driv

Re: [PATCH] rtlwifi: rtl8821ae: style: Simplify bool comparison

2021-01-12 Thread Kalle Valo
Pkshih writes: > On Tue, 2021-01-12 at 16:33 +0800, YANG LI wrote: >> Fix the following coccicheck warning: >> ./drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:3853:7-17: >> WARNING: Comparison of 0/1 to bool variable >> >> Reported-by: Abaci Robot >> Signed-off-by: YANG LI >> > > I thi

Re: [net-next PATCH v3 09/15] device property: Introduce fwnode_get_id()

2021-01-12 Thread Andy Shevchenko
On Tue, Jan 12, 2021 at 3:42 PM Calvin Johnson wrote: > > Using fwnode_get_id(), get the reg property value for DT node > or get the _ADR object value for ACPI node. > > Signed-off-by: Calvin Johnson > --- > > Changes in v3: > - Modified to retrieve reg property value for ACPI as well > - Resolve

Re: [PATCH 2/2] iwlwifi: dbg: Mark ucode tlv data as const

2021-01-12 Thread Kalle Valo
Takashi Iwai writes: > The ucode TLV data may be read-only and should be treated as const > pointers, but currently a few code forcibly cast to the writable > pointer unnecessarily. This gave developers a wrong impression as if > it can be modified, resulting in crashing regressions already a co

Re: [PATCH 1/2] iwlwifi: dbg: Don't touch the tlv data

2021-01-12 Thread Kalle Valo
Takashi Iwai writes: > The commit ba8f6f4ae254 ("iwlwifi: dbg: add dumping special device > memory") added a termination of name string just to be sure, and this > seems causing a regression, a GPF triggered at firmware loading. > Basically we shouldn't modify the firmware data that may be provid

Re: [net-next PATCH v3 11/15] net: mdiobus: Introduce fwnode_mdiobus_register()

2021-01-12 Thread Andy Shevchenko
On Tue, Jan 12, 2021 at 3:42 PM Calvin Johnson wrote: > > Introduce fwnode_mdiobus_register() to register PHYs on the mdiobus. > If the fwnode is DT node, then call of_mdiobus_register(). > If it is an ACPI node, then call acpi_mdiobus_register(). ... > +/** > + * fwnode_mdiobus_register - Regi

Re: [net-next PATCH v3 12/15] net/fsl: Use fwnode_mdiobus_register()

2021-01-12 Thread Andy Shevchenko
On Tue, Jan 12, 2021 at 3:43 PM Calvin Johnson wrote: > > fwnode_mdiobus_register() internally takes care of both DT > and ACPI cases to register mdiobus. Replace existing > of_mdiobus_register() with fwnode_mdiobus_register(). > > Note: For both ACPI and DT cases, endianness of MDIO controller >

Re: [net-next PATCH v3 13/15] phylink: introduce phylink_fwnode_phy_connect()

2021-01-12 Thread Andy Shevchenko
On Tue, Jan 12, 2021 at 3:43 PM Calvin Johnson wrote: > > Define phylink_fwnode_phy_connect() to connect phy specified by > a fwnode to a phylink instance. ... > + phy_dev = fwnode_phy_find_device(phy_fwnode); > + /* We're done with the phy_node handle */ > + fwnode_handle_put(

Re: [net-next PATCH v3 14/15] net: phylink: Refactor phylink_of_phy_connect()

2021-01-12 Thread Andy Shevchenko
On Tue, Jan 12, 2021 at 3:43 PM Calvin Johnson wrote: > > Refactor phylink_of_phy_connect() to use phylink_fwnode_phy_connect(). Same Q as per previous patch. If it's indeed a bug in the existing code, should be fixed in a separate patch -- With Best Regards, Andy Shevchenko

Re: regression in iwlwifi: page fault in iwl_dbg_tlv_alloc_region() (commit ba8f6f4ae254)

2021-01-12 Thread Takashi Iwai
On Tue, 12 Jan 2021 16:46:21 +0100, Kalle Valo wrote: > > Takashi Iwai writes: > > > On Tue, 12 Jan 2021 13:45:33 +0100, > > Kalle Valo wrote: > >> > >> Takashi Iwai writes: > >> > >> > On Tue, 12 Jan 2021 12:33:14 +0100, > >> > Kalle Valo wrote: > >> >> > >> >> (adding luca) > >> >> > >> >

[PATCH net] rxrpc: Call state should be read with READ_ONCE() under some circumstances

2021-01-12 Thread David Howells
From: Baptiste Lepers The call state may be changed at any time by the data-ready routine in response to received packets, so if the call state is to be read and acted upon several times in a function, READ_ONCE() must be used unless the call state lock is held. As it happens, we used READ_ONCE(

Re: [PATCH 1/2] iwlwifi: dbg: Don't touch the tlv data

2021-01-12 Thread Takashi Iwai
On Tue, 12 Jan 2021 16:48:56 +0100, Kalle Valo wrote: > > Takashi Iwai writes: > > > The commit ba8f6f4ae254 ("iwlwifi: dbg: add dumping special device > > memory") added a termination of name string just to be sure, and this > > seems causing a regression, a GPF triggered at firmware loading. >

Re: [PATCH net-next v14 5/6] net: dsa: mv88e6xxx: Add support for mv88e6393x family of Marvell

2021-01-12 Thread Marek Behún
Hi Vladimir, On Tue, 12 Jan 2021 13:11:39 +0200 Vladimir Oltean wrote: > On Mon, Jan 11, 2021 at 02:21:55AM +0100, Marek Behún wrote: > > via which serveral more registers can be accessed indirectly > > several Thanks. > > +static void mv88e6393x_phylin

Re: [PATCH net-next 4/4] tcp: remove limit on initial receive window

2021-01-12 Thread Heath Caldwell
On 2021-01-12 09:30 (+0100), Eric Dumazet wrote: > I think the whole patch series is an attempt to badly break TCP stack. Can you explain the concern that you have about how these changes might break the TCP stack? Patches 1 and 3 fix clear bugs. Patches 2 and 4 might be arguable, though. Is y

Re: [PATCH 2/2] iwlwifi: dbg: Mark ucode tlv data as const

2021-01-12 Thread Takashi Iwai
On Tue, 12 Jan 2021 16:50:54 +0100, Kalle Valo wrote: > > Takashi Iwai writes: > > > The ucode TLV data may be read-only and should be treated as const > > pointers, but currently a few code forcibly cast to the writable > > pointer unnecessarily. This gave developers a wrong impression as if >

Re: [PATCH v1 0/2] Add 100 base-x mode

2021-01-12 Thread Russell King - ARM Linux admin
On Tue, Jan 12, 2021 at 03:33:34PM +0100, Bjarni Jonasson wrote: > On Mon, 2021-01-11 at 14:18 +, Russell King - ARM Linux admin > wrote: > > EXTERNAL EMAIL: Do not click links or open attachments unless you > > know the content is safe > > > > On Mon, Jan 11, 2021 at 02:06:55PM +0100, Bjarni

Re: [PATCH bpf-next 0/2] add xdp_build_skb_from_frame utility routine

2021-01-12 Thread Lorenzo Bianconi
> Introduce __xdp_build_skb_from_frame and xdp_build_skb_from_frame routines to > build the skb from a xdp_frame. Respect to __xdp_build_skb_from_frame, > xdp_build_skb_from_frame will allocate the skb object. > Rely on __xdp_build_skb_from_frame/xdp_build_skb_from_frame in cpumap and veth > code.

Re: [PATCH 2/2] selftests/bpf: add verifier test for PTR_TO_MEM spill

2021-01-12 Thread KP Singh
On Tue, Jan 12, 2021 at 4:43 PM Daniel Borkmann wrote: > > On 1/12/21 4:35 PM, Gilad Reti wrote: > > On Tue, Jan 12, 2021 at 4:56 PM KP Singh wrote: > >> On Tue, Jan 12, 2021 at 10:16 AM Gilad Reti wrote: > >>> > >>> Add test to check that the verifier is able to recognize spilling of > >>> PTR_

[PATCH net 2/2] net/smc: use memcpy instead of snprintf to avoid out of bounds read

2021-01-12 Thread Karsten Graul
From: Guvenc Gulce Using snprintf() to convert not null-terminated strings to null terminated strings may cause out of bounds read in the source string. Therefore use memcpy() and terminate the target string with a null afterwards. Fixes: a3db10efcc4c ("net/smc: Add support for obtaining SMCR de

[PATCH net 1/2] smc: fix out of bound access in smc_nl_get_sys_info()

2021-01-12 Thread Karsten Graul
From: Jakub Kicinski smc_clc_get_hostname() sets the host pointer to a buffer which is not NULL-terminated (see smc_clc_init()). Reported-by: syzbot+f4708c391121cfc58...@syzkaller.appspotmail.com Fixes: 099b990bd11a ("net/smc: Add support for obtaining system information") Signed-off-by: Jakub K

[PATCH net 0/2] net/smc: fix out of bound access in netlink interface

2021-01-12 Thread Karsten Graul
Please apply the following patch for smc to netdev's net tree. Both patches fix possible out-of-bounds reads. The original code expected that snprintf() reads len-1 bytes from source and appends the terminating null, but actually snprintf() first copies len bytes and finally overwrites the last by

Re: [PATCH 2/2] selftests/bpf: add verifier test for PTR_TO_MEM spill

2021-01-12 Thread Gilad Reti
On Tue, Jan 12, 2021 at 6:17 PM KP Singh wrote: > > On Tue, Jan 12, 2021 at 4:43 PM Daniel Borkmann wrote: > > > > On 1/12/21 4:35 PM, Gilad Reti wrote: > > > On Tue, Jan 12, 2021 at 4:56 PM KP Singh wrote: > > >> On Tue, Jan 12, 2021 at 10:16 AM Gilad Reti wrote: > > >>> > > >>> Add test to ch

Re: [PATCH v3 bpf-next 5/7] bpf: support BPF ksym variables in kernel modules

2021-01-12 Thread Daniel Borkmann
On 1/12/21 8:55 AM, Andrii Nakryiko wrote: Add support for directly accessing kernel module variables from BPF programs using special ldimm64 instructions. This functionality builds upon vmlinux ksym support, but extends ldimm64 with src_reg=BPF_PSEUDO_BTF_ID to allow specifying kernel module BTF

Re: [PATCH net-next v14 5/6] net: dsa: mv88e6xxx: Add support for mv88e6393x family of Marvell

2021-01-12 Thread Russell King - ARM Linux admin
On Tue, Jan 12, 2021 at 05:02:26PM +0100, Marek Behún wrote: > > > +static void mv88e6393x_phylink_validate(struct mv88e6xxx_chip *chip, int > > > port, > > > + unsigned long *mask, > > > + struct phylink_link_state *state) > > > +{ >

Re: [PATCH bpf-next 1/4] bpf: enable task local storage for tracing programs

2021-01-12 Thread Yonghong Song
On 1/11/21 3:45 PM, Song Liu wrote: On Jan 11, 2021, at 1:58 PM, Martin Lau wrote: On Mon, Jan 11, 2021 at 10:35:43PM +0100, KP Singh wrote: On Mon, Jan 11, 2021 at 7:57 PM Martin KaFai Lau wrote: On Fri, Jan 08, 2021 at 03:19:47PM -0800, Song Liu wrote: [ ... ] diff --git a/kernel

Re: [PATCH net-next v14 5/6] net: dsa: mv88e6xxx: Add support for mv88e6393x family of Marvell

2021-01-12 Thread Marek Behún
On Tue, 12 Jan 2021 16:29:09 + Russell King - ARM Linux admin wrote: > On Tue, Jan 12, 2021 at 05:02:26PM +0100, Marek Behún wrote: > > > > +static void mv88e6393x_phylink_validate(struct mv88e6xxx_chip *chip, > > > > int port, > > > > + unsigned long *m

Re: [PATCH bpf-next 1/2] net: xdp: introduce __xdp_build_skb_from_frame utility routine

2021-01-12 Thread Jesper Dangaard Brouer
On Wed, 16 Dec 2020 19:38:33 +0100 Lorenzo Bianconi wrote: > Introduce __xdp_build_skb_from_frame utility routine to build > the skb from xdp_frame. Rely on __xdp_build_skb_from_frame in > cpumap code. > > Signed-off-by: Lorenzo Bianconi > --- > include/net/xdp.h | 3 +++ > kernel/bpf/cpuma

Re: [PATCH bpf-next 0/2] add xdp_build_skb_from_frame utility routine

2021-01-12 Thread Daniel Borkmann
On 1/12/21 5:08 PM, Lorenzo Bianconi wrote: Introduce __xdp_build_skb_from_frame and xdp_build_skb_from_frame routines to build the skb from a xdp_frame. Respect to __xdp_build_skb_from_frame, xdp_build_skb_from_frame will allocate the skb object. Rely on __xdp_build_skb_from_frame/xdp_build_skb_

Re: [PATCH bpf-next 2/2] net: xdp: introduce xdp_build_skb_from_frame utility routine

2021-01-12 Thread Jesper Dangaard Brouer
On Wed, 16 Dec 2020 19:38:34 +0100 Lorenzo Bianconi wrote: > Introduce xdp_build_skb_from_frame utility routine to build the skb > from xdp_frame. Respect to __xdp_build_skb_from_frame, > xdp_build_skb_from_frame will allocate the skb object. Rely on > xdp_build_skb_from_frame in veth driver. >

Re: [PATCH bpf-next 1/4] bpf: enable task local storage for tracing programs

2021-01-12 Thread KP Singh
On Tue, Jan 12, 2021 at 5:32 PM Yonghong Song wrote: > > > > On 1/11/21 3:45 PM, Song Liu wrote: > > > > > >> On Jan 11, 2021, at 1:58 PM, Martin Lau wrote: > >> > >> On Mon, Jan 11, 2021 at 10:35:43PM +0100, KP Singh wrote: > >>> On Mon, Jan 11, 2021 at 7:57 PM Martin KaFai Lau wrote: > >

Re: [PATCH bpf-next 0/2] add xdp_build_skb_from_frame utility routine

2021-01-12 Thread Lorenzo Bianconi
> On 1/12/21 5:08 PM, Lorenzo Bianconi wrote: > > > Introduce __xdp_build_skb_from_frame and xdp_build_skb_from_frame > > > routines to > > > build the skb from a xdp_frame. Respect to __xdp_build_skb_from_frame, > > > xdp_build_skb_from_frame will allocate the skb object. > > > Rely on __xdp_buil

Re: [PATCH 2/2] selftests/bpf: add verifier test for PTR_TO_MEM spill

2021-01-12 Thread Yonghong Song
On 1/12/21 7:43 AM, Daniel Borkmann wrote: On 1/12/21 4:35 PM, Gilad Reti wrote: On Tue, Jan 12, 2021 at 4:56 PM KP Singh wrote: On Tue, Jan 12, 2021 at 10:16 AM Gilad Reti wrote: Add test to check that the verifier is able to recognize spilling of PTR_TO_MEM registers. It would be nic

Re: [PATCH 1/2] iwlwifi: dbg: Don't touch the tlv data

2021-01-12 Thread Coelho, Luciano
On Tue, 2021-01-12 at 17:02 +0100, Takashi Iwai wrote: > On Tue, 12 Jan 2021 16:48:56 +0100, > Kalle Valo wrote: > > > > Takashi Iwai writes: > > > > > The commit ba8f6f4ae254 ("iwlwifi: dbg: add dumping special device > > > memory") added a termination of name string just to be sure, and this >

Re: [PATCH 2/2] iwlwifi: dbg: Mark ucode tlv data as const

2021-01-12 Thread Coelho, Luciano
On Tue, 2021-01-12 at 17:05 +0100, Takashi Iwai wrote: > On Tue, 12 Jan 2021 16:50:54 +0100, > Kalle Valo wrote: > > > > Takashi Iwai writes: > > > > > The ucode TLV data may be read-only and should be treated as const > > > pointers, but currently a few code forcibly cast to the writable > > >

[PATCH net 1/2] net: stmmac: fix taprio schedule configuration

2021-01-12 Thread Yannick Vignon
From: Yannick Vignon When configuring a 802.1Qbv schedule through the tc taprio qdisc on an NXP i.MX8MPlus device, the effective cycle time differed from the requested one by N*96ns, with N number of entries in the Qbv Gate Control List. This is because the driver was adding a 96ns margin to each

[PATCH net 2/2] net: stmmac: fix taprio configuration when base_time is in the past

2021-01-12 Thread Yannick Vignon
From: Yannick Vignon The Synopsys TSN MAC supports Qbv base times in the past, but only up to a certain limit. As a result, a taprio qdisc configuration with a small base time (for example when treating the base time as a simple phase offset) is not applied by the hardware and silently ignored.

[PATCH net 2/2] mptcp: better msk-level shutdown.

2021-01-12 Thread Paolo Abeni
Instead of re-implementing most of inet_shutdown, re-use such helper, and implement the MPTCP-specific bits at the 'proto' level. The msk-level disconnect() can now be invoked, lets provide a suitable implementation. As a side effect, this fixes bad state management for listener sockets. The latt

[PATCH net 0/2] mptcp: a couple of fixes

2021-01-12 Thread Paolo Abeni
This series includes two related fixes addressing potential divide by 0 bugs in the MPTCP datapath. Paolo Abeni (2): mptcp: more strict state checking for acks mptcp: better msk-level shutdown. net/mptcp/protocol.c | 64 +--- 1 file changed, 18 inserti

[PATCH net 1/2] mptcp: more strict state checking for acks

2021-01-12 Thread Paolo Abeni
Syzkaller found a way to trigger division by zero in mptcp_subflow_cleanup_rbuf(). The current checks implemented into tcp_can_send_ack() are too week, let's be more accurate. Reported-by: Christoph Paasch Fixes: ea4ca586b16f ("mptcp: refine MPTCP-level ack scheduling") Fixes: fd8976790a6c ("mpt

Re: [PATCH V3] drivers: net: marvell: Fixed two spellings,controling to controlling and oen to one

2021-01-12 Thread Randy Dunlap
On 1/12/21 2:31 AM, Bhaskar Chowdhury wrote: > s/oen/one/ > s/controling/controlling/ > > Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Thanks. > --- > Changes from V2 : Correct the versioning,mentioned both the changes > > drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.h | 2 +- >

RE: [Intel-wired-lan] [PATCH] i40e: acquire VSI pointer only after VF is initialized

2021-01-12 Thread Jankowski, Konrad0
> -Original Message- > From: Intel-wired-lan On Behalf Of > Stefan Assmann > Sent: poniedziałek, 30 listopada 2020 14:13 > To: intel-wired-...@lists.osuosl.org > Cc: netdev@vger.kernel.org; da...@davemloft.net; sassm...@kpanic.de > Subject: [Intel-wired-lan] [PATCH] i40e: acquire VSI po

Re: [Patch net] cls_flower: call nla_ok() before nla_next()

2021-01-12 Thread Cong Wang
On Tue, Jan 12, 2021 at 3:52 AM Xin Long wrote: > > On Tue, Jan 12, 2021 at 10:56 AM Cong Wang wrote: > > > > From: Cong Wang > > > > fl_set_enc_opt() simply checks if there are still bytes left to parse, > > but this is not sufficent as syzbot seems to be able to generate > > malformatted netli

[PATCH bpf-next V11 0/7] bpf: New approach for BPF MTU handling

2021-01-12 Thread Jesper Dangaard Brouer
This patchset drops all the MTU checks in TC BPF-helpers that limits growing the packet size. This is done because these BPF-helpers doesn't take redirect into account, which can result in their MTU check being done against the wrong netdev. The new approach is to give BPF-programs knowledge about

[PATCH bpf-next V11 3/7] bpf: bpf_fib_lookup return MTU value as output when looked up

2021-01-12 Thread Jesper Dangaard Brouer
The BPF-helpers for FIB lookup (bpf_xdp_fib_lookup and bpf_skb_fib_lookup) can perform MTU check and return BPF_FIB_LKUP_RET_FRAG_NEEDED. The BPF-prog don't know the MTU value that caused this rejection. If the BPF-prog wants to implement PMTU (Path MTU Discovery) (rfc1191) it need to know this MT

[PATCH bpf-next V11 2/7] bpf: fix bpf_fib_lookup helper MTU check for SKB ctx

2021-01-12 Thread Jesper Dangaard Brouer
BPF end-user on Cilium slack-channel (Carlo Carraro) wants to use bpf_fib_lookup for doing MTU-check, but *prior* to extending packet size, by adjusting fib_params 'tot_len' with the packet length plus the expected encap size. (Just like the bpf_check_mtu helper supports). He discovered that for SK

[PATCH bpf-next V11 4/7] bpf: add BPF-helper for MTU checking

2021-01-12 Thread Jesper Dangaard Brouer
This BPF-helper bpf_check_mtu() works for both XDP and TC-BPF programs. The SKB object is complex and the skb->len value (accessible from BPF-prog) also include the length of any extra GRO/GSO segments, but without taking into account that these GRO/GSO segments get added transport (L4) and networ

[PATCH bpf-next V11 5/7] bpf: drop MTU check when doing TC-BPF redirect to ingress

2021-01-12 Thread Jesper Dangaard Brouer
The use-case for dropping the MTU check when TC-BPF does redirect to ingress, is described by Eyal Birger in email[0]. The summary is the ability to increase packet size (e.g. with IPv6 headers for NAT64) and ingress redirect packet and let normal netstack fragment packet as needed. [0] https://l

[PATCH bpf-next V11 6/7] selftests/bpf: use bpf_check_mtu in selftest test_cls_redirect

2021-01-12 Thread Jesper Dangaard Brouer
This demonstrate how bpf_check_mtu() helper can easily be used together with bpf_skb_adjust_room() helper, prior to doing size adjustment, as delta argument is already setup. Hint: This specific test can be selected like this: ./test_progs -t cls_redirect Signed-off-by: Jesper Dangaard Brouer -

[PATCH bpf-next V11 1/7] bpf: Remove MTU check in __bpf_skb_max_len

2021-01-12 Thread Jesper Dangaard Brouer
Multiple BPF-helpers that can manipulate/increase the size of the SKB uses __bpf_skb_max_len() as the max-length. This function limit size against the current net_device MTU (skb->dev->mtu). When a BPF-prog grow the packet size, then it should not be limited to the MTU. The MTU is a transmit limit

[PATCH bpf-next V11 7/7] bpf/selftests: tests using bpf_check_mtu BPF-helper

2021-01-12 Thread Jesper Dangaard Brouer
Adding selftest for BPF-helper bpf_check_mtu(). Making sure it can be used from both XDP and TC. V11: - Addresse nitpicks from Andrii Nakryiko V10: - Remove errno non-zero test in CHECK_ATTR() - Addresse comments from Andrii Nakryiko Signed-off-by: Jesper Dangaard Brouer --- tools/testing/s

Re: [PATCH net-next v4 1/4] net: phy: mdio-i2c: support I2C MDIO protocol for RollBall SFP modules

2021-01-12 Thread Marek Behún
On Tue, 12 Jan 2021 15:02:49 +0100 Andrew Lunn wrote: > > I'd think that mdio-i2c.c is for generic code. When adding a > > vendor-specific protocol, wouldn't it make sense to use a dedicated > > source file for it? > > Hi Heiner > > There is no standardised way to access MDIO over i2c. So the

[RFC PATCH v2] net: bridge: igmp: Extend IGMP query to be per vlan

2021-01-12 Thread Horatiu Vultur
Based on the comments of the previous version, we started to work on a new version, so it would be possible to enable/disable queries per vlan. This is still work in progress and there are plenty of things that are not implemented and tested: - ipv6 support - the fast path needs to be improved - cu

Re: [net-next PATCH v3 09/15] device property: Introduce fwnode_get_id()

2021-01-12 Thread Andy Shevchenko
On Tue, Jan 12, 2021 at 09:30:31AM -0800, Saravana Kannan wrote: > On Tue, Jan 12, 2021 at 5:42 AM Calvin Johnson > wrote: > > > > Using fwnode_get_id(), get the reg property value for DT node > > or get the _ADR object value for ACPI node. ... > > +/** > > + * fwnode_get_id - Get the id of a fw

Re: [PATCH bpf v2] bpf: don't leak memory in bpf getsockopt when optlen == 0

2021-01-12 Thread Martin KaFai Lau
On Tue, Jan 12, 2021 at 08:28:29AM -0800, Stanislav Fomichev wrote: > optlen == 0 indicates that the kernel should ignore BPF buffer > and use the original one from the user. We, however, forget > to free the temporary buffer that we've allocated for BPF. Acked-by: Martin KaFai Lau

Re: [PATCH net-next v14 5/6] net: dsa: mv88e6xxx: Add support for mv88e6393x family of Marvell

2021-01-12 Thread Marek Behún
On Tue, 12 Jan 2021 16:29:09 + Russell King - ARM Linux admin wrote: > I'm seriously thinking about changing the phylink_validate() interface > such that the question of which link _modes_ are supported no longer > comes up with MAC drivers, but instead MAC drivers say what interface > modes,

[PATCH net-next v2 2/7] ibmvnic: update reset function prototypes

2021-01-12 Thread Sukadev Bhattiprolu
The reset functions need just the 'reset reason' parameter and not the ibmvnic_rwi list element. Update the functions so we can simplify the handling of the ->rwi_list in a follow-on patch. Fixes: 2770a7984db5 ("ibmvnic: Introduce hard reset recovery") Signed-off-by: Sukadev Bhattiprolu --- driv

[PATCH net-next v2 0/7] ibmvnic: Use more consistent locking

2021-01-12 Thread Sukadev Bhattiprolu
Use more consistent locking when reading/writing the adapter->state field. This patch set fixes a race condition during ibmvnic_open() where the adapter could be left in the PROBED state if a reset occurs at the wrong time. This can cause networking to not come up during boot and potentially requir

[PATCH net-next v2 6/7] ibmvnic: check adapter->state under state_lock

2021-01-12 Thread Sukadev Bhattiprolu
Consider following code from __ibmvnic_reset() spin_lock_irqsave(&adapter->state_lock, flags); if (adapter->state == VNIC_REMOVING || adapter->state == VNIC_REMOVED) { spin_unlock_irqrestore(&adapter->state_lock, flags);

[PATCH net-next v2 5/7] ibmvnic: serialize access to work queue

2021-01-12 Thread Sukadev Bhattiprolu
The work queue is used to queue reset requests like CHANGE-PARAM or FAILOVER resets for the worker thread. When the adapter is being removed the adapter state is set to VNIC_REMOVING and the work queue is flushed so no new work is added. However the check for adapter being removed is racy in that t

[PATCH net-next v2 3/7] ibmvnic: avoid allocating rwi entries

2021-01-12 Thread Sukadev Bhattiprolu
Whenever we need to schedule a reset, we allocate an rwi (reset work item?) entry and add to the list of pending resets. Since we only add one rwi for a given reason type to the list (no duplicates). we will only have a handful of reset types in the list - even in the worst case. In the common cas

[PATCH net-next v2 4/7] ibmvnic: switch order of checks in ibmvnic_reset

2021-01-12 Thread Sukadev Bhattiprolu
We check separately for REMOVING and PROBING in ibmvnic_reset(). Switch the order of checks to facilitate better locking when checking for REMOVING/REMOVED state. Fixes: 6a2fb0e99f9c ("ibmvnic: driver initialization for kdump/kexec") Signed-off-by: Sukadev Bhattiprolu --- drivers/net/ethernet/i

[PATCH net-next v2 7/7] ibmvnic: add comments about state_lock

2021-01-12 Thread Sukadev Bhattiprolu
Add some comments, notes and TODOs about ->state_lock and RTNL. Signed-off-by: Sukadev Bhattiprolu --- drivers/net/ethernet/ibm/ibmvnic.c | 58 ++ drivers/net/ethernet/ibm/ibmvnic.h | 51 +- 2 files changed, 108 insertions(+), 1 deletion(-) di

[PATCH net-next v2 1/7] ibmvnic: restore state in change-param reset

2021-01-12 Thread Sukadev Bhattiprolu
Restore adapter state before returning from change-param reset. In case of errors, caller will try a hard-reset anyway. Fixes: 0cb4bc66ba5e ("ibmvnic: restore adapter state on failed reset") Signed-off-by: Sukadev Bhattiprolu --- drivers/net/ethernet/ibm/ibmvnic.c | 2 +- 1 file changed, 1 inser

Re: [PATCH bpf-next 1/4] bpf: enable task local storage for tracing programs

2021-01-12 Thread Martin KaFai Lau
On Mon, Jan 11, 2021 at 03:41:26PM -0800, Song Liu wrote: > > > > On Jan 11, 2021, at 10:56 AM, Martin Lau wrote: > > > > On Fri, Jan 08, 2021 at 03:19:47PM -0800, Song Liu wrote: > > > > [ ... ] > > > >> diff --git a/kernel/bpf/bpf_local_storage.c > >> b/kernel/bpf/bpf_local_storage.c > >>

[PATCH v2 bpf-next 0/2] add xdp_build_skb_from_frame utility routine

2021-01-12 Thread Lorenzo Bianconi
Introduce __xdp_build_skb_from_frame and xdp_build_skb_from_frame routines to build the skb from a xdp_frame. Respect to __xdp_build_skb_from_frame, xdp_build_skb_from_frame will allocate the skb object. Rely on __xdp_build_skb_from_frame/xdp_build_skb_from_frame in cpumap and veth code. Changes s

[PATCH v2 bpf-next 1/2] net: xdp: introduce __xdp_build_skb_from_frame utility routine

2021-01-12 Thread Lorenzo Bianconi
Introduce __xdp_build_skb_from_frame utility routine to build the skb from xdp_frame. Rely on __xdp_build_skb_from_frame in cpumap code. Acked-by: Jesper Dangaard Brouer Signed-off-by: Lorenzo Bianconi --- include/net/xdp.h | 3 +++ kernel/bpf/cpumap.c | 46 ++

Re: [PATCH net-next 0/5] skbuff: introduce skbuff_heads bulking and reusing

2021-01-12 Thread Alexander Lobakin
From: Eric Dumazet Date: Tue, 12 Jan 2021 13:32:56 +0100 > On Tue, Jan 12, 2021 at 11:56 AM Alexander Lobakin wrote: >> > >> >> Ah, I should've mentioned that I use UDP GRO Fraglists, so these >> numbers are for GRO. >> > > Right, this suggests UDP GRO fraglist is a pathological case of GRO, > n

[PATCH v2 bpf-next 2/2] net: xdp: introduce xdp_build_skb_from_frame utility routine

2021-01-12 Thread Lorenzo Bianconi
Introduce xdp_build_skb_from_frame utility routine to build the skb from xdp_frame. Respect to __xdp_build_skb_from_frame, xdp_build_skb_from_frame will allocate the skb object. Rely on xdp_build_skb_from_frame in veth driver. Introduce missing xdp metadata support in veth_xdp_rcv_one routine. Add

Re: [PATCH net-next v2 1/7] ibmvnic: restore state in change-param reset

2021-01-12 Thread Dany Madden
On 2021-01-12 10:14, Sukadev Bhattiprolu wrote: Restore adapter state before returning from change-param reset. In case of errors, caller will try a hard-reset anyway. Fixes: 0cb4bc66ba5e ("ibmvnic: restore adapter state on failed reset") Signed-off-by: Sukadev Bhattiprolu Reviewed-by: Dany Ma

Re: [PATCH v1 0/2] Add 100 base-x mode

2021-01-12 Thread Bjarni Jonasson
On Mon, 2021-01-11 at 14:18 +, Russell King - ARM Linux admin wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you > know the content is safe > > On Mon, Jan 11, 2021 at 02:06:55PM +0100, Bjarni Jonasson wrote: > > Adding support for 100 base-x in phylink. > > The Sparx5

Re: [PATCH v3 bpf-next 1/4] bpf: introduce task_vma bpf_iter

2021-01-12 Thread Yonghong Song
On 1/6/21 8:17 PM, Song Liu wrote: Introduce task_vma bpf_iter to print memory information of a process. It can be used to print customized information similar to /proc//maps. Current /proc//maps and /proc//smaps provide information of vma's of a process. However, these information are not fl

Re: [PATCH net] net: dsa: clear devlink port type before unregistering slave netdevs

2021-01-12 Thread Florian Fainelli
On 1/11/21 4:48 PM, Vladimir Oltean wrote: > From: Vladimir Oltean > > Florian reported a use-after-free bug in devlink_nl_port_fill found with > KASAN: > > (devlink_nl_port_fill) > (devlink_port_notify) > (devlink_port_unregister) > (dsa_switch_teardown.part.3) > (dsa_tree_teardown_switches) >

Re: [PATCH net] net: dsa: unbind all switches from tree when DSA master unbinds

2021-01-12 Thread Florian Fainelli
On 1/11/21 3:09 PM, Vladimir Oltean wrote: > From: Vladimir Oltean > > Currently the following happens when a DSA master driver unbinds while > there are DSA switches attached to it: > > $ echo :00:00.5 > /sys/bus/pci/drivers/mscc_felix/unbind > [ cut here ] > WARNING

[PATCH net-next v4 2/2] net: flow_dissector: Parse PTP L2 packet header

2021-01-12 Thread Eran Ben Elisha
Add support for parsing PTP L2 packet header. Such packet consists of an L2 header (with ethertype of ETH_P_1588), PTP header, body and an optional suffix. Signed-off-by: Eran Ben Elisha Reviewed-by: Tariq Toukan --- net/core/flow_dissector.c | 16 1 file changed, 16 insertions

<    1   2   3   4   5   >