linux/Documentation
Thomas Huth 2def950c63 KVM: arm64: Limit length in kvm_vm_ioctl_mte_copy_tags() to INT_MAX
In case of success, this function returns the amount of handled bytes.
However, this does not work for large values: The function is called
from kvm_arch_vm_ioctl() (which still returns a long), which in turn
is called from kvm_vm_ioctl() in virt/kvm/kvm_main.c. And that function
stores the return value in an "int r" variable. So the upper 32-bits
of the "long" return value are lost there.

KVM ioctl functions should only return "int" values, so let's limit
the amount of bytes that can be requested here to INT_MAX to avoid
the problem with the truncated return value. We can then also change
the return type of the function to "int" to make it clearer that it
is not possible to return a "long" here.

Fixes: f0376edb1d ("KVM: arm64: Add ioctl to fetch/store tags in a guest")
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Message-Id: <20230208140105.655814-5-thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
History 2023-03-16 10:18:06 -04:00
..
ABI docs: sysfs-block: document hidden sysfs entry 2023-03-07 16:40:52 -07:00
accel Documentation: accel: escape wildcard in special file path 2023-01-26 11:52:14 +02:00
accounting filemap: make the accounting of thrashing more consistent 2022-09-26 19:46:06 -07:00
admin-guide A small set of updates for x86: 2023-03-05 11:27:48 -08:00
arc docs: ARC: Improve readability 2021-12-10 14:28:01 -07:00
arm ARM: s3c: remove all s3c24xx support 2023-01-16 09:26:05 +01:00
arm64 arm64 updates for 6.3: 2023-02-21 15:27:48 -08:00
block block: stub out and deprecated the capability attribute on the gendisk 2023-02-06 08:44:55 -07:00
bpf bpf, doc: Link to submitting-patches.rst for general patch submission info 2023-03-06 16:44:39 +01:00
cdrom It was a moderately busy cycle for documentation; highlights include: 2022-05-25 11:17:41 -07:00
core-api - Daniel Verkamp has contributed a memfd series ("mm/memfd: add 2023-02-23 17:09:35 -08:00
cpu-freq Docs/subsystem-apis: Remove '[The ]Linux' prefixes from titles of listed documents 2023-01-24 15:27:08 -07:00
crypto Docs/subsystem-apis: Remove '[The ]Linux' prefixes from titles of listed documents 2023-01-24 15:27:08 -07:00
dev-tools - Daniel Verkamp has contributed a memfd series ("mm/memfd: add 2023-02-23 17:09:35 -08:00
devicetree sound fixes for 6.3-rc1 2023-03-04 10:53:59 -08:00
doc-guide Merge branch 'alabaster-rb' into docs-mw 2022-10-18 16:29:50 -06:00
driver-api media updates for v6.3-rc1 2023-02-26 11:47:26 -08:00
fault-injection docs: fault-injection: add requirements of error injectable functions 2023-02-02 22:50:00 -08:00
fb drm/modes: Introduce more named modes 2022-11-24 12:42:40 +01:00
features m68k: Add kernel seccomp support 2023-01-30 16:40:15 +01:00
filesystems Bug fixes and regressions for ext4, the most serious of which is a 2023-03-12 08:55:55 -07:00
firmware-guide Documentation: firmware-guide: gpio-properties: Clarify Explicit and Implicit 2023-02-14 15:50:09 +01:00
firmware_class firmware: revamp firmware documentation 2017-01-11 09:42:59 +01:00
fpga Documentation: fpga: dfl: Add documentation for DFHv1 2023-01-19 16:07:40 +01:00
gpu drm next for 6.3-rc1 2023-02-22 18:28:03 -08:00
hid It has been a moderately calm cycle for documentation; the significant 2023-02-22 12:00:20 -08:00
hwmon It has been a moderately calm cycle for documentation; the significant 2023-02-22 12:00:20 -08:00
i2c Documentation: i2c: correct spelling 2023-02-15 20:59:44 +01:00
ia64 docs: ia64: Fix a typo ("identify mappings") 2022-11-09 14:03:51 -07:00
iio docs: iio: add documentation for BNO055 driver 2022-09-21 18:42:56 +01:00
images docs: add SVG version of the Linux logo 2022-06-01 09:32:45 -06:00
infiniband RDMA/core: Remove FMR device ops 2020-06-02 20:32:54 -03:00
input Docs/subsystem-apis: Remove '[The ]Linux' prefixes from titles of listed documents 2023-01-24 15:27:08 -07:00
isdn Documentation: isdn: correct spelling 2023-02-10 16:28:13 -08:00
kbuild Kbuild updates for v6.3 2023-02-26 11:53:25 -08:00
kernel-hacking docs: locking: Discourage from calling disable_irq() in atomic 2023-01-11 19:45:26 +01:00
leds - Remove Drivers 2023-02-23 15:09:31 -08:00
litmus-tests Documentation/litmus-tests: Add note on herd7 7.56 in atomic litmus test 2020-06-29 12:05:18 -07:00
livepatch Documentation: livepatch: module-elf-format: Remove local klp_modinfo definition 2023-02-06 08:45:55 -08:00
locking docs: locking: refer to the actual existing config names 2023-02-23 12:26:00 -07:00
loongarch This was a not-too-busy cycle for documentation; highlights include: 2022-12-12 17:18:50 -08:00
m68k video: fbdev: atari: Fix inverse handling 2022-07-18 07:56:17 +02:00
maintainer docs, nvme: add a feature and quirk policy document 2022-12-28 05:37:12 -10:00
mhi docs: Add documentation for MHI bus 2020-03-19 07:41:04 +01:00
mips docs: archis: add a per-architecture features list 2020-12-03 15:10:15 -07:00
misc-devices Documentation: Wire Oxford Semiconductor PCIe (Tornado) 950 2022-05-19 18:24:22 +02:00
mm - Daniel Verkamp has contributed a memfd series ("mm/memfd: add 2023-02-23 17:09:35 -08:00
netlabel docs: add some directories to the main documentation index 2019-07-15 11:03:03 -03:00
netlink ynl: re-license uniformly under GPL-2.0 OR BSD-3-Clause 2023-03-07 13:44:30 -08:00
networking Including fixes from wireless and netfilter. 2023-02-27 14:05:08 -08:00
nios2 docs: nios2: add missing ReST file 2020-12-07 08:35:21 -07:00
nvdimm nvdimm: fixes to maintainter-entry-profile 2020-05-25 10:19:19 -06:00
nvme docs, nvme: add a feature and quirk policy document 2022-12-28 05:37:12 -10:00
openrisc docs: archis: add a per-architecture features list 2020-12-03 15:10:15 -07:00
parisc docs: archis: add a per-architecture features list 2020-12-03 15:10:15 -07:00
PCI Docs/subsystem-apis: Remove '[The ]Linux' prefixes from titles of listed documents 2023-01-24 15:27:08 -07:00
pcmcia docs: add some directories to the main documentation index 2019-07-15 11:03:03 -03:00
peci Docs/subsystem-apis: Remove '[The ]Linux' prefixes from titles of listed documents 2023-01-24 15:27:08 -07:00
power Power management updates for 6.3-rc1 2023-02-21 12:13:58 -08:00
powerpc docs: powerpc: add POWER9 and POWER10 to CPU families 2022-11-24 23:31:47 +11:00
process A handful of documentation patches that were ready before the merge window, 2023-02-28 16:01:08 -08:00
RCU doc: Fix htmldocs build warnings of stallwarn.rst 2023-01-05 11:27:56 -08:00
riscv Documentation: riscv: fix insufficient list item indent 2023-02-14 16:00:02 -08:00
rust Documentation: rust: Fix arch support table 2023-02-13 10:14:32 +01:00
s390 VFIO updates for v6.3-rc1 2023-02-25 11:52:57 -08:00
scheduler RISC-V Patches for the 6.3 Merge Window, Part 1 2023-02-25 11:14:08 -08:00
scsi SCSI misc on 20230222 2023-02-22 13:41:41 -08:00
security landlock: Explain file descriptor access rights 2023-01-13 20:40:35 +01:00
sh docs: archis: add a per-architecture features list 2020-12-03 15:10:15 -07:00
sound It has been a moderately calm cycle for documentation; the significant 2023-02-22 12:00:20 -08:00
sparc Documentation: sparc: correct spelling 2023-02-02 11:07:02 -07:00
sphinx docs: Use HTML comments for the kernel-toc SPDX line 2023-02-16 16:06:44 -07:00
sphinx-static docs: Add more information to the HTML sidebar 2023-02-08 13:28:27 -07:00
spi spi: correct spelling 2023-01-27 12:14:17 +00:00
staging docs: put atomic*.txt and memory-barriers.txt into the core-api book 2022-09-29 12:55:06 -06:00
target scsi: target: Documentation: Correct spelling 2023-02-08 18:49:48 -05:00
timers Documentation: Replace del_timer/del_timer_sync() 2022-11-24 15:09:11 +01:00
tools Documentation/rtla: Add hwnoise man page 2023-02-13 23:56:46 -05:00
trace Char/Misc and other driver subsystem changes for 6.3-rc1 2023-02-24 12:47:33 -08:00
translations A handful of documentation patches that were ready before the merge window, 2023-02-28 16:01:08 -08:00
usb usb: gadget: configfs: Support arbitrary string descriptors 2023-02-07 08:46:36 +01:00
userspace-api ynl: re-license uniformly under GPL-2.0 OR BSD-3-Clause 2023-03-07 13:44:30 -08:00
virt KVM: arm64: Limit length in kvm_vm_ioctl_mte_copy_tags() to INT_MAX 2023-03-16 10:18:06 -04:00
w1 Documentation: W1: minor typo corrections 2022-09-27 13:21:44 -06:00
watchdog Documentation/watchdog/hpwdt: Fix Format 2023-02-16 17:31:29 -07:00
x86 It has been a moderately calm cycle for documentation; the significant 2023-02-22 12:00:20 -08:00
xtensa A much quieter cycle for documentation (happily), with, one hopes, the bulk 2020-12-14 16:55:54 -08:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
arch.rst Documentation: LoongArch: Add basic documentations 2022-06-03 20:09:27 +08:00
atomic_bitops.txt wait_on_bit: add an acquire memory barrier 2022-08-26 09:30:25 -07:00
atomic_t.txt Documentation: Fixed a typo in atomic_t.txt 2023-01-03 20:47:04 -08:00
Changes docs: add back 'Documentation/Changes' file (as symlink) 2016-12-14 16:30:12 -08:00
CodingStyle doc: re-add CodingStyle and SubmittingPatches 2016-10-24 08:12:35 -02:00
conf.py It has been a moderately calm cycle for documentation; the significant 2023-02-22 12:00:20 -08:00
docutils.conf doc-rst: Add missing newline at end of file 2019-06-20 14:16:56 -06:00
dontdiff scripts: remove bin2c 2023-01-26 12:43:33 +09:00
index.rst Documentation: front page: use recommended heading adornments 2023-02-23 12:44:51 -07:00
Kconfig Documentation: Avoid duplicate Kconfig inclusion 2023-01-19 13:56:34 -07:00
Makefile kbuild: do not print extra logs for V=2 2023-01-22 23:43:32 +09:00
memory-barriers.txt locking/memory-barriers.txt: Improve documentation for writel() example 2023-01-03 20:47:04 -08:00
SubmittingPatches doc: re-add CodingStyle and SubmittingPatches 2016-10-24 08:12:35 -02:00
subsystem-apis.rst doc: add documentation for accel subsystem 2022-11-22 13:14:52 +02:00