1 |
commit: 45a997db178a0677381de56d0e6dedc59e79cbce |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Oct 14 14:28:02 2017 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Oct 14 14:28:02 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=45a997db |
7 |
|
8 |
Linux patch 4.13.7 |
9 |
|
10 |
0000_README | 4 ++ |
11 |
1006_linux-4.13.7.patch | 99 +++++++++++++++++++++++++++++++++++++++++++++++++ |
12 |
2 files changed, 103 insertions(+) |
13 |
|
14 |
diff --git a/0000_README b/0000_README |
15 |
index 92f54b8..b6a0ed9 100644 |
16 |
--- a/0000_README |
17 |
+++ b/0000_README |
18 |
@@ -67,6 +67,10 @@ Patch: 1005_linux-4.13.6.patch |
19 |
From: http://www.kernel.org |
20 |
Desc: Linux 4.13.6 |
21 |
|
22 |
+Patch: 1006_linux-4.13.7.patch |
23 |
+From: http://www.kernel.org |
24 |
+Desc: Linux 4.13.7 |
25 |
+ |
26 |
Patch: 1500_XATTR_USER_PREFIX.patch |
27 |
From: https://bugs.gentoo.org/show_bug.cgi?id=470644 |
28 |
Desc: Support for namespace user.pax.* on tmpfs. |
29 |
|
30 |
diff --git a/1006_linux-4.13.7.patch b/1006_linux-4.13.7.patch |
31 |
new file mode 100644 |
32 |
index 0000000..038d91d |
33 |
--- /dev/null |
34 |
+++ b/1006_linux-4.13.7.patch |
35 |
@@ -0,0 +1,99 @@ |
36 |
+diff --git a/Documentation/watchdog/watchdog-parameters.txt b/Documentation/watchdog/watchdog-parameters.txt |
37 |
+index b3526365ea8e..6f9d7b418917 100644 |
38 |
+--- a/Documentation/watchdog/watchdog-parameters.txt |
39 |
++++ b/Documentation/watchdog/watchdog-parameters.txt |
40 |
+@@ -117,7 +117,7 @@ nowayout: Watchdog cannot be stopped once started |
41 |
+ ------------------------------------------------- |
42 |
+ iTCO_wdt: |
43 |
+ heartbeat: Watchdog heartbeat in seconds. |
44 |
+- (5<=heartbeat<=74 (TCO v1) or 1226 (TCO v2), default=30) |
45 |
++ (2<heartbeat<39 (TCO v1) or 613 (TCO v2), default=30) |
46 |
+ nowayout: Watchdog cannot be stopped once started |
47 |
+ (default=kernel config parameter) |
48 |
+ ------------------------------------------------- |
49 |
+diff --git a/Makefile b/Makefile |
50 |
+index 9e1af1af327b..0d4f1b19869d 100644 |
51 |
+--- a/Makefile |
52 |
++++ b/Makefile |
53 |
+@@ -1,6 +1,6 @@ |
54 |
+ VERSION = 4 |
55 |
+ PATCHLEVEL = 13 |
56 |
+-SUBLEVEL = 6 |
57 |
++SUBLEVEL = 7 |
58 |
+ EXTRAVERSION = |
59 |
+ NAME = Fearless Coyote |
60 |
+ |
61 |
+diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c |
62 |
+index c4f65873bfa4..347f0389b089 100644 |
63 |
+--- a/drivers/watchdog/iTCO_wdt.c |
64 |
++++ b/drivers/watchdog/iTCO_wdt.c |
65 |
+@@ -306,15 +306,16 @@ static int iTCO_wdt_ping(struct watchdog_device *wd_dev) |
66 |
+ |
67 |
+ iTCO_vendor_pre_keepalive(p->smi_res, wd_dev->timeout); |
68 |
+ |
69 |
+- /* Reset the timeout status bit so that the timer |
70 |
+- * needs to count down twice again before rebooting */ |
71 |
+- outw(0x0008, TCO1_STS(p)); /* write 1 to clear bit */ |
72 |
+- |
73 |
+ /* Reload the timer by writing to the TCO Timer Counter register */ |
74 |
+- if (p->iTCO_version >= 2) |
75 |
++ if (p->iTCO_version >= 2) { |
76 |
+ outw(0x01, TCO_RLD(p)); |
77 |
+- else if (p->iTCO_version == 1) |
78 |
++ } else if (p->iTCO_version == 1) { |
79 |
++ /* Reset the timeout status bit so that the timer |
80 |
++ * needs to count down twice again before rebooting */ |
81 |
++ outw(0x0008, TCO1_STS(p)); /* write 1 to clear bit */ |
82 |
++ |
83 |
+ outb(0x01, TCO_RLD(p)); |
84 |
++ } |
85 |
+ |
86 |
+ spin_unlock(&p->io_lock); |
87 |
+ return 0; |
88 |
+@@ -327,8 +328,11 @@ static int iTCO_wdt_set_timeout(struct watchdog_device *wd_dev, unsigned int t) |
89 |
+ unsigned char val8; |
90 |
+ unsigned int tmrval; |
91 |
+ |
92 |
+- /* The timer counts down twice before rebooting */ |
93 |
+- tmrval = seconds_to_ticks(p, t) / 2; |
94 |
++ tmrval = seconds_to_ticks(p, t); |
95 |
++ |
96 |
++ /* For TCO v1 the timer counts down twice before rebooting */ |
97 |
++ if (p->iTCO_version == 1) |
98 |
++ tmrval /= 2; |
99 |
+ |
100 |
+ /* from the specs: */ |
101 |
+ /* "Values of 0h-3h are ignored and should not be attempted" */ |
102 |
+@@ -381,8 +385,6 @@ static unsigned int iTCO_wdt_get_timeleft(struct watchdog_device *wd_dev) |
103 |
+ spin_lock(&p->io_lock); |
104 |
+ val16 = inw(TCO_RLD(p)); |
105 |
+ val16 &= 0x3ff; |
106 |
+- if (!(inw(TCO1_STS(p)) & 0x0008)) |
107 |
+- val16 += (inw(TCOv2_TMR(p)) & 0x3ff); |
108 |
+ spin_unlock(&p->io_lock); |
109 |
+ |
110 |
+ time_left = ticks_to_seconds(p, val16); |
111 |
+diff --git a/kernel/exit.c b/kernel/exit.c |
112 |
+index 6d31fc5ba50d..135b36985f8a 100644 |
113 |
+--- a/kernel/exit.c |
114 |
++++ b/kernel/exit.c |
115 |
+@@ -1611,6 +1611,9 @@ SYSCALL_DEFINE5(waitid, int, which, pid_t, upid, struct siginfo __user *, |
116 |
+ if (!infop) |
117 |
+ return err; |
118 |
+ |
119 |
++ if (!access_ok(VERIFY_WRITE, infop, sizeof(*infop))) |
120 |
++ goto Efault; |
121 |
++ |
122 |
+ user_access_begin(); |
123 |
+ unsafe_put_user(signo, &infop->si_signo, Efault); |
124 |
+ unsafe_put_user(0, &infop->si_errno, Efault); |
125 |
+@@ -1736,6 +1739,9 @@ COMPAT_SYSCALL_DEFINE5(waitid, |
126 |
+ if (!infop) |
127 |
+ return err; |
128 |
+ |
129 |
++ if (!access_ok(VERIFY_WRITE, infop, sizeof(*infop))) |
130 |
++ goto Efault; |
131 |
++ |
132 |
+ user_access_begin(); |
133 |
+ unsafe_put_user(signo, &infop->si_signo, Efault); |
134 |
+ unsafe_put_user(0, &infop->si_errno, Efault); |