linux_dsm_epyc7002/arch/riscv/include/asm
Alexandre Ghiti 4fccb50ec9 riscv: virt_addr_valid must check the address belongs to linear mapping
[ Upstream commit 2ab543823322b564f205cb15d0f0302803c87d11 ]

virt_addr_valid macro checks that a virtual address is valid, ie that
the address belongs to the linear mapping and that the corresponding
 physical page exists.

Add the missing check that ensures the virtual address belongs to the
linear mapping, otherwise __virt_to_phys, when compiled with
CONFIG_DEBUG_VIRTUAL enabled, raises a WARN that is interpreted as a
kernel bug by syzbot.

Signed-off-by: Alexandre Ghiti <alex@ghiti.fr>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-02-17 11:02:23 +01:00
..
vdso RISC-V: fix barrier() use in <vdso/processor.h> 2020-11-25 09:44:27 -08:00
asm-offsets.h
asm-prototypes.h riscv: Less inefficient gcc tishift helpers (and export their symbols) 2020-01-18 19:13:41 -08:00
asm.h RISC-V: Clear load reservations while restoring hart contexts 2019-10-01 13:16:40 -07:00
atomic.h locking/atomic: Move ATOMIC_INIT into linux/types.h 2020-07-29 16:14:18 +02:00
barrier.h RISC-V: Upgrade smp_mb__after_spinlock() to iorw,iorw 2020-07-17 09:28:35 -07:00
bitops.h RISC-V patches for v5.2-rc6 2019-06-17 10:34:03 -07:00
bug.h riscv: add macro to get instruction length 2020-03-26 09:24:49 -07:00
cache.h riscv: add nommu support 2019-11-17 15:17:39 -08:00
cacheflush.h mm: rename flush_icache_user_range to flush_icache_user_page 2020-06-08 11:05:58 -07:00
cacheinfo.h riscv: Add cache information in AUX vector 2020-09-15 18:46:08 -07:00
clint.h RISC-V: Resurrect the MMIO timer implementation for M-mode systems 2020-09-19 13:21:11 -07:00
clocksource.h riscv: use vDSO common flow to reduce the latency of the time-related functions 2020-06-10 19:47:16 -07:00
cmpxchg.h riscv/atomic: Fix sign extension for RV64I 2020-06-12 12:07:58 -07:00
cpu_ops.h RISC-V: Support cpu hotplug 2020-03-31 11:28:30 -07:00
csr.h RISC-V: Remove N-extension related defines 2020-05-04 14:09:00 -07:00
current.h RISC-V: Stop relying on GCC's register allocator's hueristics 2020-03-03 10:28:13 -08:00
delay.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 286 2019-06-05 17:36:37 +02:00
efi.h RISC-V: Add EFI runtime services 2020-10-02 14:31:28 -07:00
elf.h riscv: Add cache information in AUX vector 2020-09-15 18:46:08 -07:00
fence.h
fixmap.h RISC-V: Add early ioremap support 2020-10-02 14:31:03 -07:00
ftrace.h RISC-V: Take text_mutex in ftrace_init_nop() 2020-09-11 12:15:21 -07:00
futex.h futex: arch_futex_atomic_op_inuser() calling conventions change 2020-03-27 23:58:51 -04:00
gdb_xml.h riscv: Avoid kgdb.h including gdb_xml.h to solve unused-const-variable warning 2020-07-09 20:12:28 -07:00
hugetlb.h mm/hugetlb: define a generic fallback for arch_clear_hugepage_flags() 2020-06-03 20:09:46 -07:00
hwcap.h RISC-V: Add bitmap reprensenting ISA features common across CPUs 2020-05-04 14:08:59 -07:00
image.h RISC-V: Typo fixes in image header and documentation. 2019-12-19 09:32:45 -07:00
io.h RISC-V: Add early ioremap support 2020-10-02 14:31:03 -07:00
irq_work.h riscv: Support irq_work via self IPIs 2020-07-30 11:37:33 -07:00
irq.h clocksource/drivers/timer-riscv: Use per-CPU timer interrupt 2020-06-09 19:11:22 -07:00
irqflags.h riscv: abstract out CSR names for supervisor vs machine mode 2019-11-05 09:20:42 -08:00
jump_label.h riscv: Add jump-label implementation 2020-07-30 11:37:43 -07:00
kasan.h mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
Kbuild local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
kdebug.h riscv: Add KGDB support 2020-05-18 11:38:10 -07:00
kgdb.h riscv: Avoid kgdb.h including gdb_xml.h to solve unused-const-variable warning 2020-07-09 20:12:28 -07:00
kprobes.h riscv: clean up the macro format in each header file 2019-11-12 12:04:52 -08:00
linkage.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 286 2019-06-05 17:36:37 +02:00
mmio.h riscv: Use generic pgprot_* macros from <linux/pgtable.h> 2020-07-30 11:37:46 -07:00
mmiowb.h riscv: mmiowb: Fix implicit declaration of function 'smp_processor_id' 2020-05-13 17:11:46 -07:00
mmu_context.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 286 2019-06-05 17:36:37 +02:00
mmu.h RISC-V: Add EFI runtime services 2020-10-02 14:31:28 -07:00
module.h arch: split MODULE_ARCH_VERMAGIC definitions out to <asm/vermagic.h> 2020-04-23 10:50:26 +09:00
module.lds.h kbuild: preprocess module linker script 2020-09-25 00:36:41 +09:00
page.h riscv: virt_addr_valid must check the address belongs to linear mapping 2021-02-17 11:02:23 +01:00
parse_asm.h riscv: Add SW single-step support for KDB 2020-05-18 11:38:12 -07:00
patch.h riscv: Remove the 'riscv_' prefix of function name 2020-05-18 11:38:13 -07:00
pci.h riscv: clean up the macro format in each header file 2019-11-12 12:04:52 -08:00
perf_event.h riscv: perf: RISCV_BASE_PMU should be independent 2020-05-12 16:21:46 -07:00
pgalloc.h asm-generic: pgalloc: provide generic pgd_free() 2020-08-07 11:33:26 -07:00
pgtable-32.h arch: pgtable: define MAX_POSSIBLE_PHYSMEM_BITS where needed 2020-11-16 16:57:18 +01:00
pgtable-64.h mm: consolidate pte_index() and pte_offset_*() definitions 2020-06-09 09:39:14 -07:00
pgtable-bits.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 286 2019-06-05 17:36:37 +02:00
pgtable.h riscv: Drop a duplicated PAGE_KERNEL_EXEC 2021-01-19 18:27:20 +01:00
processor.h riscv: use vDSO common flow to reduce the latency of the time-related functions 2020-06-10 19:47:16 -07:00
ptdump.h riscv: support DEBUG_WX 2020-06-03 20:09:50 -07:00
ptrace.h riscv: abstract out CSR names for supervisor vs machine mode 2019-11-05 09:20:42 -08:00
sbi.h RISC-V: Add SBI HSM extension definitions 2020-03-31 11:26:05 -07:00
seccomp.h riscv: add support for SECCOMP and SECCOMP_FILTER 2019-10-29 11:32:10 -07:00
sections.h RISC-V: Add PE/COFF header for EFI stub 2020-10-02 14:31:16 -07:00
set_memory.h RISC-V: Remove unused code from STRICT_KERNEL_RWX 2020-05-05 17:02:14 -07:00
smp.h RISC-V: Add mechanism to provide custom IPI operations 2020-08-20 10:55:40 -07:00
soc.h treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
sparsemem.h riscv: clean up the macro format in each header file 2019-11-12 12:04:52 -08:00
spinlock_types.h riscv: clean up the macro format in each header file 2019-11-12 12:04:52 -08:00
spinlock.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 286 2019-06-05 17:36:37 +02:00
stackprotector.h RISC-V: Check clint_time_val before use 2020-09-30 11:05:14 -07:00
string.h riscv: Add KASAN support 2020-01-22 13:09:58 -08:00
switch_to.h riscv: abstract out CSR names for supervisor vs machine mode 2019-11-05 09:20:42 -08:00
syscall.h riscv: fix seccomp reject syscall code path 2020-03-05 13:58:15 -08:00
thread_info.h riscv: remove address space overrides using set_fs() 2020-10-04 10:27:10 -07:00
timex.h RISC-V: Define get_cycles64() regardless of M-mode 2020-12-10 17:39:43 -08:00
tlb.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 286 2019-06-05 17:36:37 +02:00
tlbflush.h riscv: add nommu support 2019-11-17 15:17:39 -08:00
uaccess.h riscv: uaccess: fix __put_kernel_nofault() 2020-11-06 00:03:46 -08:00
unistd.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 286 2019-06-05 17:36:37 +02:00
vdso.h riscv: Fixup CONFIG_GENERIC_TIME_VSYSCALL 2021-01-19 18:27:20 +01:00
vermagic.h arch: split MODULE_ARCH_VERMAGIC definitions out to <asm/vermagic.h> 2020-04-23 10:50:26 +09:00
vmalloc.h mm/vmalloc: Add empty <asm/vmalloc.h> headers and use them from <linux/vmalloc.h> 2019-12-10 10:12:55 +01:00
word-at-a-time.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 286 2019-06-05 17:36:37 +02:00