]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Mark .opd section read-only
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Wed, 13 Oct 2021 14:43:54 +0000 (16:43 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 14 Oct 2021 10:47:34 +0000 (21:47 +1100)
commit2f5ee4976dceeb0267c349f5495484f85c63514e
tree3e17c2810ec510cb4835f31cd9dba76b7329465a
parent7f9ef7ae1eab3af9496c1e7476e08fceb87f3b9d
powerpc: Mark .opd section read-only

.opd section contains function descriptors used to locate
functions in the kernel. If someone is able to modify a
function descriptor he will be able to run arbitrary
kernel function instead of another.

To avoid that, move .opd section inside read-only memory.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/3cd40b682fb6f75bb40947b55ca0bac20cb3f995.1634136222.git.christophe.leroy@csgroup.eu
arch/powerpc/kernel/vmlinux.lds.S