aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-06-20 09:47:20 +0900
committervantoman <mustafa.vantom@gmail.com>2021-04-18 14:36:01 +0200
commite5dae9ef841a437d21d62d43630010392dc6e74b (patch)
tree3b4ca79cc82faf256e67cb4d7f5806fb7ceae348 /scripts/gdb/linux/utils.py
parent77cb8fb86527d10cf1755a0a226d36263a4de97d (diff)
proc: fix missing final NUL in get_mm_cmdline() rewrite
The rewrite of the cmdline fetching missed the fact that we used to also return the final terminating NUL character of the last argument. I hadn't noticed, and none of the tools I tested cared, but something obviously must care, because Michal Kubecek noticed the change in behavior. Tweak the "find the end" logic to actually include the NUL character, and once past the eend of argv, always start the strnlen() at the expected (original) argument end. This whole "allow people to rewrite their arguments in place" is a nasty hack and requires that odd slop handling at the end of the argv array, but it's our traditional model, so we continue to support it. Repored-and-bisected-by: Michal Kubecek <mkubecek@suse.cz> Reviewed-and-tested-by: Michal Kubecek <mkubecek@suse.cz> Cc: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Bug: 147443331 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I9046c8b691aa9eda82026c24823154271bcb05e2
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions