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 possibleBut gives a nice big warning if that's the case. This is not something that
hacker,
as the function always return a valid pointer even when hacker input a
large size.
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.
-- Steve