Re: [PATCH v5] trace: acquire buffer from temparary trace sequence

From: Linyu Yuan
Date: Mon Jan 30 2023 - 21:06:36 EST



On 1/31/2023 3:30 AM, Steven Rostedt wrote:
On Mon, 30 Jan 2023 21:14:01 +0800
Linyu Yuan <quic_linyyuan@xxxxxxxxxxx> wrote:

@Steven current design is not safe, as user still can write to buffer
which have no enough space.
I'm assuming that it would never use more that DWC3_MSG_MAX, and that's set
to 500. The size of the trace_seq() is 4096 (or PAGE_SIZE), I doubt it will
ever be an issue.

How do you think the user can still write more than enough?


yes, agree it will be safe for dwc3, but i don't know if any possible hacker,

as the function always return a valid pointer even when hacker input a large size.



-- Steve

do you think it is better to improve dwc3 trace in fast assign path ?