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]
Date:   Sun, 18 Mar 2018 13:21:27 +0000
From:   Russell King - ARM Linux <linux@...linux.org.uk>
To:     Abbott Liu <liuwenliang@...wei.com>
Cc:     aryabinin@...tuozzo.com, marc.zyngier@....com,
        kstewart@...uxfoundation.org, gregkh@...uxfoundation.org,
        f.fainelli@...il.com, akpm@...ux-foundation.org,
        afzal.mohd.ma@...il.com, alexander.levin@...izon.com,
        glider@...gle.com, dvyukov@...gle.com, christoffer.dall@...aro.org,
        linux@...musvillemoes.dk, mawilcox@...rosoft.com,
        pombredanne@...b.com, ard.biesheuvel@...aro.org,
        vladimir.murzin@....com, nicolas.pitre@...aro.org,
        tglx@...utronix.de, thgarnie@...gle.com, dhowells@...hat.com,
        keescook@...omium.org, arnd@...db.de, geert@...ux-m68k.org,
        tixy@...aro.org, mark.rutland@....com, james.morse@....com,
        zhichao.huang@...aro.org, jinb.park7@...il.com, labbott@...hat.com,
        philip@....systems, grygorii.strashko@...aro.org,
        catalin.marinas@....com, opendmb@...il.com,
        kirill.shutemov@...ux.intel.com,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        kasan-dev@...glegroups.com, kvmarm@...ts.cs.columbia.edu,
        linux-mm@...ck.org
Subject: Re: [PATCH 1/7] 2 1-byte checks more safer for memory_is_poisoned_16

On Sun, Mar 18, 2018 at 08:53:36PM +0800, Abbott Liu wrote:
> Because in some architecture(eg. arm) instruction set, non-aligned
> access support is not very well, so 2 1-byte checks is more
> safer than 1 2-byte check. The impact on performance is small
> because 16-byte accesses are not too common.

This is unnecessary:

1. a load of a 16-bit quantity will work as desired on modern ARMs.
2. Networking already relies on unaligned loads to work as per x86
   (iow, an unaligned 32-bit load loads the 32-bits at the address
   even if it's not naturally aligned, and that also goes for 16-bit
   accesses.)

If these are rare (which you say above - "not too common") then it's
much better to leave the code as-is, because it will most likely be
faster on modern CPUs, and the impact for older generation CPUs is
likely to be low.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up
According to speedtest.net: 8.21Mbps down 510kbps up

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ