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: <CAK8P3a2JSSJxs92uEiJQAa0iQOvA6NDuww3+Br5cAxYvXVOOAQ@mail.gmail.com>
Date:   Mon, 6 Dec 2021 09:50:03 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Sai Prakash Ranjan <quic_saipraka@...cinc.com>
Cc:     Will Deacon <will@...nel.org>,
        Catalin Marinas <catalin.marinas@....com>,
        Arnd Bergmann <arnd@...db.de>,
        Steven Rostedt <rostedt@...dmis.org>,
        Marc Zyngier <maz@...nel.org>,
        gregkh <gregkh@...uxfoundation.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        linux-arm-msm <linux-arm-msm@...r.kernel.org>,
        quic_psodagud@...cinc.com
Subject: Re: [PATCHv5 1/4] arm64: io: Use asm-generic high level MMIO accessors

On Mon, Dec 6, 2021 at 9:28 AM Sai Prakash Ranjan
<quic_saipraka@...cinc.com> wrote:
>
> Remove custom arm64 MMIO accessors read{b,w,l,q} and their relaxed
> versions in support to use asm-generic ones. Also define arm64
> barrier macros to override the asm-generic defined barriers.
>
> Suggested-by: Arnd Bergmann <arnd@...db.de>
> Signed-off-by: Sai Prakash Ranjan <quic_saipraka@...cinc.com>

This looks correct, but I would change one detail:

> +#define __io_ar(v)             __io_par(v)
> +#define __io_bw()              __iowmb()
> +#define __io_br(v)
> +#define __io_aw(v)

The default __io_par() is defined in terms of __io_ar(), so it would
be more logical
to remove the custom __io_par() and just define __io_ar() here.

I think it would be even better to flip these around and make the low-level
definitions __io_ar() and __io_bw(), and then defining the arm64 specific
macros based on those:

/* arm64-specific, don't use in portable drivers */
#define __iormb(v)     __io_ar(v)
#define __iowmb()      __io_bw()
#define __iomb()        dma_mb()

        Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ