Thread (8 messages) 8 messages, 2 authors, 2023-07-11

Re: [PATCH v3 4/4] tracing/probes: Fix to record 0-length data_loc in fetch_store_string*() if fails

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2023-07-11 00:16:46
Also in: lkml

On Tue, 11 Jul 2023 09:05:15 +0900
Masami Hiramatsu (Google) [off-list ref] wrote:
quoted
And this patch could have been:

static nokprobe_inline void set_data_loc(int ret, void *dest, void *__dest, void *base)
{
	*(u32 *)dest = make_data_loc(ret, __dest - base);
}  
and introduce it. I also want to put the ternary operator into set_data_loc() too
for simplicity.

static nokprobe_inline void set_data_loc(int ret, void *dest, void *__dest, void *base)
{
	if (ret < 0)
		ret = 0;
	*(u32 *)dest = make_data_loc(ret, __dest - base);
}
Sounds good.

-- Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help