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] [day] [month] [year] [list]
Message-ID: <06BDEBBE-F7C8-4EE4-9BE4-A3C6DB4E01AB@akamai.com>
Date:	Tue, 7 Jun 2016 21:14:27 +0000
From:	"Jayaramappa, Srilakshmi" <sjayaram@...mai.com>
To:	Mike Kravetz <mike.kravetz@...cle.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>
CC:	Shuah Khan <shuahkh@....samsung.com>,
	Eric B Munson <emunson@...mai.com>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] selftests/vm/compaction_test: fix write to restore
 nr_hugepages



On 6/7/16, 4:26 PM, "Mike Kravetz" <mike.kravetz@...cle.com> wrote:

>The write at the end of the test to restore nr_hugepages to its previous
>value is failing.  This is because it is trying to write the number of
>bytes in the char array as opposed to the number of bytes in the string.
>
>Signed-off-by: Mike Kravetz <mike.kravetz@...cle.com>
>---
> tools/testing/selftests/vm/compaction_test.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/tools/testing/selftests/vm/compaction_test.c b/tools/testing/selftests/vm/compaction_test.c
>index 932ff57..00c4f65 100644
>--- a/tools/testing/selftests/vm/compaction_test.c
>+++ b/tools/testing/selftests/vm/compaction_test.c
>@@ -136,7 +136,7 @@ int check_compaction(unsigned long mem_free, unsigned int hugepage_size)
> 	printf("No of huge pages allocated = %d\n",
> 	       (atoi(nr_hugepages)));
> 
>-	if (write(fd, initial_nr_hugepages, sizeof(initial_nr_hugepages))
>+	if (write(fd, initial_nr_hugepages, strlen(initial_nr_hugepages))
> 	    != strlen(initial_nr_hugepages)) {
> 		perror("Failed to write to /proc/sys/vm/nr_hugepages\n");
> 		goto close_fd;
>-- 
>2.4.11
>


Looks good, thanks!

-Sri Jayaramappa

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ