mirror of
https://github.com/opnsense/src.git
synced 2026-07-16 12:33:07 -04:00
Ensure the DPCPU and VNET module spaces are aligned to hold a pointer.
Previously they may have been aligned to a char, leading to misaligned DPCPU and VNET variables. Sponsored by: DARPA, AFRL
This commit is contained in:
parent
d0a179019f
commit
cd2106eaea
2 changed files with 2 additions and 2 deletions
|
|
@ -72,7 +72,7 @@ struct dpcpu_free {
|
|||
TAILQ_ENTRY(dpcpu_free) df_link;
|
||||
};
|
||||
|
||||
DPCPU_DEFINE_STATIC(char, modspace[DPCPU_MODMIN]);
|
||||
DPCPU_DEFINE_STATIC(char, modspace[DPCPU_MODMIN] __aligned(__alignof(void *)));
|
||||
static TAILQ_HEAD(, dpcpu_free) dpcpu_head = TAILQ_HEAD_INITIALIZER(dpcpu_head);
|
||||
static struct sx dpcpu_lock;
|
||||
uintptr_t dpcpu_off[MAXCPU];
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ static MALLOC_DEFINE(M_VNET_DATA, "vnet_data", "VNET data");
|
|||
* Space to store virtualized global variables from loadable kernel modules,
|
||||
* and the free list to manage it.
|
||||
*/
|
||||
VNET_DEFINE_STATIC(char, modspace[VNET_MODMIN]);
|
||||
VNET_DEFINE_STATIC(char, modspace[VNET_MODMIN] __aligned(__alignof(void *)));
|
||||
|
||||
/*
|
||||
* Global lists of subsystem constructor and destructors for vnets. They are
|
||||
|
|
|
|||
Loading…
Reference in a new issue