rpms/kernel/devel xen-fb-probe-fix.patch, NONE, 1.1 xen-x86-fix-stackprotect.patch, NONE, 1.1 xen-x86-no-stackprotect.patch, NONE, 1.1 kernel.spec, 1.1735, 1.1736
Chuck Ebbert
cebbert at fedoraproject.org
Tue Aug 25 00:57:46 UTC 2009
- Previous message (by thread): rpms/kernel/devel drm-next.patch, 1.13, 1.14 drm-page-flip.patch, 1.3, 1.4 drm-vga-arb.patch, 1.5, 1.6 kernel.spec, 1.1734, 1.1735
- Next message (by thread): rpms/gucharmap/devel .cvsignore, 1.22, 1.23 gucharmap.spec, 1.40, 1.41 sources, 1.22, 1.23
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv13899
Modified Files:
kernel.spec
Added Files:
xen-fb-probe-fix.patch xen-x86-fix-stackprotect.patch
xen-x86-no-stackprotect.patch
Log Message:
Fix Xen boot (#508120)
xen-fb-probe-fix.patch:
xen-fbfront.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- NEW FILE xen-fb-probe-fix.patch ---
As soon as the framebuffer is registered, our methods may be called by the
kernel. This leads to a crash as xenfb_refresh() gets called before we have
the irq.
Connect to the backend before registering our framebuffer with the kernel.
Signed-off-by: Michal Schmidt <mschmidt at redhat.com>
--
Index: linux-git/drivers/video/xen-fbfront.c
===================================================================
--- linux-git.orig/drivers/video/xen-fbfront.c
+++ linux-git/drivers/video/xen-fbfront.c
@@ -454,6 +454,10 @@ static int __devinit xenfb_probe(struct
xenfb_init_shared_page(info, fb_info);
+ ret = xenfb_connect_backend(dev, info);
+ if (ret < 0)
+ goto error;
+
ret = register_framebuffer(fb_info);
if (ret) {
fb_deferred_io_cleanup(fb_info);
@@ -464,10 +468,6 @@ static int __devinit xenfb_probe(struct
}
info->fb_info = fb_info;
- ret = xenfb_connect_backend(dev, info);
- if (ret < 0)
- goto error;
-
xenfb_make_preferred_console();
return 0;
xen-x86-fix-stackprotect.patch:
Makefile | 4 ++++
enlighten.c | 22 ++++++++++------------
2 files changed, 14 insertions(+), 12 deletions(-)
--- NEW FILE xen-x86-fix-stackprotect.patch ---
From: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
Date: Mon, 17 Aug 2009 19:26:53 +0000 (-0700)
Subject: xen: rearrange things to fix stackprotector
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftip%2Flinux-2.6-tip.git;a=commitdiff_plain;h=ce2eef33d3
xen: rearrange things to fix stackprotector
Make sure the stack-protector segment registers are properly set up
before calling any functions which may have stack-protection compiled
into them.
[ Impact: prevent Xen early-boot crash when stack-protector is enabled ]
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
---
diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile
index 3b767d0..a5b9288 100644
--- a/arch/x86/xen/Makefile
+++ b/arch/x86/xen/Makefile
@@ -5,6 +5,10 @@ CFLAGS_REMOVE_time.o = -pg
CFLAGS_REMOVE_irq.o = -pg
endif
+# Make sure early boot has no stackprotector
+nostackp := $(call cc-option, -fno-stack-protector)
+CFLAGS_enlighten.o := $(nostackp)
+
obj-y := enlighten.o setup.o multicalls.o mmu.o irq.o \
time.o xen-asm.o xen-asm_$(BITS).o \
grant-table.o suspend.o
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index f09e8c3..edcf72a 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -925,10 +925,6 @@ asmlinkage void __init xen_start_kernel(void)
xen_domain_type = XEN_PV_DOMAIN;
- BUG_ON(memcmp(xen_start_info->magic, "xen-3", 5) != 0);
-
- xen_setup_features();
-
/* Install Xen paravirt ops */
pv_info = xen_info;
pv_init_ops = xen_init_ops;
@@ -937,8 +933,15 @@ asmlinkage void __init xen_start_kernel(void)
pv_apic_ops = xen_apic_ops;
pv_mmu_ops = xen_mmu_ops;
- xen_init_irq_ops();
+#ifdef CONFIG_X86_64
+ /*
+ * Setup percpu state. We only need to do this for 64-bit
+ * because 32-bit already has %fs set properly.
+ */
+ load_percpu_segment(0);
+#endif
+ xen_init_irq_ops();
xen_init_cpuid_mask();
#ifdef CONFIG_X86_LOCAL_APIC
@@ -948,6 +951,8 @@ asmlinkage void __init xen_start_kernel(void)
set_xen_basic_apic_ops();
#endif
+ xen_setup_features();
+
if (xen_feature(XENFEAT_mmu_pt_update_preserve_ad)) {
pv_mmu_ops.ptep_modify_prot_start = xen_ptep_modify_prot_start;
pv_mmu_ops.ptep_modify_prot_commit = xen_ptep_modify_prot_commit;
@@ -955,13 +960,6 @@ asmlinkage void __init xen_start_kernel(void)
machine_ops = xen_machine_ops;
-#ifdef CONFIG_X86_64
- /*
- * Setup percpu state. We only need to do this for 64-bit
- * because 32-bit already has %fs set properly.
- */
- load_percpu_segment(0);
-#endif
/*
* The only reliable way to retain the initial address of the
* percpu gdt_page is to remember it here, so we can go and
xen-x86-no-stackprotect.patch:
Makefile | 4 ++++
1 file changed, 4 insertions(+)
--- NEW FILE xen-x86-no-stackprotect.patch ---
From: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
Date: Mon, 17 Aug 2009 19:25:41 +0000 (-0700)
Subject: x86: make sure load_percpu_segment has no stackprotector
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftip%2Flinux-2.6-tip.git;a=commitdiff_plain;h=5416c26635
x86: make sure load_percpu_segment has no stackprotector
load_percpu_segment() is used to set up the per-cpu segment registers,
which are also used for -fstack-protector. Make sure that the
load_percpu_segment() function doesn't have stackprotector enabled.
[ Impact: allow percpu setup before calling stack-protected functions ]
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
---
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index 4e242f9..8b5b9b6 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -7,6 +7,10 @@ ifdef CONFIG_FUNCTION_TRACER
CFLAGS_REMOVE_common.o = -pg
endif
+# Make sure load_percpu_segment has no stackprotector
+nostackp := $(call cc-option, -fno-stack-protector)
+CFLAGS_common.o := $(nostackp)
+
obj-y := intel_cacheinfo.o addon_cpuid_features.o
obj-y += proc.o capflags.o powerflags.o common.o
obj-y += vmware.o hypervisor.o
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1735
retrieving revision 1.1736
diff -u -p -r1.1735 -r1.1736
--- kernel.spec 25 Aug 2009 00:53:29 -0000 1.1735
+++ kernel.spec 25 Aug 2009 00:57:46 -0000 1.1736
@@ -723,6 +723,11 @@ Patch11010: via-hwmon-temp-sensor.patch
Patch12010: linux-2.6-dell-laptop-rfkill-fix.patch
Patch12011: linux-2.6-block-silently-error-unsupported-empty-barriers-too.patch
+# fix xen boot
+Patch12020: xen-fb-probe-fix.patch
+Patch12021: xen-x86-fix-stackprotect.patch
+Patch12022: xen-x86-no-stackprotect.patch
+
%endif
BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -1333,6 +1338,13 @@ ApplyPatch linux-2.6-silence-acpi-blackl
#ApplyPatch linux-2.6-v4l-dvb-experimental.patch
#ApplyPatch linux-2.6-revert-dvb-net-kabi-change.patch
+# Patches headed upstream
+
+# fix xen boot
+ApplyPatch xen-fb-probe-fix.patch
+ApplyPatch xen-x86-fix-stackprotect.patch
+ApplyPatch xen-x86-no-stackprotect.patch
+
# END OF PATCH APPLICATIONS
%endif
@@ -1999,6 +2011,9 @@ fi
# and build.
%changelog
+* Tue Aug 25 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.31-0.173.rc7.git2
+- Fix Xen boot (#508120)
+
* Tue Aug 25 2009 Dave Airlie <airlied at redhat.com>
- pull in drm-next tree + rebase around it
- Previous message (by thread): rpms/kernel/devel drm-next.patch, 1.13, 1.14 drm-page-flip.patch, 1.3, 1.4 drm-vga-arb.patch, 1.5, 1.6 kernel.spec, 1.1734, 1.1735
- Next message (by thread): rpms/gucharmap/devel .cvsignore, 1.22, 1.23 gucharmap.spec, 1.40, 1.41 sources, 1.22, 1.23
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list