blatt A1
Go to file
Peter Xu 51897f9935 mm/page_table_check: fix crash on ZONE_DEVICE
commit 8bb592c2eca8fd2bc06db7d80b38da18da4a2f43 upstream.

Not all pages may apply to pgtable check.  One example is ZONE_DEVICE
pages: they map PFNs directly, and they don't allocate page_ext at all
even if there's struct page around.  One may reference
devm_memremap_pages().

When both ZONE_DEVICE and page-table-check enabled, then try to map some
dax memories, one can trigger kernel bug constantly now when the kernel
was trying to inject some pfn maps on the dax device:

 kernel BUG at mm/page_table_check.c:55!

While it's pretty legal to use set_pxx_at() for ZONE_DEVICE pages for page
fault resolutions, skip all the checks if page_ext doesn't even exist in
pgtable checker, which applies to ZONE_DEVICE but maybe more.

Link: https://lkml.kernel.org/r/20240605212146.994486-1-peterx@redhat.com
Fixes: df4e817b71 ("mm: page table check")
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Alistair Popple <apopple@nvidia.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-06-27 13:46:22 +02:00
arch mm: mmap: allow for the maximum number of bits for randomizing mmap_base by default 2024-06-27 13:46:22 +02:00
block block/ioctl: prefer different overflow check 2024-06-27 13:46:15 +02:00
certs
crypto crypto: ecrdsa - Fix module auto-load on add_key 2024-06-16 13:41:37 +02:00
Documentation mm: fix race between __split_huge_pmd_locked() and GUP-fast 2024-06-16 13:41:38 +02:00
drivers drm/amdgpu: fix UBSAN warning in kv_dpm.c 2024-06-27 13:46:22 +02:00
fs cifs: fix typo in module parameter enable_gcm_256 2024-06-27 13:46:21 +02:00
include kcov: don't lose track of remote references during softirqs 2024-06-27 13:46:22 +02:00
init smp: Provide 'setup_max_cpus' definition on UP too 2024-06-16 13:41:42 +02:00
io_uring io_uring/sqpoll: work around a potential audit memory leak 2024-06-27 13:46:14 +02:00
ipc
kernel kcov: don't lose track of remote references during softirqs 2024-06-27 13:46:22 +02:00
lib maple_tree: fix mas_empty_area_rev() null pointer dereference 2024-06-16 13:41:31 +02:00
LICENSES
mm mm/page_table_check: fix crash on ZONE_DEVICE 2024-06-27 13:46:22 +02:00
net tcp: clear tp->retrans_stamp in tcp_rcv_fastopen_synack() 2024-06-27 13:46:22 +02:00
rust rust: macros: fix soundness issue in module! macro 2024-05-17 11:56:17 +02:00
samples work around gcc bugs with 'asm goto' with outputs 2024-02-23 09:12:28 +01:00
scripts scripts/gdb: fix SB_* constants parsing 2024-06-16 13:41:32 +02:00
security landlock: Fix d_parent walk 2024-06-21 14:35:43 +02:00
sound ALSA: hda/realtek: Limit mic boost on N14AP7 2024-06-27 13:46:22 +02:00
tools kselftest: arm64: Add a null pointer check 2024-06-27 13:46:15 +02:00
usr
virt KVM: Fix a data race on last_boosted_vcpu in kvm_vcpu_on_spin() 2024-06-27 13:46:21 +02:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS MAINTAINERS: add leah to 6.1 MAINTAINERS file 2024-05-17 11:56:16 +02:00
Makefile kbuild: Remove support for Clang's ThinLTO caching 2024-06-27 13:46:21 +02: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.