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

From: Linyu Yuan
Date: Mon Jan 30 2023 - 21:49:53 EST



On 1/31/2023 10:37 AM, Steven Rostedt wrote:
On Tue, 31 Jan 2023 10:06:22 +0800
Linyu Yuan <quic_linyyuan@xxxxxxxxxxx> wrote:

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.
But gives a nice big warning if that's the case. This is not something that
can be modified by user input. We do not need to worry about
kernel implementations that could overflow (and trigger a WARN_ON() when
they do). Especially since the max size is greater than the max size of the
content of an event.

A lot of systems that worry about hackers enable "panic_on_warn" which
means that if the WARN_ON() triggers, the machine will crash, which will at
most cause a DOS, but not something people can use to hack into the machine
with.


thanks, please help review the change.



-- Steve