diff options
author | Peter Volkov <pva@gentoo.org> | 2010-04-16 09:48:23 +0000 |
---|---|---|
committer | Peter Volkov <pva@gentoo.org> | 2010-04-16 09:48:23 +0000 |
commit | f68ce45ddb2e4e06f0e4c6203b820ec9fefea8b2 (patch) | |
tree | 62dd5919c661e8ea65f83829e63744aca5aab124 /sys-kernel/openvz-sources/files | |
parent | Version bump, security bug #314531. (diff) | |
download | historical-f68ce45ddb2e4e06f0e4c6203b820ec9fefea8b2.tar.gz historical-f68ce45ddb2e4e06f0e4c6203b820ec9fefea8b2.tar.bz2 historical-f68ce45ddb2e4e06f0e4c6203b820ec9fefea8b2.zip |
Upstream patches added.
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64
Diffstat (limited to 'sys-kernel/openvz-sources/files')
6 files changed, 206 insertions, 0 deletions
diff --git a/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.4.1-CAP_VE.patch b/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.4.1-CAP_VE.patch new file mode 100644 index 000000000000..09f5f0b71a0e --- /dev/null +++ b/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.4.1-CAP_VE.patch @@ -0,0 +1,18 @@ +X-Git-Url: http://git.openvz.org/?p=linux-2.6.27-openvz;a=blobdiff_plain;f=security%2Fcommoncap.c;fp=security%2Fcommoncap.c;h=59b6841de151e5e704a58ee9d92cfd583b2ad2ce;hp=880d02f0368bb51badc500d94b5960452092ab3d;hb=193ba36c82f6097e910a47f12cce85833fae9d57;hpb=a8e6d74c12874f97232c8dba8b2b4521cbdb3230 + +diff --git a/security/commoncap.c b/security/commoncap.c +index 880d02f..59b6841 100644 +--- a/security/commoncap.c ++++ b/security/commoncap.c +@@ -700,8 +700,9 @@ void cap_task_reparent_to_init (struct task_struct *p) + + int cap_syslog (int type) + { +- if ((type != 3 && type != 10) && !capable(CAP_VE_SYS_ADMIN)) +- return -EPERM; ++ if ((type != 3 && type != 10) && ++ !capable(CAP_VE_SYS_ADMIN) && !capable(CAP_SYS_ADMIN)) ++ return -EPERM; + return 0; + } + diff --git a/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.4.1-hrtimer.patch b/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.4.1-hrtimer.patch new file mode 100644 index 000000000000..cd9c2eb75ef5 --- /dev/null +++ b/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.4.1-hrtimer.patch @@ -0,0 +1,55 @@ +From: Cyrill Gorcunov <gorcunov@openvz.org> +Date: Mon, 5 Apr 2010 11:44:48 +0000 (+0400) +Subject: hrtimer: fixup negative expire value in hrtimer_start and hrtimer_force_reprogram +X-Git-Url: http://git.openvz.org/?p=linux-2.6.27-openvz;a=commitdiff_plain;h=1713baddd8443c4abf299aec70bbde96a0885a8a;hp=762c78b5d7f1c293133651ac2096179f161ef0c0 + +hrtimer: fixup negative expire value in hrtimer_start and hrtimer_force_reprogram + +We still have a few user-space callers for hrtimer_start() +with HRTIMER_MODE_ABS timer mode in which we can't be sure +the sane expire value has been passed. So to prevent overflow +warning we fix su a case by using maximal possible timer +expiration. + +ps: mainline already uses hrtimer_set_expires_range_ns +which is safe against such values. + +http://bugzilla.openvz.org/show_bug.cgi?id=1370 + +Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> +Signed-off-by: Pavel Emelyanov <xemul@openvz.org> +--- + +diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c +index 59604cb..7821ea7 100644 +--- a/kernel/hrtimer.c ++++ b/kernel/hrtimer.c +@@ -518,6 +518,13 @@ static void hrtimer_force_reprogram(struct hrtimer_cpu_base *cpu_base) + continue; + timer = rb_entry(base->first, struct hrtimer, node); + expires = ktime_sub(timer->expires, base->offset); ++ /* ++ * clock_was_set() has changed base->offset so the ++ * result might be negative. Fix it up to prevent a ++ * false positive in clockevents_program_event() ++ */ ++ if (expires.tv64 < 0) ++ expires.tv64 = 0; + if (expires.tv64 < cpu_base->expires_next.tv64) + cpu_base->expires_next = expires; + } +@@ -983,7 +990,13 @@ hrtimer_start(struct hrtimer *timer, ktime_t tim, const enum hrtimer_mode mode) + #endif + } + +- timer->expires = tim; ++ /* ++ * We still have a few callers from a userspace ++ * so that we can't be sure they send a proper value, ++ * lets prevent overflow ++ */ ++ timer->expires = (tim.tv64 < 0) ? ++ ktime_set(KTIME_SEC_MAX, 0) : tim; + + timer_stats_hrtimer_set_start_info(timer); + diff --git a/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.4.1-nfs-flags.patch b/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.4.1-nfs-flags.patch new file mode 100644 index 000000000000..abfeff3b7401 --- /dev/null +++ b/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.4.1-nfs-flags.patch @@ -0,0 +1,26 @@ +From: Konstantin Khlebnikov <khlebnikov@openvz.org> +Date: Mon, 5 Apr 2010 11:41:30 +0000 (+0400) +Subject: check flags on parsed structure +X-Git-Url: http://git.openvz.org/?p=linux-2.6.27-openvz;a=commitdiff_plain;h=f83e9da10c15dcb6532a1d1bf3e46a4758c7ad97;hp=0eac9fd14f22c8f217de47db339ca82a574c075b + +check flags on parsed structure + +http://bugzilla.openvz.org/show_bug.cgi?id=1464 + +Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org> +Signed-off-by: Pavel Emelyanov <xemul@openvz.org> +--- + +diff --git a/fs/nfs/super.c b/fs/nfs/super.c +index 59915e1..fdd9c18 100644 +--- a/fs/nfs/super.c ++++ b/fs/nfs/super.c +@@ -1708,7 +1708,7 @@ static int nfs_validate_mount_data(void *options, + goto out_v3_not_compiled; + #endif /* !CONFIG_NFS_V3 */ + +- if (!(data->flags & NFS_MOUNT_VER3)) { ++ if (!(args->flags & NFS_MOUNT_VER3)) { + printk("NFSv2 is broken and not supported\n"); + return -EPROTONOSUPPORT; + } diff --git a/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.4.1-signal-curr_target.patch b/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.4.1-signal-curr_target.patch new file mode 100644 index 000000000000..e282b7108086 --- /dev/null +++ b/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.4.1-signal-curr_target.patch @@ -0,0 +1,38 @@ +From: Konstantin Khlebnikov <khlebnikov@openvz.org> +Date: Mon, 5 Apr 2010 11:38:29 +0000 (+0400) +Subject: CPT: check signal curr_target at restore +X-Git-Url: http://git.openvz.org/?p=linux-2.6.27-openvz;a=commitdiff_plain;h=0eac9fd14f22c8f217de47db339ca82a574c075b;hp=9248c37200a97a9ab41019692aaf7fb70f0ba34b + +CPT: check signal curr_target at restore + +set signal curr_target to current if right task was not found. +fix oops after broken restore. + +"curr_target" controls round robin signal target balance over process +threads, there no reasons to care about migration accuracy. + +http://bugzilla.openvz.org/show_bug.cgi?id=1467 + +Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org> +Signed-off-by: Pavel Emelyanov <xemul@openvz.org> +--- + +diff --git a/kernel/cpt/rst_process.c b/kernel/cpt/rst_process.c +index 873aec6..50b1d8a 100644 +--- a/kernel/cpt/rst_process.c ++++ b/kernel/cpt/rst_process.c +@@ -421,8 +421,13 @@ restore_one_signal_struct(struct cpt_task_image *ti, int *exiting, cpt_context_t + } + } + +- if (si->cpt_curr_target) ++ if (si->cpt_curr_target) { + current->signal->curr_target = find_task_by_vpid(si->cpt_curr_target); ++ if (current->signal->curr_target == NULL) { ++ wprintk_ctx("oops, curr_target=NULL, pid=%u\n", si->cpt_curr_target); ++ current->signal->curr_target = current; ++ } ++ } + current->signal->flags = 0; + *exiting = si->cpt_group_exit; + current->signal->group_exit_code = si->cpt_group_exit_code; diff --git a/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.4.1-splice.patch b/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.4.1-splice.patch new file mode 100644 index 000000000000..0f62b98da118 --- /dev/null +++ b/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.4.1-splice.patch @@ -0,0 +1,31 @@ +From: Pavel Emelyanov <xemul@openvzorg> +Date: Mon, 5 Apr 2010 11:35:58 +0000 (+0400) +Subject: cpt: Don't mind the tsk->splice_pipe cache at cpt time +X-Git-Url: http://git.openvz.org/?p=linux-2.6.27-openvz;a=commitdiff_plain;h=9248c37200a97a9ab41019692aaf7fb70f0ba34b;hp=193ba36c82f6097e910a47f12cce85833fae9d57 + +cpt: Don't mind the tsk->splice_pipe cache at cpt time + +This field is just a cache for sendfile systemcall. It can be dropped +safely during migration - the first sendfile after restore will create +it back. + +http://bugzilla.openvz.org/show_bug.cgi?id=881 + +Signed-off-by: Pavel Emelyanov <xemul@openvz.org> +--- + +diff --git a/kernel/cpt/cpt_process.c b/kernel/cpt/cpt_process.c +index 57bdcb2..dd44694 100644 +--- a/kernel/cpt/cpt_process.c ++++ b/kernel/cpt/cpt_process.c +@@ -712,10 +712,6 @@ static int dump_one_signal_struct(cpt_object_t *obj, struct cpt_context *ctx) + + int cpt_check_unsupported(struct task_struct *tsk, cpt_context_t *ctx) + { +- if (tsk->splice_pipe) { +- eprintk_ctx("splice is used by " CPT_FID "\n", CPT_TID(tsk)); +- return -EBUSY; +- } + #ifdef CONFIG_KEYS + if (tsk->request_key_auth || tsk->thread_keyring) { + eprintk_ctx("keys are used by " CPT_FID "\n", CPT_TID(tsk)); diff --git a/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.4.1-task-state-percpu-counters.patch b/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.4.1-task-state-percpu-counters.patch new file mode 100644 index 000000000000..14c41571d2b8 --- /dev/null +++ b/sys-kernel/openvz-sources/files/openvz-sources-2.6.27.4.1-task-state-percpu-counters.patch @@ -0,0 +1,38 @@ +From: Konstantin Khlebnikov <khlebnikov@openvz.org> +Date: Mon, 5 Apr 2010 11:43:18 +0000 (+0400) +Subject: ve: fix ve task state percpu counters +X-Git-Url: http://git.openvz.org/?p=linux-2.6.27-openvz;a=commitdiff_plain;h=762c78b5d7f1c293133651ac2096179f161ef0c0;hp=f83e9da10c15dcb6532a1d1bf3e46a4758c7ad97 + +ve: fix ve task state percpu counters + +Counters overlap detection for ve tasks in running/uninterraprible/iowait state +was broken due to type mismatch: +nr_{running/unin..e/iowait}_ve() uses _long_ for summing _int_ percpu counters. + +As result, it broke ve loadavg calculation after first int overlap. + +This patch expand all this percpu counters to unsigned long. + +http://bugzilla.openvz.org/show_bug.cgi?id=1396 + +Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org> +Signed-off-by: Pavel Emelyanov <xemul@openvz.org> +--- + +diff --git a/include/linux/ve.h b/include/linux/ve.h +index 7d12746..821a2be 100644 +--- a/include/linux/ve.h ++++ b/include/linux/ve.h +@@ -129,9 +129,9 @@ struct ve_cpu_stats { + cycles_t strt_idle_time; + cycles_t used_time; + seqcount_t stat_lock; +- int nr_running; +- int nr_unint; +- int nr_iowait; ++ unsigned long nr_running; ++ unsigned long nr_unint; ++ unsigned long nr_iowait; + cputime64_t user; + cputime64_t nice; + cputime64_t system; |