Bug 13503
Summary: | Compile failure with gcc 3.4.6 - start_kernel in paravirt.h | ||
---|---|---|---|
Product: | Virtualization | Reporter: | Brad Plant (bplant) |
Component: | Xen | Assignee: | virtualization_xen |
Status: | CLOSED OBSOLETE | ||
Severity: | normal | CC: | alan, jeremy |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.30 | Subsystem: | |
Regression: | Yes | Bisected commit-id: |
Description
Brad Plant
2009-06-10 22:04:27 UTC
Have you tried compiling earlier kernels with gcc 4.4.3? Ie, is this a new problem in the kernel, or with the compiler? I just compiled 2.6.29.4 successfully with gcc 4.4.3. I have successfully compiled 2.6.27.x, 2.6.28.x and 2.6.29.x pvops kernels before with gcc 3.4.6, but 2.6.30 fails. I believe that indicates a problem in the kernel, not the compiler. Oh, I misparsed the original report. The bug is that 3.4.6 no longer works, but 4.4.3 does work. The code in question does do some fairly involved inline asms, which commonly upset some versions of gcc, particularly if they have various non-standard patches applied (which is what I'm assuming the "hardening patches" are). Are you using 3.4.6 specifically because of the hardening patches, or is there some other reason you're using it? Does Ubuntu provide some other compiler package? Yes, I am using 3.4.6 because of the hardening patches. This system is a Gentoo system. I have compiled several kernels with this same compiler 2.6.{18,20,21,27,28,29} with no issues so this is definitely a kernel problem. I am able to switch between gcc profiles to disable hardened features. I tried switching to the vanilla profile, but the compile error still persists. Does this help at all? diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h index c7136e8..5041919 100644 --- a/arch/x86/include/asm/paravirt.h +++ b/arch/x86/include/asm/paravirt.h @@ -387,7 +387,7 @@ extern struct pv_mmu_ops pv_mmu_ops; extern struct pv_lock_ops pv_lock_ops; #define PARAVIRT_PATCH(x) \ - (offsetof(struct paravirt_patch_template, x) / sizeof(void *)) + ((int)(offsetof(struct paravirt_patch_template, x) / sizeof(void *))) #define paravirt_type(op) \ [paravirt_typenum] "i" (PARAVIRT_PATCH(op)), \ No, the compile error remains unchanged. |