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: <6fa7d32b-07f0-ab6d-8053-021b171153e6@virtuozzo.com>
Date:   Fri, 21 Sep 2018 12:37:16 +0300
From:   Andrey Ryabinin <aryabinin@...tuozzo.com>
To:     Souptick Joarder <jrdr.linux@...il.com>, willy@...radead.org,
        akpm@...ux-foundation.org, mark.rutland@....com,
        dvyukov@...gle.com, tglx@...utronix.de, gregkh@...uxfoundation.org,
        tchibo@...gle.com
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kernel/kcov: Replace vm_insert_page with vmf_insert_page

On 09/20/2018 10:12 PM, Souptick Joarder wrote:
> There is a plan to replace vm_insert_page with new API
> vmf_insert_page. As part of it, converting vm_insert_page
> to use vmf_insert_page.
> 
> Signed-off-by: Souptick Joarder <jrdr.linux@...il.com>
> ---
>  kernel/kcov.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/kcov.c b/kernel/kcov.c
> index 3ebd09e..8900d8e 100644
> --- a/kernel/kcov.c
> +++ b/kernel/kcov.c
> @@ -293,8 +293,9 @@ static int kcov_mmap(struct file *filep, struct vm_area_struct *vma)
>  		spin_unlock(&kcov->lock);
>  		for (off = 0; off < size; off += PAGE_SIZE) {
>  			page = vmalloc_to_page(kcov->area + off);
> -			if (vm_insert_page(vma, vma->vm_start + off, page))
> -				WARN_ONCE(1, "vm_insert_page() failed");
> +			if (vmf_insert_page(vma, vma->vm_start + off, page)
> +					!= VM_FAULT_NOPAGE)
> +				WARN_ONCE(1, "vmf_insert_page() failed");

Nack, don't see the reason for such change, it only makes code worse.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ