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: <CAHk-=wht3yDtJ6zka=DNaB8Nymh-zmUMZhGaC8yFz29nuW-EsA@mail.gmail.com>
Date:   Sun, 10 May 2020 11:34:49 -0700
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Joerg Roedel <joro@...tes.org>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        iommu <iommu@...ts.linux-foundation.org>
Subject: Re: [git pull] IOMMU Fixes for Linux v5.7-rc4

On Sun, May 10, 2020 at 5:26 AM Joerg Roedel <joro@...tes.org> wrote:
>
>            The first race condition was around
>           the non-atomic update of the domain page-table root pointer
>           and the variable containing the page-table depth (called
>           mode). This is fixed now be merging page-table root and mode
>           into one 64-bit field which is read/written atomically.

This seems a bit odd.

The pointer part is always page-aligned, and the "mode" is just three bits.

Why isn't it just encoded as one pointer with the low three bits being the mode?

The thing is, the 64-bit atomic reads/writes are very expensive on
32-bit x86. If it was just a native pointer, it would be much cheaper
than an "atomic64_t".

                Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ