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]
Date:   Mon, 16 Nov 2020 21:16:34 +0100
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Max Filippov <jcmvbkbc@...il.com>, linux-xtensa@...ux-xtensa.org
Cc:     Chris Zankel <chris@...kel.net>, linux-kernel@...r.kernel.org,
        Max Filippov <jcmvbkbc@...il.com>
Subject: Re: [PATCH v2] xtensa/mm/highmem: Make generic kmap_atomic() work correctly

On Mon, Nov 16 2020 at 11:32, Max Filippov wrote:
> From: Thomas Gleixner <tglx@...utronix.de>
>
> The conversion to the generic kmap_atomic() implementation missed the fact
> that xtensa's fixmap works bottom up while all other implementations work
> top down. There is no real reason why xtensa needs to work that way.
>
> Cure it by:
>
>   - Using the generic fix_to_virt()/virt_to_fix() functions which work top
>     down
>   - Adjusting the mapping defines
>   - Using the generic index calculation for the non cache aliasing case
>   - Making the cache colour offset reverse so the effective index is correct
>
> While at it, remove the outdated and misleading comment above the fixmap
> enum which originates from the initial copy&pasta of this code from i386.
>
> Reported-by: Max Filippov <jcmvbkbc@...il.com>
> Fixes: 629ed3f7dad2 ("xtensa/mm/highmem: Switch to generic kmap atomic")
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Signed-off-by: Max Filippov <jcmvbkbc@...il.com>
> Tested-by: Max Filippov <jcmvbkbc@...il.com>
> ---
> Changes v1->v2:
> - fix off-by-one error in kmap_idx calculation

Duh. Indeed.

Thanks for following up and helping with this. Much appreciated!

     tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ