]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/blob
a0b870486f0970e2ffb91769d3f170d30512d718
[thirdparty/openembedded/openembedded-core-contrib.git] /
1 From f419315f28a1da656c4faa8a852a2928ce38c72d Mon Sep 17 00:00:00 2001
2 From: Ovidiu Panait <ovidiu.panait@windriver.com>
3 Date: Thu, 14 May 2020 14:27:17 +0300
4 Subject: [PATCH 4/4] Update: Use vmalloc_sync_mappings for stable kernels
5
6 Starting from v5.4.28/v5.2.37/v4.19.113/v4.14.175/v4.9.218/v4.4.218, stable
7 kernel branches backported v5.6 upstream commit [1], causing the following
8 warnings:
9 ...
10 [ 483.242037] LTTng: vmalloc_sync_all symbol lookup failed.
11 [ 483.257056] Page fault handler and NMI tracing might trigger faults.
12 ...
13
14 Extend check for vmalloc_sync_mappings for stable kernels as well.
15
16 [1] https://github.com/torvalds/linux/commit/763802b53a427ed3cbd419dbba255c414fdd9e7c
17
18 [ Edit: minor coding style fix by Mathieu Desnoyers. ]
19
20 Upstream-Status: Backport [https://github.com/lttng/lttng-modules/commit/5939591f87dc291bc858caf72decfb8569d802e3]
21
22 Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
23 Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
24 Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
25 ---
26 wrapper/vmalloc.h | 17 +++++++++++++++--
27 1 file changed, 15 insertions(+), 2 deletions(-)
28
29 diff --git a/wrapper/vmalloc.h b/wrapper/vmalloc.h
30 index d905f60..c7538ae 100644
31 --- a/wrapper/vmalloc.h
32 +++ b/wrapper/vmalloc.h
33 @@ -20,8 +20,15 @@
34
35 #include <linux/kallsyms.h>
36 #include <wrapper/kallsyms.h>
37 +#include <lttng-kernel-version.h>
38
39 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
40 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0) \
41 + || LTTNG_KERNEL_RANGE(5,4,28, 5,5,0) \
42 + || LTTNG_KERNEL_RANGE(5,2,37, 5,3,0) \
43 + || LTTNG_KERNEL_RANGE(4,19,113, 4,20,0) \
44 + || LTTNG_KERNEL_RANGE(4,14,175, 4,15,0) \
45 + || LTTNG_KERNEL_RANGE(4,9,218, 4,10,0) \
46 + || LTTNG_KERNEL_RANGE(4,4,218, 4,5,0))
47
48 static inline
49 void wrapper_vmalloc_sync_mappings(void)
50 @@ -72,7 +79,13 @@ void wrapper_vmalloc_sync_mappings(void)
51
52 #else
53
54 -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
55 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0) \
56 + || LTTNG_KERNEL_RANGE(5,4,28, 5,5,0) \
57 + || LTTNG_KERNEL_RANGE(5,2,37, 5,3,0) \
58 + || LTTNG_KERNEL_RANGE(4,19,113, 4,20,0) \
59 + || LTTNG_KERNEL_RANGE(4,14,175, 4,15,0) \
60 + || LTTNG_KERNEL_RANGE(4,9,218, 4,10,0) \
61 + || LTTNG_KERNEL_RANGE(4,4,218, 4,5,0))
62
63 static inline
64 void wrapper_vmalloc_sync_mappings(void)
65 --
66 2.17.1
67