]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/32s: Don't warn when mapping RO data ROX.
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 19 May 2020 05:48:56 +0000 (05:48 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 26 May 2020 12:22:19 +0000 (22:22 +1000)
commit3a000d89f0455858e1ddc54ec6282d0f15a2c79d
tree91eda84aac9b6362404e16026aeee6dc5d7b5161
parentfda82d08955a1242a12ca7ace7a180808b63f4df
powerpc/32s: Don't warn when mapping RO data ROX.

Mapping RO data as ROX is not an issue since that data
cannot be modified to introduce an exploit.

PPC64 accepts to have RO data mapped ROX, as a trade off
between kernel size and strictness of protection.

On PPC32, kernel size is even more critical as amount of
memory is usually small.

Depending on the number of available IBATs, the last IBATs
might overflow the end of text. Only warn if it crosses
the end of RO data.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/6499f8eeb2a36330e5c9fc1cee9a79374875bd54.1589866984.git.christophe.leroy@csgroup.eu
arch/powerpc/mm/book3s32/mmu.c