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: <ZoVdIbQx6OxkrERu@boxer>
Date: Wed, 3 Jul 2024 16:16:01 +0200
From: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
To: Przemek Kitszel <przemyslaw.kitszel@...el.com>
CC: Tony Nguyen <anthony.l.nguyen@...el.com>, <davem@...emloft.net>,
	<kuba@...nel.org>, <pabeni@...hat.com>, <edumazet@...gle.com>,
	<netdev@...r.kernel.org>, Milena Olech <milena.olech@...el.com>,
	<richardcochran@...il.com>, Jacob Keller <jacob.e.keller@...el.com>, "Karol
 Kolacinski" <karol.kolacinski@...el.com>, Simon Horman <horms@...nel.org>,
	Pucha Himasekhar Reddy <himasekharx.reddy.pucha@...el.com>
Subject: Re: [PATCH net v2 1/4] ice: Fix improper extts handling

On Wed, Jul 03, 2024 at 03:59:27PM +0200, Przemek Kitszel wrote:
> On 7/3/24 13:56, Maciej Fijalkowski wrote:
> > On Tue, Jul 02, 2024 at 10:14:54AM -0700, Tony Nguyen wrote:
> > > From: Milena Olech <milena.olech@...el.com>
> > > 
> > > Extts events are disabled and enabled by the application ts2phc.
> > > However, in case where the driver is removed when the application is
> > > running, a specific extts event remains enabled and can cause a kernel
> > > crash.
> > > As a side effect, when the driver is reloaded and application is started
> > > again, remaining extts event for the channel from a previous run will
> > > keep firing and the message "extts on unexpected channel" might be
> > > printed to the user.
> > > 
> > > To avoid that, extts events shall be disabled when PTP is released.
> > > 
> > > Fixes: 172db5f91d5f ("ice: add support for auxiliary input/output pins")
> > > Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@...el.com>
> > > Co-developed-by: Jacob Keller <jacob.e.keller@...el.com>
> > > Signed-off-by: Jacob Keller <jacob.e.keller@...el.com>
> > > Signed-off-by: Milena Olech <milena.olech@...el.com>
> > > Signed-off-by: Karol Kolacinski <karol.kolacinski@...el.com>
> > > Reviewed-by: Simon Horman <horms@...nel.org>
> > > Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@...el.com> (A Contingent worker at Intel)
> > > Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>
> > > ---
> 
> > > +static void ice_ptp_enable_all_extts(struct ice_pf *pf)
> > > +{
> > > +	int i;
> > > +
> > > +	for (i = 0; i < pf->ptp.info.n_ext_ts; i++) {
> > > +		if (pf->ptp.extts_channels[i].ena)
> > > +			ice_ptp_cfg_extts(pf, i, &pf->ptp.extts_channels[i],
> > > +					  false);
> > > +	}
> > 
> > Still one redundant pair of braces. Just do:
> 
> "Also, use braces when a loop contains more than a single simple statement"
> https://docs.kernel.org/process/coding-style.html
> 
> I even suggested adding that pair only to prevent such request later :D

Thanks, i wasn't aware of that TBH and was following the pattern I
suggested. Checkpatch never yelled at me for that:)

> 
> > 
> > 	for (i = 0; i < pf->ptp.info.n_ext_ts; i++)
> > 		if (pf->ptp.extts_channels[i].ena)
> > 			ice_ptp_cfg_extts(pf, i, &pf->ptp.extts_channels[i],
> > 					  false);
> > 
> > >   }
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ