Linux 3.4.78
Greg KH
maintainerI'm announcing the release of the 3.4.78 kernel.
All users of the 3.4 kernel series must upgrade.
The updated 3.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.4.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 - arch/x86/kernel/cpu/perf_event_amd_ibs.c | 53 ++++++++++++++++++++++++----- arch/x86/kvm/lapic.c | 24 +++++++------ arch/x86/kvm/lapic.h | 4 +- arch/x86/kvm/x86.c | 33 ------------------ drivers/hwmon/coretemp.c | 2 - drivers/md/raid10.c | 12 +++--- drivers/staging/comedi/drivers/cb_pcidio.c | 21 ++++------- fs/nilfs2/segment.c | 10 +++-- mm/memory-failure.c | 16 ++++++-- security/selinux/hooks.c | 20 +++++++++- security/selinux/include/objsec.h | 5 ++ 12 files changed, 118 insertions(+), 84 deletions(-)
Andreas Rohner (1):
nilfs2: fix segctor bug that causes file system corruption
Andy Honig (1):
KVM: x86: Convert vapic synchronization to _cached functions (CVE-2013-6368)
Greg Kroah-Hartman (1):
Linux 3.4.78
Ian Abbott (1):
staging: comedi: 8255_pci: fix for newer PCI-DIO48H
Jean Delvare (1):
hwmon: (coretemp) Fix truncated name of alarm attributes
Jianguo Wu (1):
mm/memory-failure.c: recheck PageHuge() after hugetlb page migrate successfully
NeilBrown (2):
md/raid10: fix bug when raid10 recovery fails to recover a block. md/raid10: fix two bugs in handling of known-bad-blocks.
Robert Richter (1):
perf/x86/amd/ibs: Fix waking up from S3 for AMD family 10h
Steven Rostedt (1):
SELinux: Fix possible NULL pointer dereference in selinux_inode_permission()
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 4 -SUBLEVEL = 77 +SUBLEVEL = 78 EXTRAVERSION = NAME = Saber-toothed Squirrel
arch/x86/kernel/cpu/perf_event_amd_ibs.c +45 -8
81 lines not on this page · raw message
arch/x86/kvm/lapic.c +14 -10
@@ -1278,14 +1278,12 @@ void __kvm_migrate_apic_timer(struct kvm_vcpu *vcpu)void kvm_lapic_sync_from_vapic (struct kvm_vcpu *vcpu) {u32 data; -void *vapic;if (!irqchip_in_kernel (vcpu->kvm) || !vcpu->arch.apic->vapic_addr)return ; - vapic =kmap_atomic (vcpu->arch.apic->vapic_page); - data = *(u32 *)(vapic +offset_in_page (vcpu->arch.apic->vapic_addr)); -kunmap_atomic (vapic); +kvm_read_guest_cached (vcpu->kvm, &vcpu->arch.apic->vapic_cache, &data, +sizeof (u32));apic_set_tpr (vcpu->arch.apic, data &0xff ); }
@@ -1295,7 +1293,6 @@ void kvm_lapic_sync_to_vapic(struct kvm_vcpu *vcpu)u32 data, tpr;int max_irr, max_isr;struct kvm_lapic *apic; -void *vapic;if (!irqchip_in_kernel (vcpu->kvm) || !vcpu->arch.apic->vapic_addr)return ;
@@ -1310,17 +1307,24 @@ void kvm_lapic_sync_to_vapic(struct kvm_vcpu *vcpu) max_isr =0 ; data = (tpr &0xff ) | ((max_isr &0xf0 ) <<8 ) | (max_irr <<24 ); - vapic =kmap_atomic (vcpu->arch.apic->vapic_page); - *(u32 *)(vapic +offset_in_page (vcpu->arch.apic->vapic_addr)) = data; -kunmap_atomic (vapic); +kvm_write_guest_cached (vcpu->kvm, &vcpu->arch.apic->vapic_cache, &data, +sizeof (u32)); } -void kvm_lapic_set_vapic_addr (struct kvm_vcpu *vcpu,gpa_t vapic_addr) +int kvm_lapic_set_vapic_addr (struct kvm_vcpu *vcpu,gpa_t vapic_addr) {if (!irqchip_in_kernel (vcpu->kvm)) -return ; +return -EINVAL ; + +if (vapic_addr) { +if (kvm_gfn_to_hva_cache_init (vcpu->kvm, + &vcpu->arch.apic->vapic_cache, + vapic_addr,sizeof (u32))) +return -EINVAL ; + } vcpu->arch.apic->vapic_addr = vapic_addr; +return 0 ; }int kvm_x2apic_msr_write (struct kvm_vcpu *vcpu,u32 msr,u64 data)
arch/x86/kvm/lapic.h +2 -2
@@ -15,7 +15,7 @@ struct kvm_lapic {bool irr_pending;void *regs;gpa_t vapic_addr; -struct page *vapic_page; +struct gfn_to_hva_cache vapic_cache; };int kvm_create_lapic (struct kvm_vcpu *vcpu);void kvm_free_lapic (struct kvm_vcpu *vcpu);
@@ -46,7 +46,7 @@ int kvm_lapic_find_highest_irr(struct kvm_vcpu *vcpu);u64 kvm_get_lapic_tscdeadline_msr (struct kvm_vcpu *vcpu);void kvm_set_lapic_tscdeadline_msr (struct kvm_vcpu *vcpu,u64 data); -void kvm_lapic_set_vapic_addr (struct kvm_vcpu *vcpu,gpa_t vapic_addr); +int kvm_lapic_set_vapic_addr (struct kvm_vcpu *vcpu,gpa_t vapic_addr);void kvm_lapic_sync_from_vapic (struct kvm_vcpu *vcpu);void kvm_lapic_sync_to_vapic (struct kvm_vcpu *vcpu);
arch/x86/kvm/x86.c +1 -32
@@ -2728,8 +2728,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp, r = -EFAULT ;if (copy_from_user (&va, argp,sizeof va)) goto out; - r =0 ; -kvm_lapic_set_vapic_addr (vcpu, va.vapic_addr); + r =kvm_lapic_set_vapic_addr (vcpu, va.vapic_addr);break ; }case KVM_X86_SETUP_MCE : {
@@ -5075,33 +5074,6 @@ static void post_kvm_run_save(struct kvm_vcpu *vcpu) !kvm_event_needs_reinjection (vcpu); } -static void vapic_enter (struct kvm_vcpu *vcpu) -{ -struct kvm_lapic *apic = vcpu->arch.apic; -struct page *page; - -if (!apic || !apic->vapic_addr) -return ; - - page =gfn_to_page (vcpu->kvm, apic->vapic_addr >>PAGE_SHIFT ); - - vcpu->arch.apic->vapic_page = page; -} - -static void vapic_exit (struct kvm_vcpu *vcpu) -{ -struct kvm_lapic *apic = vcpu->arch.apic; -int idx; - -if (!apic || !apic->vapic_addr) -return ; - - idx =srcu_read_lock (&vcpu->kvm->srcu); -kvm_release_page_dirty (apic->vapic_page); -mark_page_dirty (vcpu->kvm, apic->vapic_addr >>PAGE_SHIFT ); -srcu_read_unlock (&vcpu->kvm->srcu, idx); -} -static void update_cr8_intercept (struct kvm_vcpu *vcpu) {int max_irr, tpr;
@@ -5385,7 +5357,6 @@ static int __vcpu_run(struct kvm_vcpu *vcpu) } vcpu->srcu_idx =srcu_read_lock (&kvm->srcu); -vapic_enter (vcpu); r =1 ;while (r >0 ) {
@@ -5442,8 +5413,6 @@ static int __vcpu_run(struct kvm_vcpu *vcpu)srcu_read_unlock (&kvm->srcu, vcpu->srcu_idx); -vapic_exit (vcpu); -return r; }
drivers/hwmon/coretemp.c +1 -1
@@ -53,7 +53,7 @@ MODULE_PARM_DESC(tjmax, "TjMax value in degrees Celsius");#define BASE_SYSFS_ATTR_NO 2/* Sysfs Base attr no for coretemp */ #define NUM_REAL_CORES 32/* Number of Real cores per cpu */ -#define CORETEMP_NAME_LENGTH 17/* String Length of attrs */ +#define CORETEMP_NAME_LENGTH 19/* String Length of attrs */ #define MAX_CORE_ATTRS 4/* Maximum no of basic attrs */ #define TOTAL_ATTRS (MAX_CORE_ATTRS + 1)#define MAX_CORE_DATA (NUM_REAL_CORES + BASE_SYSFS_ATTR_NO)
drivers/md/raid10.c +6 -6
@@ -1117,7 +1117,7 @@ read_again:/* Could not read all from this device, so we will * need another r10_bio. */ - sectors_handled = (r10_bio->sectors + max_sectors + sectors_handled = (r10_bio->sector + max_sectors - bio->bi_sector); r10_bio->sectors = max_sectors;spin_lock_irq (&conf->device_lock);
@@ -1125,7 +1125,7 @@ read_again: bio->bi_phys_segments =2 ; else bio->bi_phys_segments++; -spin_unlock (&conf->device_lock); +spin_unlock_irq (&conf->device_lock);/* Cannot call generic_make_request directly * as that will be queued in __generic_make_request * and subsequent mempool_alloc might block
@@ -2943,10 +2943,6 @@ static sector_t sync_request(struct mddev *mddev, sector_t sector_nr,if (j == conf->copies) {/* Cannot recover, so abort the recovery or * record a bad block */ -put_buf (r10_bio); -if (rb2) -atomic_dec (&rb2->remaining); - r10_bio = rb2;if (any_working) {/* problem is that there are bad blocks * on other device(s)
@@ -2978,6 +2974,10 @@ static sector_t sync_request(struct mddev *mddev, sector_t sector_nr, mirror->recovery_disabled = mddev->recovery_disabled; } +put_buf (r10_bio); +if (rb2) +atomic_dec (&rb2->remaining); + r10_bio = rb2;break ; } }
drivers/staging/comedi/drivers/cb_pcidio.c +8 -13
@@ -56,10 +56,6 @@ struct pcidio_board {const char *name;/* name of the board */ int dev_id;int n_8255;/* number of 8255 chips on board */ - -/* indices of base address regions */ -int pcicontroler_badrindex; -int dioregs_badrindex; };static const struct pcidio_board pcidio_boards[] = {
@@ -67,22 +63,16 @@ static const struct pcidio_board pcidio_boards[] = { .name = "pci-dio24", .dev_id = 0x0028, .n_8255 = 1, - .pcicontroler_badrindex = 1, - .dioregs_badrindex = 2, }, { .name = "pci-dio24h", .dev_id = 0x0014, .n_8255 = 1, - .pcicontroler_badrindex = 1, - .dioregs_badrindex = 2, }, { .name = "pci-dio48h", .dev_id = 0x000b, .n_8255 = 2, - .pcicontroler_badrindex = 0, - .dioregs_badrindex = 1, }, };
@@ -239,10 +229,15 @@ found:if (comedi_pci_enable (pcidev, thisboard->name))return -EIO ; - devpriv->dio_reg_base - = +/* +* Use PCI BAR 2 region if non-zero length, else use PCI BAR 1 region. +* PCI BAR 1 is only used for older PCI-DIO48H boards. At some point +* the PCI-DIO48H was redesigned to use the same PCI interface chip +* (and same PCI BAR region) as the other boards. +*/ + devpriv->dio_reg_base =pci_resource_start (devpriv->pci_dev, - pcidio_boards[index].dioregs_badrindex); + (pci_resource_len (pcidev,2 ) ?2 :1 ));/* * Allocate the subdevice structures. alloc_subdevice() is a
fs/nilfs2/segment.c +6 -4
@@ -1436,17 +1436,19 @@ static int nilfs_segctor_collect(struct nilfs_sc_info *sci,nilfs_clear_logs (&sci->sc_segbufs); - err =nilfs_segctor_extend_segments (sci, nilfs, nadd); -if (unlikely (err)) -return err; -if (sci->sc_stage.flags &NILFS_CF_SUFREED ) { err =nilfs_sufile_cancel_freev (nilfs->ns_sufile, sci->sc_freesegs, sci->sc_nfreesegs,NULL );WARN_ON (err);/* do not happen */ + sci->sc_stage.flags &= ~NILFS_CF_SUFREED ; } + + err =nilfs_segctor_extend_segments (sci, nilfs, nadd); +if (unlikely (err)) +return err; + nadd =min_t (int, nadd <<1 ,SC_MAX_SEGDELTA ); sci->sc_stage = prev_stage; }
mm/memory-failure.c +12 -4
@@ -1447,10 +1447,18 @@ static int soft_offline_huge_page(struct page *page, int flags)return ret; } done: -if (!PageHWPoison (hpage)) -atomic_long_add (1 <<compound_trans_order (hpage), &mce_bad_pages); -set_page_hwpoison_huge_page (hpage); -dequeue_hwpoisoned_huge_page (hpage); +/* overcommit hugetlb page will be freed to buddy */ +if (PageHuge (hpage)) { +if (!PageHWPoison (hpage)) +atomic_long_add (1 <<compound_trans_order (hpage), + &mce_bad_pages); +set_page_hwpoison_huge_page (hpage); +dequeue_hwpoisoned_huge_page (hpage); + }else { +SetPageHWPoison (page); +atomic_long_inc (&mce_bad_pages); + } +/* keep elevated page count for bad page */ return ret; }
security/selinux/hooks.c +18 -2
@@ -218,6 +218,14 @@ static int inode_alloc_security(struct inode *inode)return 0 ; } +static void inode_free_rcu (struct rcu_head *head) +{ +struct inode_security_struct *isec; + + isec = container_of(head, struct inode_security_struct, rcu); +kmem_cache_free (sel_inode_cache, isec); +} +static void inode_free_security (struct inode *inode) {struct inode_security_struct *isec = inode->i_security;
@@ -228,8 +236,16 @@ static void inode_free_security(struct inode *inode)list_del_init (&isec->list);spin_unlock (&sbsec->isec_lock); - inode->i_security =NULL ; -kmem_cache_free (sel_inode_cache, isec); +/* +* The inode may still be referenced in a path walk and +* a call to selinux_inode_permission() can be made +* after inode_free_security() is called. Ideally, the VFS +* wouldn't do this, but fixing that is a much harder +* job. For now, simply free the i_security via RCU, and +* leave the current inode->i_security pointer intact. +* The inode will be freed after the RCU grace period too. +*/ +call_rcu (&isec->rcu, inode_free_rcu); }static int file_alloc_security (struct file *file)
security/selinux/include/objsec.h +4 -1
@@ -38,7 +38,10 @@ struct task_security_struct {struct inode_security_struct {struct inode *inode;/* back pointer to inode object */ -struct list_head list;/* list of inode_security_struct */ +union { +struct list_head list;/* list of inode_security_struct */ +struct rcu_head rcu;/* for freeing the inode_security_struct */ + };u32 task_sid;/* SID of creating task */ u32 sid;/* SID of this object */ u16 sclass;/* security class of this object */