Skip to content

Commit c145da3

Browse files
committed
Merge: mm: update subsystem to v6.13
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/602 JIRA: https://issues.redhat.com/browse/RHEL-78135 JIRA: https://issues.redhat.com/browse/RHEL-83252 JIRA: https://issues.redhat.com/browse/RHEL-80531 JIRA: https://issues.redhat.com/browse/RHEL-78991 JIRA: https://issues.redhat.com/browse/RHEL-78681 CVE: CVE-2025-21869 CVE: CVE-2025-21866 CVE: CVE-2025-21861 CVE: CVE-2025-21860 CVE: CVE-2025-21696 CVE: CVE-2025-21693 CVE: CVE-2025-21691 CVE: CVE-2025-21665 CVE: CVE-2024-57886 CVE: CVE-2024-57883 CVE: CVE-2024-57881 CVE: CVE-2024-57878 CVE: CVE-2024-57877 CVE: CVE-2024-57874 CVE: CVE-2024-56612 CVE: CVE-2024-56560 CVE: CVE-2024-56559 CVE: CVE-2024-52319 CVE: CVE-2024-51729 Depends: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/663 This MR updates the MM subsystem from v6.12 to v6.13 including arch updates to all supported archs and follow up fixes up to v6.14-rc7. Please, also note the following: - There's a new config for arm64: CONFIG_ARM64_HAFT, which is enabled by default - I skipped memcg upstream commit 2b1d554 due to bad conflict with downstream-only be64087 ("mm/memcg: Free percpu stats memory of dying memcg's"). I'll ask the memcg engineers to look at this one - The following upstream commit fixes may be applicable to this series but will be backported by a future proactive fixes backport: 3ef32d9, c380931, b66e2ee, 7d953a0, 7ae9510, 306219d, 6340584, 4c8bc7c, c11bcbc Omitted-fix: 4b5bc2e ("x86/kexec: Allocate PGD for x86_64 transition page tables separately") Omitted-fix: 8b52c72 ("Revert "binder: switch alloc-\>mutex to spinlock_t"") Omitted-fix: 7d344ba ("mm/vma: move brk() internals to mm/vma.c") Omitted-fix: 6aeb991 ("mm/page-writeback: consolidate wb_thresh bumping logic into \__wb_calc_thresh") Omitted-fix: 3109d5f ("LoongArch: Set hugetlb mmap base address aligned with pmd size") Omitted-fix: 752e5fc ("bgmac: reduce max frame size to support just MTU 1500") Omitted-fix: 3cef7d8 ("tools headers: Sync uapi/asm-generic/mman.h with the kernel sources") Omitted-fix: c994ac7 ("tools headers: Sync uapi/linux/prctl.h with the kernel sources") Omitted-fix: 40733e7 ("mm/swap_cgroup: remove swap_cgroup_cmpxchg") Omitted-fix: 1d7e707 ("Revert "x86/module: prepare module loading for ROX allocations of text"") Omitted-fix: 3ef32d9 ("x86/vdso: Fix latent bug in vclock_pages calculation") Omitted-fix: c380931 ("dma: Fix encryption bit clearing for dma_to_phys") Omitted-fix: b66e2ee ("dma: Introduce generic dma_addr_*crypted helpers") Omitted-fix: 7d953a0 ("arm64: realm: Use aliased addresses for device DMA to shared buffers") Omitted-fix: 7ae9510 ("kselftest/arm64: mte: Use the correct naming for tag check modes in check_hugetlb_options.c") Omitted-fix: 306219d ("kselftest/arm64: mte: Skip the hugetlb tests if MTE not supported on such mappings") Omitted-fix: 7e91ae3 ("ext4: goto right label 'out_mmap_sem' in ext4_setattr()") Omitted-fix: 6340584 ("mm/vmstat: revert "fix a W=1 clang compiler warning"") Omitted-fix: 75fe8ec ("mm: memcontrol: unshare v2-only charge API bits again") Omitted-fix: 4c8bc7c ("cgroup: docs: add pswpin and pswpout items in cgroup v2 doc") Omitted-fix: c11bcbc ("mm: zswap: fix crypto_free_acomp() deadlock in zswap_cpu_comp_dead()") Signed-off-by: Luiz Capitulino <luizcap@redhat.com> Approved-by: Marcelo Ricardo Leitner <mleitner@redhat.com> Approved-by: Herton R. Krzesinski <herton@redhat.com> Approved-by: Rafael Aquini <raquini@redhat.com> Approved-by: David Arcari <darcari@redhat.com> Approved-by: Jocelyn Falempe <jfalempe@redhat.com> Approved-by: Jerry Snitselaar <jsnitsel@redhat.com> Approved-by: Michael Petlan <mpetlan@redhat.com> Approved-by: Phil Auld <pauld@redhat.com> Merged-by: Julio Faracco <jfaracco@redhat.com>
2 parents 33a53fd + 9d51c16 commit c145da3

File tree

599 files changed

+15562
-6662
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

599 files changed

+15562
-6662
lines changed

Documentation/admin-guide/cgroup-v1/memory.rst

Lines changed: 3 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,7 @@ Brief summary of control files.
9090
used.
9191
memory.swappiness set/show swappiness parameter of vmscan
9292
(See sysctl's vm.swappiness)
93-
memory.move_charge_at_immigrate set/show controls of moving charges
94-
This knob is deprecated and shouldn't be
95-
used.
93+
memory.move_charge_at_immigrate This knob is deprecated.
9694
memory.oom_control set/show oom controls.
9795
This knob is deprecated and shouldn't be
9896
used.
@@ -243,10 +241,6 @@ behind this approach is that a cgroup that aggressively uses a shared
243241
page will eventually get charged for it (once it is uncharged from
244242
the cgroup that brought it in -- this will happen on memory pressure).
245243

246-
But see :ref:`section 8.2 <cgroup-v1-memory-movable-charges>` when moving a
247-
task to another cgroup, its pages may be recharged to the new cgroup, if
248-
move_charge_at_immigrate has been chosen.
249-
250244
2.4 Swap Extension
251245
--------------------------------------
252246

@@ -756,78 +750,8 @@ If we want to change this to 1G, we can at any time use::
756750

757751
THIS IS DEPRECATED!
758752

759-
It's expensive and unreliable! It's better practice to launch workload
760-
tasks directly from inside their target cgroup. Use dedicated workload
761-
cgroups to allow fine-grained policy adjustments without having to
762-
move physical pages between control domains.
763-
764-
Users can move charges associated with a task along with task migration, that
765-
is, uncharge task's pages from the old cgroup and charge them to the new cgroup.
766-
This feature is not supported in !CONFIG_MMU environments because of lack of
767-
page tables.
768-
769-
8.1 Interface
770-
-------------
771-
772-
This feature is disabled by default. It can be enabled (and disabled again) by
773-
writing to memory.move_charge_at_immigrate of the destination cgroup.
774-
775-
If you want to enable it::
776-
777-
# echo (some positive value) > memory.move_charge_at_immigrate
778-
779-
.. note::
780-
Each bits of move_charge_at_immigrate has its own meaning about what type
781-
of charges should be moved. See :ref:`section 8.2
782-
<cgroup-v1-memory-movable-charges>` for details.
783-
784-
.. note::
785-
Charges are moved only when you move mm->owner, in other words,
786-
a leader of a thread group.
787-
788-
.. note::
789-
If we cannot find enough space for the task in the destination cgroup, we
790-
try to make space by reclaiming memory. Task migration may fail if we
791-
cannot make enough space.
792-
793-
.. note::
794-
It can take several seconds if you move charges much.
795-
796-
And if you want disable it again::
797-
798-
# echo 0 > memory.move_charge_at_immigrate
799-
800-
.. _cgroup-v1-memory-movable-charges:
801-
802-
8.2 Type of charges which can be moved
803-
--------------------------------------
804-
805-
Each bit in move_charge_at_immigrate has its own meaning about what type of
806-
charges should be moved. But in any case, it must be noted that an account of
807-
a page or a swap can be moved only when it is charged to the task's current
808-
(old) memory cgroup.
809-
810-
+---+--------------------------------------------------------------------------+
811-
|bit| what type of charges would be moved ? |
812-
+===+==========================================================================+
813-
| 0 | A charge of an anonymous page (or swap of it) used by the target task. |
814-
| | You must enable Swap Extension (see 2.4) to enable move of swap charges. |
815-
+---+--------------------------------------------------------------------------+
816-
| 1 | A charge of file pages (normal file, tmpfs file (e.g. ipc shared memory) |
817-
| | and swaps of tmpfs file) mmapped by the target task. Unlike the case of |
818-
| | anonymous pages, file pages (and swaps) in the range mmapped by the task |
819-
| | will be moved even if the task hasn't done page fault, i.e. they might |
820-
| | not be the task's "RSS", but other task's "RSS" that maps the same file. |
821-
| | The mapcount of the page is ignored (the page can be moved independent |
822-
| | of the mapcount). You must enable Swap Extension (see 2.4) to |
823-
| | enable move of swap charges. |
824-
+---+--------------------------------------------------------------------------+
825-
826-
8.3 TODO
827-
--------
828-
829-
- All of moving charge operations are done under cgroup_mutex. It's not good
830-
behavior to hold the mutex too long, so we may need some trick.
753+
Reading memory.move_charge_at_immigrate will always return 0 and writing
754+
to it will always return -EINVAL.
831755

832756
9. Memory thresholds
833757
====================

Documentation/admin-guide/cgroup-v2.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1655,6 +1655,11 @@ The following nested keys are defined.
16551655
pgdemote_khugepaged
16561656
Number of pages demoted by khugepaged.
16571657

1658+
hugetlb
1659+
Amount of memory used by hugetlb pages. This metric only shows
1660+
up if hugetlb usage is accounted for in memory.current (i.e.
1661+
cgroup is mounted with the memory_hugetlb_accounting option).
1662+
16581663
memory.numa_stat
16591664
A read-only nested-keyed file which exists on non-root cgroups.
16601665

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,9 @@
446446
arm64.nobti [ARM64] Unconditionally disable Branch Target
447447
Identification support
448448

449+
arm64.nogcs [ARM64] Unconditionally disable Guarded Control Stack
450+
support
451+
449452
arm64.nomops [ARM64] Unconditionally disable Memory Copy and Memory
450453
Set instructions support
451454

@@ -6165,6 +6168,16 @@
61656168
For more information see Documentation/mm/slub.rst.
61666169
(slub_nomerge legacy name also accepted for now)
61676170

6171+
slab_strict_numa [MM]
6172+
Support memory policies on a per object level
6173+
in the slab allocator. The default is for memory
6174+
policies to be applied at the folio level when
6175+
a new folio is needed or a partial folio is
6176+
retrieved from the lists. Increases overhead
6177+
in the slab fastpaths but gains more accurate
6178+
NUMA kernel object placement which helps with slow
6179+
interconnects in NUMA systems.
6180+
61686181
slram= [HW,MTD]
61696182

61706183
smart2= [HW]
@@ -6718,6 +6731,16 @@
67186731
Force threading of all interrupt handlers except those
67196732
marked explicitly IRQF_NO_THREAD.
67206733

6734+
thp_shmem= [KNL]
6735+
Format: <size>[KMG],<size>[KMG]:<policy>;<size>[KMG]-<size>[KMG]:<policy>
6736+
Control the default policy of each hugepage size for the
6737+
internal shmem mount. <policy> is one of policies available
6738+
for the shmem mount ("always", "inherit", "never", "within_size",
6739+
and "advise").
6740+
It can be used multiple times for multiple shmem THP sizes.
6741+
See Documentation/admin-guide/mm/transhuge.rst for more
6742+
details.
6743+
67216744
topology= [S390,EARLY]
67226745
Format: {off | on}
67236746
Specify if the kernel should make use of the cpu
@@ -6953,6 +6976,13 @@
69536976
See Documentation/admin-guide/mm/transhuge.rst
69546977
for more details.
69556978

6979+
transparent_hugepage_shmem= [KNL]
6980+
Format: [always|within_size|advise|never|deny|force]
6981+
Can be used to control the hugepage allocation policy for
6982+
the internal shmem mount.
6983+
See Documentation/admin-guide/mm/transhuge.rst
6984+
for more details.
6985+
69566986
trusted.source= [KEYS]
69576987
Format: <string>
69586988
This parameter identifies the trust source as a backend

Documentation/admin-guide/mm/transhuge.rst

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,29 @@ PMD_ORDER THP policy will be overridden. If the policy for PMD_ORDER
326326
is not defined within a valid ``thp_anon``, its policy will default to
327327
``never``.
328328

329+
Similarly to ``transparent_hugepage``, you can control the hugepage
330+
allocation policy for the internal shmem mount by using the kernel parameter
331+
``transparent_hugepage_shmem=<policy>``, where ``<policy>`` is one of the
332+
seven valid policies for shmem (``always``, ``within_size``, ``advise``,
333+
``never``, ``deny``, and ``force``).
334+
335+
In the same manner as ``thp_anon`` controls each supported anonymous THP
336+
size, ``thp_shmem`` controls each supported shmem THP size. ``thp_shmem``
337+
has the same format as ``thp_anon``, but also supports the policy
338+
``within_size``.
339+
340+
``thp_shmem=`` may be specified multiple times to configure all THP sizes
341+
as required. If ``thp_shmem=`` is specified at least once, any shmem THP
342+
sizes not explicitly configured on the command line are implicitly set to
343+
``never``.
344+
345+
``transparent_hugepage_shmem`` setting only affects the global toggle. If
346+
``thp_shmem`` is not specified, PMD_ORDER hugepage will default to
347+
``inherit``. However, if a valid ``thp_shmem`` setting is provided by the
348+
user, the PMD_ORDER hugepage policy will be overridden. If the policy for
349+
PMD_ORDER is not defined within a valid ``thp_shmem``, its policy will
350+
default to ``never``.
351+
329352
Hugepages in tmpfs/shmem
330353
========================
331354

@@ -530,10 +553,18 @@ anon_fault_fallback_charge
530553
instead falls back to using huge pages with lower orders or
531554
small pages even though the allocation was successful.
532555

533-
swpout
534-
is incremented every time a huge page is swapped out in one
556+
zswpout
557+
is incremented every time a huge page is swapped out to zswap in one
535558
piece without splitting.
536559

560+
swpin
561+
is incremented every time a huge page is swapped in from a non-zswap
562+
swap device in one piece.
563+
564+
swpout
565+
is incremented every time a huge page is swapped out to a non-zswap
566+
swap device in one piece without splitting.
567+
537568
swpout_fallback
538569
is incremented if a huge page has to be split before swapout.
539570
Usually because failed to allocate some continuous swap space

Documentation/arch/arm64/booting.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,38 @@ Before jumping into the kernel, the following conditions must be met:
411411

412412
- HFGRWR_EL2.nPIRE0_EL1 (bit 57) must be initialised to 0b1.
413413

414+
- For CPUs with Guarded Control Stacks (FEAT_GCS):
415+
416+
- GCSCR_EL1 must be initialised to 0.
417+
418+
- GCSCRE0_EL1 must be initialised to 0.
419+
420+
- If EL3 is present:
421+
422+
- SCR_EL3.GCSEn (bit 39) must be initialised to 0b1.
423+
424+
- If EL2 is present:
425+
426+
- GCSCR_EL2 must be initialised to 0.
427+
428+
- If the kernel is entered at EL1 and EL2 is present:
429+
430+
- HCRX_EL2.GCSEn must be initialised to 0b1.
431+
432+
- HFGITR_EL2.nGCSEPP (bit 59) must be initialised to 0b1.
433+
434+
- HFGITR_EL2.nGCSSTR_EL1 (bit 58) must be initialised to 0b1.
435+
436+
- HFGITR_EL2.nGCSPUSHM_EL1 (bit 57) must be initialised to 0b1.
437+
438+
- HFGRTR_EL2.nGCS_EL1 (bit 53) must be initialised to 0b1.
439+
440+
- HFGRTR_EL2.nGCS_EL0 (bit 52) must be initialised to 0b1.
441+
442+
- HFGWTR_EL2.nGCS_EL1 (bit 53) must be initialised to 0b1.
443+
444+
- HFGWTR_EL2.nGCS_EL0 (bit 52) must be initialised to 0b1.
445+
414446
The requirements described above for CPU mode, caches, MMUs, architected
415447
timers, coherency and system registers apply to all CPUs. All CPUs must
416448
enter the kernel in the same exception level. Where the values documented

Documentation/arch/arm64/elf_hwcaps.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,10 @@ HWCAP_PACG
170170
ID_AA64ISAR1_EL1.GPI == 0b0001, as described by
171171
Documentation/arch/arm64/pointer-authentication.rst.
172172

173+
HWCAP_GCS
174+
Functionality implied by ID_AA64PFR1_EL1.GCS == 0b1, as
175+
described by Documentation/arch/arm64/gcs.rst.
176+
173177
HWCAP2_DCPODP
174178
Functionality implied by ID_AA64ISAR1_EL1.DPB == 0b0010.
175179

0 commit comments

Comments
 (0)