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:
Will Deacon 2021-03-18 17:07:36 +00:00 коммит произвёл Catalin Marinas
Родитель e9be47eab1
Коммит 7adbf10e29
1 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -271,6 +271,14 @@ enum aarch32_map {
static struct page *aarch32_vectors_page __ro_after_init; static struct page *aarch32_vectors_page __ro_after_init;
static struct page *aarch32_sig_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[] = { static struct vm_special_mapping aarch32_vdso_maps[] = {
[AA32_MAP_VECTORS] = { [AA32_MAP_VECTORS] = {
.name = "[vectors]", /* ABI */ .name = "[vectors]", /* ABI */
@ -279,6 +287,7 @@ static struct vm_special_mapping aarch32_vdso_maps[] = {
[AA32_MAP_SIGPAGE] = { [AA32_MAP_SIGPAGE] = {
.name = "[sigpage]", /* ABI */ .name = "[sigpage]", /* ABI */
.pages = &aarch32_sig_page, .pages = &aarch32_sig_page,
.mremap = aarch32_sigpage_mremap,
}, },
[AA32_MAP_VVAR] = { [AA32_MAP_VVAR] = {
.name = "[vvar]", .name = "[vvar]",