Skip to content

Commit 82a02ba

Browse files
committed
Merge tag 'v6.12.39' into 6.12-main
This is the 6.12.39 stable release # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCgAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmh5JzMACgkQONu9yGCS # aT40UQ/9EENWsRh1Ikeczt8g3ZyeY9oM33XvI+ypX9RmmBTZ9+D33fXFNjG62Og5 # GwxyYzZZxtqDXqEdkKX94nDG+QlO0Dw67dkdDsMX4IkBcai5Gk62dinFR/kr4zDv # abIZmZdvEJCTxNb22aSnsa9IxFcBtQ7ogSS2LjIAy7wOSrnHyr+J+1aEEPfC7P2z # LSHnj+M4RGuToy8Ftp18rZJ4E975JZxNWuLrdlmdh8bWehC7ih/ED+WnRgHKLNpG # 8zQOCtgN11t59rSaNDWaBaxPOstOvHIQVYVb3eqWchzXr4kPa9/6Lv7ENX+W5Q0Z # oDdN04o+de6V0YPEpJHGfsI70O6iZ+ME8O5G1LHUHAOg4yPyaJaSGf6hcRSIz9oy # u7tcqifIkLpwcZnJxxU1GK9lylD+Rhvypmtq9C2cKEkBjs8CcOgajZ0igMkyejy3 # +ThmjGMerZFDIGz62pXVeMUIjew8Jp6Lbzlj6U+LQRgu9DOQD62fiSonqqLUOy73 # L9xev8J6VqDjKr/pgJ00ux2/ULZfuVU4p2vtAVrMLFoP/yO4uH35QEOdeS43SFVB # BjcgV3t2jbVFzUKO2oqa5w80wVzuV5pppK8lNATUPNBQAuxaciUTz9KRxpVlo+AJ # MMUYN7J5tPxBcGJmLcMAacRt+B4iFk2WIhMlX2OQ9cuXTia9aVc= # =0j4H # -----END PGP SIGNATURE----- # gpg: Signature made Thu Jul 17 18:39:15 2025 CEST # gpg: using RSA key 647F28654894E3BD457199BE38DBBDC86092693E # gpg: Can't check signature: No public key
2 parents 4f85247 + cdf264c commit 82a02ba

176 files changed

Lines changed: 2012 additions & 874 deletions

File tree

Some content is hidden

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

Documentation/bpf/map_hash.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,16 @@ attempts in order to enforce the LRU property which have increasing impacts on
233233
other CPUs involved in the following operation attempts:
234234

235235
- Attempt to use CPU-local state to batch operations
236-
- Attempt to fetch free nodes from global lists
236+
- Attempt to fetch ``target_free`` free nodes from global lists
237237
- Attempt to pull any node from a global list and remove it from the hashmap
238238
- Attempt to pull any node from any CPU's list and remove it from the hashmap
239239

240+
The number of nodes to borrow from the global list in a batch, ``target_free``,
241+
depends on the size of the map. Larger batch size reduces lock contention, but
242+
may also exhaust the global structure. The value is computed at map init to
243+
avoid exhaustion, by limiting aggregate reservation by all CPUs to half the map
244+
size. With a minimum of a single element and maximum budget of 128 at a time.
245+
240246
This algorithm is described visually in the following diagram. See the
241247
description in commit 3a08c2fd7634 ("bpf: LRU List") for a full explanation of
242248
the corresponding operations:

Documentation/bpf/map_lru_hash_update.dot

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,18 @@ digraph {
3535
fn_bpf_lru_list_pop_free_to_local [shape=rectangle,fillcolor=2,
3636
label="Flush local pending,
3737
Rotate Global list, move
38-
LOCAL_FREE_TARGET
38+
target_free
3939
from global -> local"]
4040
// Also corresponds to:
4141
// fn__local_list_flush()
4242
// fn_bpf_lru_list_rotate()
4343
fn___bpf_lru_node_move_to_free[shape=diamond,fillcolor=2,
44-
label="Able to free\nLOCAL_FREE_TARGET\nnodes?"]
44+
label="Able to free\ntarget_free\nnodes?"]
4545

4646
fn___bpf_lru_list_shrink_inactive [shape=rectangle,fillcolor=3,
4747
label="Shrink inactive list
4848
up to remaining
49-
LOCAL_FREE_TARGET
49+
target_free
5050
(global LRU -> local)"]
5151
fn___bpf_lru_list_shrink [shape=diamond,fillcolor=2,
5252
label="> 0 entries in\nlocal free list?"]

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 6
33
PATCHLEVEL = 12
4-
SUBLEVEL = 38
4+
SUBLEVEL = 39
55
EXTRAVERSION =
66
NAME = Baby Opossum Posse
77

arch/arm64/kernel/cpufeature.c

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2959,6 +2959,13 @@ static bool has_sve_feature(const struct arm64_cpu_capabilities *cap, int scope)
29592959
}
29602960
#endif
29612961

2962+
#ifdef CONFIG_ARM64_SME
2963+
static bool has_sme_feature(const struct arm64_cpu_capabilities *cap, int scope)
2964+
{
2965+
return system_supports_sme() && has_user_cpuid_feature(cap, scope);
2966+
}
2967+
#endif
2968+
29622969
static const struct arm64_cpu_capabilities arm64_elf_hwcaps[] = {
29632970
HWCAP_CAP(ID_AA64ISAR0_EL1, AES, PMULL, CAP_HWCAP, KERNEL_HWCAP_PMULL),
29642971
HWCAP_CAP(ID_AA64ISAR0_EL1, AES, AES, CAP_HWCAP, KERNEL_HWCAP_AES),
@@ -3037,25 +3044,25 @@ static const struct arm64_cpu_capabilities arm64_elf_hwcaps[] = {
30373044
HWCAP_CAP(ID_AA64ISAR2_EL1, BC, IMP, CAP_HWCAP, KERNEL_HWCAP_HBC),
30383045
#ifdef CONFIG_ARM64_SME
30393046
HWCAP_CAP(ID_AA64PFR1_EL1, SME, IMP, CAP_HWCAP, KERNEL_HWCAP_SME),
3040-
HWCAP_CAP(ID_AA64SMFR0_EL1, FA64, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_FA64),
3041-
HWCAP_CAP(ID_AA64SMFR0_EL1, LUTv2, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_LUTV2),
3042-
HWCAP_CAP(ID_AA64SMFR0_EL1, SMEver, SME2p1, CAP_HWCAP, KERNEL_HWCAP_SME2P1),
3043-
HWCAP_CAP(ID_AA64SMFR0_EL1, SMEver, SME2, CAP_HWCAP, KERNEL_HWCAP_SME2),
3044-
HWCAP_CAP(ID_AA64SMFR0_EL1, I16I64, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_I16I64),
3045-
HWCAP_CAP(ID_AA64SMFR0_EL1, F64F64, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_F64F64),
3046-
HWCAP_CAP(ID_AA64SMFR0_EL1, I16I32, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_I16I32),
3047-
HWCAP_CAP(ID_AA64SMFR0_EL1, B16B16, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_B16B16),
3048-
HWCAP_CAP(ID_AA64SMFR0_EL1, F16F16, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_F16F16),
3049-
HWCAP_CAP(ID_AA64SMFR0_EL1, F8F16, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_F8F16),
3050-
HWCAP_CAP(ID_AA64SMFR0_EL1, F8F32, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_F8F32),
3051-
HWCAP_CAP(ID_AA64SMFR0_EL1, I8I32, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_I8I32),
3052-
HWCAP_CAP(ID_AA64SMFR0_EL1, F16F32, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_F16F32),
3053-
HWCAP_CAP(ID_AA64SMFR0_EL1, B16F32, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_B16F32),
3054-
HWCAP_CAP(ID_AA64SMFR0_EL1, BI32I32, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_BI32I32),
3055-
HWCAP_CAP(ID_AA64SMFR0_EL1, F32F32, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_F32F32),
3056-
HWCAP_CAP(ID_AA64SMFR0_EL1, SF8FMA, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_SF8FMA),
3057-
HWCAP_CAP(ID_AA64SMFR0_EL1, SF8DP4, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_SF8DP4),
3058-
HWCAP_CAP(ID_AA64SMFR0_EL1, SF8DP2, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_SF8DP2),
3047+
HWCAP_CAP_MATCH_ID(has_sme_feature, ID_AA64SMFR0_EL1, FA64, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_FA64),
3048+
HWCAP_CAP_MATCH_ID(has_sme_feature, ID_AA64SMFR0_EL1, LUTv2, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_LUTV2),
3049+
HWCAP_CAP_MATCH_ID(has_sme_feature, ID_AA64SMFR0_EL1, SMEver, SME2p1, CAP_HWCAP, KERNEL_HWCAP_SME2P1),
3050+
HWCAP_CAP_MATCH_ID(has_sme_feature, ID_AA64SMFR0_EL1, SMEver, SME2, CAP_HWCAP, KERNEL_HWCAP_SME2),
3051+
HWCAP_CAP_MATCH_ID(has_sme_feature, ID_AA64SMFR0_EL1, I16I64, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_I16I64),
3052+
HWCAP_CAP_MATCH_ID(has_sme_feature, ID_AA64SMFR0_EL1, F64F64, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_F64F64),
3053+
HWCAP_CAP_MATCH_ID(has_sme_feature, ID_AA64SMFR0_EL1, I16I32, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_I16I32),
3054+
HWCAP_CAP_MATCH_ID(has_sme_feature, ID_AA64SMFR0_EL1, B16B16, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_B16B16),
3055+
HWCAP_CAP_MATCH_ID(has_sme_feature, ID_AA64SMFR0_EL1, F16F16, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_F16F16),
3056+
HWCAP_CAP_MATCH_ID(has_sme_feature, ID_AA64SMFR0_EL1, F8F16, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_F8F16),
3057+
HWCAP_CAP_MATCH_ID(has_sme_feature, ID_AA64SMFR0_EL1, F8F32, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_F8F32),
3058+
HWCAP_CAP_MATCH_ID(has_sme_feature, ID_AA64SMFR0_EL1, I8I32, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_I8I32),
3059+
HWCAP_CAP_MATCH_ID(has_sme_feature, ID_AA64SMFR0_EL1, F16F32, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_F16F32),
3060+
HWCAP_CAP_MATCH_ID(has_sme_feature, ID_AA64SMFR0_EL1, B16F32, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_B16F32),
3061+
HWCAP_CAP_MATCH_ID(has_sme_feature, ID_AA64SMFR0_EL1, BI32I32, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_BI32I32),
3062+
HWCAP_CAP_MATCH_ID(has_sme_feature, ID_AA64SMFR0_EL1, F32F32, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_F32F32),
3063+
HWCAP_CAP_MATCH_ID(has_sme_feature, ID_AA64SMFR0_EL1, SF8FMA, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_SF8FMA),
3064+
HWCAP_CAP_MATCH_ID(has_sme_feature, ID_AA64SMFR0_EL1, SF8DP4, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_SF8DP4),
3065+
HWCAP_CAP_MATCH_ID(has_sme_feature, ID_AA64SMFR0_EL1, SF8DP2, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_SF8DP2),
30593066
#endif /* CONFIG_ARM64_SME */
30603067
HWCAP_CAP(ID_AA64FPFR0_EL1, F8CVT, IMP, CAP_HWCAP, KERNEL_HWCAP_F8CVT),
30613068
HWCAP_CAP(ID_AA64FPFR0_EL1, F8FMA, IMP, CAP_HWCAP, KERNEL_HWCAP_F8FMA),

arch/arm64/kernel/process.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,11 @@ static void permission_overlay_switch(struct task_struct *next)
544544
current->thread.por_el0 = read_sysreg_s(SYS_POR_EL0);
545545
if (current->thread.por_el0 != next->thread.por_el0) {
546546
write_sysreg_s(next->thread.por_el0, SYS_POR_EL0);
547+
/*
548+
* No ISB required as we can tolerate spurious Overlay faults -
549+
* the fault handler will check again based on the new value
550+
* of POR_EL0.
551+
*/
547552
}
548553
}
549554

arch/arm64/mm/fault.c

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -487,17 +487,29 @@ static void do_bad_area(unsigned long far, unsigned long esr,
487487
}
488488
}
489489

490-
static bool fault_from_pkey(unsigned long esr, struct vm_area_struct *vma,
491-
unsigned int mm_flags)
490+
static bool fault_from_pkey(struct vm_area_struct *vma, unsigned int mm_flags)
492491
{
493-
unsigned long iss2 = ESR_ELx_ISS2(esr);
494-
495492
if (!system_supports_poe())
496493
return false;
497494

498-
if (esr_fsc_is_permission_fault(esr) && (iss2 & ESR_ELx_Overlay))
499-
return true;
500-
495+
/*
496+
* We do not check whether an Overlay fault has occurred because we
497+
* cannot make a decision based solely on its value:
498+
*
499+
* - If Overlay is set, a fault did occur due to POE, but it may be
500+
* spurious in those cases where we update POR_EL0 without ISB (e.g.
501+
* on context-switch). We would then need to manually check POR_EL0
502+
* against vma_pkey(vma), which is exactly what
503+
* arch_vma_access_permitted() does.
504+
*
505+
* - If Overlay is not set, we may still need to report a pkey fault.
506+
* This is the case if an access was made within a mapping but with no
507+
* page mapped, and POR_EL0 forbids the access (according to
508+
* vma_pkey()). Such access will result in a SIGSEGV regardless
509+
* because core code checks arch_vma_access_permitted(), but in order
510+
* to report the correct error code - SEGV_PKUERR - we must handle
511+
* that case here.
512+
*/
501513
return !arch_vma_access_permitted(vma,
502514
mm_flags & FAULT_FLAG_WRITE,
503515
mm_flags & FAULT_FLAG_INSTRUCTION,
@@ -595,7 +607,7 @@ static int __kprobes do_page_fault(unsigned long far, unsigned long esr,
595607
goto bad_area;
596608
}
597609

598-
if (fault_from_pkey(esr, vma, mm_flags)) {
610+
if (fault_from_pkey(vma, mm_flags)) {
599611
pkey = vma_pkey(vma);
600612
vma_end_read(vma);
601613
fault = 0;
@@ -639,7 +651,7 @@ static int __kprobes do_page_fault(unsigned long far, unsigned long esr,
639651
goto bad_area;
640652
}
641653

642-
if (fault_from_pkey(esr, vma, mm_flags)) {
654+
if (fault_from_pkey(vma, mm_flags)) {
643655
pkey = vma_pkey(vma);
644656
mmap_read_unlock(mm);
645657
fault = 0;

arch/riscv/kernel/vdso/vdso.lds.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ SECTIONS
3131
*(.data .data.* .gnu.linkonce.d.*)
3232
*(.dynbss)
3333
*(.bss .bss.* .gnu.linkonce.b.*)
34-
}
34+
} :text
3535

3636
.note : { *(.note.*) } :text :note
3737

arch/s390/crypto/sha1_s390.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ static int s390_sha1_init(struct shash_desc *desc)
3838
sctx->state[4] = SHA1_H4;
3939
sctx->count = 0;
4040
sctx->func = CPACF_KIMD_SHA_1;
41+
sctx->first_message_part = 0;
4142

4243
return 0;
4344
}
@@ -62,6 +63,7 @@ static int s390_sha1_import(struct shash_desc *desc, const void *in)
6263
memcpy(sctx->state, ictx->state, sizeof(ictx->state));
6364
memcpy(sctx->buf, ictx->buffer, sizeof(ictx->buffer));
6465
sctx->func = CPACF_KIMD_SHA_1;
66+
sctx->first_message_part = 0;
6567
return 0;
6668
}
6769

arch/s390/crypto/sha256_s390.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ static int s390_sha256_init(struct shash_desc *desc)
3131
sctx->state[7] = SHA256_H7;
3232
sctx->count = 0;
3333
sctx->func = CPACF_KIMD_SHA_256;
34+
sctx->first_message_part = 0;
3435

3536
return 0;
3637
}
@@ -55,6 +56,7 @@ static int sha256_import(struct shash_desc *desc, const void *in)
5556
memcpy(sctx->state, ictx->state, sizeof(ictx->state));
5657
memcpy(sctx->buf, ictx->buf, sizeof(ictx->buf));
5758
sctx->func = CPACF_KIMD_SHA_256;
59+
sctx->first_message_part = 0;
5860
return 0;
5961
}
6062

@@ -90,6 +92,7 @@ static int s390_sha224_init(struct shash_desc *desc)
9092
sctx->state[7] = SHA224_H7;
9193
sctx->count = 0;
9294
sctx->func = CPACF_KIMD_SHA_256;
95+
sctx->first_message_part = 0;
9396

9497
return 0;
9598
}

arch/s390/crypto/sha512_s390.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ static int sha512_init(struct shash_desc *desc)
3232
*(__u64 *)&ctx->state[14] = SHA512_H7;
3333
ctx->count = 0;
3434
ctx->func = CPACF_KIMD_SHA_512;
35+
ctx->first_message_part = 0;
3536

3637
return 0;
3738
}
@@ -60,6 +61,7 @@ static int sha512_import(struct shash_desc *desc, const void *in)
6061
memcpy(sctx->state, ictx->state, sizeof(ictx->state));
6162
memcpy(sctx->buf, ictx->buf, sizeof(ictx->buf));
6263
sctx->func = CPACF_KIMD_SHA_512;
64+
sctx->first_message_part = 0;
6365
return 0;
6466
}
6567

@@ -97,6 +99,7 @@ static int sha384_init(struct shash_desc *desc)
9799
*(__u64 *)&ctx->state[14] = SHA384_H7;
98100
ctx->count = 0;
99101
ctx->func = CPACF_KIMD_SHA_512;
102+
ctx->first_message_part = 0;
100103

101104
return 0;
102105
}

0 commit comments

Comments
 (0)