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-next>] [day] [month] [year] [list]
Message-Id: <20220330215257.112029-1-sidhartha.kumar@oracle.com>
Date:   Wed, 30 Mar 2022 21:52:57 +0000
From:   Sidhartha Kumar <sidhartha.kumar@...cle.com>
To:     shuah@...nel.org, akpm@...ux-foundation.org
Cc:     Sidhartha Kumar <sidhartha.kumar@...cle.com>, linux-mm@...ck.org,
        linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
        stable@...r.kernel.org
Subject: [PATCH] selftest/vm: clarify error statement in gup_test

Print two possible reasons /sys/kernel/debug/gup_test
cannot be opened to help users of this test diagnose
failures.

Signed-off-by: Sidhartha Kumar <sidhartha.kumar@...cle.com>
Cc: stable@...r.kernel.org # 5.15+
---
 tools/testing/selftests/vm/gup_test.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/vm/gup_test.c b/tools/testing/selftests/vm/gup_test.c
index fe043f67798b0..c496bcefa7a0e 100644
--- a/tools/testing/selftests/vm/gup_test.c
+++ b/tools/testing/selftests/vm/gup_test.c
@@ -205,7 +205,9 @@ int main(int argc, char **argv)
 
 	gup_fd = open("/sys/kernel/debug/gup_test", O_RDWR);
 	if (gup_fd == -1) {
-		perror("open");
+		perror("failed to open /sys/kernel/debug/gup_test");
+		printf("check if CONFIG_GUP_TEST is enabled in kernel config\n");
+		printf("check if debugfs is mounted at /sys/kernel/debug\n");
 		exit(1);
 	}
 
-- 
2.24.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ