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: <ZkH3aUDaFMR-8Mlo@smile.fi.intel.com>
Date: Mon, 13 May 2024 14:20:09 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: lakshmi.sowjanya.d@...el.com
Cc: tglx@...utronix.de, jstultz@...gle.com, giometti@...eenne.com,
	corbet@....net, linux-kernel@...r.kernel.org, x86@...nel.org,
	netdev@...r.kernel.org, linux-doc@...r.kernel.org,
	intel-wired-lan@...ts.osuosl.org, eddie.dong@...el.com,
	christopher.s.hall@...el.com, jesse.brandeburg@...el.com,
	davem@...emloft.net, alexandre.torgue@...s.st.com,
	joabreu@...opsys.com, mcoquelin.stm32@...il.com, perex@...ex.cz,
	linux-sound@...r.kernel.org, anthony.l.nguyen@...el.com,
	peter.hilber@...nsynergy.com, pandith.n@...el.com,
	subramanian.mohan@...el.com, thejesh.reddy.t.r@...el.com
Subject: Re: [PATCH v8 10/12] pps: generators: Add PPS Generator TIO Driver

On Mon, May 13, 2024 at 02:18:49PM +0300, Andy Shevchenko wrote:
> On Mon, May 13, 2024 at 04:08:11PM +0530, lakshmi.sowjanya.d@...el.com wrote:

> > +	pps_tio_disable(tio);
> 
> This...

> > +	tio->enabled = false;
> 
> ...and this should go together, which makes me look at the enabled flag over
> the code and it seems there are a few places where you missed to sync it with
> the reality.
> 
> I would think of something like this:
> 
> 	pps_tio_direction_output() ==> true
> 	pps_tio_disable(tio) ==> false
> 
> where "==> X" means assignment of enabled flag.
> 
> And perhaps this:
> 
> 	tio->enabled = pps_generate_next_pulse(tio, expires + SAFE_TIME_NS);
> 	if (!tio->enabled)
> 		...
> 
> But the above is just thinking out loudly, you may find the better approach(es).

You might need to introduce pps_tio_enable() counterpart, in such case it would
be more natural to have enabled be assigned accordingly.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ