mirror of
https://github.com/opnsense/src.git
synced 2026-02-18 18:20:26 -05:00
arm64: Remove pmap_san_bootstrap() and call kasan_init_early() directly
pmap_san_bootstrap() doesn't really do much, and it was hard-coding the the bootstrap stack size defined in locore.S. Moreover, the name is a bit confusing given the existence of pmap_bootstrap_san(). Just remove it and call kasan_init_early() directly like we do on amd64. It will not be used by KMSAN in a forthcoming patch series. No functional change intended. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D43403 (cherry picked from commit 90372a9e3cda838914bc8518dbc4340906351e98)
This commit is contained in:
parent
0dd45fdb74
commit
40adc27878
4 changed files with 9 additions and 10 deletions
|
|
@ -498,7 +498,6 @@ void pmap_page_array_startup(long count);
|
|||
vm_page_t pmap_page_alloc_below_4g(bool zeroed);
|
||||
|
||||
#if defined(KASAN) || defined(KMSAN)
|
||||
void pmap_san_bootstrap(void);
|
||||
void pmap_san_enter(vm_offset_t);
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -45,6 +45,11 @@
|
|||
#define L3_PAGE_COUNT 32
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The size of our bootstrap stack.
|
||||
*/
|
||||
#define BOOT_STACK_SIZE (KSTACK_PAGES * PAGE_SIZE)
|
||||
|
||||
.globl kernbase
|
||||
.set kernbase, KERNBASE
|
||||
|
||||
|
|
@ -151,7 +156,9 @@ virtdone:
|
|||
mov x19, x0
|
||||
|
||||
/* Bootstrap an early shadow map for the boot stack. */
|
||||
bl pmap_san_bootstrap
|
||||
ldr x0, [x0, #BP_KERN_STACK]
|
||||
ldr x1, =BOOT_STACK_SIZE
|
||||
bl kasan_init_early
|
||||
|
||||
/* Restore bootparams */
|
||||
mov x0, x19
|
||||
|
|
@ -886,7 +893,7 @@ END(abort)
|
|||
.bss
|
||||
.align PAGE_SHIFT
|
||||
initstack:
|
||||
.space (PAGE_SIZE * KSTACK_PAGES)
|
||||
.space BOOT_STACK_SIZE
|
||||
initstack_end:
|
||||
|
||||
.section .init_pagetable, "aw", %nobits
|
||||
|
|
|
|||
|
|
@ -7834,12 +7834,6 @@ pmap_is_valid_memattr(pmap_t pmap __unused, vm_memattr_t mode)
|
|||
#if defined(KASAN)
|
||||
static pd_entry_t *pmap_san_early_l2;
|
||||
|
||||
void __nosanitizeaddress
|
||||
pmap_san_bootstrap(struct arm64_bootparams *abp)
|
||||
{
|
||||
kasan_init_early(abp->kern_stack, KSTACK_PAGES * PAGE_SIZE);
|
||||
}
|
||||
|
||||
#define SAN_BOOTSTRAP_L2_SIZE (1 * L2_SIZE)
|
||||
#define SAN_BOOTSTRAP_SIZE (2 * PAGE_SIZE)
|
||||
static vm_offset_t __nosanitizeaddress
|
||||
|
|
|
|||
|
|
@ -194,7 +194,6 @@ struct arm64_bootparams;
|
|||
|
||||
void pmap_bootstrap_san(vm_paddr_t);
|
||||
void pmap_san_enter(vm_offset_t);
|
||||
void pmap_san_bootstrap(struct arm64_bootparams *);
|
||||
#endif
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
|
|
|||
Loading…
Reference in a new issue