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: <5284664.GXAFRqVoOG@fdefranc-mobl3>
Date: Thu, 01 Feb 2024 02:25:46 +0100
From: "Fabio M. De Francesco" <fabio.maria.de.francesco@...ux.intel.com>
To: Peter Zijlstra <peterz@...radead.org>,
 Dan Williams <dan.j.williams@...el.com>
Cc: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
 linux-cxl@...r.kernel.org, Ira Weiny <ira.weiny@...el.com>
Subject: Re: [RFC PATCH v3] cleanup: Add cond_guard() to conditional guards

On Thursday, 1 February 2024 02:12:12 CET Dan Williams wrote:
> Fabio M. De Francesco wrote:
> > I just noticed that this is not the final version. It misses a semicolon.
> > Please discard this v3. I'm sending v4.
> 
> Ok, but do please copy the aspect of scoped_conf_guard() to take a
> "_fail" statement argument. Passing a return code collector variable by
> reference just feels a bit too magical. I like the explicitness of
> passing the statement directly.

I'm sorry I haven't been clear. The following call convention fails my tests:

	cond_guard(..., rc = -EINTR, ...);

It always returns -EINTR, regardless of the success of 
down_read_interuptible(). There must be a reason that I can't see.

It works only if we immediaely return an error code: 

	cond_guard(..., return -EINTR, ...);

But this is not what we want since we want to check 'rc'.

Fabio




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ