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: <C2D7FE5348E1B147BCA15975FBA23075014641A449@US01WEMBX2.internal.synopsys.com>
Date:   Fri, 30 Nov 2018 19:29:44 +0000
From:   Vineet Gupta <vineet.gupta1@...opsys.com>
To:     Jose Abreu <jose.abreu@...opsys.com>,
        "linux-snps-arc@...ts.infradead.org" 
        <linux-snps-arc@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     Alexey Brodkin <alexey.brodkin@...opsys.com>,
        Joao Pinto <joao.pinto@...opsys.com>,
        Vitor Soares <vitor.soares@...opsys.com>,
        David Laight <David.Laight@...LAB.COM>
Subject: Re: [PATCH v3] ARC: io.h: Implement reads{x}()/writes{x}()

On 11/30/18 1:47 AM, Jose Abreu wrote:
> Some ARC CPU's do not support unaligned loads/stores. Currently, generic
> implementation of reads{b/w/l}()/writes{b/w/l}() is being used with ARC.
> This can lead to misfunction of some drivers as generic functions do a
> plain dereference of a pointer that can be unaligned.
>
> Let's use {get/put}_unaligned() helpers instead of plain dereference of
> pointer in order to fix. The helpers allow to get and store data from an
> unaligned address whilst preserving the CPU internal alignment.
> According to [1], the use of these helpers are costly in terms of
> performance so we added an initial check for a buffer already aligned so
> that the usage of the helpers can be avoided, when possible.
>
> [1] Documentation/unaligned-memory-access.txt
>
> Changes from v2:
> - Rework commit msg (Vineet)
> - Check if count is 0 and return (Vineet)
> - Use two different loops (Vineet)
>
> Changes from v1:
> - Check if buffer is already aligned (David)
> - Remove 64 bit mention (Alexey)
>
> Signed-off-by: Jose Abreu <joabreu@...opsys.com>
> Tested-by: Vitor Soares <soares@...opsys.com>
> Cc: Vineet Gupta <vgupta@...opsys.com>
> Cc: Alexey Brodkin <abrodkin@...opsys.com>
> Cc: Joao Pinto <jpinto@...opsys.com>
> Cc: Vitor Soares <soares@...opsys.com>
> Cc: David Laight <David.Laight@...LAB.COM>

Applied to for-curr after some minor chg (added a comment about accessor)

Thx,
-Vineet

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ