android_kernel_motorola_sm6375/drivers/xen
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Harshit Mogalapalli 4f983ee5e5 xen/privcmd: Fix a possible warning in privcmd_ioctl_mmap_resource()
[ Upstream commit 8b997b2bb2c53b76a6db6c195930e9ab8e4b0c79 ]

As 'kdata.num' is user-controlled data, if user tries to allocate
memory larger than(>=) MAX_ORDER, then kcalloc() will fail, it
creates a stack trace and messes up dmesg with a warning.

Call trace:
-> privcmd_ioctl
--> privcmd_ioctl_mmap_resource

Add __GFP_NOWARN in order to avoid too large allocation warning.
This is detected by static analysis using smatch.

Fixes: 3ad0876554 ("xen/privcmd: add IOCTL_PRIVCMD_MMAP_RESOURCE")
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/20221126050745.778967-1-harshit.m.mogalapalli@oracle.com
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-18 11:40:57 +01:00
..
events xen/events: only register debug interrupt for 2-level events 2023-01-18 11:40:57 +01:00
xen-pciback
xenbus xen/xenbus: fix return type in xenbus_file_read() 2022-08-25 11:18:26 +02:00
xenfs
acpi.c
arm-device.c
balloon.c
biomerge.c
cpu_hotplug.c
dbgp.c
efi.c
evtchn.c
features.c x86/xen: Remove undefined behavior in setup_features() 2022-06-29 08:58:46 +02:00
gntalloc.c
gntdev-common.h xen/gntdev: Avoid blocking in unmap_grant_pages() 2022-07-07 17:36:50 +02:00
gntdev-dmabuf.c
gntdev-dmabuf.h
gntdev.c xen/gntdev: Prevent leaking grants 2022-11-03 23:56:54 +09:00
grant-table.c xen/gnttab: fix gnttab_end_foreign_access() without page specified 2022-03-11 11:22:39 +01:00
Kconfig
Makefile
manage.c
mcelog.c
mem-reservation.c
pci.c
pcpu.c xen/pcpu: fix possible memory leak in register_pcpu() 2022-11-25 17:42:16 +01:00
platform-pci.c xen/platform-pci: add missing free_irq() in error path 2022-12-08 11:23:00 +01:00
preempt.c
privcmd-buf.c
privcmd.c xen/privcmd: Fix a possible warning in privcmd_ioctl_mmap_resource() 2023-01-18 11:40:57 +01:00
privcmd.h
pvcalls-back.c
pvcalls-front.c xen/pvcalls: use alloc/free_pages_exact() 2022-03-11 11:22:39 +01:00
pvcalls-front.h
swiotlb-xen.c
sys-hypervisor.c
time.c
xen-acpi-cpuhotplug.c
xen-acpi-memhotplug.c
xen-acpi-pad.c
xen-acpi-processor.c
xen-balloon.c
xen-front-pgdir-shbuf.c
xen-scsiback.c
xen-stub.c
xlate_mmu.c xen: unexport __init-annotated xen_xlate_map_ballooned_pages() 2022-06-14 18:11:57 +02:00