From: Josh Poimboeuf <jpoimboe@kernel.org>
To: Juergen Gross <jgross@suse.com>
Cc: Borislav Petkov <bp@alien8.de>,
Linus Torvalds <torvalds@linux-foundation.org>,
Peter Zijlstra <peterz@infradead.org>, x86-ml <x86@kernel.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [GIT PULL] x86/urgent for v6.3-rc7
Date: Wed, 19 Apr 2023 09:44:51 -0700 [thread overview]
Message-ID: <20230419164451.2vtnawrvbhajrb2g@treble> (raw)
In-Reply-To: <ed6bfa1a-7e82-8273-ee7f-0e8097397724@suse.com>
On Wed, Apr 19, 2023 at 06:03:53PM +0200, Juergen Gross wrote:
> > However, the only call site is in apic_intr_mode_init() which itself is
> > __init. So yeah, strictly speaking nothing wrong.
> >
> > *IF* something calls it later, when __init is gone, then boom.
> >
> > Dunno, maybe
> >
> > a) track call sites too but maybe expensive and too much
That would indeed be a lot harder to do.
> > or
> >
> > b) make those warnings debug messages in case someone wants to run objtool
> > in debug mode, feels really bored and wants to fix potential issues.
Possibly, though I suspect nobody's ever going to be that bored ;-)
> > Or someone has a better idea.
> >
> > > Anyway, this is kind of experimental. If any of these warnings don't
> > > turn out to be useful I could drop some or all them.
> >
> > Right, I can certainly see potential and as said, since we're already
> > doing objtool massaging of object files, thought this should be pretty
> > easy to do. As you've shown. ;-)
>
> What about splitting the function vectors into __init and non-init parts?
>
> This would solve above problem automatically, as a non-init function couldn't
> deref the __init part of x86_platform.
Right, if we moved the __init parts of x86_platform out into a separate
struct x86_platform_init which is __initdata, that would solve this
particular issue rather cleanly.
Though, more generally, if we make the rule that non-init data can't
contain references to init data, that would be a much bigger patch set.
Which might end up being the reasonable thing to do, but before deciding
whether enforcing such a rule would be worth it, we might want to look
more deeply at the warnings to figure out what percentage of those (if
any) could be real bugs.
--
Josh
next prev parent reply other threads:[~2023-04-19 16:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-16 12:29 Borislav Petkov
2023-04-16 17:33 ` Linus Torvalds
2023-04-17 9:04 ` Borislav Petkov
2023-04-18 1:24 ` Josh Poimboeuf
2023-04-19 15:59 ` Borislav Petkov
2023-04-19 16:03 ` Juergen Gross
2023-04-19 16:44 ` Josh Poimboeuf [this message]
2023-04-16 17:43 ` pr-tracker-bot
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=20230419164451.2vtnawrvbhajrb2g@treble \
--to=jpoimboe@kernel.org \
--cc=bp@alien8.de \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=torvalds@linux-foundation.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®