[PATCH v2 3/3] powerpc/32: Convert patch_instruction() to patch_uint()

2023-10-15 Thread Benjamin Gray
These changes are for patch_instruction() uses on data. Unlike ppc64 these should not be incorrect as-is, but using the patch_uint() alias better reflects what kind of data being patched and allows for benchmarking the effect of different patch_* implementations (e.g., skipping instruction

[PATCH v2 2/3] powerpc/64: Convert patch_instruction() to patch_u32()

2023-10-15 Thread Benjamin Gray
This use of patch_instruction() is working on 32 bit data, and can fail if the data looks like a prefixed instruction and the extra write crosses a page boundary. Use patch_u32() to fix the write size. Fixes: 8734b41b3efe ("powerpc/module_64: Fix livepatching for RO modules") Link:

[PATCH v2 1/3] powerpc/code-patching: Add generic memory patching

2023-10-15 Thread Benjamin Gray
patch_instruction() is designed for patching instructions in otherwise readonly memory. Other consumers also sometimes need to patch readonly memory, so have abused patch_instruction() for arbitrary data patches. This is a problem on ppc64 as patch_instruction() decides on the patch width using

[PATCH v2 0/3] Add generic data patching functions

2023-10-15 Thread Benjamin Gray
Currently patch_instruction() bases the write length on the value being written. If the value looks like a prefixed instruction it writes 8 bytes, otherwise it writes 4 bytes. This makes it potentially buggy to use for writing arbitrary data, as if you want to write 4 bytes but it decides to write

[powerpc:merge] BUILD SUCCESS 16cbbabfa2a7d32f7d4eae046dda0ece2f157a70

2023-10-15 Thread kernel test robot
allnoconfig gcc arc allyesconfig gcc arc defconfig gcc arc randconfig-001-20231015 gcc arm allmodconfig gcc arm

[powerpc:fixes-test] BUILD SUCCESS ff9e8f41513669e290f6e1904e1bc75950584491

2023-10-15 Thread kernel test robot
allnoconfig gcc arc allyesconfig gcc arc defconfig gcc arc randconfig-001-20231015 gcc arm allmodconfig gcc arm

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-6.6-4 tag

2023-10-15 Thread pr-tracker-bot
The pull request you sent on Sun, 15 Oct 2023 21:31:39 +1100: > https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git > tags/powerpc-6.6-4 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/f8bf101b3b1171923a011a47923a93f4b22e6cb0 Thank you! --

[GIT PULL] Please pull powerpc/linux.git powerpc-6.6-4 tag

2023-10-15 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull some more powerpc fixes for 6.6: The following changes since commit 58b33e78a31782ffe25d404d5eba9a45fe636e27: selftests/powerpc: Fix emit_tests to work with run_kselftest.sh (2023-09-22 20:29:48 +1000) are available in

Re: (subset) [PATCH 0/7] arch/*: config: Remove ReiserFS from defconfig

2023-10-15 Thread Michael Ellerman
On Mon, 18 Sep 2023 17:56:09 +, Peter Lafreniere wrote: > ReiserFS has been considered deprecated for 19 months since commit > eb103a51640e ("reiserfs: Deprecate reiserfs"). However, there are > several architectures that still build it into their defconfig kernels. > > As ReiserFS will be

Re: [PATCH v4] powerpc: Use shared font data

2023-10-15 Thread Michael Ellerman
On Fri, 25 Aug 2023 15:27:54 +0100, li...@treblig.org wrote: > PowerPC has a 'btext' font used for the console which is almost identical > to the shared font_sun8x16, so use it rather than duplicating the data. > > They were actually identical until about a decade ago when >commit

Re: (subset) [PATCH v2 0/2] m68k/powerpc: Kill references to non-existent README.legal

2023-10-15 Thread Michael Ellerman
On Mon, 18 Sep 2023 12:14:42 +0200, Geert Uytterhoeven wrote: > Note that the "COPYING" file at that time corresponded to the version > from upstream Linux v0.99.11 until v2.1.104, and thus predated the > addition of the "only valid GPL version is v2" clause in v2.4.0-test8. > > This patch series

Re: [PATCH] powerpc: Only define __parse_fpscr() when required

2023-10-15 Thread Michael Ellerman
On Fri, 22 Sep 2023 14:33:13 +0200, Christophe Leroy wrote: > Clang 17 reports: > > arch/powerpc/kernel/traps.c:1167:19: error: unused function '__parse_fpscr' > [-Werror,-Wunused-function] > > __parse_fpscr() is called from two sites. First call is guarded > by #ifdef CONFIG_PPC_FPU_REGS > >

Re: [PATCH] selftests/powerpc: Fix emit_tests to work with run_kselftest.sh

2023-10-15 Thread Michael Ellerman
On Thu, 21 Sep 2023 17:26:10 +1000, Michael Ellerman wrote: > In order to use run_kselftest.sh the list of tests must be emitted to > populate kselftest-list.txt. > > The powerpc Makefile is written to use EMIT_TESTS. But support for > EMIT_TESTS was dropped in commit d4e59a536f50 ("selftests:

Re: [PATCH] powerpc/mm: Allow ARCH_FORCE_MAX_ORDER up to 12

2023-10-15 Thread Michael Ellerman
On Thu, 24 Aug 2023 22:28:49 +1000, Michael Ellerman wrote: > Christophe reported that the change to ARCH_FORCE_MAX_ORDER to limit the > range to 10 had broken his ability to configure hugepages: > > # echo 1 > /sys/kernel/mm/hugepages/hugepages-8192kB/nr_hugepages > sh: write error: Invalid

Re: [PATCH] powerpc/47x: Fix 47x syscall return crash

2023-10-15 Thread Michael Ellerman
On Tue, 10 Oct 2023 22:47:50 +1100, Michael Ellerman wrote: > Eddie reported that newer kernels were crashing during boot on his 476 > FSP2 system: > > kernel tried to execute user page (b7ee2000) - exploit attempt? (uid: 0) > BUG: Unable to handle kernel instruction fetch > Faulting

Re: (subset) [PATCH v2 00/37] Implement execute-only protection on powerpc

2023-10-15 Thread Michael Ellerman
On Mon, 25 Sep 2023 20:31:14 +0200, Christophe Leroy wrote: > This series reworks _PAGE_FLAGS on all platforms in order > to implement execute-only protection on all powerpc. > > For all targets except 40x and 604 it will be a real execute-only > protection as the hardware and/or software allows

Re: [PATCH 1/2] powerpc/platforms/pseries: Fix STK_PARAM access in the hcall tracing code

2023-10-15 Thread Michael Ellerman
On Fri, 29 Sep 2023 22:53:36 +0530, Athira Rajeev wrote: > In powerpc pseries system, below behaviour is observed while > enabling tracing on hcall: > # cd /sys/kernel/debug/tracing/ > # cat events/powerpc/hcall_exit/enable > 0 > # echo 1 > events/powerpc/hcall_exit/enable

Re: [PATCH] powerpc/85xx: Fix math emulation exception

2023-10-15 Thread Michael Ellerman
On Mon, 25 Sep 2023 17:55:51 +0200, Christophe Leroy wrote: > Booting mpc85xx_defconfig kernel on QEMU leads to: > > Bad trap at PC: fe9bab0, SR: 2d000, vector=800 > awk[82]: unhandled trap (5) at 0 nip fe9bab0 lr fe9e01c code 5 in > libc-2.27.so[fe5a000+17a000] > awk[82]: code: 3aa0

Re: [PATCH] powerpc/stacktrace: Fix arch_stack_walk_reliable()

2023-10-15 Thread Michael Ellerman
On Fri, 22 Sep 2023 09:24:41 +1000, Michael Ellerman wrote: > The changes to copy_thread() made in commit eed7c420aac7 ("powerpc: > copy_thread differentiate kthreads and user mode threads") inadvertently > broke arch_stack_walk_reliable() because it has knowledge of the stack > layout. > > Fix