No description
Find a file
Claudio Imbrenda c6fafaa6f2 KVM: s390: fix race in gmap_make_secure()
[ Upstream commit c148dc8e2f ]

Fix a potential race in gmap_make_secure() and remove the last user of
follow_page() without FOLL_GET.

The old code is locking something it doesn't have a reference to, and
as explained by Jason and David in this discussion:
https://lore.kernel.org/linux-mm/Y9J4P%2FRNvY1Ztn0Q@nvidia.com/
it can lead to all kind of bad things, including the page getting
unmapped (MADV_DONTNEED), freed, reallocated as a larger folio and the
unlock_page() would target the wrong bit.
There is also another race with the FOLL_WRITE, which could race
between the follow_page() and the get_locked_pte().

The main point is to remove the last use of follow_page() without
FOLL_GET or FOLL_PIN, removing the races can be considered a nice
bonus.

Link: https://lore.kernel.org/linux-mm/Y9J4P%2FRNvY1Ztn0Q@nvidia.com/
Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
Fixes: 214d9bbcd3 ("s390/mm: provide memory management functions for protected KVM guests")
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Message-Id: <20230428092753.27913-2-imbrenda@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-17 11:53:38 +02:00
arch KVM: s390: fix race in gmap_make_secure() 2023-05-17 11:53:38 +02:00
block block: Skip destroyed blkg when restart in blkg_destroy_all() 2023-05-17 11:53:33 +02:00
certs certs: Fix build error when PKCS#11 URI contains semicolon 2023-02-09 11:28:11 +01:00
crypto crypto: drbg - Only fail when jent is unavailable in FIPS mode 2023-05-11 23:03:21 +09:00
Documentation ASoC: dt-bindings: qcom,lpass-rx-macro: correct minItems for clocks 2023-05-11 23:03:05 +09:00
drivers drm/amdgpu: add a missing lock for AMDGPU_SCHED 2023-05-17 11:53:37 +02:00
fs writeback: fix call of incorrect macro 2023-05-17 11:53:33 +02:00
include netfilter: nf_tables: deactivate anonymous set from preparation phase 2023-05-11 23:03:42 +09:00
init gcc: disable '-Warray-bounds' for gcc-13 too 2023-04-26 14:28:43 +02:00
io_uring io_uring/rsrc: use nospec'ed indexes 2023-05-11 23:03:24 +09:00
ipc ipc: fix memory leak in init_mqueue_fs() 2022-12-31 13:32:01 +01:00
kernel kcsan: Avoid READ_ONCE() in read_instrumented_memory() 2023-05-11 23:03:40 +09:00
lib debugobject: Ensure pool refill (again) 2023-05-11 23:03:42 +09:00
LICENSES
mm mm/mempolicy: correctly update prev when policy is equal on mbind 2023-05-11 23:03:41 +09:00
net af_packet: Don't send zero-byte data in packet_sendmsg_spkt(). 2023-05-17 11:53:37 +02:00
rust rust: kernel: Mark rust_fmt_argument as extern "C" 2023-04-26 14:28:38 +02:00
samples ftrace: Export ftrace_free_filter() to modules 2023-02-01 08:34:37 +01:00
scripts scripts/gdb: fix lx-timerlist for Python3 2023-05-11 23:03:40 +09:00
security selinux: ensure av_permissions.h is built when needed 2023-05-11 23:03:06 +09:00
sound ALSA: caiaq: input: Add error handling for unsupported input methods in snd_usb_caiaq_input_init 2023-05-17 11:53:37 +02:00
tools selftests: netfilter: fix libmnl pkg-config usage 2023-05-17 11:53:35 +02:00
usr
virt KVM: Register /dev/kvm as the _very_ last thing during initialization 2023-03-10 09:34:11 +01:00
.clang-format inet: ping: use hlist_nulls rcu iterator during lookup 2022-12-01 12:42:46 +01:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap 9 hotfixes. 6 for MM, 3 for other areas. Four of these patches address 2022-12-10 17:10:52 -08:00
.rustfmt.toml
COPYING
CREDITS MAINTAINERS: Remove Michal Marek from Kbuild maintainers 2022-11-16 14:53:00 +09:00
Kbuild
Kconfig
MAINTAINERS audit: update the mailing list in MAINTAINERS 2023-02-25 11:25:42 +01:00
Makefile Linux 6.1.28 2023-05-11 23:04:52 +09:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.