From d250223489233773e1fecdb65d2c0c9a708fe5cf Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 14 Jul 2019 07:59:53 +0200 Subject: [PATCH] fix build warning in x86 patch --- ...-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch | 2 +- ...-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch | 2 +- ...-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch | 2 +- ...-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch | 2 +- ...-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch | 2 +- ...-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/queue-4.14/x86-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch b/queue-4.14/x86-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch index 0f4be277182..79cbe020158 100644 --- a/queue-4.14/x86-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch +++ b/queue-4.14/x86-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch @@ -47,8 +47,8 @@ Signed-off-by: Greg Kroah-Hartman if (n < HBP_NUM) { - struct perf_event *bp = thread->ptrace_bps[n]; -+ index = array_index_nospec(index, HBP_NUM); + struct perf_event *bp = thread->ptrace_bps[index]; ++ index = array_index_nospec(index, HBP_NUM); if (bp) val = bp->hw.info.address; diff --git a/queue-4.19/x86-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch b/queue-4.19/x86-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch index 0f4be277182..79cbe020158 100644 --- a/queue-4.19/x86-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch +++ b/queue-4.19/x86-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch @@ -47,8 +47,8 @@ Signed-off-by: Greg Kroah-Hartman if (n < HBP_NUM) { - struct perf_event *bp = thread->ptrace_bps[n]; -+ index = array_index_nospec(index, HBP_NUM); + struct perf_event *bp = thread->ptrace_bps[index]; ++ index = array_index_nospec(index, HBP_NUM); if (bp) val = bp->hw.info.address; diff --git a/queue-4.4/x86-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch b/queue-4.4/x86-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch index c6500836716..5e0636dc6f9 100644 --- a/queue-4.4/x86-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch +++ b/queue-4.4/x86-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch @@ -47,8 +47,8 @@ Signed-off-by: Greg Kroah-Hartman if (n < HBP_NUM) { - struct perf_event *bp = thread->ptrace_bps[n]; -+ index = array_index_nospec(index, HBP_NUM); + struct perf_event *bp = thread->ptrace_bps[index]; ++ index = array_index_nospec(index, HBP_NUM); if (bp) val = bp->hw.info.address; diff --git a/queue-4.9/x86-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch b/queue-4.9/x86-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch index fa391ec3deb..a2b1e38c85f 100644 --- a/queue-4.9/x86-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch +++ b/queue-4.9/x86-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch @@ -47,8 +47,8 @@ Signed-off-by: Greg Kroah-Hartman if (n < HBP_NUM) { - struct perf_event *bp = thread->ptrace_bps[n]; -+ index = array_index_nospec(index, HBP_NUM); + struct perf_event *bp = thread->ptrace_bps[index]; ++ index = array_index_nospec(index, HBP_NUM); if (bp) val = bp->hw.info.address; diff --git a/queue-5.1/x86-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch b/queue-5.1/x86-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch index 931f00f62d5..a6c7be33722 100644 --- a/queue-5.1/x86-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch +++ b/queue-5.1/x86-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch @@ -47,8 +47,8 @@ Signed-off-by: Greg Kroah-Hartman if (n < HBP_NUM) { - struct perf_event *bp = thread->ptrace_bps[n]; -+ index = array_index_nospec(index, HBP_NUM); + struct perf_event *bp = thread->ptrace_bps[index]; ++ index = array_index_nospec(index, HBP_NUM); if (bp) val = bp->hw.info.address; diff --git a/queue-5.2/x86-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch b/queue-5.2/x86-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch index 8f03691dde6..37037b3349d 100644 --- a/queue-5.2/x86-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch +++ b/queue-5.2/x86-ptrace-fix-possible-spectre-v1-in-ptrace_get_debugreg.patch @@ -47,8 +47,8 @@ Signed-off-by: Greg Kroah-Hartman if (n < HBP_NUM) { - struct perf_event *bp = thread->ptrace_bps[n]; -+ index = array_index_nospec(index, HBP_NUM); + struct perf_event *bp = thread->ptrace_bps[index]; ++ index = array_index_nospec(index, HBP_NUM); if (bp) val = bp->hw.info.address; -- 2.47.3