Vasant Hegde
8832317f66
powerpc/rtas: Validate rtas.entry before calling enter_rtas()
...
Currently we do not validate rtas.entry before calling enter_rtas(). This
leads to a kernel oops when user space calls rtas system call on a powernv
platform (see below). This patch adds code to validate rtas.entry before
making enter_rtas() call.
Oops: Exception in kernel mode, sig: 4 [#1 ]
SMP NR_CPUS=1024 NUMA PowerNV
task: c000000004294b80 ti: c0000007e1a78000 task.ti: c0000007e1a78000
NIP: 0000000000000000 LR: 0000000000009c14 CTR: c000000000423140
REGS: c0000007e1a7b920 TRAP: 0e40 Not tainted (3.18.17-340.el7_1.pkvm3_1_0.2400.1.ppc64le)
MSR: 1000000000081000 <HV,ME> CR: 00000000 XER: 00000000
CFAR: c000000000009c0c SOFTE: 0
NIP [0000000000000000] (null)
LR [0000000000009c14] 0x9c14
Call Trace:
[c0000007e1a7bba0] [c00000000041a7f4] avc_has_perm_noaudit+0x54/0x110 (unreliable)
[c0000007e1a7bd80] [c00000000002ddc0] ppc_rtas+0x150/0x2d0
[c0000007e1a7be30] [c000000000009358] syscall_exit+0x0/0x98
Cc: stable@vger.kernel.org # v3.2+
Fixes: 55190f8878 ("powerpc: Add skeleton PowerNV platform")
Reported-by: NAGESWARA R. SASTRY <nasastry@in.ibm.com >
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com >
[mpe: Reword change log, trim oops, and add stable + fixes]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au >
2015-10-22 11:03:25 +11:00
..
2014-11-27 09:42:12 +11:00
2014-03-19 19:57:14 -05:00
2014-11-10 09:59:32 +11:00
2015-09-10 16:42:49 -07:00
2013-08-27 16:01:23 +10:00
2015-04-11 20:49:28 +10:00
2014-09-22 10:11:31 +02:00
2015-03-17 07:52:48 +11:00
2011-07-12 13:16:58 +03:00
2015-06-19 17:10:28 +10:00
2014-11-10 09:59:26 +11:00
2014-04-18 14:20:41 +02:00
2015-03-20 14:51:53 +11:00
2015-07-13 10:10:55 +10:00
2015-07-13 10:10:55 +10:00
2015-08-18 19:32:11 +10:00
2015-05-13 14:00:07 +10:00
2015-03-24 13:15:51 +11:00
2015-05-13 14:00:07 +10:00
2014-06-11 17:04:33 +10:00
2015-08-18 19:34:42 +10:00
2014-11-27 09:32:58 +11:00
2015-08-28 13:26:31 +10:00
2015-07-29 11:56:11 +10:00
2015-07-29 11:56:11 +10:00
2013-03-13 14:19:36 -05:00
2014-06-10 18:54:22 -07:00
2015-08-07 23:00:01 -05:00
2015-06-02 13:26:47 +10:00
2014-10-30 16:52:46 +11:00
2011-10-31 19:30:41 -04:00
2014-01-15 13:59:11 +11:00
2015-08-07 23:00:01 -05:00
2014-12-11 17:48:14 -08:00
2015-06-02 21:37:28 -05:00
2012-03-09 10:55:08 +11:00
2014-06-11 16:31:21 +10:00
2014-08-13 15:13:42 +10:00
2014-08-05 14:13:41 +10:00
2013-05-02 10:31:01 +10:00
2014-09-22 10:11:31 +02:00
2014-11-03 12:12:32 +11:00
2014-09-25 23:14:46 +10:00
2012-07-11 14:18:22 +10:00
2014-04-23 10:05:16 +10:00
2015-06-02 21:37:19 -05:00
2014-04-23 10:05:16 +10:00
2015-07-07 10:16:52 +10:00
2013-07-01 11:10:35 +10:00
2015-04-17 11:23:39 +10:00
2013-08-14 14:58:08 +10:00
2014-06-24 12:43:13 +10:00
2015-06-11 15:16:49 +10:00
2015-09-15 17:06:28 +02:00
2013-01-03 15:57:04 -08:00
2015-08-03 11:34:12 +02:00
2014-11-03 12:12:32 +11:00
2014-11-03 12:12:32 +11:00
2012-05-30 11:43:11 +02:00
2015-08-06 15:10:20 +10:00
2014-09-25 23:14:46 +10:00
2012-01-12 20:13:03 -08:00
2015-02-17 14:34:51 -08:00
2014-02-11 11:24:52 +11:00
2015-08-06 16:36:23 +10:00
2015-03-17 07:52:48 +11:00
2015-05-12 19:44:01 +10:00
2015-07-27 14:06:24 +02:00
2015-08-20 18:19:08 +10:00
2014-10-15 11:23:20 +11:00
2014-10-02 17:33:54 +10:00
2014-10-02 17:33:54 +10:00
2013-10-30 16:00:31 +11:00
2015-06-02 11:47:45 +10:00
2015-08-19 16:14:21 +10:00
2015-03-24 13:15:52 +11:00
2015-01-23 14:02:52 +11:00
2014-11-19 21:41:51 +11:00
2014-12-11 17:48:14 -08:00
2015-03-31 13:02:38 +11:00
2015-09-08 14:35:59 -07:00
2015-09-15 13:18:04 -05:00
2015-06-03 13:27:15 +10:00
2012-02-29 17:15:08 -05:00
2013-02-03 18:16:10 -05:00
2014-09-25 23:14:40 +10:00
2014-10-15 11:23:20 +11:00
2013-06-29 12:57:50 +04:00
2015-09-03 16:41:38 -07:00
2014-09-25 23:14:46 +10:00
2015-07-13 15:46:04 +10:00
2013-08-14 15:33:26 +10:00
2015-08-12 15:05:47 +10:00
2013-10-18 18:44:49 -05:00
2015-07-30 14:34:44 +10:00
2013-07-01 11:10:34 +10:00
2014-03-07 13:50:19 +11:00
2014-07-28 11:30:54 +10:00
2015-04-11 20:49:09 +10:00
2014-11-10 09:59:32 +11:00
2011-06-29 15:30:43 +10:00
2015-10-22 11:03:25 +11:00
2014-09-25 23:14:41 +10:00
2015-09-17 10:36:53 +10:00
2015-06-11 15:16:54 +10:00
2014-11-03 12:12:51 +11:00
2015-09-03 16:41:38 -07:00
2015-07-21 11:38:29 +10:00
2014-08-06 13:04:32 +02:00
2014-08-06 13:03:09 +02:00
2014-01-15 13:46:44 +11:00
2015-03-04 13:19:33 +11:00
2014-10-15 11:23:20 +11:00
2014-10-09 22:26:04 -04:00
2012-03-28 18:30:02 +01:00
2013-10-31 12:37:29 +11:00
2014-01-07 19:06:03 -06:00
2012-03-28 18:30:02 +01:00
2013-05-09 13:46:38 -04:00
2015-03-28 22:03:40 +11:00
2015-06-07 19:29:15 +10:00
2015-03-28 22:03:40 +11:00
2015-03-28 22:03:40 +11:00
2015-08-10 11:41:02 +02:00
2015-06-07 19:29:00 +10:00
2015-08-06 16:36:23 +10:00
2015-07-06 20:24:35 +10:00
2014-11-12 13:47:20 +11:00
2015-04-07 17:15:13 +10:00
2013-11-20 16:31:01 +01:00
2015-05-11 20:01:02 +10:00
2013-10-11 17:26:49 +11:00
2015-03-16 18:32:11 +11:00
2015-06-24 17:49:38 -07:00
2015-05-14 16:59:21 +10:00