Commit e0847283 authored by Christophe Leroy's avatar Christophe Leroy Committed by Michael Ellerman
Browse files

powerpc/ptdump: Convert powerpc to GENERIC_PTDUMP

parent cf98d2b6
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -123,6 +123,7 @@ config PPC
	select ARCH_HAS_COPY_MC			if PPC64
	select ARCH_HAS_DEBUG_VIRTUAL
	select ARCH_HAS_DEBUG_VM_PGTABLE
	select ARCH_HAS_DEBUG_WX		if STRICT_KERNEL_RWX
	select ARCH_HAS_DEVMEM_IS_ALLOWED
	select ARCH_HAS_DMA_MAP_DIRECT 		if PPC_PSERIES
	select ARCH_HAS_ELF_RANDOMIZE
@@ -182,6 +183,7 @@ config PPC
	select GENERIC_IRQ_SHOW
	select GENERIC_IRQ_SHOW_LEVEL
	select GENERIC_PCI_IOMAP		if PCI
	select GENERIC_PTDUMP
	select GENERIC_SMP_IDLE_THREAD
	select GENERIC_STRNCPY_FROM_USER
	select GENERIC_STRNLEN_USER
+0 −30
Original line number Diff line number Diff line
@@ -365,36 +365,6 @@ config FAIL_IOMMU

	  If you are unsure, say N.

config PPC_PTDUMP
	bool "Export kernel pagetable layout to userspace via debugfs"
	depends on DEBUG_KERNEL && DEBUG_FS
	help
	  This option exports the state of the kernel pagetables to a
	  debugfs file. This is only useful for kernel developers who are
	  working in architecture specific areas of the kernel - probably
	  not a good idea to enable this feature in a production kernel.

	  If you are unsure, say N.

config PPC_DEBUG_WX
	bool "Warn on W+X mappings at boot"
	depends on PPC_PTDUMP && STRICT_KERNEL_RWX
	help
	  Generate a warning if any W+X mappings are found at boot.

	  This is useful for discovering cases where the kernel is leaving
	  W+X mappings after applying NX, as such mappings are a security risk.

	  Note that even if the check fails, your kernel is possibly
	  still fine, as W+X mappings are not a security hole in
	  themselves, what they do is that they make the exploitation
	  of other unfixed kernel bugs easier.

	  There is no runtime or memory usage effect of this option
	  once the kernel has booted up - it's a one time check.

	  If in doubt, say "Y".

config PPC_FAST_ENDIAN_SWITCH
	bool "Deprecated fast endian-switch syscall"
	depends on DEBUG_KERNEL && PPC_BOOK3S_64
+1 −1
Original line number Diff line number Diff line
@@ -18,5 +18,5 @@ obj-$(CONFIG_PPC_MM_SLICES) += slice.o
obj-$(CONFIG_HUGETLB_PAGE)	+= hugetlbpage.o
obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-noncoherent.o
obj-$(CONFIG_PPC_COPRO_BASE)	+= copro_fault.o
obj-$(CONFIG_PPC_PTDUMP)	+= ptdump/
obj-$(CONFIG_PTDUMP_CORE)	+= ptdump/
obj-$(CONFIG_KASAN)		+= kasan/
+1 −1
Original line number Diff line number Diff line
@@ -180,7 +180,7 @@ static inline void mmu_mark_rodata_ro(void) { }
void __init mmu_mapin_immr(void);
#endif

#ifdef CONFIG_PPC_DEBUG_WX
#ifdef CONFIG_DEBUG_WX
void ptdump_check_wx(void);
#else
static inline void ptdump_check_wx(void) { }
+7 −2
Original line number Diff line number Diff line
@@ -5,5 +5,10 @@ obj-y += ptdump.o
obj-$(CONFIG_4xx)		+= shared.o
obj-$(CONFIG_PPC_8xx)		+= 8xx.o
obj-$(CONFIG_PPC_BOOK3E_MMU)	+= shared.o
obj-$(CONFIG_PPC_BOOK3S_32)	+= shared.o bats.o segment_regs.o
obj-$(CONFIG_PPC_BOOK3S_64)	+= book3s64.o hashpagetable.o
obj-$(CONFIG_PPC_BOOK3S_32)	+= shared.o
obj-$(CONFIG_PPC_BOOK3S_64)	+= book3s64.o

ifdef CONFIG_PTDUMP_DEBUGFS
obj-$(CONFIG_PPC_BOOK3S_32)	+= bats.o segment_regs.o
obj-$(CONFIG_PPC_BOOK3S_64)	+= hashpagetable.o
endif
Loading