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]
Message-ID: <5BF61D27.5000002@oberhumer.com>
Date:   Thu, 22 Nov 2018 04:06:15 +0100
From:   "Markus F.X.J. Oberhumer" <markus@...rhumer.com>
To:     Christoph Hellwig <hch@...radead.org>,
        Dave Rodgman <dave.rodgman@....com>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        nd <nd@....com>,
        "herbert@...dor.apana.org.au" <herbert@...dor.apana.org.au>,
        "davem@...emloft.net" <davem@...emloft.net>,
        Matt Sealey <Matt.Sealey@....com>,
        "nitingupta910@...il.com" <nitingupta910@...il.com>,
        "rpurdie@...nedhand.com" <rpurdie@...nedhand.com>,
        "minchan@...nel.org" <minchan@...nel.org>,
        "sergey.senozhatsky.work@...il.com" 
        <sergey.senozhatsky.work@...il.com>
Subject: Re: [PATCH 2/6] lib/lzo: enable 64-bit CTZ on Arm

On 2018-11-21 18:31, Christoph Hellwig wrote:
>>  #define LZO_USE_CTZ32	1
>>  #elif defined(__i386__) || defined(__powerpc__)
>>  #define LZO_USE_CTZ32	1
>> -#elif defined(__arm__) && (__LINUX_ARM_ARCH__ >= 5)
>> +#elif defined(__arm__)
>> +#if (__LINUX_ARM_ARCH__ >= 5)
>>  #define LZO_USE_CTZ32	1
>>  #endif
>> +#if (__LINUX_ARM_ARCH__ >= 6) && (CONFIG_THUMB2_KERNEL)
>> +#define LZO_USE_CTZ64	1
> 
> All of this really needs to be driven by Kconfig symbols that
> the architecture selects instead of magic arch ifdefs here.

LZO_USE_CTZ32 and LZO_USE_CTZ64 should only be defined if there
is a *fast* hardware instruction.

It would be nice if there exists a kernel #define we could
use for detecting that.

-- 
Markus Oberhumer, <markus@...rhumer.com>, http://www.oberhumer.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ