Go to file
York Jasper Niebuhr 932b59e3be mm: fix process_vm_rw page counts
1. There is a "-1" missing in the page number calculation in
   process_vm_rw_core.  While this can't break anything, it can cause
   unnecessary allocations in certain cases:

   Consider handling an iovec ranging over PVM_MAX_PP_ARRAY_COUNT pages
   that is also aligned to a page boundary.  While pp_stack could hold
   references to such an amount of pinned pages, nr_pages yields
   (PVM_MAX_PP_ARRAY + 1) in process_vm_rw_core.  Consequently, a larger
   buffer is allocated with kmalloc for no reason.

   For any page boundary aligned iovec that is a multiple of PAGE_SIZE
   and larger than PVM_MAX_PP_ARRAY_COUNT pages, nr_pages will be too big
   by 1 and thus kmalloc allocates excess space for one more pointer.

2. max_pages_per_loop is constant and there is no reason to have it as
   a variable.  A macro does the job just fine and saves memory.

3. Replaced "sizeof(struct pages *)" with "sizeof(struct page *)" to
   have matching types for allocation and prevent confusion.

Link: https://lkml.kernel.org/r/20231111184859.44264-1-yjnworkstation@gmail.com
Signed-off-by: York Jasper Niebuhr <yjnworkstation@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-12-10 16:51:39 -08:00
Documentation fs/proc/task_mmu: report SOFT_DIRTY bits through the PAGEMAP_SCAN ioctl 2023-12-10 16:51:35 -08:00
LICENSES
arch NUMA: optimize detection of memory with no node id assigned by firmware 2023-12-10 16:51:34 -08:00
block block-6.7-2023-12-01 2023-12-02 06:39:30 +09:00
certs This update includes the following changes: 2023-11-02 16:15:30 -10:00
crypto This push fixes a regression in ahash and hides the Kconfig sub-options for the jitter RNG. 2023-11-09 17:04:58 -08:00
drivers dax/kmem: allow kmem to add memory with memmap_on_memory 2023-12-10 16:51:35 -08:00
fs smb: do not test the return value of folio_start_writeback() 2023-12-10 16:51:37 -08:00
include gfp: include __GFP_NOWARN in GFP_NOWAIT 2023-12-10 16:51:39 -08:00
init As usual, lots of singleton and doubleton patches all over the tree and 2023-11-02 20:53:31 -10:00
io_uring io_uring: use fget/fput consistently 2023-11-28 11:56:29 -07:00
ipc Many singleton patches against the MM code. The patch series which are 2023-11-02 19:38:47 -10:00
kernel fork: use __mt_dup() to duplicate maple tree in dup_mmap() 2023-12-10 16:51:34 -08:00
lib maple_tree: preserve the tree attributes when destroying maple tree 2023-12-10 16:51:33 -08:00
mm mm: fix process_vm_rw page counts 2023-12-10 16:51:39 -08:00
net wireless fixes: 2023-11-29 19:43:34 -08:00
rust Kbuild updates for v6.7 2023-11-04 08:07:19 -10:00
samples Landlock updates for v6.7-rc1 2023-11-03 09:28:53 -10:00
scripts Merge branch 'master' into mm-hotfixes-stable 2023-12-06 17:03:50 -08:00
security + Features 2023-11-03 09:48:17 -10:00
sound ALSA: hda: Disable power-save on KONTRON SinglePC 2023-11-30 16:14:21 +01:00
tools selftests/mm: check that PAGEMAP_SCAN returns correct categories 2023-12-10 16:51:35 -08:00
usr arch: Remove Itanium (IA-64) architecture 2023-09-11 08:13:17 +00:00
virt ARM: 2023-09-07 13:52:20 -07:00
.clang-format iommu: Add for_each_group_device() 2023-05-23 08:15:51 +02:00
.cocciconfig
.get_maintainer.ignore
.gitattributes .gitattributes: set diff driver for Rust source code files 2023-05-31 17:48:25 +02:00
.gitignore kbuild: rpm-pkg: generate kernel.spec in rpmbuild/SPECS/ 2023-10-03 20:49:09 +09:00
.mailmap .mailmap: add a new address mapping for Chester Lin 2023-12-06 16:12:45 -08:00
.rustfmt.toml
COPYING
CREDITS MAINTAINERS: drop Antti Palosaari 2023-12-06 16:12:49 -08:00
Kbuild
Kconfig
MAINTAINERS Merge branch 'master' into mm-hotfixes-stable 2023-12-06 17:03:50 -08:00
Makefile Linux 6.7-rc4 2023-12-03 18:52:56 +09:00
README

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.