Skip to content

Commit d195b1d

Browse files
pmladekborkmann
authored andcommitted
powerpc/bpf: Enable bpf_probe_read{, str}() on powerpc again
The commit 0ebeea8 ("bpf: Restrict bpf_probe_read{, str}() only to archs where they work") caused that bpf_probe_read{, str}() functions were not longer available on architectures where the same logical address might have different content in kernel and user memory mapping. These architectures should use probe_read_{user,kernel}_str helpers. For backward compatibility, the problematic functions are still available on architectures where the user and kernel address spaces are not overlapping. This is defined CONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE. At the moment, these backward compatible functions are enabled only on x86_64, arm, and arm64. Let's do it also on powerpc that has the non overlapping address space as well. Fixes: 0ebeea8 ("bpf: Restrict bpf_probe_read{, str}() only to archs where they work") Signed-off-by: Petr Mladek <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/lkml/[email protected]
1 parent b16a87d commit d195b1d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/powerpc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ config PPC
126126
select ARCH_HAS_MMIOWB if PPC64
127127
select ARCH_HAS_PHYS_TO_DMA
128128
select ARCH_HAS_PMEM_API
129+
select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
129130
select ARCH_HAS_PTE_DEVMAP if PPC_BOOK3S_64
130131
select ARCH_HAS_PTE_SPECIAL
131132
select ARCH_HAS_MEMBARRIER_CALLBACKS

0 commit comments

Comments
 (0)