linux-stable/arch/mips
Florian Fainelli 5a2515b4b6 MIPS: Fixed __debug_virt_addr_valid()
[ Upstream commit 8a2b456665 ]

It is permissible for kernel code to call virt_to_phys() against virtual
addresses that are in KSEG0 or KSEG1 and we need to be dealing with both
types. Rewrite the test condition to ensure that the kernel virtual
addresses are above PAGE_OFFSET which they must be, and below KSEG2
where the non-linear mapping starts.

For EVA, there is not much that we can do given the linear address range
that is offered, so just return any virtual address as being valid.

Finally, when HIGHMEM is not enabled, all virtual addresses are assumed
to be valid as well.

Fixes: dfad83cb71 ("MIPS: Add support for CONFIG_DEBUG_VIRTUAL")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-08-17 14:42:06 +02:00
..
alchemy mips: alchemy: remove historic comment on gpio build constraints 2021-12-16 15:48:32 +01:00
ar7
ath25 MIPS: ath25: Constify static irq_domain_ops 2022-02-22 09:39:03 +01:00
ath79 MIPS: Remove redundant definitions of device_tree_init() 2022-03-14 15:09:02 +01:00
bcm47xx MIPS: BCM47XX: Add support for Netgear WN2500RP v1 & v2 2022-01-09 15:41:50 +01:00
bcm63xx linux-watchdog 5.17-rc1 tag 2022-01-17 08:07:57 +02:00
bmips MIPS: bmips: Remove obsolete DMA mapping support 2022-01-11 11:55:41 +01:00
boot Staging driver update for 5.18-rc1 2022-03-28 12:50:50 -07:00
cavium-octeon MIPS: OCTEON: Constify static irq_domain_ops 2022-02-22 09:38:50 +01:00
cobalt
configs - added support for QCN550x (ath79) 2022-03-25 09:35:19 -07:00
crypto MIPS: crypto: Fix CRC32 code 2022-04-01 10:19:03 +02:00
dec DEC: Limit PMAX memory probing to R3k systems 2022-03-07 13:10:44 +01:00
fw
generic MIPS: new Kconfig option ZBOOT_LOAD_ADDRESS 2022-01-02 14:17:30 +01:00
include MIPS: IP30: Remove incorrect `cpu_has_fpu' override 2022-06-09 10:30:51 +02:00
ingenic
jazz
kernel MIPS: vdso: Utilize __pa() for gic_pfn 2022-08-17 14:42:05 +02:00
kvm ARM: 2022-02-05 09:55:59 -08:00
lantiq MIPS: lantiq: check the return value of kzalloc() 2022-03-30 20:25:48 +02:00
lib MIPS: Only use current_stack_pointer on GCC 2022-03-14 15:02:53 +01:00
loongson2ef MIPS: Loongson{2ef,64}: Wrap -mno-branch-likely with cc-option 2022-02-07 18:30:12 +01:00
loongson32
loongson64 MIPS: Loongson64: Fix section mismatch warning 2022-08-17 14:42:03 +02:00
math-emu
mm MIPS: Fixed __debug_virt_addr_valid() 2022-08-17 14:42:06 +02:00
mti-malta MIPS: Remove redundant definitions of device_tree_init() 2022-03-14 15:09:02 +01:00
n64
net Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2021-12-10 15:56:13 -08:00
pci pci-v5.18-changes 2022-03-25 13:02:05 -07:00
pic32 MIPS: Remove redundant definitions of device_tree_init() 2022-03-14 15:09:02 +01:00
power
ralink Staging driver update for 5.18-rc1 2022-03-28 12:50:50 -07:00
rb532 MIPS: rb532: move GPIOD definition into C-files 2022-03-30 20:26:26 +02:00
sgi-ip22 mips: sgi-ip22: add a check for the return of kzalloc() 2022-03-30 20:25:11 +02:00
sgi-ip27 MIPS: Fix build error for loongson64 and sgi-ip27 2022-03-24 09:45:15 +01:00
sgi-ip30
sgi-ip32
sibyte MIPS: sibyte: Add missing __user annotations in sb_tbprof.c 2022-02-22 09:36:04 +01:00
sni
tools
txx9 MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
vdso mips: Enable KCSAN 2022-02-07 18:31:57 +01:00
vr41xx MIPS: Remove repetitive increase irq_err_count 2022-06-29 09:04:33 +02:00
Kbuild
Kbuild.platforms MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
Kconfig MIPS: Fix build error for loongson64 and sgi-ip27 2022-03-24 09:45:15 +01:00
Kconfig.debug
Makefile mips: Always permit to build u-boot images 2022-03-07 13:11:20 +01:00
Makefile.postlink