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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180926221815.jfh7uv52oyry2gmq@pburton-laptop>
Date:   Wed, 26 Sep 2018 22:18:17 +0000
From:   Paul Burton <paul.burton@...s.com>
To:     Yasha Cherikovsky <yasha.che3@...il.com>
CC:     Ralf Baechle <ralf@...ux-mips.org>,
        James Hogan <jhogan@...nel.org>,
        "linux-mips@...ux-mips.org" <linux-mips@...ux-mips.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/1] MIPS: Add Kconfig variable for CPUs with unaligned
 load/store instructions

Hi Yasha,

On Wed, Sep 26, 2018 at 02:16:15PM +0300, Yasha Cherikovsky wrote:
> MIPSR6 CPUs do not support unaligned load/store instructions
> (LWL, LWR, SWL, SWR and LDL, LDR, SDL, SDR for 64bit).
> 
> Currently the MIPS tree has some special cases to avoid these
> instructions, and the code is testing for !CONFIG_CPU_MIPSR6.
> 
> This patch declares a new Kconfig variable:
> CONFIG_CPU_HAS_LOAD_STORE_LR.
> This variable indicates that the CPU supports these instructions.
> 
> Then, the patch does the following:
> - Carefully selects this option on all CPUs except MIPSR6.
> - Switches all the special cases to test for the new variable,
>   and inverts the logic:
>     '#ifndef CONFIG_CPU_MIPSR6' turns into
>     '#ifdef CONFIG_CPU_HAS_LOAD_STORE_LR'
>     and vice-versa.
> 
> Also, when this variable is NOT selected (e.g. MIPSR6),
> CONFIG_GENERIC_CSUM will default to 'y', to compile generic
> C checksum code (instead of special assembly code that uses the
> unsupported instructions).
> 
> This commit should not affect any existing CPU, and is required
> for future Lexra CPU support, that misses these instructions too.
> 
> Signed-off-by: Yasha Cherikovsky <yasha.che3@...il.com>
> Cc: Ralf Baechle <ralf@...ux-mips.org>
> Cc: Paul Burton <paul.burton@...s.com>
> Cc: James Hogan <jhogan@...nel.org>
> Cc: linux-mips@...ux-mips.org
> Cc: linux-kernel@...r.kernel.org
> ---
>  arch/mips/Kconfig            | 35 +++++++++++++++++++++++++--
>  arch/mips/kernel/unaligned.c | 47 ++++++++++++++++++------------------
>  arch/mips/lib/memcpy.S       | 10 ++++----
>  arch/mips/lib/memset.S       | 12 ++++-----
>  4 files changed, 67 insertions(+), 37 deletions(-)

Thanks - applied to mips-next for 4.20.

Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ