Keir Fraser [Mon, 11 Feb 2008 11:05:27 +0000 (11:05 +0000)]
CVE-2008-0600: Fix exploitable hole in vmsplice() syscall.
Fix is Al Viro's suggested patch for RHEL5. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 11 Feb 2008 10:19:25 +0000 (10:19 +0000)]
fbfront: Clear ring contents on save/restore. Otherwise in some cases
a restored domain loses mouse and keyboard. Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
Keir Fraser [Mon, 11 Feb 2008 10:08:57 +0000 (10:08 +0000)]
block: backport Jens Axboe's commit from
Tue, 16 Oct 2007 09:03:56 +0000 (11:03 +0200) bf2de6f5a4faf0197268f18d08969b003b87b6e8
Initial support for data-less (or empty) barrier support
blkback: permit and implement empty barrier. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Keir Fraser [Mon, 11 Feb 2008 09:55:25 +0000 (09:55 +0000)]
net accel: Fix double-probe of accelerator on suspend_cancel
Fixes a bug in the network acceleration stuff where an accelerator
could get probed with the same interface twice on a suspend-cancel -
once manually in the suspend_cancel handler, and once when the watch
on the accel configuration option fired after being reinstated.
Keir Fraser [Mon, 11 Feb 2008 09:52:49 +0000 (09:52 +0000)]
xen balloon: allocate and free cold pages
To reduce the performance side effects of ballooning, use and return
cold pages. To limit the impact scrubbing of these (and other) pages
has on the cache, also implement a dedicated scrubbing function on x86
which uses non-temporal stores (when available).
Keir Fraser [Mon, 11 Feb 2008 09:49:58 +0000 (09:49 +0000)]
xen/x86: fix and improve xen_limit_pages_to_max_mfn()
- don't do multicall when nr_mcl is zero (and specifically don't
access cr_mcl[nr_mcl - 1] in that case)
- fix CONFIG_XEN_COMPAT <=3D 0x030002 handling
- don't exchange pages already meeting the restriction (likely
avoiding exchanging anything at all)
- avoid calling kmap functions without CONFIG_XEN_SCRUB_PAGES
- eliminate a few local variables
Keir Fraser [Tue, 5 Feb 2008 10:05:19 +0000 (10:05 +0000)]
netback: Fix BUG_ON() on page-flip receive path which would always
trigger and crash the kernbel.
Tracked down by Joakim Dahlstedt <jda@bea.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 4 Feb 2008 14:29:03 +0000 (14:29 +0000)]
ebtables: don't compute gap until we know we have an ebt_entry
Original upstream Linux patch by Chuck Ebbert. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 1 Feb 2008 11:11:12 +0000 (11:11 +0000)]
Do not allocate vcpu_guest_context on the stack when initialising a
new VCPU. It is too big for 4kB stacks.
Original patch by Donald Dutile <ddutile@redhat.com> backported from
upstream pv_ops work. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 21 Jan 2008 11:43:31 +0000 (11:43 +0000)]
blkback/blktap: Check for kthread_should_stop() in inner loop,
mdelaay() should be msleep(), and these changes belong in blktap as
well as blkback.
Based on comments and patches from Jan Beulich and Steven Smith. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 18 Jan 2008 16:52:25 +0000 (16:52 +0000)]
blkback: Request-processing loop is unbounded and hence requires a
yield point. Also, bad request type is a good cause to sleep for a
short while as the frontend has probably gone mad.
Patch by Steven Smith <steven.smith@eu.citrix.com>
Keir Fraser [Fri, 18 Jan 2008 16:35:24 +0000 (16:35 +0000)]
linux/x86: clean up hypercall headers
- don't define HYPERVISOR_hvm_op() for pv guests (requiring to not
include
include/xen/hvm.h in non-pv-driver builds)
- remove the custome __STR/STR macros
- remove stringification where not necessary
- reduce instruction size for pv-driver case on x86-64
Keir Fraser [Wed, 16 Jan 2008 13:27:22 +0000 (13:27 +0000)]
x86: Check for XENFEAT_mmu_pt_update_preserve_ad before attempting to
use new mmu_update() hypercall. Older Xen versions are noisy if the
unsupported hypercall is attempted. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 15 Jan 2008 14:35:41 +0000 (14:35 +0000)]
xen, x86: Allow mprotect() pte updates to be batched using new Xen
batched interface which preserves access/dirty pte flags. Signed-off-by: Bruce Rogers <brogers@novell.com>
Ian Campbell [Mon, 14 Jan 2008 15:52:23 +0000 (15:52 +0000)]
Avoid allocations causing swap activity on the resume path by allowing
such allocations to access the emergency pools otherwise a
save/restore/migration of a guest which is low on memory can
deadlock.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
We need TIF_RESTORE_SIGMASK in order to support ppoll() and pselect()
system calls. This patch originally came from Andi, and was based
heavily on David Howells' implementation of same on i386. I fixed a
typo which was causing do_signal() to use the wrong signal mask.
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andi Kleen <ak@suse.de>
Alex Williamson [Tue, 11 Dec 2007 16:00:53 +0000 (09:00 -0700)]
[IA64] Fix CONFIG_XEN=no for gate page
The important part of this is to refrain from building .tmp_gate.o unless
CONFIG_XEN. However it also seems correct to make xen_gate_section in
vmlinux.lds.S depend on CONFIG_XEN as well. Tested that both builds work now.
Ian Campbell [Mon, 10 Dec 2007 15:04:49 +0000 (15:04 +0000)]
Setup memory zones in the same way as native instead of putting all
low memory in ZONE_DMA. There is no real benefit from diverging from
native in this respect.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Keir Fraser [Thu, 6 Dec 2007 16:02:51 +0000 (16:02 +0000)]
linux/x86: Use cpu_relax() rather than barrier() in smp_call_function()
Short of getting an explanation for the odd difference to native, make
the code match native (and also, in the case of x86-64,
__smp_call_function_single()).
Keir Fraser [Thu, 6 Dec 2007 15:59:52 +0000 (15:59 +0000)]
linux/x86: fix initial GDT setup
cpu_gdt_init() can be static, can have its argument point to const,
and the number of descriptors should be calculated from one more than
the table's limit.
Keir Fraser [Tue, 4 Dec 2007 11:54:22 +0000 (11:54 +0000)]
[cpufreq] Correctly calculate load
The idle time of the system should be less than the wall time
of the system. The initial implementation incorrectly set
idle time to wall time when idle time was less than wall time,
instead of when idle time was more than wall time. Correct
this error.
Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
Keir Fraser [Tue, 4 Dec 2007 10:43:44 +0000 (10:43 +0000)]
[powernow] Fix Linux headers for architectural pstate driver
For some reason, the header changes necessary to support the
architectural pstate driver are not in linux-2.6.18-xen.hg.
Fix this oversight so the PowerNow! driver can compile.
Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
Bugzilla #1115 "Event channel port scanning unfair".
From: Scott Rixner <rixner@rice.edu>
From: Diego Ongaro <dieo.ongaro@rice.edu>
From: Alan L. Cox <alc@rice.edu> Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Keir Fraser [Fri, 23 Nov 2007 16:26:56 +0000 (16:26 +0000)]
Netfront accelerator bug fix
In testing Xen for the upcoming 3.2.0 release, we've found a bug in
the netfront accelerator support where if an accelerator was removed
before it had properly initialised it wasn't handled correctly.
Keir Fraser [Thu, 22 Nov 2007 14:28:31 +0000 (14:28 +0000)]
linux/x86: don't build cstate.o and wakeup.o
The code in arch/i386/kernel/acpi/cstate.c is (at best) irrelevant for
VMs. The code in arch/{i386,x86_64}/kernel/acpi/wakeup.S is even
dangerous; while not being actively used, its inadvertant use would go
unnoticed.