[PATCH 2/3] powerpc/code-patching: warn on code patching failure

2021-11-25 Thread Nicholas Piggin
Callers are supposed to handle this, but it is possible that they don't or they do but don't make much noise about it. A failure is probably an indication of a bigger problem somewhere so it is good to warn once about it. Signed-off-by: Nicholas Piggin --- arch/powerpc/lib/code-patching.c | 5 ++

[PATCH 3/3] powerpc/code-patching: don't use the stack for code patching tests

2021-11-25 Thread Nicholas Piggin
Use the existing test function for code patching tests instead of writing to the stack. This means the address verification does not have to be bypassed for these tests. Signed-off-by: Nicholas Piggin --- arch/powerpc/lib/code-patching.c | 24 1 file changed, 16 insertio

Re: [kbuild-all] Re: [PATCH 1/8] powerpc/mm: Make slice specific to book3s/64

2021-11-25 Thread Chen, Rong A
On 11/24/2021 9:49 PM, Christophe Leroy wrote: Le 24/11/2021 à 13:10, Christophe Leroy a écrit : Le 22/11/2021 à 15:48, kernel test robot a écrit : Hi Christophe, I love your patch! Perhaps something to improve: [auto build test WARNING on powerpc/next] [also build test WARNING on hnaz

linux-next: runtime warnings from qemu run

2021-11-25 Thread Stephen Rothwell
Hi all, My qemu boot test (pseries_le_defconfig) produces these new messages: code-patching: test failed at line 444 code-patching: test failed at line 447 code-patching: test failed at line 450 code-patching: test failed at line 453 code-patching: test failed at line 456 code-patching: test fail

[PATCH] powerpc/pseries/vas: Don't print an error when VAS is unavailable

2021-11-25 Thread Nicholas Piggin
KVM does not support VAS so guests always print a useless error on boot vas: HCALL(398) error -2, query_type 0, result buffer 0x57f2000 Change this to only print the message if the error is not H_FUNCTION. Signed-off-by: Nicholas Piggin --- arch/powerpc/platforms/pseries/vas.c | 11 +++

Re: linux-next: runtime warnings from qemu run

2021-11-25 Thread Christophe Leroy
Le 26/11/2021 à 06:17, Stephen Rothwell a écrit : Hi all, My qemu boot test (pseries_le_defconfig) produces these new messages: code-patching: test failed at line 444 code-patching: test failed at line 447 code-patching: test failed at line 450 code-patching: test failed at line 453 code-pat

Re: [PATCH] powerpc/64s/radix: Fix unmapping huge vmaps when CONFIG_HUGETLB_PAGE=n

2021-11-25 Thread Daniel Axtens
Hi, > pmd_huge is defined out to false when HUGETLB_PAGE is not configured, > but the vmap code still installs huge PMDs. This leads to errors > encountering bad PMDs when vunmapping because it is not seen as a > huge PTE, and the bad PMD check catches it. The end result may not > be much more ser

Re: [PATCH 1/3] powerpc/code-patching: work around code patching verification in patching tests

2021-11-25 Thread Christophe Leroy
Le 26/11/2021 à 04:22, Nicholas Piggin a écrit : Code patching tests patch the stack and (non-module) vmalloc space now, which falls afoul of the new address check. The stack patching can easily be fixed, but the vmalloc patching is more difficult. For now, add an ugly workaround to skip the

[powerpc/merge] ftrace warning while running stress_code_patching

2021-11-25 Thread Sachin Sant
While running stress_code_patching.sh (powerpc/mm selftest) against latest powerpc/merge branch (5.16.0-rc2-g2dbc3a3e8fc1) following warning is seen: Reverting following patch allows the test to run successfully. commit 8b8a8f0ab3f5 : powerpc/code-patching: Improve verification of patchability I

Re: [PATCH] powerpc/pseries/vas: Don't print an error when VAS is unavailable

2021-11-25 Thread Cédric Le Goater
On 11/26/21 06:21, Nicholas Piggin wrote: KVM does not support VAS so guests always print a useless error on boot vas: HCALL(398) error -2, query_type 0, result buffer 0x57f2000 Change this to only print the message if the error is not H_FUNCTION. Just being curious, why is it even call

Re: [PATCH v4 00/17] powerpc: Make hash MMU code build configurable

2021-11-25 Thread Christophe Leroy
Le 26/11/2021 à 01:55, Nicholas Piggin a écrit : Excerpts from Christophe Leroy's message of November 26, 2021 3:35 am: Le 25/11/2021 à 17:35, Christophe Leroy a écrit : Le 25/11/2021 à 13:50, Nicholas Piggin a écrit : Now that there's a platform that can make good use of it, here's a s

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

2021-11-25 Thread Christophe Leroy
Commit 8b8a8f0ab3f5 ("powerpc/code-patching: Improve verification of patchability") introduced a stricter verification of the patched area by checking it is proper kernel text. But as least two usages of patch_instruction() fall outside: - Code patching selftests, which use stack and vmalloc space

<    1   2