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]
Message-ID: <20210111142533.oulduqd76mkpdkst@box>
Date:   Mon, 11 Jan 2021 17:25:33 +0300
From:   "Kirill A. Shutemov" <kirill@...temov.name>
To:     Will Deacon <will@...nel.org>
Cc:     linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        linux-arm-kernel@...ts.infradead.org,
        Catalin Marinas <catalin.marinas@....com>,
        Jan Kara <jack@...e.cz>, Minchan Kim <minchan@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        "Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Vinayak Menon <vinmenon@...eaurora.org>,
        Hugh Dickins <hughd@...gle.com>, kernel-team@...roid.com
Subject: Re: [PATCH v2 2/3] mm: Allow architectures to request 'old' entries
 when prefaulting

On Fri, Jan 08, 2021 at 05:15:16PM +0000, Will Deacon wrote:
> diff --git a/mm/filemap.c b/mm/filemap.c
> index c1f2dc89b8a7..0fb9d1714797 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -3051,14 +3051,18 @@ vm_fault_t filemap_map_pages(struct vm_fault *vmf,
>  		if (!pte_none(*vmf->pte))
>  			goto unlock;
>  
> +		/* We're about to handle the fault */
> +		if (vmf->address == address) {
> +			vmf->flags &= ~FAULT_FLAG_PREFAULT;
> +			ret = VM_FAULT_NOPAGE;
> +		} else {
> +			vmf->flags |= FAULT_FLAG_PREFAULT;
> +		}
> +

Do we need to restore the oririnal status of the bit once we are done?

-- 
 Kirill A. Shutemov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ