[powerpc:next-test] BUILD REGRESSION 2e4a9942261f89ad204a8189634029a4b1f0efb6

2022-05-18 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test branch HEAD: 2e4a9942261f89ad204a8189634029a4b1f0efb6 powerpc/irq: Remove arch_local_irq_restore() for !CONFIG_CC_HAS_ASM_GOTO Error/Warning reports:

Re: [PATCH] tools/perf/test: Fix perf all PMU test to skip hv_24x7/hv_gpci tests on powerpc

2022-05-18 Thread Michael Ellerman
Athira Rajeev writes: > "perf all PMU test" picks the input events from > "perf list --raw-dump pmu" list and runs "perf stat -e" > for each of the event in the list. In case of powerpc, the > PowerVM environment supports events from hv_24x7 and hv_gpci > PMU which is of example format like

Re: [PATCH 1/2] powerpc: Add generic PAGE_SIZE config symbols

2022-05-18 Thread Christophe Leroy
Le 18/05/2022 à 15:21, Arnd Bergmann a écrit : > On Wed, May 18, 2022 at 2:00 PM Michael Ellerman wrote: >> >> Christophe Leroy writes: >>> Le 05/05/2022 à 14:51, Michael Ellerman a écrit : Other arches (sh, mips, hexagon) use standard names for PAGE_SIZE related config symbols.

Re: [PATCH] kexec_file: Drop pr_err in weak implementations of arch_kexec_apply_relocations[_add]

2022-05-18 Thread Eric W. Biederman
Michael Ellerman writes: > "Eric W. Biederman" writes: >> Looking at this the pr_err is absolutely needed. If an unsupported case >> winds up in the purgatory blob and the code can't handle it things >> will fail silently much worse later. > > It won't fail later, it will fail the syscall. > >

Re: [PATCH 1/2] powerpc: Add generic PAGE_SIZE config symbols

2022-05-18 Thread Arnd Bergmann
On Wed, May 18, 2022 at 2:00 PM Michael Ellerman wrote: > > Christophe Leroy writes: > > Le 05/05/2022 à 14:51, Michael Ellerman a écrit : > >> Other arches (sh, mips, hexagon) use standard names for PAGE_SIZE > >> related config symbols. > >> > >> Add matching symbols for powerpc, which are

[PATCH 3/4] KVM: PPC: Book3S HV: Implement scheduling wait interval counters in the VPA

2022-05-18 Thread Nicholas Piggin
PAPR specifies accumulated virtual processor wait intervals that relate to partition scheduling interval times. Implement these counters in the same way as they are repoted by dtl. Signed-off-by: Nicholas Piggin --- arch/powerpc/kvm/book3s_hv.c | 62 1 file

Re: [PATCH 1/2] powerpc: Add generic PAGE_SIZE config symbols

2022-05-18 Thread Michael Ellerman
Christophe Leroy writes: > Le 05/05/2022 à 14:51, Michael Ellerman a écrit : >> Other arches (sh, mips, hexagon) use standard names for PAGE_SIZE >> related config symbols. >> >> Add matching symbols for powerpc, which are enabled by default but >> depend on our architecture specific PAGE_SIZE

Re: [PATCH v2 0/6] KASAN support for 64-bit Book 3S powerpc

2022-05-18 Thread Christophe Leroy
Le 18/05/2022 à 12:03, Paul Mackerras a écrit : > This patch series implements KASAN on 64-bit POWER with radix MMU, > such as POWER9 or POWER10. Daniel Axtens posted previous versions of > these patches, but is no longer working on KASAN, and I have been > asked to get them ready for

[PATCH] powerpc: Fix all occurences of "the the"

2022-05-18 Thread Michael Ellerman
Rather than waiting for the bots to fix these one-by-one, fix all occurences of "the the" throughout arch/powerpc. Signed-off-by: Michael Ellerman --- arch/powerpc/boot/wrapper | 2 +- arch/powerpc/kernel/eeh_pe.c | 2 +- arch/powerpc/kernel/head_64.S

[PATCH 4/4] powerpc/pseries: Implement CONFIG_PARAVIRT_TIME_ACCOUNTING

2022-05-18 Thread Nicholas Piggin
CONFIG_VIRT_CPU_ACCOUNTING_GEN under pseries does not implement stolen time accounting. Implement it with the paravirt time accounting option. Signed-off-by: Nicholas Piggin --- .../admin-guide/kernel-parameters.txt | 6 +++--- arch/powerpc/include/asm/paravirt.h | 12

Re: [PATCH 00/35] Add group constraints and event code test as part of selftest

2022-05-18 Thread Michael Ellerman
Kajol Jain writes: > Patch series extends the perf interface selftests > to cover scenarios for event code checking, > group constraints, and also thresholding/branch related > interface tests in sampling area. There are build failures in CI:

Re: [PATCH] kexec_file: Drop pr_err in weak implementations of arch_kexec_apply_relocations[_add]

2022-05-18 Thread Naveen N. Rao
Eric W. Biederman wrote: Michael Ellerman writes: "Eric W. Biederman" writes: Looking at this the pr_err is absolutely needed. If an unsupported case winds up in the purgatory blob and the code can't handle it things will fail silently much worse later. It won't fail later, it will fail

Re: [PATCH v3 19/25] powerpc/ftrace: Minimise number of #ifdefs

2022-05-18 Thread Naveen N. Rao
Christophe Leroy wrote: Le 18/05/2022 à 14:03, Michael Ellerman a écrit : Michael Ellerman writes: "Naveen N. Rao" writes: Christophe Leroy wrote: A lot of #ifdefs can be replaced by IS_ENABLED() Do so. This requires to have kernel_toc_addr() defined at all time as well as

[PATCH 1/4] KVM: PPC: Book3S HV P9: Restore stolen time logging in dtl

2022-05-18 Thread Nicholas Piggin
Stolen time logging in dtl was removed from the P9 path, so guests had no stolen time accounting. Add it back in a simpler way that still avoids locks and per-core accounting code. Fixes: ecb6a7207f92 ("KVM: PPC: Book3S HV P9: Remove most of the vcore logic") Signed-off-by: Nicholas Piggin ---

[PATCH 2/4] powerpc/pseries: Add wait interval counters to VPA

2022-05-18 Thread Nicholas Piggin
The hypervisor exposes accumulated partition scheduling interval times in the VPA (lppaca). These can be used to implement a simple stolen time in the guest without complex and costly dtl scanning. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/lppaca.h | 10 +++--- 1 file

Re: [PATCH 2/2] drm/tiny: Add ofdrm for Open Firmware framebuffers

2022-05-18 Thread Michal Suchánek
Hello, On Wed, May 18, 2022 at 08:30:06PM +0200, Thomas Zimmermann wrote: > Open Firmware provides basic display output via the 'display' node. > DT platform code already provides a device that represents the node's > framebuffer. Add a DRM driver for the device. The display mode and > color

Re: [PATCH] kexec_file: Drop weak attribute from arch_kexec_apply_relocations[_add]

2022-05-18 Thread Andrew Morton
On Wed, 18 May 2022 23:48:28 +0530 "Naveen N. Rao" wrote: > Since commit d1bcae833b32f1 ("ELF: Don't generate unused section > symbols") [1], binutils (v2.36+) started dropping section symbols that > it thought were unused. This isn't an issue in general, but with > kexec_file.c, gcc is

Re: [PATCH] powerpc/vdso: Fix incorrect CFI in gettimeofday.S

2022-05-18 Thread Alan Modra
On Tue, May 17, 2022 at 10:32:09PM +1000, Michael Ellerman wrote: > "Naveen N. Rao" writes: > > Michael Ellerman wrote: > >> > >> diff --git a/arch/powerpc/kernel/vdso/gettimeofday.S > >> b/arch/powerpc/kernel/vdso/gettimeofday.S > >> index eb9c81e1c218..0aee255e9cbb 100644 > >> ---

[PATCH] powerpc: check previous kernel's ima-kexec-buffer against memory bounds

2022-05-18 Thread Vaibhav Jain
Presently ima_get_kexec_buffer() doesn't check if the previous kernel's ima-kexec-buffer lies outside the addressable memory range. This can result in a kernel panic if the new kernel is booted with 'mem=X' arg and the ima-kexec-buffer was allocated beyond that range by the previous kernel. The

Re: [PATCH] powerpc: check previous kernel's ima-kexec-buffer against memory bounds

2022-05-18 Thread Lakshmi Ramasubramanian
Hi Vaibhav, On 5/18/2022 1:05 PM, Vaibhav Jain wrote: Presently ima_get_kexec_buffer() doesn't check if the previous kernel's ima-kexec-buffer lies outside the addressable memory range. This can result in a kernel panic if the new kernel is booted with 'mem=X' arg and the ima-kexec-buffer was

Re: [PATCH] kexec_file: Drop weak attribute from arch_kexec_apply_relocations[_add]

2022-05-18 Thread Eric W. Biederman
"Naveen N. Rao" writes: > Since commit d1bcae833b32f1 ("ELF: Don't generate unused section > symbols") [1], binutils (v2.36+) started dropping section symbols that > it thought were unused. This isn't an issue in general, but with > kexec_file.c, gcc is placing

Re: [Buildroot] [PATCH] linux: Fix powerpc64le defconfig selection

2022-05-18 Thread Arnout Vandecappelle
On 16/05/2022 15:17, Michael Ellerman wrote: Arnout Vandecappelle writes: On 10/05/2022 04:20, Joel Stanley wrote: The default defconfig target for the 64 bit powerpc kernel is ppc64_defconfig, the big endian configuration. When building for powerpc64le users want the little endian kernel

[PATCH 2/2] drm/tiny: Add ofdrm for Open Firmware framebuffers

2022-05-18 Thread Thomas Zimmermann
Open Firmware provides basic display output via the 'display' node. DT platform code already provides a device that represents the node's framebuffer. Add a DRM driver for the device. The display mode and color format is pre-initialized by the system's firmware. Runtime modesetting via DRM is not

Re: [PATCH 2/2] drm/tiny: Add ofdrm for Open Firmware framebuffers

2022-05-18 Thread Mark Cave-Ayland
On 18/05/2022 19:30, Thomas Zimmermann wrote: Open Firmware provides basic display output via the 'display' node. DT platform code already provides a device that represents the node's framebuffer. Add a DRM driver for the device. The display mode and color format is pre-initialized by the

[PATCH] kexec_file: Drop weak attribute from arch_kexec_apply_relocations[_add]

2022-05-18 Thread Naveen N. Rao
Since commit d1bcae833b32f1 ("ELF: Don't generate unused section symbols") [1], binutils (v2.36+) started dropping section symbols that it thought were unused. This isn't an issue in general, but with kexec_file.c, gcc is placing kexec_arch_apply_relocations[_add] into a separate .text.unlikely

[PATCH 1/2] MAINTAINERS: Broaden scope of simpledrm entry

2022-05-18 Thread Thomas Zimmermann
There will be more DRM drivers for firmware-provided framebuffers. Use the existing entry for simpledrm instead of adding a new one for each driver. Also add DRM's aperture helpers, which are part of the driver's infrastructure. Signed-off-by: Thomas Zimmermann --- MAINTAINERS | 4 +++- 1 file

[PATCH 0/2] drm: Add driverof PowerPC OF displays

2022-05-18 Thread Thomas Zimmermann
PowerPC's Open Firmware offers a simple display buffer for graphics output. Add ofdrm, a DRM driver for the device. As with the existing simpledrm driver, the graphics hardware is pre-initialized by the firmware. The driver only provides blitting, no actual DRM modesetting is possible. Thomas

Re: [PATCH] kexec_file: Drop weak attribute from arch_kexec_apply_relocations[_add]

2022-05-18 Thread Michael Ellerman
"Naveen N. Rao" writes: > Since commit d1bcae833b32f1 ("ELF: Don't generate unused section > symbols") [1], binutils (v2.36+) started dropping section symbols that > it thought were unused. This isn't an issue in general, but with > kexec_file.c, gcc is placing kexec_arch_apply_relocations[_add]

Re: [PATCH 19/30] panic: Add the panic hypervisor notifier list

2022-05-18 Thread Guilherme G. Piccoli
On 18/05/2022 04:58, Petr Mladek wrote: > [...] >> I does similar things like kmsg_dump() so it should be called in >> the same location (after info notifier list and before kdump). >> >> A solution might be to put it at these notifiers at the very >> end of the "info" list or make extra "dump"

Re: [PATCH 19/30] panic: Add the panic hypervisor notifier list

2022-05-18 Thread Guilherme G. Piccoli
On 18/05/2022 04:38, Petr Mladek wrote: > [...] > I have answered this in more detail in the other reply, see > https://lore.kernel.org/r/YoShZVYNAdvvjb7z@alley > > I agree that both notifiers in > > drivers/soc/bcm/brcmstb/pm/pm-arm.c > drivers/firmware/google/gsmi.c > > better fit

Re: [PATCH 19/30] panic: Add the panic hypervisor notifier list

2022-05-18 Thread Guilherme G. Piccoli
On 18/05/2022 04:33, Petr Mladek wrote: > [...] > Anyway, I would distinguish it the following way. > > + If the notifier is preserving kernel log then it should be ideally > treated as kmsg_dump(). > > + It the notifier is saving another debugging data then it better > fits into the

Re: [PATCH v1 3/4] powerpc/code-patching: Use jump_label for testing freed initmem

2022-05-18 Thread Guenter Roeck
> It also causes the qemu mpc8544ds emulation to crash. BUG: Unable to handle kernel data access on write at 0xc122eb34 Faulting instruction address: 0xc001b580 Oops: Kernel access of bad area, sig: 11 [#1] BE PAGE_SIZE=4K MPC8544 DS Modules linked in: CPU: 0 PID: 1 Comm: swapper Not tainted 5.18.0

Re: [PATCH] kexec_file: Drop weak attribute from arch_kexec_apply_relocations[_add]

2022-05-18 Thread Baoquan He
Hi Eric, On 05/18/22 at 04:59pm, Eric W. Biederman wrote: > "Naveen N. Rao" writes: > > > Since commit d1bcae833b32f1 ("ELF: Don't generate unused section > > symbols") [1], binutils (v2.36+) started dropping section symbols that > > it thought were unused. This isn't an issue in general, but

Re: [PATCH kernel] KVM: PPC: Make KVM_CAP_IRQFD_RESAMPLE platform dependent

2022-05-18 Thread Alexey Kardashevskiy
On 5/4/22 17:48, Alexey Kardashevskiy wrote: When introduced, IRQFD resampling worked on POWER8 with XICS. However KVM on POWER9 has never implemented it - the compatibility mode code ("XICS-on-XIVE") misses the kvm_notify_acked_irq() call and the native XIVE mode does not handle INTx in KVM

[PATCH 1/2] powerpc/irq: Split irq.c

2022-05-18 Thread Christophe Leroy
More than half of irq.c is dedicated to PPC64. Move PPC64 code out of irq.c into irq_64.c Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/Makefile| 2 +- arch/powerpc/kernel/irq.c | 421 arch/powerpc/kernel/{irq.c => irq_64.c} | 331

[PATCH 2/2] powerpc/irq64: Remove get_irq_happened()

2022-05-18 Thread Christophe Leroy
No need to open code the read of local_paca->irq_happened in assembly, we have READ_ONCE() for doing the same. Replace get_irq_happened() by READ_ONCE(local_paca->irq_happened). Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/irq_64.c | 14 ++ 1 file changed, 2

[PATCH V2 1/2] powerpc/perf: Add support for caps under sysfs in powerpc

2022-05-18 Thread Athira Rajeev
Add caps support under "/sys/bus/event_source/devices//" for powerpc. This directory can be used to expose some of the specific features that powerpc PMU supports to the user. Example: pmu_name. The name of PMU registered will depend on platform, say power9 or power10 or it could be Generic Compat

[PATCH] tools/perf/test: Fix perf all PMU test to skip hv_24x7/hv_gpci tests on powerpc

2022-05-18 Thread Athira Rajeev
"perf all PMU test" picks the input events from "perf list --raw-dump pmu" list and runs "perf stat -e" for each of the event in the list. In case of powerpc, the PowerVM environment supports events from hv_24x7 and hv_gpci PMU which is of example format like below: -

Re: [PATCH v3 19/25] powerpc/ftrace: Minimise number of #ifdefs

2022-05-18 Thread Naveen N. Rao
Christophe Leroy wrote: A lot of #ifdefs can be replaced by IS_ENABLED() Do so. This requires to have kernel_toc_addr() defined at all time as well as PPC_INST_LD_TOC and PPC_INST_STD_LR. Signed-off-by: Christophe Leroy --- v2: Moved the setup of pop outside of the big if()/else() in

Re: [PATCH] kexec_file: Drop pr_err in weak implementations of arch_kexec_apply_relocations[_add]

2022-05-18 Thread Baoquan He
On 05/18/22 at 12:26pm, Michael Ellerman wrote: > "Eric W. Biederman" writes: > > Looking at this the pr_err is absolutely needed. If an unsupported case > > winds up in the purgatory blob and the code can't handle it things > > will fail silently much worse later. > > It won't fail later, it

[PATCH 2/2] powerpc/irq: Replace #ifdefs by IS_ENABLED()

2022-05-18 Thread Christophe Leroy
Replace #ifdef CONFIG_PPC_IRQ_SOFT_MASK_DEBUG and #ifdef CONFIG_PERF_EVENTS by IS_ENABLED() in hw_irq.h and plpar_wrappers.h Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/hw_irq.h | 30 +++ arch/powerpc/include/asm/plpar_wrappers.h | 5 ++-- 2

[PATCH 1/2] powerpc/irq: Don't open code irq_soft_mask helpers

2022-05-18 Thread Christophe Leroy
Use READ_ONCE() and WRITE_ONCE() instead of open coding read and write of local PACA irq_soft_mask. For the write, add a barrier to keep the memory clobber that was there previously. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/hw_irq.h | 43 +-- 1

[PATCH] powerpc/irq: remove inline assembly in hard_irq_disable macro

2022-05-18 Thread Christophe Leroy
Use WRITE_ONCE() instead of opencoding the saving of current stack pointeur. Signed-off-by: Christophe Leroy --- By the way, is WRITE_ONCE() needed at all ? Could we instead do local_paca->saved_r1 = current_stack_pointer; --- arch/powerpc/include/asm/hw_irq.h | 4 +--- 1 file changed, 1

[PATCH V2 2/2] docs: ABI: sysfs-bus-event_source-devices: Document sysfs caps entry for PMU

2022-05-18 Thread Athira Rajeev
Add ABI documentation for "caps" attribute group. Some of the platform specific PMU features can be exposed in "caps" attribute group/directory: /sys/bus/event_source/devices// Signed-off-by: Athira Rajeev --- .../sysfs-bus-event_source-devices-caps| 18 ++ 1 file

Re: [PATCH] kexec_file: Drop pr_err in weak implementations of arch_kexec_apply_relocations[_add]

2022-05-18 Thread Naveen N. Rao
Baoquan He wrote: On 05/18/22 at 12:26pm, Michael Ellerman wrote: It seems that recordmcount is not really maintained anymore now that x86 uses objtool? There've been several threads about fixing recordmcount, but none of them seem to have lead to a solution. These weak symbol vs

Re: [PATCH 1/2] powerpc: Add generic PAGE_SIZE config symbols

2022-05-18 Thread Christophe Leroy
Le 05/05/2022 à 14:51, Michael Ellerman a écrit : > Other arches (sh, mips, hexagon) use standard names for PAGE_SIZE > related config symbols. > > Add matching symbols for powerpc, which are enabled by default but > depend on our architecture specific PAGE_SIZE symbols. > > This allows

Re: [Buildroot] [PATCH] linux: Fix powerpc64le defconfig selection

2022-05-18 Thread Arnd Bergmann
On Mon, May 16, 2022 at 2:17 PM Michael Ellerman wrote: > Having said that I think we could handle this better in the powerpc > kernel. Other arches allow specifying a different value for ARCH, which > then is fed into the defconfig. > > That way you could at least pass ARCH=ppc/ppc64/ppc64le,

Re: [PATCH v3 19/25] powerpc/ftrace: Minimise number of #ifdefs

2022-05-18 Thread Michael Ellerman
Michael Ellerman writes: > "Naveen N. Rao" writes: >> Christophe Leroy wrote: >>> A lot of #ifdefs can be replaced by IS_ENABLED() >>> >>> Do so. >>> >>> This requires to have kernel_toc_addr() defined at all time >>> as well as PPC_INST_LD_TOC and PPC_INST_STD_LR. >>> >>> Signed-off-by:

Re: [PATCH v3 19/25] powerpc/ftrace: Minimise number of #ifdefs

2022-05-18 Thread Christophe Leroy
Le 18/05/2022 à 13:19, Michael Ellerman a écrit : > "Naveen N. Rao" writes: >> Christophe Leroy wrote: >>> A lot of #ifdefs can be replaced by IS_ENABLED() >>> >>> Do so. >>> >>> This requires to have kernel_toc_addr() defined at all time >>> as well as PPC_INST_LD_TOC and PPC_INST_STD_LR. >>>

Re: [PATCH v3 19/25] powerpc/ftrace: Minimise number of #ifdefs

2022-05-18 Thread Christophe Leroy
Le 18/05/2022 à 14:03, Michael Ellerman a écrit : > Michael Ellerman writes: >> "Naveen N. Rao" writes: >>> Christophe Leroy wrote: A lot of #ifdefs can be replaced by IS_ENABLED() Do so. This requires to have kernel_toc_addr() defined at all time as well as

Re: [PATCH 2/2] powerpc/signal: Report minimum signal frame size to userspace via AT_MINSIGSTKSZ

2022-05-18 Thread Tulio Magno Quites Machado Filho
Nicholas Piggin writes: > Implement the AT_MINSIGSTKSZ AUXV entry, allowing userspace to > dynamically size stack allocations in a manner forward-compatible with > new processor state saved in the signal frame > > For now these statically find the maximum signal frame size rather than > doing

Re: [PATCH] powerpc/vdso: Fix incorrect CFI in gettimeofday.S

2022-05-18 Thread Naveen N. Rao
Michael Ellerman wrote: "Naveen N. Rao" writes: Michael Ellerman wrote: diff --git a/arch/powerpc/kernel/vdso/gettimeofday.S b/arch/powerpc/kernel/vdso/gettimeofday.S index eb9c81e1c218..0aee255e9cbb 100644 --- a/arch/powerpc/kernel/vdso/gettimeofday.S +++

[PATCH v2 5/6] powerpc/kasan: Disable address sanitization in kexec paths

2022-05-18 Thread Paul Mackerras
From: Daniel Axtens The kexec code paths involve code that necessarily run in real mode, as CPUs are disabled and control is transferred to the new kernel. Disable address sanitization for the kexec code and the functions called in real mode on CPUs being disabled. [pau...@ozlabs.org: combined

[PATCH v2 1/6] kasan: Document support on 32-bit powerpc

2022-05-18 Thread Paul Mackerras
From: Daniel Axtens KASAN is supported on 32-bit powerpc and the docs should reflect this. Suggested-by: Christophe Leroy Reviewed-by: Christophe Leroy Signed-off-by: Daniel Axtens Signed-off-by: Paul Mackerras --- Documentation/powerpc/kasan.txt | 12 1 file changed, 12

[PATCH v2 6/6] Documentation/kasan: Update details of KASAN on powerpc

2022-05-18 Thread Paul Mackerras
From: Daniel Axtens Signed-off-by: Paul Mackerras --- Documentation/dev-tools/kasan.rst | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Documentation/dev-tools/kasan.rst b/Documentation/dev-tools/kasan.rst index 8089c559d339..448995c11bee 100644 ---

[PATCH v2 2/6] powerpc/mm/kasan: rename kasan_init_32.c to init_32.c

2022-05-18 Thread Paul Mackerras
From: Daniel Axtens kasan is already implied by the directory name, we don't need to repeat it. Suggested-by: Christophe Leroy Signed-off-by: Daniel Axtens Signed-off-by: Paul Mackerras --- arch/powerpc/mm/kasan/Makefile | 2 +- arch/powerpc/mm/kasan/{kasan_init_32.c

[PATCH v2 4/6] powerpc/kasan: Don't instrument non-maskable or raw interrupts

2022-05-18 Thread Paul Mackerras
From: Daniel Axtens Disable address sanitization for raw and non-maskable interrupt handlers, because they can run in real mode, where we cannot access the shadow memory. (Note that kasan_arch_is_ready() doesn't test for real mode, since it is a static branch for speed, and in any case not all

[PATCH v2 0/6] KASAN support for 64-bit Book 3S powerpc

2022-05-18 Thread Paul Mackerras
This patch series implements KASAN on 64-bit POWER with radix MMU, such as POWER9 or POWER10. Daniel Axtens posted previous versions of these patches, but is no longer working on KASAN, and I have been asked to get them ready for inclusion. Because of various technical difficulties, mostly

[PATCH v2 3/6] powerpc: Book3S 64-bit outline-only KASAN support

2022-05-18 Thread Paul Mackerras
From: Daniel Axtens Implement a limited form of KASAN for Book3S 64-bit machines running under the Radix MMU, supporting only outline mode. - Enable the compiler instrumentation to check addresses and maintain the shadow region. (This is the guts of KASAN which we can easily reuse.) -

Re: [PATCH v3 19/25] powerpc/ftrace: Minimise number of #ifdefs

2022-05-18 Thread Christophe Leroy
Le 18/05/2022 à 11:45, Naveen N. Rao a écrit : > Christophe Leroy wrote: >> A lot of #ifdefs can be replaced by IS_ENABLED() >> >> Do so. >> >> This requires to have kernel_toc_addr() defined at all time >> as well as PPC_INST_LD_TOC and PPC_INST_STD_LR. >> >> Signed-off-by: Christophe Leroy >>

Re: [PATCH] kexec_file: Drop pr_err in weak implementations of arch_kexec_apply_relocations[_add]

2022-05-18 Thread Baoquan He
On 05/18/22 at 02:48pm, Naveen N. Rao wrote: > Baoquan He wrote: > > On 05/18/22 at 12:26pm, Michael Ellerman wrote: > > > > > > It seems that recordmcount is not really maintained anymore now that x86 > > > uses objtool? > > > > > > There've been several threads about fixing recordmcount, but

Re: [PATCH v3 19/25] powerpc/ftrace: Minimise number of #ifdefs

2022-05-18 Thread Michael Ellerman
"Naveen N. Rao" writes: > Christophe Leroy wrote: >> A lot of #ifdefs can be replaced by IS_ENABLED() >> >> Do so. >> >> This requires to have kernel_toc_addr() defined at all time >> as well as PPC_INST_LD_TOC and PPC_INST_STD_LR. >> >> Signed-off-by: Christophe Leroy >> --- >> v2: Moved the