lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7ca422d4-412d-8e26-c25b-eb897898e2fe@linux.intel.com>
Date: Thu, 10 Aug 2023 10:14:50 +0200
From: Marcin Szycik <marcin.szycik@...ux.intel.com>
To: Tony Nguyen <anthony.l.nguyen@...el.com>,
 intel-wired-lan@...ts.osuosl.org, "Ertman, David M"
 <david.m.ertman@...el.com>
Cc: netdev@...r.kernel.org, leon@...nel.org, jiri@...nulli.us,
 Przemek Kitszel <przemyslaw.kitszel@...el.com>
Subject: Re: [PATCH iwl-net v2] ice: Block switchdev mode when ADQ is active
 and vice versa



On 08.08.2023 19:55, Tony Nguyen wrote:
> On 8/4/2023 7:26 AM, Marcin Szycik wrote:
>> ADQ and switchdev are not supported simultaneously. Enabling both at the
>> same time can result in nullptr dereference.
>>
>> To prevent this, check if ADQ is active when changing devlink mode to
>> switchdev mode, and check if switchdev is active when enabling ADQ.
>>
>> Fixes: fbc7b27af0f9 ("ice: enable ndo_setup_tc support for mqprio_qdisc")
>> Signed-off-by: Marcin Szycik <marcin.szycik@...ux.intel.com>
>> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@...el.com>
>> ---
> 
> ...
> 
>> @@ -8834,6 +8834,12 @@ ice_setup_tc(struct net_device *netdev, enum tc_setup_type type,
>>               }
>>           }
>>   +        if (ice_is_eswitch_mode_switchdev(pf)) {
>> +            netdev_err(netdev, "TC MQPRIO offload not supported, switchdev is enabled\n");
>> +            err = -EOPNOTSUPP;
>> +            goto adev_unlock;
> 
> Does this need to be checked under adev locks?

It doesn't. I'll move it above.

> 
>> +        }
>> +
>>           /* setup traffic classifier for receive side */
>>           mutex_lock(&pf->tc_mutex);
>>           err = ice_setup_tc_mqprio_qdisc(netdev, type_data);

Thank you for reviewing!
Marcin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ