powerpc: Add a probe_user_read_inst() function
authorJordan Niethe <jniethe5@gmail.com>
Wed, 6 May 2020 03:40:33 +0000 (13:40 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 18 May 2020 14:10:37 +0000 (00:10 +1000)
commit7ba68b2172c19031fdc2a2caf37328edd146e299
tree308fb5c5231ef35c900818c159b58b7410cb3d18
parentf8faaffaa7d99028e457ef2d1dcb43a98f736938
powerpc: Add a probe_user_read_inst() function

Introduce a probe_user_read_inst() function to use in cases where
probe_user_read() is used for getting an instruction. This will be
more useful for prefixed instructions.

Signed-off-by: Jordan Niethe <jniethe5@gmail.com>
Reviewed-by: Alistair Popple <alistair@popple.id.au>
[mpe: Don't write to *inst on error, fold in __user annotations]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200506034050.24806-14-jniethe5@gmail.com
arch/powerpc/include/asm/inst.h
arch/powerpc/lib/Makefile
arch/powerpc/lib/inst.c [new file with mode: 0644]
arch/powerpc/mm/fault.c