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  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:	Wed, 5 Dec 2007 11:04:08 +0100
From:	Hans-J├╝rgen Koch <hjk@...utronix.de>
To:	npiggin@...e.de
Cc:	akpm@...ux-foundation.org, greg@...ah.com,
	linux-kernel@...r.kernel.org
Subject: Re: [patch 04/18] uio: nopage

Am Wed, 05 Dec 2007 18:15:51 +1100
schrieb npiggin@...e.de:

> Convert uio from nopage to fault.
> 
> Signed-off-by: Nick Piggin <npiggin@...e.de>
> Cc: greg@...ah.com

Hi Nick,
could you please add me to Cc: for UIO stuff:

Cc: hjk@...utronix.de

The patch itself looks alright to me, but I didn't test with a real
driver.

Acked-by: Hans J Koch <hjk@...utronix.de>

Thanks,
Hans


> Cc: linux-kernel@...r.kernel.org
> ---
>  drivers/uio/uio.c |   14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
> 
> Index: linux-2.6/drivers/uio/uio.c
> ===================================================================
> --- linux-2.6.orig/drivers/uio/uio.c
> +++ linux-2.6/drivers/uio/uio.c
> @@ -412,30 +412,28 @@ static void uio_vma_close(struct vm_area
>  	idev->vma_count--;
>  }
>  
> -static struct page *uio_vma_nopage(struct vm_area_struct *vma,
> -				   unsigned long address, int *type)
> +static int uio_vma_fault(struct vm_area_struct *vma, struct vm_fault
> *vmf) {
>  	struct uio_device *idev = vma->vm_private_data;
> -	struct page* page = NOPAGE_SIGBUS;
> +	struct page *page;
>  
>  	int mi = uio_find_mem_index(vma);
>  	if (mi < 0)
> -		return page;
> +		return VM_FAULT_SIGBUS;
>  
>  	if (idev->info->mem[mi].memtype == UIO_MEM_LOGICAL)
>  		page = virt_to_page(idev->info->mem[mi].addr);
>  	else
>  		page =
> vmalloc_to_page((void*)idev->info->mem[mi].addr); get_page(page);
> -	if (type)
> -		*type = VM_FAULT_MINOR;
> -	return page;
> +	vmf->page = page;
> +	return 0;
>  }
>  
>  static struct vm_operations_struct uio_vm_ops = {
>  	.open = uio_vma_open,
>  	.close = uio_vma_close,
> -	.nopage = uio_vma_nopage,
> +	.fault = uio_vma_fault,
>  };
>  
>  static int uio_mmap_physical(struct vm_area_struct *vma)
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists