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: <x4960ukogf6.fsf@segfault.boston.devel.redhat.com>
Date:	Wed, 11 May 2016 09:47:09 -0400
From:	Jeff Moyer <jmoyer@...hat.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Shaohua Li <shli@...com>, <linux-block@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <axboe@...com>,
	<Kernel-team@...com>
Subject: Re: [PATCH 3/3] blk-throttle: don't parse cgroup path if trace isn't enabled

Steven Rostedt <rostedt@...dmis.org> writes:

>> Do we want to return !!(bt->act_mask & BLK_TC_NOTIFY)?
>
> The return type is bool. I would think that gcc would be smart enough
> to make the conversion.
>
> To check, I compiled the following function:
>
> bool testbool(int x)
> {
>         return x & 1<<3;
> }
>
> and the result was:
>
>
> 0000000000000000 <testbool>:
>    0:   55                      push   %rbp
>    1:   48 89 e5                mov    %rsp,%rbp
>    4:   89 7d fc                mov    %edi,-0x4(%rbp)
>    7:   8b 45 fc                mov    -0x4(%rbp),%eax
>    a:   83 e0 08                and    $0x8,%eax
>    d:   85 c0                   test   %eax,%eax
>    f:   0f 95 c0                setne  %al
>   12:   5d                      pop    %rbp
>   13:   c3                      retq   
>
> I get the same by adding !!(x & 1<<3)
>
> Looks like it does the conversion.

Cool, thanks!

-Jeff

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ