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: <CAHk-=wiP68twiDi58hdgP7LrDeyTUrtFf=Kz0owF=X8i5AUTng@mail.gmail.com>
Date:   Wed, 3 Jun 2020 18:23:48 -0700
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     maobibo <maobibo@...ngson.cn>
Cc:     Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        linux-mips@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [GIT PULL] MIPS changes for v5.8-rc1

On Wed, Jun 3, 2020 at 6:11 PM maobibo <maobibo@...ngson.cn> wrote:
>
> On architectures that manage the access bit in hardware, access bit is
> set at the beginning even if there is no memory access. On MIPS system
> access bit is not set at the beginning, it is set in page fault handling.

I had a hard time parsing that.

But I think you mean that the access bit is already set in the pgprot
bits on other architectures. And yeah, you seem to be right for at
least x86.

So yes, it seems unnecessary to set the accessed bit again, when the
accessed bit is already there from the pgprot bits. Good point.

> I am investigating why access bit is not set at the
> beginning in MIPS system.

Yeah, that does seem to be the right thing to do.

On x86, we have (for example)

  #define PAGE_COPY            __pg(__PP|   0|_USR|___A|__NX|   0|   0|   0)
..
  #define __P010  PAGE_COPY

where that "__A" bit is the accessed bit (_PAGE_ACCESSED), just a
small internal macro to make all those line up nicely.

And that ends up being used for that protection_map[] array.

MIPS fills in the initial protection bits in protection_map[] with
dummy values, and then seems to initialize them without ever setting
the accessed bit there.

Not sure why that initialization then doesn't just add the pte_mkyoung..

                Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ