]>
Commit | Line | Data |
---|---|---|
0232a98e AM |
1 | --- linux-3.3/fs/proc/base.c~ 2012-03-19 21:44:42.000000000 +0100 |
2 | +++ linux-3.3/fs/proc/base.c 2012-03-21 12:25:28.051092423 +0100 | |
3 | @@ -568,6 +568,8 @@ | |
4 | struct task_struct *task, | |
5 | int hide_pid_min) | |
6 | { | |
7 | + if (vx_check(0, VS_WATCH_P)) | |
8 | + return true; | |
9 | if (pid->hide_pid < hide_pid_min) | |
10 | return true; | |
11 | if (in_group_p(pid->pid_gid)) | |
369dbd59 | 12 | |
5ba7a31c | 13 | |
6690eb62 | 14 | |
6296f305 AM |
15 | diff -NurpP --minimal linux-4.9.217-vs2.3.9.12/fs/proc/array.c linux-4.9.217-vs2.3.9.13/fs/proc/array.c |
16 | --- linux-4.9.217-vs2.3.9.12/fs/proc/array.c 2019-10-05 14:58:45.660307716 +0000 | |
17 | +++ linux-4.9.217-vs2.3.9.13/fs/proc/array.c 2020-04-19 00:54:52.163080084 +0000 | |
18 | @@ -567,17 +567,6 @@ static int do_task_stat(struct seq_file | |
19 | /* convert nsec -> ticks */ | |
20 | start_time = nsec_to_clock_t(task->real_start_time); | |
21 | ||
22 | - /* fixup start time for virt uptime */ | |
23 | - if (vx_flags(VXF_VIRT_UPTIME, 0)) { | |
24 | - unsigned long long bias = | |
25 | - current->vx_info->cvirt.bias_clock; | |
26 | - | |
27 | - if (start_time > bias) | |
28 | - start_time -= bias; | |
29 | - else | |
30 | - start_time = 0; | |
31 | - } | |
32 | - | |
33 | seq_printf(m, "%d (%s) %c", pid_nr_ns(pid, ns), tcomm, state); | |
34 | seq_put_decimal_ll(m, " ", ppid); | |
35 | seq_put_decimal_ll(m, " ", pgid); | |
36 | diff -NurpP --minimal linux-4.9.217-vs2.3.9.12/fs/proc/uptime.c linux-4.9.217-vs2.3.9.13/fs/proc/uptime.c | |
37 | --- linux-4.9.217-vs2.3.9.12/fs/proc/uptime.c 2019-10-13 16:02:19.324763467 +0000 | |
38 | +++ linux-4.9.217-vs2.3.9.13/fs/proc/uptime.c 2020-04-18 23:42:47.412036999 +0000 | |
39 | @@ -23,6 +23,9 @@ static int uptime_proc_show(struct seq_f | |
40 | idle.tv_sec = div_u64_rem(nsec, NSEC_PER_SEC, &rem); | |
41 | idle.tv_nsec = rem; | |
42 | ||
43 | + if (vx_flags(VXF_VIRT_UPTIME, 0)) | |
44 | + vx_vsi_uptime(&uptime, &idle); | |
45 | + | |
46 | seq_printf(m, "%lu.%02lu %lu.%02lu\n", | |
47 | (unsigned long) uptime.tv_sec, | |
48 | (uptime.tv_nsec / (NSEC_PER_SEC / 100)), | |
49 | diff -NurpP --minimal linux-4.9.217-vs2.3.9.12/include/linux/vserver/cvirt.h linux-4.9.217-vs2.3.9.13/include/linux/vserver/cvirt.h | |
50 | --- linux-4.9.217-vs2.3.9.12/include/linux/vserver/cvirt.h 2019-10-13 16:04:08.203030205 +0000 | |
51 | +++ linux-4.9.217-vs2.3.9.13/include/linux/vserver/cvirt.h 2020-04-19 00:30:46.735970074 +0000 | |
52 | @@ -5,6 +5,9 @@ struct vx_info; | |
53 | ||
54 | void vx_update_load(struct vx_info *); | |
55 | ||
56 | +struct timespec; | |
57 | + | |
58 | +void vx_vsi_uptime(struct timespec *, struct timespec *); | |
59 | ||
60 | int vx_do_syslog(int, char __user *, int); | |
61 | ||
62 | diff -NurpP --minimal linux-4.9.217-vs2.3.9.12/kernel/time/timekeeping.c linux-4.9.217-vs2.3.9.13/kernel/time/timekeeping.c | |
63 | --- linux-4.9.217-vs2.3.9.12/kernel/time/timekeeping.c 2019-12-25 15:09:47.185439847 +0000 | |
64 | +++ linux-4.9.217-vs2.3.9.13/kernel/time/timekeeping.c 2020-04-19 00:55:09.072812292 +0000 | |
65 | @@ -770,15 +770,6 @@ ktime_t ktime_get_with_offset(enum tk_of | |
66 | ||
67 | } while (read_seqcount_retry(&tk_core.seq, seq)); | |
68 | ||
69 | -#ifdef CONFIG_VSERVER_VTIME | |
70 | - if ((offs == TK_OFFS_BOOT) && | |
71 | - vx_flags(VXF_VIRT_UPTIME, 0) && | |
72 | - !vx_check(0, VS_ADMIN|VS_WATCH)) { | |
73 | - struct vx_info *vxi = current_vx_info(); | |
74 | - ktime_t bias_uptime = timespec64_to_ktime(vxi->cvirt.bias_uptime); | |
75 | - base = ktime_sub(base, bias_uptime); | |
76 | - } | |
77 | -#endif | |
78 | return ktime_add_ns(base, nsecs); | |
79 | ||
80 | } |