All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/2] tst_kvercmp: Add rhel7,8 support
@ 2020-10-29 16:35 Yang Xu
  2020-10-29 16:35 ` [LTP] [PATCH 2/2] syscalls/ptrace08: Add exception for RHEL8 4.18 kernel Yang Xu
  2020-10-30 12:54 ` [LTP] [PATCH 1/2] tst_kvercmp: Add rhel7,8 support Cyril Hrubis
  0 siblings, 2 replies; 3+ messages in thread
From: Yang Xu @ 2020-10-29 16:35 UTC (permalink / raw)
  To: ltp

Signed-off-by: Yang Xu <xuyang_jy_0410@163.com>
---
 lib/tst_kvercmp.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/tst_kvercmp.c b/lib/tst_kvercmp.c
index 5d56e30b9..8bf65d309 100644
--- a/lib/tst_kvercmp.c
+++ b/lib/tst_kvercmp.c
@@ -146,6 +146,12 @@ const char *tst_kvcmp_distname(const char *kver)
 	if (strstr(kver, ".el6"))
 		return "RHEL6";
 
+	if (strstr(kver, ".el7"))
+		return "RHEL7";
+
+	if (strstr(kver, ".el8"))
+		return "RHEL8";
+
 	if (access(OSRELEASE_PATH, F_OK) != -1) {
 		SAFE_FILE_LINES_SCANF(NULL, OSRELEASE_PATH, "ID=%s", distname);
 
-- 
2.18.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [LTP] [PATCH 2/2] syscalls/ptrace08: Add exception for RHEL8 4.18 kernel
  2020-10-29 16:35 [LTP] [PATCH 1/2] tst_kvercmp: Add rhel7,8 support Yang Xu
@ 2020-10-29 16:35 ` Yang Xu
  2020-10-30 12:54 ` [LTP] [PATCH 1/2] tst_kvercmp: Add rhel7,8 support Cyril Hrubis
  1 sibling, 0 replies; 3+ messages in thread
From: Yang Xu @ 2020-10-29 16:35 UTC (permalink / raw)
  To: ltp

RHEL 4.18 kernel got this patch
commit bd14406b78e6d("perf/hw_breakpoint: Modify breakpoint even if the new attrhas disabled set") since 4.18.0-49.

Without this fix, this case failed as below on RHEL8:
tst_kernel.c:79: TINFO: uname.machine=x86_64 kernel is 64bit
ptrace08.c:96: TINFO: Trying address 0xffff800000000000
ptrace08.c:122: TFAIL: ptrace() breakpoint with kernel addr succeeded
ptrace08.c:96: TINFO: Trying address 0xffffffffffffffff
ptrace08.c:122: TFAIL: ptrace() breakpoint with kernel addr succeeded
ptrace08.c:96: TINFO: Trying address 0xffffbfffffffffff
ptrace08.c:122: TFAIL: ptrace() breakpoint with kernel addr succeeded

Signed-off-by: Yang Xu <xuyang_jy_0410@163.com>
---
 testcases/kernel/syscalls/ptrace/ptrace08.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/syscalls/ptrace/ptrace08.c b/testcases/kernel/syscalls/ptrace/ptrace08.c
index 63086f1fd..2796c40e2 100644
--- a/testcases/kernel/syscalls/ptrace/ptrace08.c
+++ b/testcases/kernel/syscalls/ptrace/ptrace08.c
@@ -56,6 +56,11 @@ static pid_t child_pid;
 
 static int deffered_check;
 
+static struct tst_kern_exv kvers[] = {
+	{"RHEL8", "4.18.0-49"},
+	{NULL, NULL},
+};
+
 static void setup(void)
 {
 	/*
@@ -70,9 +75,10 @@ static void setup(void)
 	 * The original fix for the kernel haven't rejected the kernel address
 	 * right away when breakpoint was modified from userspace it was
 	 * disabled instead and the EINVAL was returned when dr7 was written to
-	 * enable it again.
+	 * enable it again. On RHEL8, it has introduced the right fix since
+	 * 4.18.0-49.
 	 */
-	if (tst_kvercmp(4, 19, 0) < 0)
+	if (tst_kvercmp2(4, 19, 0, kvers) < 0)
 		deffered_check = 1;
 }
 
-- 
2.18.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [LTP] [PATCH 1/2] tst_kvercmp: Add rhel7,8 support
  2020-10-29 16:35 [LTP] [PATCH 1/2] tst_kvercmp: Add rhel7,8 support Yang Xu
  2020-10-29 16:35 ` [LTP] [PATCH 2/2] syscalls/ptrace08: Add exception for RHEL8 4.18 kernel Yang Xu
@ 2020-10-30 12:54 ` Cyril Hrubis
  1 sibling, 0 replies; 3+ messages in thread
From: Cyril Hrubis @ 2020-10-30 12:54 UTC (permalink / raw)
  To: ltp

Hi!
Both pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-30 12:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-29 16:35 [LTP] [PATCH 1/2] tst_kvercmp: Add rhel7,8 support Yang Xu
2020-10-29 16:35 ` [LTP] [PATCH 2/2] syscalls/ptrace08: Add exception for RHEL8 4.18 kernel Yang Xu
2020-10-30 12:54 ` [LTP] [PATCH 1/2] tst_kvercmp: Add rhel7,8 support Cyril Hrubis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.