]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Send SIGBUS on unaligned copy and paste
authorChris Smart <chris@distroguy.com>
Thu, 16 Jun 2016 23:33:45 +0000 (09:33 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 5 Jul 2016 13:49:51 +0000 (23:49 +1000)
commitd4ba25f22ec930208fed660ed8fadd394ed5d3b0
tree766addae9b10b81a171235bfb289e448f1784f2e
parent1bb631f29a4b6bb9793410ac049b297a7af61248
powerpc: Send SIGBUS on unaligned copy and paste

Calling ISA 3.0 instructions copy, copy_first, paste and paste_last
generates an alignment fault when copying or pasting unaligned
data (128 byte). We catch this and send SIGBUS to the userspace
process that caused it.

We do not emulate these because paste may contain additional metadata
when pasting to a co-processor and paste_last is the synchronisation
point for preceding copy/paste sequences.

Thanks to Michael Neuling <mikey@neuling.org> for his help.

Signed-off-by: Chris Smart <chris@distroguy.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/ppc-opcode.h
arch/powerpc/kernel/align.c