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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170725133604.GA27322@dhcp22.suse.cz>
Date:   Tue, 25 Jul 2017 15:36:04 +0200
From:   Michal Hocko <mhocko@...nel.org>
To:     Anshuman Khandual <khandual@...ux.vnet.ibm.com>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        akpm@...ux-foundation.org, mike.kravetz@...cle.com
Subject: Re: [PATCH V2] selftests/vm: Add tests to validate mirror
 functionality with mremap

On Tue 25-07-17 12:06:57, Anshuman Khandual wrote:
[...]
> diff --git a/tools/testing/selftests/vm/mremap_mirror_private_anon.c b/tools/testing/selftests/vm/mremap_mirror_private_anon.c
[...]
> +	ptr = mmap(NULL, alloc_size, PROT_READ | PROT_WRITE,
> +			MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
> +	if (ptr == MAP_FAILED) {
> +		perror("map() failed");
> +		return -1;
> +	}
> +	memset(ptr, PATTERN, alloc_size);
> +
> +	mirror_ptr =  (char *) mremap(ptr, 0, alloc_size, MREMAP_MAYMOVE);
> +	if (mirror_ptr == MAP_FAILED) {
> +		perror("mremap() failed");
> +		return -1;
> +	}

What is the point of this test? It will break with Mike's patch very
soon. Btw. it never worked. 
-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ