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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1271782907.78002.1753970909117.JavaMail.zimbra@couthit.local>
Date: Thu, 31 Jul 2025 19:38:29 +0530 (IST)
From: Parvathi Pudi <parvathi@...thit.com>
To: ALOK TIWARI <alok.a.tiwari@...cle.com>
Cc: parvathi <parvathi@...thit.com>, danishanwar <danishanwar@...com>, 
	rogerq <rogerq@...nel.org>, andrew+netdev <andrew+netdev@...n.ch>, 
	davem <davem@...emloft.net>, edumazet <edumazet@...gle.com>, 
	kuba <kuba@...nel.org>, pabeni <pabeni@...hat.com>, 
	robh <robh@...nel.org>, krzk+dt <krzk+dt@...nel.org>, 
	conor+dt <conor+dt@...nel.org>, ssantosh <ssantosh@...nel.org>, 
	richardcochran <richardcochran@...il.com>, 
	s hauer <s.hauer@...gutronix.de>, m-karicheri2 <m-karicheri2@...com>, 
	glaroque <glaroque@...libre.com>, afd <afd@...com>, 
	saikrishnag <saikrishnag@...vell.com>, m-malladi <m-malladi@...com>, 
	jacob e keller <jacob.e.keller@...el.com>, 
	kory maincent <kory.maincent@...tlin.com>, 
	diogo ivo <diogo.ivo@...mens.com>, 
	javier carrasco cruz <javier.carrasco.cruz@...il.com>, 
	horms <horms@...nel.org>, s-anna <s-anna@...com>, 
	basharath <basharath@...thit.com>, 
	linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>, 
	netdev <netdev@...r.kernel.org>, 
	devicetree <devicetree@...r.kernel.org>, 
	linux-kernel <linux-kernel@...r.kernel.org>, 
	Vadim Fedorenko <vadim.fedorenko@...ux.dev>, 
	pratheesh <pratheesh@...com>, Prajith Jayarajan <prajith@...com>, 
	Vignesh Raghavendra <vigneshr@...com>, praneeth <praneeth@...com>, 
	srk <srk@...com>, rogerq <rogerq@...com>, 
	krishna <krishna@...thit.com>, pmohan <pmohan@...thit.com>, 
	mohan <mohan@...thit.com>
Subject: Re: [PATCH net-next v12 5/5] net: ti: prueth: Adds IEP support for
 PRUETH on AM33x, AM43x and AM57x SOCs

Hi,

> On 7/24/2025 2:40 PM, Parvathi Pudi wrote:
>> Added API hooks for IEP module (legacy 32-bit model) to support
>> timestamping requests from application.
>> 
>> Signed-off-by: Roger Quadros <rogerq@...com>
>> Signed-off-by: Andrew F. Davis <afd@...com>
>> Signed-off-by: Basharath Hussain Khaja <basharath@...thit.com>
>> Signed-off-by: Parvathi Pudi <parvathi@...thit.com>
>> ---
>>   drivers/net/ethernet/ti/icssg/icss_iep.c      | 103 ++++++++++++++++++
>>   drivers/net/ethernet/ti/icssm/icssm_prueth.c  |  72 +++++++++++-
>>   drivers/net/ethernet/ti/icssm/icssm_prueth.h  |   2 +
>>   .../net/ethernet/ti/icssm/icssm_prueth_ptp.h  |  85 +++++++++++++++
>>   4 files changed, 260 insertions(+), 2 deletions(-)
>>   create mode 100644 drivers/net/ethernet/ti/icssm/icssm_prueth_ptp.h
>> 
>> diff --git a/drivers/net/ethernet/ti/icssg/icss_iep.c
>> b/drivers/net/ethernet/ti/icssg/icss_iep.c
>> index 2a1c43316f46..59aca63e2fe5 100644
>> --- a/drivers/net/ethernet/ti/icssg/icss_iep.c
>> +++ b/drivers/net/ethernet/ti/icssg/icss_iep.c
>> @@ -968,11 +968,114 @@ static const struct icss_iep_plat_data
>> am654_icss_iep_plat_data = {
>>   	.config = &am654_icss_iep_regmap_config,
>>   };
>>   
>> +static const struct icss_iep_plat_data am57xx_icss_iep_plat_data = {
>> +	.flags = ICSS_IEP_64BIT_COUNTER_SUPPORT |
>> +		 ICSS_IEP_SLOW_COMPEN_REG_SUPPORT,
>> +	.reg_offs = {
>> +		[ICSS_IEP_GLOBAL_CFG_REG] = 0x00,
>> +		[ICSS_IEP_COMPEN_REG] = 0x08,
>> +		[ICSS_IEP_SLOW_COMPEN_REG] = 0x0C,
> 
> using both uppercase and lowercase hex
> 

Sure, We will check and address this.

>> +		[ICSS_IEP_COUNT_REG0] = 0x10,
>> +		[ICSS_IEP_COUNT_REG1] = 0x14,
>> +		[ICSS_IEP_CAPTURE_CFG_REG] = 0x18,
>> +		[ICSS_IEP_CAPTURE_STAT_REG] = 0x1c,
>> +
>> +		[ICSS_IEP_CAP6_RISE_REG0] = 0x50,
>> +		[ICSS_IEP_CAP6_RISE_REG1] = 0x54,
>> +
>> +		[ICSS_IEP_CAP7_RISE_REG0] = 0x60,
>> +		[ICSS_IEP_CAP7_RISE_REG1] = 0x64,
>> +
>> +		[ICSS_IEP_CMP_CFG_REG] = 0x70,
>> +		[ICSS_IEP_CMP_STAT_REG] = 0x74,
>> +		[ICSS_IEP_CMP0_REG0] = 0x78,
>> +		[ICSS_IEP_CMP0_REG1] = 0x7c,
>> +		[ICSS_IEP_CMP1_REG0] = 0x80,
>> +		[ICSS_IEP_CMP1_REG1] = 0x84,
>> +
>> +		[ICSS_IEP_CMP8_REG0] = 0xc0,
>> +		[ICSS_IEP_CMP8_REG1] = 0xc4,
>> +		[ICSS_IEP_SYNC_CTRL_REG] = 0x180,
>> +		[ICSS_IEP_SYNC0_STAT_REG] = 0x188,
>> +		[ICSS_IEP_SYNC1_STAT_REG] = 0x18c,
>> +		[ICSS_IEP_SYNC_PWIDTH_REG] = 0x190,
>> +		[ICSS_IEP_SYNC0_PERIOD_REG] = 0x194,
>> +		[ICSS_IEP_SYNC1_DELAY_REG] = 0x198,
>> +		[ICSS_IEP_SYNC_START_REG] = 0x19c,
>> +	},
>> +	.config = &am654_icss_iep_regmap_config,
>> +};
>> +
>> +static bool am335x_icss_iep_valid_reg(struct device *dev, unsigned int reg)
>> +{
>> +	switch (reg) {
>> +	case ICSS_IEP_GLOBAL_CFG_REG ... ICSS_IEP_CAPTURE_STAT_REG:
>> +	case ICSS_IEP_CAP6_RISE_REG0:
>> +	case ICSS_IEP_CMP_CFG_REG ... ICSS_IEP_CMP0_REG0:
>> +	case ICSS_IEP_CMP8_REG0 ... ICSS_IEP_SYNC_START_REG:
>> +		return true;
>> +	default:
>> +		return false;
>> +	}
>> +
>> +	return false;
> 
> Redundant code after default return
> 

Sure, We will address this.

>> +}
>> +
> [clip]
>>   
>> @@ -1434,12 +1490,19 @@ static int icssm_prueth_probe(struct platform_device
>> *pdev)
>>   		}
>>   	}
>>   
>> +	prueth->iep = icss_iep_get(np);
>> +	if (IS_ERR(prueth->iep)) {
>> +		ret = PTR_ERR(prueth->iep);
>> +		dev_err(dev, "unable to get IEP\n");
>> +		goto netdev_exit;
>> +	}
>> +
>>   	/* register the network devices */
>>   	if (eth0_node) {
>>   		ret = register_netdev(prueth->emac[PRUETH_MAC0]->ndev);
>>   		if (ret) {
>>   			dev_err(dev, "can't register netdev for port MII0");
>> -			goto netdev_exit;
>> +			goto iep_put;
>>   		}
>>   
>>   		prueth->registered_netdevs[PRUETH_MAC0] =
>> @@ -1473,6 +1536,9 @@ static int icssm_prueth_probe(struct platform_device
>> *pdev)
>>   		unregister_netdev(prueth->registered_netdevs[i]);
>>   	}
>>   
>> +iep_put:
>> +	icss_iep_put(prueth->iep);
> 
> prueth->iep = NULL; avoid potential use-after-free
> 

Sure, We will check and address this.


Thanks and Regards,
Parvathi.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ