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:	Tue, 7 May 2013 13:16:30 +0200
From:	Andrew Jones <drjones@...hat.com>
To:	Andrea Arcangeli <aarcange@...hat.com>
Cc:	qemu-devel@...gnu.org, linux-kernel@...r.kernel.org,
	Anthony Liguori <aliguori@...ibm.com>,
	Orit Wasserman <owasserm@...hat.com>,
	Juan Quintela <quintela@...hat.com>,
	Hugh Dickins <hughd@...gle.com>,
	Isaku Yamahata <yamahata@...inux.co.jp>,
	Mel Gorman <mgorman@...e.de>,
	Paolo Bonzini <pbonzini@...hat.com>
Subject: Re: [Qemu-devel] [PATCH 1/4] mm: madvise MADV_USERFAULT

On Mon, May 06, 2013 at 09:56:58PM +0200, Andrea Arcangeli wrote:
> +++ b/mm/madvise.c
> @@ -93,6 +93,21 @@ static long madvise_behavior(struct vm_area_struct * vma,
>  		if (error)
>  			goto out;
>  		break;
> +	case MADV_USERFAULT:
> +		if (vma->vm_ops) {
> +			error = -EINVAL;
> +			goto out;
> +		}
> +		new_flags |= VM_USERFAULT;
> +		break;
> +	case MADV_NOUSERFAULT:
> +		if (vma->vm_ops) {
> +			WARN_ON(new_flags & VM_USERFAULT);
> +			error = -EINVAL;
> +			goto out;
> +		}
> +		new_flags &= ~VM_USERFAULT;
> +		break;
>  	}
>  
>  	if (new_flags == vma->vm_flags) {
> @@ -405,6 +420,7 @@ madvise_behavior_valid(int behavior)
>  	case MADV_HUGEPAGE:
>  	case MADV_NOHUGEPAGE:
>  #endif
> +	case MADV_USERFAULT:

Missing MADV_NOUSERFAULT: here

>  	case MADV_DONTDUMP:
>  	case MADV_DODUMP:
>  		return 1;
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ