[PATCH 3/5] arm64: compat: Allow signal page to be remapped
Vincenzo Frascino
vincenzo.frascino at arm.com
Thu Mar 18 18:06:34 GMT 2021
On 3/18/21 5:07 PM, Will Deacon wrote:
> For compatability with 32-bit Arm, allow the compat signal page to be
> remapped via mremap().
>
> Signed-off-by: Will Deacon <will at kernel.org>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino at arm.com>
> ---
> arch/arm64/kernel/vdso.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c
> index 421411981dc3..16bf0b46fb70 100644
> --- a/arch/arm64/kernel/vdso.c
> +++ b/arch/arm64/kernel/vdso.c
> @@ -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]",
>
--
Regards,
Vincenzo
More information about the linux-arm-kernel
mailing list