mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-18 18:23:53 +08:00
Kprobe events added "ustring" to distinguish reading strings from kernel space
or user space. But the creating of the event format file only checks for "string" to display string formats. "ustring" must also be handled. -----BEGIN PGP SIGNATURE----- iIoEABYIADIWIQRRSw7ePDh/lE+zeZMp5XQQmuv6qgUCXi8JRxQccm9zdGVkdEBn b29kbWlzLm9yZwAKCRAp5XQQmuv6qvaiAP943Srl0C1NHuKtJGHpYkgHJRt4mPFO 569Wx82a2ODH4AEA/D8uda0+p0wJB/uDnd/VyhTeb1nAjqzhx4pfGPNjaw8= =lu3h -----END PGP SIGNATURE----- Merge tag 'trace-v5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: "Kprobe events added 'ustring' to distinguish reading strings from kernel space or user space. But the creating of the event format file only checks for 'string' to display string formats. 'ustring' must also be handled" * tag 'trace-v5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing/kprobes: Have uname use __get_str() in print_fmt
This commit is contained in:
commit
a78416d974
@ -876,7 +876,8 @@ static int __set_print_fmt(struct trace_probe *tp, char *buf, int len,
|
||||
for (i = 0; i < tp->nr_args; i++) {
|
||||
parg = tp->args + i;
|
||||
if (parg->count) {
|
||||
if (strcmp(parg->type->name, "string") == 0)
|
||||
if ((strcmp(parg->type->name, "string") == 0) ||
|
||||
(strcmp(parg->type->name, "ustring") == 0))
|
||||
fmt = ", __get_str(%s[%d])";
|
||||
else
|
||||
fmt = ", REC->%s[%d]";
|
||||
@ -884,7 +885,8 @@ static int __set_print_fmt(struct trace_probe *tp, char *buf, int len,
|
||||
pos += snprintf(buf + pos, LEN_OR_ZERO,
|
||||
fmt, parg->name, j);
|
||||
} else {
|
||||
if (strcmp(parg->type->name, "string") == 0)
|
||||
if ((strcmp(parg->type->name, "string") == 0) ||
|
||||
(strcmp(parg->type->name, "ustring") == 0))
|
||||
fmt = ", __get_str(%s)";
|
||||
else
|
||||
fmt = ", REC->%s";
|
||||
|
Loading…
Reference in New Issue
Block a user