commit | be3dd0e67482cddc67c80ea1d4a0ed5cb6ad7733 | [log] [tgz] |
---|---|---|
author | Andrew Jeffery <andrew@aj.id.au> | Fri Dec 22 15:48:32 2023 +1030 |
committer | Andrew Jeffery <andrew@aj.id.au> | Fri Dec 22 15:49:57 2023 +1030 |
tree | 91043e312de99366eee4729bb79d52be35601b8d | |
parent | 1161642d2288f71549f0c9f89d09807ca251b58f [diff] |
main: Address strncat() overflow warning ``` FAILED: debug-trigger.p/main.c.o ccache cc -Idebug-trigger.p -I. -I.. -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -std=gnu18 -O0 -g -MD -MQ debug-trigger.p/main.c.o -MF debug-trigger.p/main.c.o.d -o debug-trigger.p/main.c.o -c ../main.c ../main.c: In function ‘main’: ../main.c:549:17: error: ‘strncat’ specified bound 4096 equals destination size [-Werror=stringop-overflow=] 549 | strncat(devnode, devid, sizeof(devnode)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors ``` Change-Id: Id9abfb900ad7601acd595febf00eb92c5a56d3af Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
debug-trigger
listens for an external signal that the BMC is in some way unresponsive. When the signal is received it triggers a crash to collect debug data and reboots the system in the hope that it will recover.
debug-trigger
implements a simple protocol over an LPC KCS device as its trigger source.
debug-trigger
implements a single action once the trigger event is received, which is to crash the kernel via /proc/sysrq-trigger
. For systems with kdump configured this results in collection of system state as context for why the system was externally unresponsive.