Skip to content

Commit b206246

Browse files
committed
Merge tag 'mm-hotfixes-stable-2026-02-04-15-55' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull misc fixes from Andrew Morton: "Five hotfixes. Two are cc:stable, two are for MM. All are singletons - please see the changelogs for details" * tag 'mm-hotfixes-stable-2026-02-04-15-55' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: Documentation: document liveupdate cmdline parameter mm, shmem: prevent infinite loop on truncate race mailmap: update Alexander Mikhalitsyn's emails liveupdate: luo_file: do not clear serialized_data on unfreeze x86/kfence: fix booting on 32bit non-PAE systems
2 parents f14faaf + 1a47837 commit b206246

5 files changed

Lines changed: 24 additions & 14 deletions

File tree

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Alexander Lobakin <[email protected]> <[email protected]>
3434
3535
Alexander Mikhalitsyn <[email protected]> <[email protected]>
3636
Alexander Mikhalitsyn <[email protected]> <[email protected]>
37+
Alexander Mikhalitsyn <[email protected]> <[email protected]>
3738
Alexander Sverdlin <[email protected]> <[email protected]>
3839
Alexander Sverdlin <[email protected]> <[email protected]>
3940
Alexander Sverdlin <[email protected]> <[email protected]>

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3472,6 +3472,11 @@ Kernel parameters
34723472
If there are multiple matching configurations changing
34733473
the same attribute, the last one is used.
34743474

3475+
liveupdate= [KNL,EARLY]
3476+
Format: <bool>
3477+
Enable Live Update Orchestrator (LUO).
3478+
Default: off.
3479+
34753480
load_ramdisk= [RAM] [Deprecated]
34763481

34773482
lockd.nlm_grace_period=P [NFS] Assign grace period.

arch/x86/include/asm/kfence.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ static inline bool kfence_protect_page(unsigned long addr, bool protect)
4242
{
4343
unsigned int level;
4444
pte_t *pte = lookup_address(addr, &level);
45-
pteval_t val;
45+
pteval_t val, new;
4646

4747
if (WARN_ON(!pte || level != PG_LEVEL_4K))
4848
return false;
@@ -57,11 +57,12 @@ static inline bool kfence_protect_page(unsigned long addr, bool protect)
5757
return true;
5858

5959
/*
60-
* Otherwise, invert the entire PTE. This avoids writing out an
60+
* Otherwise, flip the Present bit, taking care to avoid writing an
6161
* L1TF-vulnerable PTE (not present, without the high address bits
6262
* set).
6363
*/
64-
set_pte(pte, __pte(~val));
64+
new = val ^ _PAGE_PRESENT;
65+
set_pte(pte, __pte(flip_protnone_guard(val, new, PTE_PFN_MASK)));
6566

6667
/*
6768
* If the page was protected (non-present) and we're making it

kernel/liveupdate/luo_file.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,6 @@ static void luo_file_unfreeze_one(struct luo_file_set *file_set,
402402

403403
luo_file->fh->ops->unfreeze(&args);
404404
}
405-
406-
luo_file->serialized_data = 0;
407405
}
408406

409407
static void __luo_file_unfreeze(struct luo_file_set *file_set,

mm/shmem.c

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,17 +1211,22 @@ static void shmem_undo_range(struct inode *inode, loff_t lstart, uoff_t lend,
12111211
swaps_freed = shmem_free_swap(mapping, indices[i],
12121212
end - 1, folio);
12131213
if (!swaps_freed) {
1214-
/*
1215-
* If found a large swap entry cross the end border,
1216-
* skip it as the truncate_inode_partial_folio above
1217-
* should have at least zerod its content once.
1218-
*/
1214+
pgoff_t base = indices[i];
1215+
12191216
order = shmem_confirm_swap(mapping, indices[i],
12201217
radix_to_swp_entry(folio));
1221-
if (order > 0 && indices[i] + (1 << order) > end)
1222-
continue;
1223-
/* Swap was replaced by page: retry */
1224-
index = indices[i];
1218+
/*
1219+
* If found a large swap entry cross the end or start
1220+
* border, skip it as the truncate_inode_partial_folio
1221+
* above should have at least zerod its content once.
1222+
*/
1223+
if (order > 0) {
1224+
base = round_down(base, 1 << order);
1225+
if (base < start || base + (1 << order) > end)
1226+
continue;
1227+
}
1228+
/* Swap was replaced by page or extended, retry */
1229+
index = base;
12251230
break;
12261231
}
12271232
nr_swaps_freed += swaps_freed;

0 commit comments

Comments
 (0)