Re: [PATCH v3] powerpc/code-patching: Improve verification of patchability

2021-11-25 Thread Michael Ellerman
On Mon, 15 Nov 2021 11:12:22 +0100, Christophe Leroy wrote: > Today, patch_instruction() assumes that it is called exclusively on > valid addresses, and only checks that it is not called on an init > address after init section has been freed. > > Improve verification by calling kernel_text_address

[PATCH v3] powerpc/code-patching: Improve verification of patchability

2021-11-15 Thread Christophe Leroy
Today, patch_instruction() assumes that it is called exclusively on valid addresses, and only checks that it is not called on an init address after init section has been freed. Improve verification by calling kernel_text_address() instead. kernel_text_address() already includes a verification of