https://github.com/torvalds/linux
Revision 8832317f662c06f5c06e638f57bfe89a71c9b266 authored by Vasant Hegde on 16 October 2015, 10:23:29 UTC, committed by Michael Ellerman on 22 October 2015, 00:03:25 UTC
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: 55190f88789a ("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>
1 parent 53c656c
History
Tip revision: 8832317f662c06f5c06e638f57bfe89a71c9b266 authored by Vasant Hegde on 16 October 2015, 10:23:29 UTC
powerpc/rtas: Validate rtas.entry before calling enter_rtas()
Tip revision: 8832317
File Mode Size
Kconfig -rw-r--r-- 3.1 KB
Makefile -rw-r--r-- 453 bytes
acl.c -rw-r--r-- 8.8 KB
acl.h -rw-r--r-- 1.2 KB
checkpoint.c -rw-r--r-- 27.9 KB
crypto.c -rw-r--r-- 12.7 KB
crypto_fname.c -rw-r--r-- 11.0 KB
crypto_key.c -rw-r--r-- 6.6 KB
crypto_policy.c -rw-r--r-- 5.9 KB
data.c -rw-r--r-- 38.3 KB
debug.c -rw-r--r-- 13.8 KB
dir.c -rw-r--r-- 20.8 KB
extent_cache.c -rw-r--r-- 18.8 KB
f2fs.h -rw-r--r-- 65.3 KB
f2fs_crypto.h -rw-r--r-- 3.8 KB
file.c -rw-r--r-- 39.1 KB
gc.c -rw-r--r-- 20.8 KB
gc.h -rw-r--r-- 3.2 KB
hash.c -rw-r--r-- 2.0 KB
inline.c -rw-r--r-- 13.3 KB
inode.c -rw-r--r-- 11.5 KB
namei.c -rw-r--r-- 24.2 KB
node.c -rw-r--r-- 51.0 KB
node.h -rw-r--r-- 10.5 KB
recovery.c -rw-r--r-- 14.3 KB
segment.c -rw-r--r-- 61.6 KB
segment.h -rw-r--r-- 21.9 KB
shrinker.c -rw-r--r-- 3.2 KB
super.c -rw-r--r-- 36.5 KB
trace.c -rw-r--r-- 3.4 KB
trace.h -rw-r--r-- 1013 bytes
xattr.c -rw-r--r-- 14.8 KB
xattr.h -rw-r--r-- 4.6 KB

back to top