From: Thomas Gleixner <tglx@linutronix.de>
To: Guenter Roeck <linux@roeck-us.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org
Cc: patches@lists.linux.dev, linux-kernel@vger.kernel.org,
torvalds@linux-foundation.org, akpm@linux-foundation.org,
shuah@kernel.org, patches@kernelci.org,
lkft-triage@lists.linaro.org, pavel@denx.de,
jonathanh@nvidia.com, f.fainelli@gmail.com,
sudipm.mukherjee@gmail.com, srw@sladewatkins.net, rwarsow@gmx.de,
conor@kernel.org, allen.lkml@gmail.com, broonie@kernel.org,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Helge Deller <deller@gmx.de>,
Parisc List <linux-parisc@vger.kernel.org>
Subject: Re: [PATCH 6.10 000/809] 6.10.3-rc3 review
Date: Mon, 05 Aug 2024 23:49:02 +0200 [thread overview]
Message-ID: <87y15a4p4h.ffs@tglx> (raw)
In-Reply-To: <8326f852-87fa-435a-9ca7-712bce534472@roeck-us.net>
On Mon, Aug 05 2024 at 08:02, Guenter Roeck wrote:
> On 8/5/24 05:51, Thomas Gleixner wrote:
>> IRQF_COND_ONESHOT has only an effect when
>>
>> 1) Interrupt is shared
>> 2) First interrupt request has IRQF_ONESHOT set
>>
>> Neither #1 nor #2 are true, but maybe your current config enables some moar
>> devices than the one on your website.
>>
>
> No, it is pretty much the same, except for a more recent C compiler, and it
> requires qemu v9.0. See http://server.roeck-us.net/qemu/parisc64-6.10.3/.
>
> Debugging shows pretty much the same for me, and any log message added
> to request_irq() makes the problem go away (or be different), and if the problem
> is seen it doesn't even get to the third interrupt request. I copied a more complete
> log to bad.log.gz in above page.
At the point where the problem happens is way before the first interrupt
is requested, so that definitely excludes any side effect of
COND_ONESHOT.
It happens right after
[ 0.000000] Memory: 991812K/1048576K available (16752K kernel code, 5220K rwdata, 3044K rodata, 760K init, 1424K bss, 56764K reserved, 0K cma-reserved)
SNIP
[ 0.000000] ** This system shows unhashed kernel memory addresses **
SNIP
I.e. the big fat warning about unhashed kernel addresses)
In the good case the first interrupt is requested here:
[ 0.000000] Memory: 992804K/1048576K available (16532K kernel code, 5096K rwdata, 2984K rodata, 744K init, 1412K bss, 55772K reserved, 0K cma-reserved)
SNIP
[ 0.000000] ** This system shows unhashed kernel memory addresses **
SNIP
[ 0.000000] SLUB: HWalign=16, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] ODEBUG: selftest passed
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU callback double-/use-after-free debug is enabled.
[ 0.000000] rcu: RCU debug extended QS entry/exit.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] NR_IRQS: 128 <- This is where the interrupt
subsystem is initialized
[ 0.000000] genirq: 64: 00215600 <- This is probably the timer interrupt
Looking at the backtrace the fail happens from within start_kernel(),
i.e. mm_core_init():
slab_err+0x13c/0x190
check_slab+0xf4/0x140
alloc_debug_processing+0x58/0x248
___slab_alloc+0x22c/0xa38
__slab_alloc.isra.0+0x60/0x88
kmem_cache_alloc_node_noprof+0x148/0x3c0
__kmem_cache_create+0x5d4/0x680
create_boot_cache+0xc4/0x128
new_kmalloc_cache+0x1ac/0x1d8
create_kmalloc_caches+0xac/0x108
kmem_cache_init+0x1cc/0x340
mm_core_init+0x458/0x560
start_kernel+0x9ac/0x11e0
start_parisc+0x188/0x1b0
The interrupt subsystem is initialized way later and request_irq() only
works after that point.
I'm 100% sure by now that this commit has absolutely nothing to do with
the underlying problem. All it does is changing the code size and
placement of text, data and ....
So I finally managed to reproduce with gcc-13.3.0 from the k.org cross
tools (the debian 12.2.2 does not).
If I add:
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1513,6 +1513,8 @@ static int
unsigned long flags, thread_mask = 0;
int ret, nested, shared = 0;
+ pr_info("%u: %08x\n", irq, new->flags);
+
if (!desc)
return -EINVAL;
it still reproduces. If I change that to:
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1513,6 +1513,8 @@ static int
unsigned long flags, thread_mask = 0;
int ret, nested, shared = 0;
+ new->flags &= ~IRQF_COND_ONESHOT;
+
if (!desc)
return -EINVAL;
that does neither cure it (unsurprisingly).
Reverting the "offending" commit cures it.
So I tried your
+ pr_info_once("####### First timer interrupt\n");
which cures it too.
So now where is the difference between the printk() in __setup_irq(),
the new->flag mangling, the revert and the printk() in timer interrupt?
There is ZERO functional change. There is no race either because at that
point everything is single threaded and interrupts are disabled.
The only thing which changes is the code and data layout as I can
observe when looking at System.map of the builds. I stared at the diffs
for a bit, but nothing stood out.
Maybe the PARISC people can shed some light on it.
This reminds me of the x86 32-bit disaster we debugged a few days ago...
Thanks,
tglx
next prev parent reply other threads:[~2024-08-05 21:49 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-31 10:03 [PATCH 6.10 000/809] 6.10.3-rc3 review Greg Kroah-Hartman
2024-07-31 11:03 ` Pavel Machek
2024-07-31 12:18 ` Mark Brown
2024-07-31 13:33 ` Luna Jernberg
2024-07-31 14:59 ` Jon Hunter
2024-07-31 15:12 ` Christian Heusel
2024-07-31 16:49 ` Markus Reichelt
2024-07-31 19:04 ` Peter Schneider
2024-07-31 19:29 ` Naresh Kamboju
2024-07-31 19:47 ` Justin Forbes
2024-07-31 20:25 ` Shuah Khan
2024-07-31 20:37 ` Allen
2024-07-31 21:03 ` Florian Fainelli
2024-08-01 5:15 ` Jiri Slaby
2024-08-01 7:49 ` Ron Economos
2024-08-02 6:59 ` Miguel Ojeda
2024-08-04 18:36 ` Guenter Roeck
2024-08-05 3:28 ` Guenter Roeck
2024-08-05 8:56 ` Thomas Gleixner
2024-08-05 12:51 ` Thomas Gleixner
2024-08-05 15:02 ` Guenter Roeck
2024-08-05 21:49 ` Thomas Gleixner [this message]
2024-08-06 1:16 ` Guenter Roeck
2024-08-05 17:42 ` Guenter Roeck
2024-08-06 2:40 ` Linus Torvalds
2024-08-06 11:02 ` Vlastimil Babka
2024-08-06 17:20 ` Guenter Roeck
2024-08-06 17:34 ` Linus Torvalds
2024-08-06 17:49 ` Linus Torvalds
2024-08-06 18:10 ` Linus Torvalds
2024-08-06 18:13 ` Guenter Roeck
2024-08-06 18:23 ` Linus Torvalds
2024-08-06 19:21 ` Vlastimil Babka
2024-08-06 19:40 ` Vlastimil Babka
2024-08-07 18:51 ` Alexander Gordeev
2024-08-06 17:33 ` Thomas Gleixner
2024-08-06 19:25 ` Vlastimil Babka
2024-08-06 23:24 ` Thomas Gleixner
2024-08-07 0:49 ` James Bottomley
2024-08-07 1:38 ` Guenter Roeck
2024-08-07 12:45 ` Thomas Gleixner
2024-08-08 1:07 ` Guenter Roeck
2024-08-08 7:48 ` Vlastimil Babka
2024-08-08 14:46 ` Guenter Roeck
2024-08-08 9:57 ` Thomas Gleixner
2024-08-08 14:59 ` Guenter Roeck
2024-08-08 15:58 ` John David Anglin
2024-08-08 15:53 ` Linus Torvalds
2024-08-08 16:12 ` Thomas Gleixner
2024-08-08 16:33 ` Linus Torvalds
2024-08-08 17:48 ` Thomas Gleixner
2024-08-08 18:19 ` Linus Torvalds
2024-08-08 20:52 ` Guenter Roeck
2024-08-08 21:50 ` John David Anglin
2024-08-08 22:29 ` John David Anglin
2024-08-08 23:33 ` Linus Torvalds
2024-08-09 0:33 ` John David Anglin
2024-08-09 0:56 ` Guenter Roeck
2024-08-09 0:50 ` Guenter Roeck
2024-08-08 22:15 ` Richard Henderson
2024-09-03 7:54 ` Helge Deller
2024-09-03 14:13 ` Guenter Roeck
2024-09-03 18:43 ` Linus Torvalds
2024-08-06 18:09 ` Guenter Roeck
2024-08-06 19:31 ` Vlastimil Babka
-- strict thread matches above, loose matches on Subject: below --
2024-07-31 14:09 Ronald Warsow
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=87y15a4p4h.ffs@tglx \
--to=tglx@linutronix.de \
--cc=akpm@linux-foundation.org \
--cc=allen.lkml@gmail.com \
--cc=broonie@kernel.org \
--cc=conor@kernel.org \
--cc=deller@gmx.de \
--cc=f.fainelli@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=lkft-triage@lists.linaro.org \
--cc=patches@kernelci.org \
--cc=patches@lists.linux.dev \
--cc=pavel@denx.de \
--cc=rafael.j.wysocki@intel.com \
--cc=rwarsow@gmx.de \
--cc=shuah@kernel.org \
--cc=srw@sladewatkins.net \
--cc=stable@vger.kernel.org \
--cc=sudipm.mukherjee@gmail.com \
--cc=torvalds@linux-foundation.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