aboutsummaryrefslogtreecommitdiffstats
path: root/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/process.c
diff options
context:
space:
mode:
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2003-05-06 14:54:13 +0000
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2003-05-06 14:54:13 +0000
commitbeb01bce683c8ee2ca2b5105e5274f2fe56e6cb0 (patch)
tree5d86e454c69ef015d034807f061a68cf72406d64 /xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/process.c
parent8f6aca9a6b125d8f592ac793f93fcecfbb9f4802 (diff)
downloadxen-beb01bce683c8ee2ca2b5105e5274f2fe56e6cb0.tar.gz
xen-beb01bce683c8ee2ca2b5105e5274f2fe56e6cb0.tar.bz2
xen-beb01bce683c8ee2ca2b5105e5274f2fe56e6cb0.zip
bitkeeper revision 1.208 (3eb7cc95biENxNPLM1gD4B9rpj7H_w)
Makefile: new file Many files: Allow hypercalls from ring 3 (if permitted by ring 1). .del-Config.in~31701845a0b06ec3: Delete: xenolinux-2.4.21-pre4-sparse/drivers/char/Config.in
Diffstat (limited to 'xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/process.c')
-rw-r--r--xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/process.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/process.c b/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/process.c
index a7c0755d38..c1764fce50 100644
--- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/process.c
+++ b/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/process.c
@@ -269,6 +269,9 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
unlazy_fpu(current);
struct_cpy(&p->thread.i387, &current->thread.i387);
+ /* We're careful with hypercall privileges. Don't allow inheritance. */
+ p->thread.hypercall_pl = 1;
+
return 0;
}
@@ -366,8 +369,9 @@ void __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
{
queue_multicall2(__HYPERVISOR_stack_switch, __KERNEL_DS, next->esp0);
/* Next call will silently fail if we are a non-privileged guest OS. */
- queue_multicall1(__HYPERVISOR_iopl,
- ((((struct pt_regs *)next->esp0)-1)->eflags>>12)&3);
+ queue_multicall2(__HYPERVISOR_set_priv_levels,
+ ((((struct pt_regs *)next->esp0)-1)->eflags>>12)&3,
+ next->hypercall_pl);
}
/* EXECUTE ALL TASK SWITCH XEN SYSCALLS AT THIS POINT. */