summaryrefslogtreecommitdiff
path: root/tools/sound
diff options
context:
space:
mode:
authorBreno Leitao <leitao@debian.org>2024-07-29 01:45:08 -0700
committerAndrew Morton <akpm@linux-foundation.org>2024-09-01 20:43:31 -0700
commit11ee88a0f98770719f29b7d1efb2a2ca6a83af3c (patch)
tree17ee4aa554a333029a87a9b6a60ea4b3e2ab5dc9 /tools/sound
parent588661fd87a79c89b506abdba186cb58c07a5dfc (diff)
downloadlinux-11ee88a0f98770719f29b7d1efb2a2ca6a83af3c.tar.gz
linux-11ee88a0f98770719f29b7d1efb2a2ca6a83af3c.tar.bz2
linux-11ee88a0f98770719f29b7d1efb2a2ca6a83af3c.zip
fault-injection: enhance failcmd to exit on non-hex address input
The failcmd.sh script in the fault-injection toolkit does not currently validate whether the provided address is in hexadecimal format. This can lead to silent failures if the address is sourced from places like `/proc/kallsyms`, which omits the '0x' prefix, potentially causing users to operate under incorrect assumptions. Introduce a new function, `exit_if_not_hex`, which checks the format of the provided address and exits with an error message if the address is not a valid hexadecimal number. This enhancement prevents users from running the command with improperly formatted addresses, thus improving the robustness and usability of the failcmd tool. Link: https://lkml.kernel.org/r/20240729084512.3349928-1-leitao@debian.org Signed-off-by: Breno Leitao <leitao@debian.org> Reviewed-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/sound')
0 files changed, 0 insertions, 0 deletions