From: Ingo Molnar <mingo@kernel.org>
To: peterz@infradead.org
Cc: Josh Poimboeuf <jpoimboe@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
x86@kernel.org, linux-kernel@vger.kernel.org, mbenes@suse.cz
Subject: Re: [PATCH] objtool,x86: Verify poke_int3_handler() is self contained
Date: Mon, 27 Jul 2020 13:21:44 +0200 [thread overview]
Message-ID: <20200727112144.GA55660@gmail.com> (raw)
In-Reply-To: <20200727104050.GH119549@hirez.programming.kicks-ass.net>
* peterz@infradead.org <peterz@infradead.org> wrote:
>
> Abuse the SMAP rules to ensure poke_int3_handler() doesn't call out to
> anything.
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> ---
> tools/objtool/check.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> --- a/tools/objtool/check.c
> +++ b/tools/objtool/check.c
> @@ -551,6 +551,14 @@ static const char *uaccess_safe_builtin[
> "__memcpy_mcsafe",
> "mcsafe_handle_tail",
> "ftrace_likely_update", /* CONFIG_TRACE_BRANCH_PROFILING */
> + /*
> + * Abuse alert!
> + *
> + * poke_int3_handler() is not in fact related to uaccess at all, we
> + * abuse the uaccess rules to ensure poke_int3_handler() is self
> + * contained and doesn't CALL out to other code.
> + */
> + "poke_int3_handler",
So ->uaccess_safe makes sure that we don't CALL into non-uaccess-safe
functions, but it still allows CALLs into *other* uaccess-safe
functions, right?
So unless I missed something in the logic, the comment should say
something like "doesn't CALL out to other non-uaccess safe code" or
so? Which is, arguably, like 99% of all functions - but still, a whole
bunch are allowed, such as low level instrumentation and other utility
functions.
Thanks,
Ingo
next prev parent reply other threads:[~2020-07-27 11:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-27 10:40 [PATCH] objtool,x86: Verify poke_int3_handler() is self contained peterz
2020-07-27 11:21 ` Ingo Molnar [this message]
2020-07-27 12:50 ` peterz
2020-07-27 13:11 ` Ingo Molnar
2020-07-27 20:56 ` Thomas Gleixner
2020-07-28 8:34 ` peterz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200727112144.GA55660@gmail.com \
--to=mingo@kernel.org \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.