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: <57CB5088.6050007@emindsoft.com.cn>
Date:   Sun, 04 Sep 2016 06:36:56 +0800
From:   Chen Gang <chengang@...ndsoft.com.cn>
To:     Vineet Gupta <Vineet.Gupta1@...opsys.com>,
        Al Viro <viro@...IV.linux.org.uk>
CC:     Arnd Bergmann <arnd@...db.de>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        "minchan@...nel.org" <minchan@...nel.org>,
        "vbabka@...e.cz" <vbabka@...e.cz>,
        "gi-oh.kim@...fitbricks.com" <gi-oh.kim@...fitbricks.com>,
        "iamjoonsoo.kim@....com" <iamjoonsoo.kim@....com>,
        "hillf.zj@...baba-inc.com" <hillf.zj@...baba-inc.com>,
        "mgorman@...hsingularity.net" <mgorman@...hsingularity.net>,
        "mhocko@...e.com" <mhocko@...e.com>,
        "rientjes@...gle.com" <rientjes@...gle.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "rth@...ddle.net" <rth@...ddle.net>,
        "ink@...assic.park.msu.ru" <ink@...assic.park.msu.ru>,
        "mattst88@...il.com" <mattst88@...il.com>,
        "linux@...linux.org.uk" <linux@...linux.org.uk>,
        "catalin.marinas@....com" <catalin.marinas@....com>,
        "will.deacon@....com" <will.deacon@....com>,
        "hskinnemoen@...il.com" <hskinnemoen@...il.com>,
        "egtvedt@...fundet.no" <egtvedt@...fundet.no>,
        "realmz6@...il.com" <realmz6@...il.com>,
        "ysato@...rs.sourceforge.jp" <ysato@...rs.sourceforge.jp>,
        "rkuo@...eaurora.org" <rkuo@...eaurora.org>,
        "tony.luck@...el.com" <tony.luck@...el.com>,
        "fenghua.yu@...el.com" <fenghua.yu@...el.com>,
        "geert@...ux-m68k.org" <geert@...ux-m68k.org>,
        "james.hogan@...tec.com" <james.hogan@...tec.com>,
        "ralf@...ux-mips.org" <ralf@...ux-mips.org>,
        "dhowells@...hat.com" <dhowells@...hat.com>,
        "deller@....de" <deller@....de>,
        "benh@...nel.crashing.org" <benh@...nel.crashing.org>,
        "paulus@...ba.org" <paulus@...ba.org>,
        "mpe@...erman.id.au" <mpe@...erman.id.au>,
        "schwidefsky@...ibm.com" <schwidefsky@...ibm.com>,
        "heiko.carstens@...ibm.com" <heiko.carstens@...ibm.com>,
        "dalias@...c.org" <dalias@...c.org>,
        "David S. Miller" <davem@...emloft.net>
Subject: Re: cmsg newgroup alt.sex.fetish.bool (was Re: [PATCH] arch: all:
 include: asm: bitops: Use bool instead of int for all bit test functions)


On 9/3/16 08:07, Vineet Gupta wrote:
> On 09/02/2016 04:33 PM, Chen Gang wrote:
>> On 9/2/16 04:43, Al Viro wrote:
>>>>
>>>> Can you show a proof that it actually improves anything?  He who proposes
>>>> a patch gets to defend it, not the other way round...
>>>>
>>>> Al, bloody annoyed
>>>>
>> OK, what you said sounds reasonable to me.
>>
>> It makes the code more readable since they are really pure Boolean
>> functions, and let the functions are precisely same in all archs. But
>> really, I shall try to prove that it has no negative effect.
>>
>> e.g. for arc arch. now, I have built the arc raw compiler to build arc
>> kernel, but excuse me, I plan to finish proof next week, because during
>> these days, I have to work, buy house, and focus on my father's health.
> 
> Since you seem to be have so much stuff to do I decided to help. I did a quick
> compile of kernel with and w/o your changes
> 
> bloat-o-meter vmlinux-v4.8rc4-baseline vmlinux-v4.8rc4-bool-in-atomics
> add/remove: 0/0 grow/shrink: 1/0 up/down: 6/0 (6)
> function                                     old     new   delta
> vermagic                                      49      55      +6
> Total: Before=5967447, After=5967453, chg 0.000000%
> 
> I'm mildly surprised that there is no difference so yeah this change is fine as
> far as I'm concerned.
> 

Thank you for your reply :-)


And for all: shall I provide the proof for another archs?

For me, Boolean gives additional chance to compiler to improve the code.
If the compiler can not improve the code, it can treat it as int simply.
So theoretically, at least, Boolean should not be worse than int.


Thanks.
-- 
Chen Gang (陈刚)

Managing Natural Environments is the Duty of Human Beings.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ