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: <440631554142479@myt6-23299ba78d64.qloud-c.yandex.net>
Date:   Mon, 01 Apr 2019 21:14:39 +0300
From:   Andrey Abramov <st5pub@...dex.ru>
To:     Vineet Gupta <vineet.gupta1@...opsys.com>,
        David Laight <david.laight@...lab.com>,
        "'gregkh@...uxfoundation.org'" <gregkh@...uxfoundation.org>
Cc:     George Spelvin <lkml@....org>,
        "adrian.hunter@...el.com" <adrian.hunter@...el.com>,
        "ard.biesheuvel@...aro.org" <ard.biesheuvel@...aro.org>,
        "benh@...nel.crashing.org" <benh@...nel.crashing.org>,
        "bp@...en8.de" <bp@...en8.de>,
        "darrick.wong@...cle.com" <darrick.wong@...cle.com>,
        "dchinner@...hat.com" <dchinner@...hat.com>,
        "dedekind1@...il.com" <dedekind1@...il.com>,
        "hpa@...or.com" <hpa@...or.com>,
        "jlbec@...lplan.org" <jlbec@...lplan.org>,
        "jpoimboe@...hat.com" <jpoimboe@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-snps-arc@...ts.infradead.org" 
        <linux-snps-arc@...ts.infradead.org>,
        "mark@...heh.com" <mark@...heh.com>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "mpe@...erman.id.au" <mpe@...erman.id.au>,
        "naveen.n.rao@...ux.vnet.ibm.com" <naveen.n.rao@...ux.vnet.ibm.com>,
        "paulus@...ba.org" <paulus@...ba.org>,
        "richard@....at" <richard@....at>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "x86@...nel.org" <x86@...nel.org>
Subject: Re: [PATCH 5/5] Lib: sort.h: replace int size with size_t size in the swap function

01.04.2019, 21:02, "Vineet Gupta" <vineet.gupta1@...opsys.com>:
> On 4/1/19 7:46 AM, David Laight wrote:
>>  From: gregkh@...uxfoundation.org
>>>  Sent: 31 March 2019 11:54
>>  ...
>>>  Yes, "int" is a very nice variable for "size", you need to explain why
>>>  it is better to use size_t here please.
>>  Actually, on x86_64 you probably want 'unsigned int' to avoid the
>>  compiler having to generate a sign-extending register move if the
>>  value is ever used in a 64bit expression (eg an address calculation).
>
> Thats likely true for non x86 arches too (for certain on ARC). That is also the
> reason I dislike "bool", despite its "software engineering" benefits. Per ARC ABI
> (and likely others too) it is signed 8 bits and any use thereof, requires the
> compiler to generate an additional EXTB instruction to promote to 32-bit int with
> sign extension before using the value.
>
> -Vineet

George Spelvin wrote "So how about *deleting* the parameter instead?
That simplifies everything.", and he is right,
so I am just going to completely remove it.

Any objections?

--
With Best Regards,
Andrey Abramov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ