Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 379867 - sys-kernel/hardened-sources-2.6.39-r8: warnings from apic/apic.c:setup_local_APIC
Summary: sys-kernel/hardened-sources-2.6.39-r8: warnings from apic/apic.c:setup_local_...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL: https://patchwork.kernel.org/patch/10...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-19 14:19 UTC by Alex Efros
Modified: 2011-09-02 23:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
.config (config,55.46 KB, text/plain)
2011-08-19 14:19 UTC, Alex Efros
Details
i386-bigsmp-early-lapicid-override.patch (i386-bigsmp-early-lapicid-override.patch,684 bytes, patch)
2011-08-28 20:29 UTC, Stratos Psomadakis (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Efros 2011-08-19 14:19:22 UTC
Created attachment 283917 [details]
.config

While boot I see this per each of 24 CPU (Dual Xeon X5680):

Initializing CPU#20
------------[ cut here ]------------
WARNING: at arch/x86/kernel/apic/apic.c:1236 setup_local_APIC+0x11b/0x396()
Hardware name: PowerEdge R610
Pid: 0, comm: kworker/0:1 Tainted: G        W   2.6.39-hardened-r8 #1
Call Trace:
 [<c1035438>] warn_slowpath_common+0x68/0xa0
 [<c1593e52>] ? setup_local_APIC+0x11b/0x396
 [<c1593e52>] ? setup_local_APIC+0x11b/0x396
 [<c103548d>] warn_slowpath_null+0x1d/0x20
 [<c1593e52>] setup_local_APIC+0x11b/0x396
 [<c15906db>] ? cpu_init+0x25c/0x264
 [<c100894e>] ? tsc_refine_calibration_work+0x5e/0x1b0
 [<c1008952>] ? tsc_refine_calibration_work+0x62/0x1b0
 [<c15936f9>] start_secondary+0xc9/0x1ac
---[ end trace 847e4d83bdf41dab ]---
Leaving ESR disabled.

I've found similar report for Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632432

My kernel's .config attached.
Comment 1 Agostino Sarubbo gentoo-dev 2011-08-19 23:55:28 UTC
also with latest .39 revision?
Comment 2 Alex Efros 2011-08-20 00:16:57 UTC
(In reply to comment #1)
> also with latest .39 revision?

If you mean ~x86 hardened-sources-2.6.39-r12, then I've just tried it:

...
CPU: Physical Processor ID: 1
CPU: Processor Core ID: 0
mce: CPU supports 9 MCE banks
CPU0: Thermal monitoring enabled (TM1)
using mwait in idle threads.
Freeing SMP alternatives: 24k freed
ACPI: Core revision 20110316
Overriding APIC driver with bigsmp
Enabling APIC mode:  Physflat.  Using 2 I/O APICs
------------[ cut here ]------------
WARNING: at arch/x86/kernel/apic/apic.c:1236 setup_local_APIC+0x11b/0x396()
Hardware name: PowerEdge R610
Pid: 1, comm: swapper Not tainted 2.6.39-hardened-r12 #1
Call Trace:
 [<c1035438>] warn_slowpath_common+0x68/0xa0
 [<c1595d12>] ? setup_local_APIC+0x11b/0x396
 [<c1595d12>] ? setup_local_APIC+0x11b/0x396
 [<c103548d>] warn_slowpath_null+0x1d/0x20
 [<c1595d12>] setup_local_APIC+0x11b/0x396
 [<c101d43b>] ? bigsmp_setup_apic_routing+0x1b/0x20
 [<c156de2a>] native_smp_prepare_cpus+0x241/0x2f9
 [<c15652ca>] ? parse_early_options+0x25/0x25
 [<c1565309>] kernel_init+0x3f/0x12f
 [<c13a21b6>] kernel_thread_helper+0x6/0xd
---[ end trace 847e4d83bdf41d97 ]---
Leaving ESR disabled.
..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
CPU0: Intel(R) Xeon(R) CPU           X5680  @ 3.33GHz stepping 02
Performance Events: PEBS fmt1+, Westmere events, Intel PMU driver.
... version:                3
... bit width:              48
... generic registers:      4
... value mask:             0000ffffffffffff
... max period:             000000007fffffff
... fixed-purpose events:   3
... event mask:             000000070000000f
CPU 1 irqstacks, hard=ea492000 soft=ea494000
Booting Node   0, Processors  #1
smpboot cpu 1: start_ip = 9d000
Initializing CPU#1
------------[ cut here ]------------
WARNING: at arch/x86/kernel/apic/apic.c:1236 setup_local_APIC+0x11b/0x396()
Hardware name: PowerEdge R610
Pid: 0, comm: kworker/0:0 Tainted: G        W   2.6.39-hardened-r12 #1
Call Trace:
 [<c1035438>] warn_slowpath_common+0x68/0xa0
 [<c1595d12>] ? setup_local_APIC+0x11b/0x396
 [<c1595d12>] ? setup_local_APIC+0x11b/0x396
 [<c103548d>] warn_slowpath_null+0x1d/0x20
 [<c1595d12>] setup_local_APIC+0x11b/0x396
 [<c159259b>] ? cpu_init+0x25c/0x264
 [<c100894e>] ? tsc_refine_calibration_work+0x5e/0x1b0
 [<c1008950>] ? tsc_refine_calibration_work+0x60/0x1b0
 [<c15955b9>] start_secondary+0xc9/0x1ac
---[ end trace 847e4d83bdf41d98 ]---
Leaving ESR disabled.
TSC synchronization [CPU#0 -> CPU#1]:
Measured 106 cycles TSC warp between CPUs, turning off TSC clock.
Marking TSC unstable due to check_tsc_sync_source failed
...
Comment 3 Stratos Psomadakis (RETIRED) gentoo-dev 2011-08-20 16:13:59 UTC
Although I don't think it'll make any difference, can you try with gentoo-sources-3.0.3?

Which was the last working kernel (ie no warnings from setup_local_APIC)?
Comment 4 Anthony Basile gentoo-dev 2011-08-20 16:53:49 UTC
(In reply to comment #3)
> Although I don't think it'll make any difference, can you try with
> gentoo-sources-3.0.3?
> 
> Which was the last working kernel (ie no warnings from setup_local_APIC)?

This may be true, but its certainly not a hardened issue per se.  The debian kernel does not have the grsec patches and shows the exact same panic.

(I didn't change the summary because its assigned to the correct herd, but to be clear, this is coming from vanilla upstream.)
Comment 5 Alex Efros 2011-08-20 23:09:38 UTC
(In reply to comment #3)
> Which was the last working kernel (ie no warnings from setup_local_APIC)?

It's previous: 2.6.38-hardened-r6.
Comment 6 Alex Efros 2011-08-20 23:22:19 UTC
(In reply to comment #3)
> Although I don't think it'll make any difference, can you try with
> gentoo-sources-3.0.3?

gentoo-sources-3.0.3 have same issue:

...
CPU: Physical Processor ID: 1
CPU: Processor Core ID: 0
mce: CPU supports 9 MCE banks
CPU0: Thermal monitoring enabled (TM1)
using mwait in idle threads.
Freeing SMP alternatives: 16k freed
ACPI: Core revision 20110413
Overriding APIC driver with bigsmp
Enabling APIC mode:  Physflat.  Using 2 I/O APICs
------------[ cut here ]------------
WARNING: at arch/x86/kernel/apic/apic.c:1237 setup_local_APIC+0x11b/0x3d1()
Hardware name: PowerEdge R610
Pid: 1, comm: swapper Not tainted 3.0.3-gentoo #1
Call Trace:
 [<c10332d8>] warn_slowpath_common+0x68/0xa0
 [<c150d799>] ? setup_local_APIC+0x11b/0x3d1
 [<c150d799>] ? setup_local_APIC+0x11b/0x3d1
 [<c103332d>] warn_slowpath_null+0x1d/0x20
 [<c150d799>] setup_local_APIC+0x11b/0x3d1
 [<c101c12b>] ? bigsmp_setup_apic_routing+0x1b/0x20
 [<c14e4e19>] native_smp_prepare_cpus+0x242/0x2fa
 [<c102cbce>] ? set_cpus_allowed_ptr+0x6e/0xe0
 [<c14dc2c7>] ? parse_early_options+0x25/0x25
 [<c14dc306>] kernel_init+0x3f/0x116
 [<c137d036>] kernel_thread_helper+0x6/0xd
---[ end trace 4eaa2a86a8e2da22 ]---
Leaving ESR disabled.
..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
CPU0: Intel(R) Xeon(R) CPU           X5680  @ 3.33GHz stepping 02
Performance Events: PEBS fmt1+, Westmere events, Intel PMU driver.
... version:                3
... bit width:              48
... generic registers:      4
... value mask:             0000ffffffffffff
... max period:             000000007fffffff
... fixed-purpose events:   3
... event mask:             000000070000000f
CPU 1 irqstacks, hard=ea492000 soft=ea494000
Booting Node   0, Processors  #1
smpboot cpu 1: start_ip = 9d000
Initializing CPU#1
------------[ cut here ]------------
WARNING: at arch/x86/kernel/apic/apic.c:1237 setup_local_APIC+0x11b/0x3d1()
Hardware name: PowerEdge R610
Pid: 0, comm: kworker/0:0 Tainted: G        W   3.0.3-gentoo #1
Call Trace:
 [<c10332d8>] warn_slowpath_common+0x68/0xa0
 [<c150d799>] ? setup_local_APIC+0x11b/0x3d1
 [<c150d799>] ? setup_local_APIC+0x11b/0x3d1
 [<c103332d>] warn_slowpath_null+0x1d/0x20
 [<c150d799>] setup_local_APIC+0x11b/0x3d1
 [<c150d06c>] start_secondary+0xc9/0x1ac
---[ end trace 4eaa2a86a8e2da23 ]---
Leaving ESR disabled.
TSC synchronization [CPU#0 -> CPU#1]:
Measured 1566 cycles TSC warp between CPUs, turning off TSC clock.
Marking TSC unstable due to check_tsc_sync_source failed
...
Comment 7 Stratos Psomadakis (RETIRED) gentoo-dev 2011-08-28 20:29:13 UTC
Created attachment 284935 [details, diff]
i386-bigsmp-early-lapicid-override.patch

This should be fixed in 3.1 and 3.0-stable, although it's not yet included in those trees.

I attach the proposed patch.
Comment 8 Stratos Psomadakis (RETIRED) gentoo-dev 2011-08-28 20:30:23 UTC
I forgot to add the URL with the upstream patch / thread.
Comment 9 Anthony Basile gentoo-dev 2011-08-29 09:59:00 UTC
(In reply to comment #8)
> I forgot to add the URL with the upstream patch / thread.

Is this patch in the genpatches set?
Comment 10 Stratos Psomadakis (RETIRED) gentoo-dev 2011-08-29 10:08:09 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > I forgot to add the URL with the upstream patch / thread.
> 
> Is this patch in the genpatches set?

Not yet, I'll add it to genpatches when 3.0.4-stable gets released (today or tomorrow).

The patch has not been merged in Linus kernel yet (as of 3.1-rc4), and thus is not yet included in the -stable queue.
Comment 11 Stratos Psomadakis (RETIRED) gentoo-dev 2011-08-29 23:39:10 UTC
genaptches-3.0-5, which include the patch, released.
Comment 12 Mike Pagano gentoo-dev 2011-09-02 23:02:30 UTC
Included in gentoo-sources-3.0.4. Closing