Skip to content

Commit d41fef1

Browse files
committed
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 fixes from Will Deacon: "There's nothing major (even the vmalloc one is just suppressing a potential warning) but all worth having, nonetheless. - Suppress KASAN false positive in stack unwinding code - Drop redundant reset of the GCS state on exec() - Don't try to descend into a !present PMD when creating a huge vmap() entry at the PUD level - Fix a small typo in the arm64 booting Documentation" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64/ptrace: Fix stack-out-of-bounds read in regs_get_kernel_stack_nth() arm64/gcs: Don't call gcs_free() during flush_gcs() arm64: Restrict pagetable teardown to avoid false warning docs: arm64: Fix ICC_SRE_EL2 register typo in booting.rst
2 parents 75f5f23 + 39dfc97 commit d41fef1

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

Documentation/arch/arm64/booting.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ Before jumping into the kernel, the following conditions must be met:
234234

235235
- If the kernel is entered at EL1:
236236

237-
- ICC.SRE_EL2.Enable (bit 3) must be initialised to 0b1
237+
- ICC_SRE_EL2.Enable (bit 3) must be initialised to 0b1
238238
- ICC_SRE_EL2.SRE (bit 0) must be initialised to 0b1.
239239

240240
- The DT or ACPI tables must describe a GICv3 interrupt controller.

arch/arm64/kernel/process.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,9 @@ static void flush_gcs(void)
288288
if (!system_supports_gcs())
289289
return;
290290

291-
gcs_free(current);
291+
current->thread.gcspr_el0 = 0;
292+
current->thread.gcs_base = 0;
293+
current->thread.gcs_size = 0;
292294
current->thread.gcs_el0_mode = 0;
293295
write_sysreg_s(GCSCRE0_EL1_nTR, SYS_GCSCRE0_EL1);
294296
write_sysreg_s(0, SYS_GCSPR_EL0);

arch/arm64/kernel/ptrace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs, unsigned int n)
141141

142142
addr += n;
143143
if (regs_within_kernel_stack(regs, (unsigned long)addr))
144-
return *addr;
144+
return READ_ONCE_NOCHECK(*addr);
145145
else
146146
return 0;
147147
}

arch/arm64/mm/mmu.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1305,7 +1305,8 @@ int pud_free_pmd_page(pud_t *pudp, unsigned long addr)
13051305
next = addr;
13061306
end = addr + PUD_SIZE;
13071307
do {
1308-
pmd_free_pte_page(pmdp, next);
1308+
if (pmd_present(pmdp_get(pmdp)))
1309+
pmd_free_pte_page(pmdp, next);
13091310
} while (pmdp++, next += PMD_SIZE, next != end);
13101311

13111312
pud_clear(pudp);

0 commit comments

Comments
 (0)