From: Peter Zijlstra <peterz@infradead.org>
To: kbuild-all@lists.01.org
Subject: Re: [peterz-queue:core/rcu 31/33] arch/x86/kernel/alternative.c:961:26: error: inlining failed in call to always_inline 'try_get_desc': function attribute mismatch
Date: Thu, 05 Mar 2020 21:28:54 +0100 [thread overview]
Message-ID: <20200305202854.GD3348@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <CACT4Y+axD4ZjEPdekgVkkUGu6V0MMR9Q1RNcVA9v6dOSi8FHzg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1287 bytes --]
On Thu, Mar 05, 2020 at 09:13:26PM +0100, Dmitry Vyukov wrote:
> > Right, but then I have to ask how this is different vs inlining things
> > into a __no_sanitize function.
>
> We ask compiler to do slightly different things in these cases. In the
> original case we asked to sanitize user_mode. If we have a separate
> file, we ask to not sanitize user_mode. A more explicit analog of this
> would be to introduce user_mode2 with no_sanitize attribute and call
> it from the poke_int3_handler.
> Strictly saying what you are going to do is sort of ODR violation,
> because now we have user_mode that is sanitized and another user_mode
> which is not sanitized (different behavior). It should work for
> force_inline functions because we won't actually have the user_mode
> symbol materizalied. But generally one needs to be careful with such
> tricks, say if the function would be inline and compiled to a real
> symbol, an instrumented or non-instrumented version will be chosen
> randomly and we may end up with silent unexpected results.
Right, so I'd completely understand the compiler yelling at me if the
functions were indeed instantiated, but exactly because of the
force-inline I was expecting it to actually work.
A well, can't have it all it seems.
next prev parent reply other threads:[~2020-03-05 20:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-29 14:37 [peterz-queue:core/rcu 31/33] arch/x86/kernel/alternative.c:961:26: error: inlining failed in call to always_inline 'try_get_desc': function attribute mismatch kbuild test robot
2020-03-05 13:43 ` Peter Zijlstra
2020-03-05 15:00 ` Dmitry Vyukov
2020-03-05 15:10 ` Dmitry Vyukov
2020-03-05 15:23 ` Dmitry Vyukov
2020-03-05 15:55 ` Peter Zijlstra
2020-03-05 16:29 ` Dmitry Vyukov
2020-03-05 18:47 ` Peter Zijlstra
2020-03-05 20:13 ` Dmitry Vyukov
2020-03-05 20:28 ` Peter Zijlstra [this message]
2020-03-06 5:34 ` Dmitry Vyukov
2020-03-06 9:51 ` Peter Zijlstra
2020-03-06 10:06 ` Dmitry Vyukov
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=20200305202854.GD3348@worktop.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=kbuild-all@lists.01.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.