summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorChangqing Li <changqing.li@windriver.com>2022-08-19 17:58:04 +0800
committerKhem Raj <raj.khem@gmail.com>2022-08-19 09:28:58 -0700
commite4f8e83541229888e63113debb21c3fde3a0e7d8 (patch)
tree09a73ee88fe11599faec7558e3aedf1ed868a2da /meta-oe
parentb20af98b5ad28e330c97770f7d0db75890784f98 (diff)
downloadmeta-openembedded-e4f8e83541229888e63113debb21c3fde3a0e7d8.tar.gz
dlt-daemon: fix dlt-system.service failed since buffer overflow
dlt-system.service start failed with error: dlt-system[367]: *** buffer overflow detected ***: terminated dlt-system.service: Failed with result 'watchdog'. dlt-system.service: Main process exited, code=dumped, status=6/ABRT dlt-system.service: Watchdog timeout (limit 2s)! Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-dlt-system-Fix-buffer-overflow-detection-on-32bit-ta.patch40
-rw-r--r--meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.8.bb1
2 files changed, 41 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-dlt-system-Fix-buffer-overflow-detection-on-32bit-ta.patch b/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-dlt-system-Fix-buffer-overflow-detection-on-32bit-ta.patch
new file mode 100644
index 0000000000..e7e6cb3b1a
--- /dev/null
+++ b/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-dlt-system-Fix-buffer-overflow-detection-on-32bit-ta.patch
@@ -0,0 +1,40 @@
1From 94378458d653b1edca86435026909592cbe5e793 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Fri, 19 Aug 2022 11:12:17 +0800
4Subject: [PATCH] dlt-system: Fix buffer overflow detection on 32bit targets
5
6On 32bit target, dlt-system will termiated with error:
7dlt-system: *** buffer overflow detected ***: terminated
8
9Upstream-Status: Submitted [https://github.com/COVESA/dlt-daemon/pull/398]
10
11Signed-off-by: Changqing Li <changqing.li@windriver.com>
12---
13 src/system/dlt-system-watchdog.c | 6 +++---
14 1 file changed, 3 insertions(+), 3 deletions(-)
15
16diff --git a/src/system/dlt-system-watchdog.c b/src/system/dlt-system-watchdog.c
17index a2b01de..c0eaa12 100644
18--- a/src/system/dlt-system-watchdog.c
19+++ b/src/system/dlt-system-watchdog.c
20@@ -109,8 +109,8 @@ int register_watchdog_fd(struct pollfd *pollfd, int fdcnt)
21
22 void watchdog_fd_handler(int fd)
23 {
24- long int timersElapsed = 0;
25- int r = read(fd, &timersElapsed, 8); // only needed to reset fd event
26+ uint64_t timersElapsed = 0ULL;
27+ int r = read(fd, &timersElapsed, 8U); // only needed to reset fd event
28 if(r < 0)
29 DLT_LOG(watchdogContext, DLT_LOG_ERROR, DLT_STRING("Could not reset systemd watchdog. Exit with: "),
30 DLT_STRING(strerror(r)));
31@@ -120,4 +120,4 @@ void watchdog_fd_handler(int fd)
32
33 DLT_LOG(watchdogContext, DLT_LOG_DEBUG, DLT_STRING("systemd watchdog waited periodic\n"));
34 }
35-#endif
36\ No newline at end of file
37+#endif
38--
392.25.1
40
diff --git a/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.8.bb b/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.8.bb
index 7a613bcc93..aa5ef46a9d 100644
--- a/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.8.bb
+++ b/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.8.bb
@@ -18,6 +18,7 @@ SRC_URI = "git://github.com/GENIVI/${BPN}.git;protocol=https;branch=master \
18 file://0002-Don-t-execute-processes-as-a-specific-user.patch \ 18 file://0002-Don-t-execute-processes-as-a-specific-user.patch \
19 file://0004-Modify-systemd-config-directory.patch \ 19 file://0004-Modify-systemd-config-directory.patch \
20 file://0001-cmake-Link-with-libatomic-on-rv32-rv64.patch \ 20 file://0001-cmake-Link-with-libatomic-on-rv32-rv64.patch \
21 file://0001-dlt-system-Fix-buffer-overflow-detection-on-32bit-ta.patch \
21 " 22 "
22SRCREV = "6a3bd901d825c7206797e36ea98e10a218f5aad2" 23SRCREV = "6a3bd901d825c7206797e36ea98e10a218f5aad2"
23 24