[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211201111922.2c52047d@gandalf.local.home>
Date: Wed, 1 Dec 2021 11:19:22 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Masami Hiramatsu <mhiramat@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
zhangyue <zhangyue1@...inos.cn>, naveen.n.rao@...ux.ibm.com,
anil.s.keshavamurthy@...el.com, davem@...emloft.net
Subject: Re: [PATCH] kprobes: Limit max data_size of the kretprobe instances
On Wed, 1 Dec 2021 23:45:50 +0900
Masami Hiramatsu <mhiramat@...nel.org> wrote:
> The kretprobe::data_size is unsigned (size_t) but it is
> used as 'data_size + sizeof(struct kretprobe_instance)'.
> Thus, it can be smaller than sizeof(struct kretprobe_instance)
> while allocating memory for the kretprobe_instance.
The above doesn't make sense.
data_size is unsigned but it is used as
'data_size + sizeof(struct kretprobe_instance)'.
What does that mean?
What can be smaller than sizeof(struct kretprobe_instance) and why does it
matter?
-- Steve
>
> To avoid this issue, introduce a max limitation of the
> kretprobe::data_size. 4KB per instance should be OK.
>
Powered by blists - more mailing lists