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] [thread-next>] [day] [month] [year] [list]
Message-ID: <7928f17e-83a1-4f6b-8319-eb316e2ee595@intel.com>
Date: Tue, 21 Oct 2025 13:41:49 -0700
From: Jacob Keller <jacob.e.keller@...el.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: Jiri Pirko <jiri@...nulli.us>, "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, "Simon
 Horman" <horms@...nel.org>, Jonathan Corbet <corbet@....net>, Tony Nguyen
	<anthony.l.nguyen@...el.com>, Przemek Kitszel <przemyslaw.kitszel@...el.com>,
	Andrew Lunn <andrew+netdev@...n.ch>, Alexander Lobakin
	<aleksander.lobakin@...el.com>, <netdev@...r.kernel.org>,
	<linux-doc@...r.kernel.org>, <linux-kernel@...r.kernel.org>, "Aleksandr
 Loktionov" <aleksandr.loktionov@...el.com>, Dan Nowlin
	<dan.nowlin@...el.com>, Rafal Romanowski <rafal.romanowski@...el.com>
Subject: Re: [PATCH net-next v2 05/14] ice: improve TCAM priority handling for
 RSS profiles



On 10/20/2025 6:16 PM, Jakub Kicinski wrote:
> On Thu, 16 Oct 2025 23:08:34 -0700 Jacob Keller wrote:
>> +/**
>> + * ice_set_tcam_flags - set TCAM flag don't care mask
>> + * @mask: mask for flags
>> + * @dc_mask: pointer to the don't care mask
>> + */
>> +static void ice_set_tcam_flags(u16 mask, u8 dc_mask[ICE_TCAM_KEY_VAL_SZ])
>> +{
>> +	u16 *flag_word;
>> +
>> +	/* flags are lowest u16 */
>> +	flag_word = (u16 *)dc_mask;
>> +	*flag_word = ~mask;
> 
> Please don't cast pointers to wider types, get_unaligned() exists 
> for a reason. BTW endian also exists, AFAIU, this will do a different
> thing on BE and LE.
> 
>>  /**
>>   * ice_adj_prof_priorities - adjust profile based on priorities
>>   * @hw: pointer to the HW struct
>> @@ -3688,10 +3733,17 @@ ice_adj_prof_priorities(struct ice_hw *hw, enum ice_block blk, u16 vsig,
>>  			struct list_head *chg)
>>  {
>>  	DECLARE_BITMAP(ptgs_used, ICE_XLT1_CNT);
>> +	struct ice_tcam_inf **attr_used;
>>  	struct ice_vsig_prof *t;
>> -	int status;
>> +	u16 attr_used_cnt = 0;
>> +	int status = 0;
>>  	u16 idx;
>>  
>> +	attr_used = devm_kcalloc(ice_hw_to_dev(hw), ICE_MAX_PTG_ATTRS,
> 
> attr_used is freed before exiting this function, every time.
> Why the devm_* ?

Yep this should be removed. It likely came about from old legacy code
that used devm everywhere, before we started trying to remove or avoid
it except during long-lived allocations.


Download attachment "OpenPGP_signature.asc" of type "application/pgp-signature" (237 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ