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] [day] [month] [year] [list]
Date:   Wed, 30 May 2018 15:06:38 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Ivan Bornyakov <brnkv.i1@...il.com>
Cc:     lustre-devel@...ts.lustre.org, devel@...verdev.osuosl.org,
        gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
        oleg.drokin@...el.com, andreas.dilger@...el.com
Subject: Re: [PATCH] staging: lustre: libcfs: add parens around macros args

On Tue, May 22, 2018 at 04:34:39PM +0300, Ivan Bornyakov wrote:
> One may call 'CFS_FAIL_TIMEOUT(id, secs + 5);' and get unexpected result
> after macro substitution, viz., 'secs + 5' will turn into
> 'secs + 5 * 1000'
> 

We actually do that in ptl_send_rpc() as well so this is a real bug.

It's sort of an interesting coincidence that the code in ptl_send_rpc()
looks almost exactly like your theoretical code:

	OBD_FAIL_TIMEOUT(OBD_FAIL_PTLRPC_DELAY_SEND, request->rq_timeout + 5);

regards,
dan carpenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ