Re: [Intel-wired-lan] [BUG] e1000e, scheduling while atomic (stable)

2024-04-24 Thread Sasha Neftin
On 23/04/2024 19:23, Greg Kroah-Hartman wrote: On Fri, Apr 19, 2024 at 12:20:05PM -0400, Jérôme Carretero wrote: Hi Sasha, Thank you, sorry for the delay but I coudln't reboot. Adding Greg KH because I don't know if stable will receive my e-mail (not subscribed) but the regression was integra

Re: [Intel-wired-lan] [PATCH] igc: fix a log entry using uninitialized netdev

2024-04-24 Thread Vinicius Costa Gomes
Andrew Lunn writes: > On Tue, Apr 23, 2024 at 12:24:54PM +0200, Corinna Vinschen wrote: >> During successful probe, igc logs this: >> >> [5.133667] igc :01:00.0 (unnamed net_device) (uninitialized): PHC >> added >> >>

Re: [Intel-wired-lan] [PATCH 1/1] net: e1000e & ixgbe: Remove PCI_HEADER_TYPE_MFD duplicates

2024-04-24 Thread Jesse Brandeburg
On 4/23/2024 7:40 AM, Ilpo Järvinen wrote: PCI_HEADER_TYPE_MULTIFUNC is define by e1000e and ixgbe and both are unused. There is already PCI_HEADER_TYPE_MFD in pci_regs.h anyway which should be used instead so remove the duplicated defines of it. Signed-off-by: Ilpo Järvinen Thanks Ilpo! Rev

Re: [Intel-wired-lan] [PATCH] igc: fix a log entry using uninitialized netdev

2024-04-24 Thread Andrew Lunn
On Tue, Apr 23, 2024 at 12:24:54PM +0200, Corinna Vinschen wrote: > During successful probe, igc logs this: > > [5.133667] igc :01:00.0 (unnamed net_device) (uninitialized): PHC > added > > The reason is that igc_ptp_ini

Re: [Intel-wired-lan] [PATCH iwl-next v5 08/12] iavf: periodically cache PHC time

2024-04-24 Thread Keller, Jacob E
> -Original Message- > From: Polchlopek, Mateusz > Sent: Monday, April 22, 2024 2:23 AM > To: Rahul Rameshbabu > Cc: intel-wired-...@lists.osuosl.org; net...@vger.kernel.org; > ho...@kernel.org; > Nguyen, Anthony L ; Keller, Jacob E > ; Drewek, Wojciech > Subject: Re: [Intel-wired-lan

Re: [Intel-wired-lan] [iwl-next v1 3/4] ice: move VSI configuration outside repr setup

2024-04-24 Thread Tony Nguyen
On 4/19/2024 10:13 AM, Michal Swiatkowski wrote: +/** + * ice_eswitch_cfg_vsi - configure VSI to work in slow-path + * @vsi: VSI structure of representee + * @mac: representee MAC Can you fix the kdoc for this? > drivers/net/ethernet/intel/ice/ice_eswitch.c:140: warning: No description fo

[Intel-wired-lan] [tnguy-next-queue:40GbE] BUILD SUCCESS c5662d7ed0ea0b9655b8ae3221ae1725c5ff951e

2024-04-24 Thread kernel test robot
allnoconfig gcc arc allyesconfig gcc arc defconfig gcc arc randconfig-001-20240424 gcc arc randconfig-002-20240424 gcc arm allmodconfig

Re: [Intel-wired-lan] [PATCH iwl-next v2] ice: Extend auxbus device naming

2024-04-24 Thread Jacob Keller
On 4/24/2024 8:07 AM, Jiri Pirko wrote: > Wed, Apr 24, 2024 at 12:03:25AM CEST, jacob.e.kel...@intel.com wrote: >> >> >> On 4/23/2024 6:14 AM, Jiri Pirko wrote: >>> Tue, Apr 23, 2024 at 01:56:55PM CEST, sergey.temerkha...@intel.com wrote: > -Original Message- > From: Ji

Re: [Intel-wired-lan] [PATCH v2 5/6] cio: ensure the copied buf is NUL terminated

2024-04-24 Thread Alexander Gordeev
On Wed, Apr 24, 2024 at 09:44:22PM +0700, Bui Quang Minh wrote: > Currently, we allocate a lbuf-sized kernel buffer and copy lbuf from > userspace to that buffer. Later, we use scanf on this buffer but we don't > ensure that the string is terminated inside the buffer, this can lead to > OOB read wh

Re: [Intel-wired-lan] [PATCH v2 5/6] cio: ensure the copied buf is NUL terminated

2024-04-24 Thread Heiko Carstens
On Wed, Apr 24, 2024 at 09:44:22PM +0700, Bui Quang Minh wrote: > Currently, we allocate a lbuf-sized kernel buffer and copy lbuf from > userspace to that buffer. Later, we use scanf on this buffer but we don't > ensure that the string is terminated inside the buffer, this can lead to > OOB read wh

Re: [Intel-wired-lan] [PATCH 5/5] drivers/s390/cio: ensure the copied buf is NULL terminated

2024-04-24 Thread Heiko Carstens
On Tue, Apr 23, 2024 at 09:46:35PM +0700, Bui Quang Minh wrote: > > > - buffer = vmemdup_user(buf, lbuf); > > > + buffer = vmemdup_user(buf, lbuf + 1); > > > if (IS_ERR(buffer)) > > > return -ENOMEM; > > > + buffer[lbuf] = '\0'; > > > > This would read one byte too much

[Intel-wired-lan] [PATCH v2 6/6] octeontx2-af: avoid off-by-one read from userspace

2024-04-24 Thread Bui Quang Minh
We try to access count + 1 byte from userspace with memdup_user(buffer, count + 1). However, the userspace only provides buffer of count bytes and only these count bytes are verified to be okay to access. To ensure the copied buffer is NUL terminated, we use memdup_user_nul instead. Fixes: 3a2eb51

[Intel-wired-lan] [PATCH v2 5/6] cio: ensure the copied buf is NUL terminated

2024-04-24 Thread Bui Quang Minh
Currently, we allocate a lbuf-sized kernel buffer and copy lbuf from userspace to that buffer. Later, we use scanf on this buffer but we don't ensure that the string is terminated inside the buffer, this can lead to OOB read when using scanf. Fix this issue by using memdup_user_nul instead. Fixes:

[Intel-wired-lan] [PATCH v2 4/6] qedf: ensure the copied buf is NUL terminated

2024-04-24 Thread Bui Quang Minh
Currently, we allocate a count-sized kernel buffer and copy count from userspace to that buffer. Later, we use kstrtouint on this buffer but we don't ensure that the string is terminated inside the buffer, this can lead to OOB read when using kstrtouint. Fix this issue by using memdup_user_nul inst

[Intel-wired-lan] [PATCH v2 3/6] bfa: ensure the copied buf is NUL terminated

2024-04-24 Thread Bui Quang Minh
Currently, we allocate a nbytes-sized kernel buffer and copy nbytes from userspace to that buffer. Later, we use sscanf on this buffer but we don't ensure that the string is terminated inside the buffer, this can lead to OOB read when using sscanf. Fix this issue by using memdup_user_nul instead of

[Intel-wired-lan] [PATCH v2 2/6] bna: ensure the copied buf is NUL terminated

2024-04-24 Thread Bui Quang Minh
Currently, we allocate a nbytes-sized kernel buffer and copy nbytes from userspace to that buffer. Later, we use sscanf on this buffer but we don't ensure that the string is terminated inside the buffer, this can lead to OOB read when using sscanf. Fix this issue by using memdup_user_nul instead of

[Intel-wired-lan] [PATCH v2 1/6] ice: ensure the copied buf is NUL terminated

2024-04-24 Thread Bui Quang Minh
Currently, we allocate a count-sized kernel buffer and copy count bytes from userspace to that buffer. Later, we use sscanf on this buffer but we don't ensure that the string is terminated inside the buffer, this can lead to OOB read when using sscanf. Fix this issue by using memdup_user_nul instea

[Intel-wired-lan] [PATCH v2 0/6] Ensure the copied buf is NUL terminated

2024-04-24 Thread Bui Quang Minh
Hi everyone, I found that some drivers contains an out-of-bound read pattern like this kern_buf = memdup_user(user_buf, count); ... sscanf(kern_buf, ...); The sscanf can be replaced by some other string-related functions. This pattern can lead to out-of-bound read of kern

[Intel-wired-lan] [PATCH 1/1] net: e1000e & ixgbe: Remove PCI_HEADER_TYPE_MFD duplicates

2024-04-24 Thread Hariprasad Kelam
> PCI_HEADER_TYPE_MULTIFUNC is define by e1000e and ixgbe and both are > unused. There is already PCI_HEADER_TYPE_MFD in pci_regs.h anyway which > should be used instead so remove the duplicated defines of it. > > Signed-off-by: Ilpo Järvinen > --- > drivers/net/ethernet/intel/e1000e/defines.h

Re: [Intel-wired-lan] [PATCH iwl-next v2] ice: Extend auxbus device naming

2024-04-24 Thread Jiri Pirko
Wed, Apr 24, 2024 at 12:03:25AM CEST, jacob.e.kel...@intel.com wrote: > > >On 4/23/2024 6:14 AM, Jiri Pirko wrote: >> Tue, Apr 23, 2024 at 01:56:55PM CEST, sergey.temerkha...@intel.com wrote: >>> >>> -Original Message- From: Jiri Pirko Sent: Tuesday, April 23, 2024 1:36 PM >

Re: [Intel-wired-lan] [PATCH iwl-next v5 5/5] ixgbe: Enable link management in E610 device

2024-04-24 Thread Paul Menzel
Dear Piotr, Thank you for the patch. Am 24.04.24 um 16:22 schrieb Piotr Kwapulinski: Add high level link management support for E610 device. Enable the following features: - driver load - bring up network interface - IP address assignment - pass traffic - show statistics (e.g. via ethtool) - d

[Intel-wired-lan] [tnguy-net-queue:40GbE] BUILD SUCCESS 87dc42260f72837ca71c5e6de8f0c18b8f76f5ac

2024-04-24 Thread kernel test robot
allmodconfig gcc arc allnoconfig gcc arc allyesconfig gcc arc defconfig gcc arc randconfig-001-20240424 gcc arc randconfig-002

Re: [Intel-wired-lan] [PATCH iwl-next v4 5/5] ixgbe: Enable link management in E610 device

2024-04-24 Thread Jiri Pirko
Wed, Apr 24, 2024 at 03:49:09PM CEST, piotr.kwapulin...@intel.com wrote: >>>-Original Message- >>>From: Jiri Pirko >>>Sent: Monday, April 22, 2024 4:26 PM >>>To: Kwapulinski, Piotr >>>Cc: intel-wired-...@lists.osuosl.org; net...@vger.kernel.org; >>>ho...@kernel.org; Wyborny, Carolyn ; J

[Intel-wired-lan] [PATCH iwl-next v5 5/5] ixgbe: Enable link management in E610 device

2024-04-24 Thread Piotr Kwapulinski
Add high level link management support for E610 device. Enable the following features: - driver load - bring up network interface - IP address assignment - pass traffic - show statistics (e.g. via ethtool) - disable network interface - driver unload Co-developed-by: Carolyn Wyborny Signed-off-by:

[Intel-wired-lan] [PATCH iwl-next v5 3/5] ixgbe: Add link management support for E610 device

2024-04-24 Thread Piotr Kwapulinski
Add low level link management support for E610 device. Link management operations are handled via the Admin Command Interface. Add the following link management operations: - get link capabilities - set up link - get media type - get link status, link status events - link power management Co-devel

[Intel-wired-lan] [PATCH iwl-next v5 4/5] ixgbe: Add support for NVM handling in E610 device

2024-04-24 Thread Piotr Kwapulinski
Add low level support for accessing NVM in E610 device. NVM operations are handled via the Admin Command Interface. Add the following NVM specific operations: - acquire, release, read - validate checksum - read shadow ram Co-developed-by: Stefan Wegrzyn Signed-off-by: Stefan Wegrzyn Co-developed

[Intel-wired-lan] [PATCH iwl-next v5 2/5] ixgbe: Add support for E610 device capabilities detection

2024-04-24 Thread Piotr Kwapulinski
Add low level support for E610 device capabilities detection. The capabilities are discovered via the Admin Command Interface. Discover the following capabilities: - function caps: vmdq, dcb, rss, rx/tx qs, msix, nvm, orom, reset - device caps: vsi, fdir, 1588 - phy caps Co-developed-by: Stefan We

[Intel-wired-lan] [PATCH iwl-next v5 1/5] ixgbe: Add support for E610 FW Admin Command Interface

2024-04-24 Thread Piotr Kwapulinski
Add low level support for Admin Command Interface (ACI). ACI is the Firmware interface used by a driver to communicate with E610 adapter. Add the following ACI features: - data structures, macros, register definitions - commands handling - events handling Co-developed-by: Stefan Wegrzyn Signed-of

[Intel-wired-lan] [PATCH iwl-next v5 0/5] ixgbe: Add support for Intel(R) E610 device

2024-04-24 Thread Piotr Kwapulinski
Add initial support for Intel(R) E610 Series of network devices. The E610 is based on X550 but adds firmware managed link, enhanced security capabilities and support for updated server manageability. This patch series adds low level support for the following features and enables link management.

Re: [Intel-wired-lan] [PATCH iwl-next v4 5/5] ixgbe: Enable link management in E610 device

2024-04-24 Thread Kwapulinski, Piotr
>>-Original Message- >>From: Jiri Pirko >>Sent: Monday, April 22, 2024 4:26 PM >>To: Kwapulinski, Piotr >>Cc: intel-wired-...@lists.osuosl.org; net...@vger.kernel.org; >>ho...@kernel.org; Wyborny, Carolyn ; Jagielski, >>Jedrzej ; Glaza, Jan >>Subject: Re: [PATCH iwl-next v4 5/5] ixgbe

[Intel-wired-lan] [PATCH v10 iwl-next 12/12] ice: Adjust PTP init for 2x50G E825C devices

2024-04-24 Thread Karol Kolacinski
From: Grzegorz Nitka >From FW/HW perspective, 2 port topology in E825C devices requires merging of 2 port mapping internally and breakout mapping externally. As a consequence, it requires different port numbering from PTP code perspective. For that topology, pf_id can not be used to index PTP por

[Intel-wired-lan] [PATCH v10 iwl-next 11/12] ice: Support 2XNAC configuration using auxbus

2024-04-24 Thread Karol Kolacinski
There are E825C products featuring 2 NACs. Those have only one source clock on the primary NAC. For those devices, there should be only one clock controller on the primary NAC. All PFs from both NACs should connect as auxiliary devices to the auxiliary driver on the primary NAC. Reviewed-by: Igor

[Intel-wired-lan] [PATCH v10 iwl-next 10/12] ice: Add NAC Topology device capability parser

2024-04-24 Thread Karol Kolacinski
From: Grzegorz Nitka Add new device capability ICE_AQC_CAPS_NAC_TOPOLOGY which allows to determine the mode of operation (1 or 2 NAC). Define a new structure to store data from new capability and corresponding parser code. Co-developed-by: Prathisna Padmasanan Signed-off-by: Prathisna Padmasana

[Intel-wired-lan] [PATCH v10 iwl-next 09/12] ice: Add support for E825-C TS PLL handling

2024-04-24 Thread Karol Kolacinski
From: Michal Michalik The CGU layout of E825-C is a little different than E822/E823. Add support the new hardware adding relevant functions. Signed-off-by: Michal Michalik Reviewed-by: Przemek Kitszel Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski --- V9 -> V10: changed 15

[Intel-wired-lan] [PATCH v10 iwl-next 07/12] ice: Introduce ETH56G PHY model for E825C products

2024-04-24 Thread Karol Kolacinski
From: Sergey Temerkhanov E825C products feature a new PHY model - ETH56G. Introduces all necessary PHY definitions, functions etc. for ETH56G PHY, analogous to E82X and E810 ones with addition of a few HW-specific functionalities for ETH56G like one-step timestamping. It ensures correct PTP ini

[Intel-wired-lan] [PATCH v10 iwl-next 08/12] ice: Change CGU regs struct to anonymous

2024-04-24 Thread Karol Kolacinski
Simplify the code by using anonymous struct in CGU registers instead of naming each structure 'field'. Suggested-by: Przemek Kitszel Reviewed-by: Przemek Kitszel Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski --- drivers/net/ethernet/intel/ice/ice_cgu_regs.h | 12 ++--- dri

[Intel-wired-lan] [PATCH v10 iwl-next 06/12] ice: Introduce ice_get_base_incval() helper

2024-04-24 Thread Karol Kolacinski
From: Jacob Keller Add a new helper for getting base clock increment value for specific HW. Signed-off-by: Jacob Keller Reviewed-by: Przemek Kitszel Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski --- V4 -> V5: Removed unused UNKNOWN_INCVAL_E82X drivers/net/ethernet/intel

[Intel-wired-lan] [PATCH v10 iwl-next 05/12] ice: Move CGU block

2024-04-24 Thread Karol Kolacinski
From: Sergey Temerkhanov Move CGU block to the beginning of ice_ptp_hw.c Signed-off-by: Sergey Temerkhanov Reviewed-by: Przemek Kitszel Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski --- V7 -> V8: brought back P_REG_40B_HIGH_S due to 32 bit compatibility issue V6 -> V7: -

[Intel-wired-lan] [PATCH v10 iwl-next 04/12] ice: Add PHY OFFSET_READY register clearing

2024-04-24 Thread Karol Kolacinski
Add a possibility to mark all transmitted/received timestamps as invalid by clearing PHY OFFSET_READY registers. Reviewed-by: Przemek Kitszel Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski --- drivers/net/ethernet/intel/ice/ice_ptp.c| 11 --- drivers/net/ethernet/int

[Intel-wired-lan] [PATCH v10 iwl-next 03/12] ice: Implement Tx interrupt enablement functions

2024-04-24 Thread Karol Kolacinski
From: Sergey Temerkhanov Introduce functions enabling/disabling Tx TS interrupts for the E822 and ETH56G PHYs Signed-off-by: Sergey Temerkhanov Reviewed-by: Przemek Kitszel Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski --- V5 -> V6: Adjusted return in ice_phy_cfg_intr_e82

[Intel-wired-lan] [PATCH v10 iwl-next 02/12] ice: Introduce helper to get tmr_cmd_reg values

2024-04-24 Thread Karol Kolacinski
From: Jacob Keller Multiple places in the driver code need to convert enum ice_ptp_tmr_cmd values into register bits for both the main timer and the PHY port timers. The main MAC register has one bit scheme for timer commands, while the PHY commands use a different scheme. The E810 and E830 devi

[Intel-wired-lan] [PATCH v10 iwl-next 01/12] ice: Introduce ice_ptp_hw struct

2024-04-24 Thread Karol Kolacinski
Create new ice_ptp_hw struct and use it for all HW and PTP-related fields from struct ice_hw. Replace definitions with struct fields, which values are set accordingly to a specific device. Reviewed-by: Przemek Kitszel Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski --- V4 -> V

[Intel-wired-lan] [PATCH v10 iwl-next 00/12] Introduce ETH56G PHY model for E825C products

2024-04-24 Thread Karol Kolacinski
E825C products have a different PHY model than E822, E823 and E810 products. This PHY is ETH56G and its support is necessary to have functional PTP stack for E825C products. Grzegorz Nitka (2): ice: Add NAC Topology device capability parser ice: Adjust PTP init for 2x50G E825C devices Jacob K

[Intel-wired-lan] [tnguy-next-queue:10GbE] BUILD SUCCESS 1af2dface5d286dd1f2f3405a0d6fa9f2c8fb998

2024-04-24 Thread kernel test robot
onfig gcc arc allmodconfig gcc arc allnoconfig gcc arc allyesconfig gcc arc defconfig gcc arc randconfig-001-20240424 gcc

[Intel-wired-lan] [tnguy-net-queue:dev-queue] BUILD SUCCESS 216abe6123385bfc888c623ec2e8fc799699f23d

2024-04-24 Thread kernel test robot
allnoconfig gcc arc allyesconfig gcc arc defconfig gcc arc randconfig-001-20240424 gcc arc randconfig-002-20240424 gcc arm

[Intel-wired-lan] [tnguy-net-queue:200GbE] BUILD SUCCESS a44f2eb106a46f2275a79de54ce0ea63e4f3d8c8

2024-04-24 Thread kernel test robot
arc allmodconfig gcc arc allnoconfig gcc arc allyesconfig gcc arc defconfig gcc arc randconfig-001-20240424 gcc arc randc

Re: [Intel-wired-lan] [PATCH iwl-next v2 2/5] ixgbe: Add support for E610 device capabilities detection

2024-04-24 Thread Kwapulinski, Piotr
>-Original Message- >From: Simon Horman >Sent: Monday, April 22, 2024 8:32 PM >To: Kwapulinski, Piotr >Cc: intel-wired-...@lists.osuosl.org; net...@vger.kernel.org; Gomes, Vinicius >; Wegrzyn, Stefan ; >Jagielski, Jedrzej ; Sokolowski, Jan > >Subject: Re: [PATCH iwl-next v2 2/5] ixgb

Re: [Intel-wired-lan] [PATCH iwl-net v1 1/1] e1000e: change usleep_range to udelay in PHY mdic access

2024-04-24 Thread Paul Menzel
Dear Vitaly, Thank you for the patch. Am 17.04.24 um 21:03 schrieb Vitaly Lifshits: This is a partial revert of commit 6dbdd4de0362 ("e1000e: Workaround for sporadic MDI error on Meteor Lake systems"). The referenced commit introduced an issue on vPro systems, where disconnecting and reconnec

Re: [Intel-wired-lan] [PATCH iwl-next v2 2/5] ixgbe: Add support for E610 device capabilities detection

2024-04-24 Thread Kwapulinski, Piotr
>-Original Message- >From: Simon Horman >Sent: Monday, April 22, 2024 8:32 PM >To: Kwapulinski, Piotr >Cc: intel-wired-...@lists.osuosl.org; net...@vger.kernel.org; Gomes, Vinicius >; Wegrzyn, Stefan ; >Jagielski, Jedrzej ; Sokolowski, Jan > >Subject: Re: [PATCH iwl-next v2 2/5] ixgbe

Re: [Intel-wired-lan] [PATCH iwl-next v4 5/5] ixgbe: Enable link management in E610 device

2024-04-24 Thread Kwapulinski, Piotr
>-Original Message- >From: Jiri Pirko >Sent: Monday, April 22, 2024 4:26 PM >To: Kwapulinski, Piotr >Cc: intel-wired-...@lists.osuosl.org; net...@vger.kernel.org; >ho...@kernel.org; Wyborny, Carolyn ; Jagielski, >Jedrzej ; Glaza, Jan >Subject: Re: [PATCH iwl-next v4 5/5] ixgbe: Enable