linux/drivers/hv
Nuno Das Neves ab3e7a78d8 mshv: Fix create memory region overlap check
[ Upstream commit ba9eb9b86d ]

The current check is incorrect; it only checks if the beginning or end
of a region is within an existing region. This doesn't account for
userspace specifying a region that begins before and ends after an
existing region.

Change the logic to a range intersection check against gfns and uaddrs
for each region.

Remove mshv_partition_region_by_uaddr() as it is no longer used.

Fixes: 621191d709 ("Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs")
Reported-by: Michael Kelley <mhklinux@outlook.com>
Closes: https://lore.kernel.org/linux-hyperv/SN6PR02MB41575BE0406D3AB22E1D7DB5D4C2A@SN6PR02MB4157.namprd02.prod.outlook.com/
Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-12-18 14:03:02 +01:00
..
channel.c Drivers: hv: Simplify data structures for VMBus channel close message 2025-09-08 22:11:03 +00:00
channel_mgmt.c Drivers: hv: Fix warnings for missing export.h header inclusion 2025-07-09 23:43:52 +00:00
connection.c Drivers: hv: Use nested hypercall for post message and signal event 2025-07-15 06:24:16 +00:00
hv.c Drivers: hv: Use nested hypercall for post message and signal event 2025-07-15 06:24:16 +00:00
hv_balloon.c hv_balloon: update the NR_BALLOON_PAGES state 2025-03-21 22:03:13 -07:00
hv_common.c mshv: Add support for a new parent partition configuration 2025-09-08 22:10:51 +00:00
hv_debugfs.c hv_debugfs: Make hv_debug_root static 2020-04-04 17:47:43 +01:00
hv_kvp.c hyperv: Switch from hyperv-tlfs.h to hyperv/hvhdk.h 2025-01-10 00:54:21 +00:00
hv_proc.c Drivers: hv: Fix warnings for missing export.h header inclusion 2025-07-09 23:43:52 +00:00
hv_snapshot.c hyperv: Switch from hyperv-tlfs.h to hyperv/hvhdk.h 2025-01-10 00:54:21 +00:00
hv_trace.c hv: add SPDX license to trace 2018-03-28 13:24:56 +02:00
hv_trace.h Drivers: hv: vmbus: Drivers: hv: vmbus: Introduce CHANNELMSG_MODIFYCHANNEL_RESPONSE 2021-04-18 13:03:11 +00:00
hv_trace_balloon.h hv_balloon: trace post_status 2018-03-06 09:57:17 -08:00
hv_util.c Drivers: hv: util: Avoid accessing a ringbuffer not initialized yet 2024-12-09 18:44:15 +00:00
hv_utils_transport.c Drivers: hv: util: Cosmetic changes for hv_utils_transport.c 2025-09-08 22:10:55 +00:00
hv_utils_transport.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 280 2019-06-05 17:36:36 +02:00
hyperv_vmbus.h uio_hv_generic: Fix sysfs creation path for ring buffer 2025-05-02 13:59:02 +02:00
Kconfig Drivers: hv: Make CONFIG_HYPERV bool 2025-10-01 00:00:45 +00:00
Makefile Drivers: hv: Make CONFIG_HYPERV bool 2025-10-01 00:00:45 +00:00
mshv.h mshv: Use common "entry virt" APIs to do work in root before running guest 2025-09-30 22:50:48 +00:00
mshv_common.c mshv: Use common "entry virt" APIs to do work in root before running guest 2025-09-30 22:50:48 +00:00
mshv_eventfd.c ARM: 2025-07-30 17:14:01 -07:00
mshv_eventfd.h Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-03-21 18:24:22 +00:00
mshv_irq.c Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-03-21 18:24:22 +00:00
mshv_portid_table.c Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-03-21 18:24:22 +00:00
mshv_root.h Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-03-21 18:24:22 +00:00
mshv_root_hv_call.c Drivers: hv: Fix warnings for missing export.h header inclusion 2025-07-09 23:43:52 +00:00
mshv_root_main.c mshv: Fix create memory region overlap check 2025-12-18 14:03:02 +01:00
mshv_synic.c Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-03-21 18:24:22 +00:00
ring_buffer.c Drivers: hv: Fix warnings for missing export.h header inclusion 2025-07-09 23:43:52 +00:00
vmbus_drv.c Drivers: hv: vmbus: Fix typos in vmbus_drv.c 2025-09-30 23:31:00 +00:00