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]
Date:   Thu, 4 Jun 2020 09:10:20 +0800
From:   maobibo <maobibo@...ngson.cn>
To:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Cc:     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 06/04/2020 05:00 AM, Linus Torvalds wrote:
> On Tue, Jun 2, 2020 at 5:55 AM Thomas Bogendoerfer
> <tsbogend@...ha.franken.de> wrote:
>>
>> Bibo Mao (4):
>>       mm/memory.c: Add memory read privilege on page fault handling
> 
> Hmm. That's a horribly named commit, but can you clarify why this
> didn't just use the existing pte_mkyoung?
> 
> These are all paths that set the dirty bit early if it's a write, I
> don't see why they wouldn't set the accessed bit too.
> 
> Even on architectures that manage the accessed bit in hardware, this
> might be a (tiny) performance advantage because it avoids a page table
> walker microfault to set the bit when it's accessed.
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.

There are two ways to solve this, one way is to set access bit in page
fault stage like mk_dirty for write accessing, this will bring out
one/two cycle performance penalty for other architectures. The other way
is to set access bit in the beginning like other architectures
even if there is no memory access.

I am ok with the former method, only that it will influence other arches
just one or two cycles. For the latter I am investigating why access bit
is not set at the beginning in MIPS system.

regards
bibo, mao

> 
> We already do the pte_mkyoung() in paths like cow_user_page(), so the
> others may have been just oversights?
> 
> Or was there possibly some reason we didn't want to do it here?
> 
>                 Linus
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ