[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131105081310.34f88a92@gandalf.local.home>
Date: Tue, 5 Nov 2013 08:13:10 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Ingo Molnar <mingo@...nel.org>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
Ananth N Mavinakayanahalli <ananth@...ibm.com>,
x86@...nel.org, lkml <linux-kernel@...r.kernel.org>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Borislav Petkov <bp@...e.de>
Subject: Re: [PATCH -tip v2 3/3] [BUGFIX] kprobes: Prohibit probing on
func_ptr_is_kernel_text
On Tue, 5 Nov 2013 08:05:37 +0100
Ingo Molnar <mingo@...nel.org> wrote:
> The macro magic I can think of would need to change the syntax of the
> function definition - for example that is how the SYSCALL_DEFINE*() macros
> work.
Or something like the EXPORT_SYMBOL(), but that wouldn't include the
size of the function. But using the name we could use kallsyms to see
if a probe is placed in a function that is blacklisted. Not very pretty
to do though.
>
> It would be nice if there was a GCC extension that marked a function
> noinline and allowed the emitting of the function's address (and size)
> into a special section - but I'm not aware of any such compiler feature
> today.
Yeah, I was wishing the same thing. Maybe I'll try to talk with the gcc
folks about adding such a feature. Something like
void __attribute__((save_loc_and_size(".section"))) function(void)
{
}
-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists