Linux 3.3.6
This commit is contained in:
parent
79b001249a
commit
eefa8b0319
@ -1,106 +0,0 @@
|
||||
From 5b40572ed5f0344b9dbee486a17c589ce1abe1a3 Mon Sep 17 00:00:00 2001
|
||||
From: Avi Kivity <avi@redhat.com>
|
||||
Date: Mon, 5 Mar 2012 14:23:29 +0200
|
||||
Subject: [PATCH] KVM: Ensure all vcpus are consistent with in-kernel irqchip
|
||||
settings
|
||||
|
||||
If some vcpus are created before KVM_CREATE_IRQCHIP, then
|
||||
irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading
|
||||
to potential NULL pointer dereferences.
|
||||
|
||||
Fix by:
|
||||
- ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called
|
||||
- ensuring that a vcpu has an apic if it is installed after KVM_CREATE_IRQCHIP
|
||||
|
||||
This is somewhat long winded because vcpu->arch.apic is created without
|
||||
kvm->lock held.
|
||||
|
||||
Based on earlier patch by Michael Ellerman.
|
||||
|
||||
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
|
||||
Signed-off-by: Avi Kivity <avi@redhat.com>
|
||||
---
|
||||
arch/ia64/kvm/kvm-ia64.c | 5 +++++
|
||||
arch/x86/kvm/x86.c | 8 ++++++++
|
||||
include/linux/kvm_host.h | 7 +++++++
|
||||
virt/kvm/kvm_main.c | 4 ++++
|
||||
4 files changed, 24 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
|
||||
index d8ddbba..f5104b7 100644
|
||||
--- a/arch/ia64/kvm/kvm-ia64.c
|
||||
+++ b/arch/ia64/kvm/kvm-ia64.c
|
||||
@@ -1172,6 +1172,11 @@ out:
|
||||
|
||||
#define PALE_RESET_ENTRY 0x80000000ffffffb0UL
|
||||
|
||||
+bool kvm_vcpu_compatible(struct kvm_vcpu *vcpu)
|
||||
+{
|
||||
+ return irqchip_in_kernel(vcpu->kcm) == (vcpu->arch.apic != NULL);
|
||||
+}
|
||||
+
|
||||
int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
struct kvm_vcpu *v;
|
||||
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
|
||||
index 3ee008f..be9594a 100644
|
||||
--- a/arch/x86/kvm/x86.c
|
||||
+++ b/arch/x86/kvm/x86.c
|
||||
@@ -3199,6 +3199,9 @@ long kvm_arch_vm_ioctl(struct file *filp,
|
||||
r = -EEXIST;
|
||||
if (kvm->arch.vpic)
|
||||
goto create_irqchip_unlock;
|
||||
+ r = -EINVAL;
|
||||
+ if (atomic_read(&kvm->online_vcpus))
|
||||
+ goto create_irqchip_unlock;
|
||||
r = -ENOMEM;
|
||||
vpic = kvm_create_pic(kvm);
|
||||
if (vpic) {
|
||||
@@ -6107,6 +6110,11 @@ void kvm_arch_check_processor_compat(void *rtn)
|
||||
kvm_x86_ops->check_processor_compatibility(rtn);
|
||||
}
|
||||
|
||||
+bool kvm_vcpu_compatible(struct kvm_vcpu *vcpu)
|
||||
+{
|
||||
+ return irqchip_in_kernel(vcpu->kvm) == (vcpu->arch.apic != NULL);
|
||||
+}
|
||||
+
|
||||
int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
struct page *page;
|
||||
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
|
||||
index 355e445..759fa26 100644
|
||||
--- a/include/linux/kvm_host.h
|
||||
+++ b/include/linux/kvm_host.h
|
||||
@@ -805,6 +805,13 @@ static inline bool kvm_vcpu_is_bsp(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
return vcpu->kvm->bsp_vcpu_id == vcpu->vcpu_id;
|
||||
}
|
||||
+
|
||||
+bool kvm_vcpu_compatible(struct kvm_vcpu *vcpu);
|
||||
+
|
||||
+#else
|
||||
+
|
||||
+static bool kvm_vcpu_compatible(struct kvm_vcpu *vcpu) { return true; }
|
||||
+
|
||||
#endif
|
||||
|
||||
#ifdef __KVM_HAVE_DEVICE_ASSIGNMENT
|
||||
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
|
||||
index e4431ad..94e148e 100644
|
||||
--- a/virt/kvm/kvm_main.c
|
||||
+++ b/virt/kvm/kvm_main.c
|
||||
@@ -1651,6 +1651,10 @@ static int kvm_vm_ioctl_create_vcpu(struct kvm *kvm, u32 id)
|
||||
goto vcpu_destroy;
|
||||
|
||||
mutex_lock(&kvm->lock);
|
||||
+ if (!kvm_vcpu_compatible(vcpu)) {
|
||||
+ r = -EINVAL;
|
||||
+ goto unlock_vcpu_destroy;
|
||||
+ }
|
||||
if (atomic_read(&kvm->online_vcpus) == KVM_MAX_VCPUS) {
|
||||
r = -EINVAL;
|
||||
goto unlock_vcpu_destroy;
|
||||
--
|
||||
1.7.7.6
|
||||
|
@ -353,6 +353,8 @@ CONFIG_BLK_DEV_FD=m
|
||||
# CONFIG_BLK_DEV_XD is not set
|
||||
# CONFIG_PARIDE is not set
|
||||
|
||||
# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set
|
||||
|
||||
CONFIG_BLK_CPQ_DA=m
|
||||
CONFIG_BLK_CPQ_CISS_DA=m
|
||||
CONFIG_CISS_SCSI_TAPE=y
|
||||
|
@ -391,7 +391,7 @@ CONFIG_RELOCATABLE=y
|
||||
|
||||
# CONFIG_HYPERV is not set
|
||||
|
||||
# Depends on HOTPLUG_PCI_PCIE
|
||||
# Depends on PCI
|
||||
CONFIG_BLK_DEV_PCIESSD_MTIP32XX=m
|
||||
|
||||
CONFIG_DRM_GMA500=m
|
||||
|
19
kernel.spec
19
kernel.spec
@ -54,7 +54,7 @@ Summary: The Linux kernel
|
||||
# For non-released -rc kernels, this will be appended after the rcX and
|
||||
# gitX tags, so a 3 here would become part of release "0.rcX.gitX.3"
|
||||
#
|
||||
%global baserelease 2
|
||||
%global baserelease 1
|
||||
%global fedora_build %{baserelease}
|
||||
|
||||
# base_sublevel is the kernel version we're starting with and patching
|
||||
@ -66,7 +66,7 @@ Summary: The Linux kernel
|
||||
%if 0%{?released_kernel}
|
||||
|
||||
# Do we have a -stable update to apply?
|
||||
%define stable_update 5
|
||||
%define stable_update 6
|
||||
# Is it a -stable RC?
|
||||
%define stable_rc 0
|
||||
# Set rpm version accordingly
|
||||
@ -763,9 +763,6 @@ Patch21232: rt2x00_fix_MCU_request_failures.patch
|
||||
#rhbz 789644
|
||||
Patch21237: mcelog-rcu-splat.patch
|
||||
|
||||
#rhbz 728478
|
||||
Patch21242: sony-laptop-Enable-keyboard-backlight-by-default.patch
|
||||
|
||||
Patch21300: unhandled-irqs-switch-to-polling.patch
|
||||
|
||||
#rhbz 804957 CVE-2012-1568
|
||||
@ -779,9 +776,6 @@ Patch21353: xen-x86-Implement-x86_apic_ops.patch
|
||||
#rhbz 807632
|
||||
Patch21385: libata-forbid-port-runtime-pm-by-default.patch
|
||||
|
||||
#rhbz 808207 CVE-2012-1601
|
||||
Patch21520: KVM-Ensure-all-vcpus-are-consistent-with-in-kernel-i.patch
|
||||
|
||||
#rhbz 808559
|
||||
Patch21530: ALSA-hda-realtek-Add-quirk-for-Mac-Pro-5-1-machines.patch
|
||||
|
||||
@ -1456,9 +1450,6 @@ ApplyPatch rt2x00_fix_MCU_request_failures.patch
|
||||
#rhbz 789644
|
||||
ApplyPatch mcelog-rcu-splat.patch
|
||||
|
||||
#rhbz 728478
|
||||
ApplyPatch sony-laptop-Enable-keyboard-backlight-by-default.patch
|
||||
|
||||
#rhbz 804957 CVE-2012-1568
|
||||
ApplyPatch shlib_base_randomize.patch
|
||||
|
||||
@ -1473,9 +1464,6 @@ ApplyPatch x86-add-io_apic_ops-to-allow-interception.patch
|
||||
ApplyPatch x86-apic_ops-Replace-apic_ops-with-x86_apic_ops.patch
|
||||
ApplyPatch xen-x86-Implement-x86_apic_ops.patch
|
||||
|
||||
#rhbz 808207 CVE-2012-1601
|
||||
ApplyPatch KVM-Ensure-all-vcpus-are-consistent-with-in-kernel-i.patch
|
||||
|
||||
#rhbz 807632
|
||||
ApplyPatch libata-forbid-port-runtime-pm-by-default.patch
|
||||
|
||||
@ -2229,6 +2217,9 @@ fi
|
||||
# and build.
|
||||
|
||||
%changelog
|
||||
* Mon May 14 2012 Justin M. Forbes <jforbes@redhat.com> 3.3.6-1
|
||||
- Linux 3.3.6
|
||||
|
||||
* Mon May 07 2012 Mauro Carvalho Chehab <mchehab@redhat.com> 3.3.5-2
|
||||
- Add patch to fix DVB-S zigzag (rhbz 814404)
|
||||
|
||||
|
@ -1,44 +0,0 @@
|
||||
From 0dbc2bc96b1ec741bdd43451c286ccd45da3310b Mon Sep 17 00:00:00 2001
|
||||
From: Josh Boyer <jwboyer@redhat.com>
|
||||
Date: Wed, 2 Nov 2011 14:31:59 -0400
|
||||
Subject: [PATCH] sony-laptop: Enable keyboard backlight by default
|
||||
|
||||
When the keyboard backlight support was originally added, the commit said
|
||||
to default it to on with a 10 second timeout. That actually wasn't the
|
||||
case, as the default value is commented out for the kbd_backlight parameter.
|
||||
Because it is a static variable, it gets set to 0 by default without some
|
||||
other form of initialization.
|
||||
|
||||
However, it seems the function to set the value wasn't actually called
|
||||
immediately, so whatever state the keyboard was in initially would remain.
|
||||
Then commit df410d522410e67660 was introduced during the 2.6.39 timeframe to
|
||||
immediately set whatever value was present (as well as attempt to
|
||||
restore/reset the state on module removal or resume). That seems to have
|
||||
now forced the light off immediately when the module is loaded unless
|
||||
the option kbd_backlight=1 is specified.
|
||||
|
||||
Let's enable it by default again (for the first time). This should solve
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=728478
|
||||
|
||||
Acked-by: Mattia Dongili <malattia@linux.it>
|
||||
Signed-off-by: Josh Boyer <jwboyer@redhat.com>
|
||||
---
|
||||
drivers/platform/x86/sony-laptop.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
|
||||
index c006dee..40c4705 100644
|
||||
--- a/drivers/platform/x86/sony-laptop.c
|
||||
+++ b/drivers/platform/x86/sony-laptop.c
|
||||
@@ -127,7 +127,7 @@ MODULE_PARM_DESC(minor,
|
||||
"default is -1 (automatic)");
|
||||
#endif
|
||||
|
||||
-static int kbd_backlight; /* = 1 */
|
||||
+static int kbd_backlight = 1;
|
||||
module_param(kbd_backlight, int, 0444);
|
||||
MODULE_PARM_DESC(kbd_backlight,
|
||||
"set this to 0 to disable keyboard backlight, "
|
||||
--
|
||||
1.7.7.6
|
||||
|
Loading…
Reference in New Issue
Block a user