arm64: compat: Allow signal page to be remapped
For compatability with 32-bit Arm, allow the compat signal page to be remapped via mremap(). Signed-off-by: Will Deacon <will@kernel.org> Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Link: https://lore.kernel.org/r/20210318170738.7756-4-will@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
This commit is contained in:
Родитель
e9be47eab1
Коммит
7adbf10e29
|
@ -271,6 +271,14 @@ enum aarch32_map {
|
|||
static struct page *aarch32_vectors_page __ro_after_init;
|
||||
static struct page *aarch32_sig_page __ro_after_init;
|
||||
|
||||
static int aarch32_sigpage_mremap(const struct vm_special_mapping *sm,
|
||||
struct vm_area_struct *new_vma)
|
||||
{
|
||||
current->mm->context.sigpage = (void *)new_vma->vm_start;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct vm_special_mapping aarch32_vdso_maps[] = {
|
||||
[AA32_MAP_VECTORS] = {
|
||||
.name = "[vectors]", /* ABI */
|
||||
|
@ -279,6 +287,7 @@ static struct vm_special_mapping aarch32_vdso_maps[] = {
|
|||
[AA32_MAP_SIGPAGE] = {
|
||||
.name = "[sigpage]", /* ABI */
|
||||
.pages = &aarch32_sig_page,
|
||||
.mremap = aarch32_sigpage_mremap,
|
||||
},
|
||||
[AA32_MAP_VVAR] = {
|
||||
.name = "[vvar]",
|
||||
|
|
Загрузка…
Ссылка в новой задаче