mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* uprobe_events can't accept paths that contain spaces
@ 2024-11-22  0:42 Yuxuan Shui
  2024-11-25  6:43 ` Masami Hiramatsu
  0 siblings, 1 reply; 2+ messages in thread
From: Yuxuan Shui @ 2024-11-22  0:42 UTC (permalink / raw)
  To: linux-trace-kernel
  Cc: Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers, open list

Hi,

I hit this problem accidentally when one of the shared libraries I was
looking at is located in a directory with spaces in its name. `perf
probe` reported "Failed to write event: Invalid argument".

If I understand the code correctly, strings written into uprobe_events
are strictly splitted at whitespaces (by `argv_split`). This seems
like an unfortunate restriction. If I submit a patch to introduce
support for either quotes (") or escapes (\), will that be considered?

(For context I am running something that expects its libraries to be
located at fixed paths, so moving them to a different path would be
awkward at best.)

Thanks.

-- 

Regards
Yuxuan Shui

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: uprobe_events can't accept paths that contain spaces
  2024-11-22  0:42 uprobe_events can't accept paths that contain spaces Yuxuan Shui
@ 2024-11-25  6:43 ` Masami Hiramatsu
  0 siblings, 0 replies; 2+ messages in thread
From: Masami Hiramatsu @ 2024-11-25  6:43 UTC (permalink / raw)
  To: Yuxuan Shui
  Cc: linux-trace-kernel, Steven Rostedt, Masami Hiramatsu,
	Mathieu Desnoyers, open list

On Fri, 22 Nov 2024 00:42:51 +0000
Yuxuan Shui <yshuiv7@gmail.com> wrote:

> Hi,
> 
> I hit this problem accidentally when one of the shared libraries I was
> looking at is located in a directory with spaces in its name. `perf
> probe` reported "Failed to write event: Invalid argument".

Oops, yes, it is limited by implementation.

> 
> If I understand the code correctly, strings written into uprobe_events
> are strictly splitted at whitespaces (by `argv_split`).

Right!

> This seems
> like an unfortunate restriction. If I submit a patch to introduce
> support for either quotes (") or escapes (\), will that be considered?

Yeah, that enhancement is welcome! You can add such function in
trace_probe.c and use it instead of argv_split.

> 
> (For context I am running something that expects its libraries to be
> located at fixed paths, so moving them to a different path would be
> awkward at best.)

Thanks,

> 
> Thanks.
> 
> -- 
> 
> Regards
> Yuxuan Shui


-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-11-25  6:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-22  0:42 uprobe_events can't accept paths that contain spaces Yuxuan Shui
2024-11-25  6:43 ` Masami Hiramatsu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®