From: peterz@infradead.org
To: "Jürgen Groß" <jgross@suse.com>
Cc: Marco Elver <elver@google.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
fenghua.yu@intel.com, "H. Peter Anvin" <hpa@zytor.com>,
LKML <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@redhat.com>,
syzkaller-bugs <syzkaller-bugs@googlegroups.com>,
Thomas Gleixner <tglx@linutronix.de>,
"Luck, Tony" <tony.luck@intel.com>,
the arch/x86 maintainers <x86@kernel.org>,
yu-cheng.yu@intel.com, sdeep@vmware.com,
virtualization@lists.linux-foundation.org,
kasan-dev <kasan-dev@googlegroups.com>,
syzbot <syzbot+8db9e1ecde74e590a657@syzkaller.appspotmail.com>,
"Paul E. McKenney" <paulmck@kernel.org>,
Wei Liu <wei.liu@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH] x86/paravirt: Add missing noinstr to arch_local*() helpers
Date: Tue, 11 Aug 2020 11:46:51 +0200 [thread overview]
Message-ID: <20200811094651.GH35926@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20200811092054.GB2674@hirez.programming.kicks-ass.net>
On Tue, Aug 11, 2020 at 11:20:54AM +0200, peterz@infradead.org wrote:
> On Tue, Aug 11, 2020 at 10:38:50AM +0200, Jürgen Groß wrote:
> > In case you don't want to do it I can send the patch for the Xen
> > variants.
>
> I might've opened a whole new can of worms here. I'm not sure we
> can/want to fix the entire fallout this release :/
>
> Let me ponder this a little, because the more I look at things, the more
> problems I keep finding... bah bah bah.
That is, most of these irq-tracking problem are new because commit:
859d069ee1dd ("lockdep: Prepare for NMI IRQ state tracking")
changed irq-tracking to ignore the lockdep recursion count.
This then allows:
lock_acquire()
raw_local_irq_save();
current->lockdep_recursion++;
trace_lock_acquire()
... tracing ...
#PF under raw_local_irq_*()
__lock_acquire()
arch_spin_lock(&graph_lock)
pv-spinlock-wait()
local_irq_save() under raw_local_irq_*()
However afaict that just made a bad situation worse. There already were
issues, take for example:
trace_clock_global()
raw_local_irq_save();
arch_spin_lock()
pv-spinlock-wait
local_irq_save()
And that has no lockdep_recursion to 'save' the say.
The tracing recursion does however avoid some of the obvious fails
there, like trace_clock calling into paravirt which then calls back into
tracing. But still, that would've caused IRQ tracking problems even with
the old code.
And in that respect, this is all the exact same problem as that other
set of patches has ( 20200807192336.405068898@infradead.org ).
Now, on the flip side, it does find actual problems, the trace_lock_*()
things were using RCU in RCU-disabled code, and here I found that
trace_clock_global() thinkg (and I suspect there's more of that).
But at this point I'm not entirelty sure how best to proceed... tracing
uses arch_spinlock_t, which means all spinlock implementations should be
notrace, but then that drops into paravirt and all hell breaks loose
because Hyper-V then calls into the APIC code etc.. etc..
At that rate we'll have the entire kernel marked notrace, and I'm fairly
sure that's not a solution either.
So let me once again see if I can't find a better solution for this all.
Clearly it needs one :/
next prev parent reply other threads:[~2020-08-11 9:47 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-05 7:19 upstream test error: WARNING in __local_bh_enable_ip syzbot
2020-08-05 13:26 ` [PATCH] x86/paravirt: Add missing noinstr to arch_local*() helpers Marco Elver
2020-08-05 13:42 ` peterz
2020-08-05 13:59 ` Marco Elver
2020-08-05 14:12 ` peterz
2020-08-05 14:17 ` Jürgen Groß
2020-08-05 14:17 ` peterz
2020-08-05 14:36 ` Marco Elver
2020-08-05 17:31 ` Marco Elver
2020-08-06 7:47 ` Marco Elver
2020-08-06 11:32 ` peterz
2020-08-06 13:17 ` Marco Elver
2020-08-06 16:06 ` Marco Elver
2020-08-07 9:01 ` Marco Elver
2020-08-07 9:24 ` Jürgen Groß
2020-08-07 9:50 ` Marco Elver
2020-08-07 10:35 ` Jürgen Groß
2020-08-07 11:38 ` Marco Elver
2020-08-07 12:04 ` Jürgen Groß
2020-08-07 12:08 ` Marco Elver
2020-08-07 15:19 ` Marco Elver
2020-08-11 7:00 ` Marco Elver
2020-08-11 7:04 ` Jürgen Groß
2020-08-11 7:41 ` Peter Zijlstra
2020-08-11 7:57 ` Jürgen Groß
2020-08-11 8:12 ` Peter Zijlstra
2020-08-11 8:18 ` Jürgen Groß
2020-08-11 8:38 ` Jürgen Groß
2020-08-11 9:20 ` peterz
2020-08-11 9:46 ` peterz [this message]
2020-08-11 20:17 ` peterz
2020-08-12 8:06 ` Marco Elver
2020-08-12 8:18 ` peterz
2020-08-12 8:57 ` peterz
2020-08-06 21:02 ` kernel test robot
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=20200811094651.GH35926@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=elver@google.com \
--cc=fenghua.yu@intel.com \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulmck@kernel.org \
--cc=rostedt@goodmis.org \
--cc=sdeep@vmware.com \
--cc=syzbot+8db9e1ecde74e590a657@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=wei.liu@kernel.org \
--cc=x86@kernel.org \
--cc=yu-cheng.yu@intel.com \
/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®