From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: Preventing READ_IMPLIES_EXEC propagation
Date: Tue, 25 Apr 2017 17:53:21 +0100 [thread overview]
Message-ID: <20170425165320.GT24484@arm.com> (raw)
In-Reply-To: <d4205c8c-c8cd-ef35-a6bd-3444a7b3ac48@huawei.com>
On Tue, Apr 25, 2017 at 02:11:29PM +0800, dongbo (E) wrote:
> From: Dong Bo <dongbo4@huawei.com>
>
> Once the READ_IMPLIES_EXEC flag is set on arm64, the flag is
> propagated to its child processes, even the ELF files are
> marked as not requiring executable stack.
>
> Signed-off-by: Dong Bo <dongbo4@huawei.com>
> ---
> arch/arm64/include/asm/elf.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h
> index 5d17004..5941e7f 100644
> --- a/arch/arm64/include/asm/elf.h
> +++ b/arch/arm64/include/asm/elf.h
> @@ -142,6 +142,7 @@
> ({ \
> clear_bit(TIF_32BIT, ¤t->mm->context.flags); \
> clear_thread_flag(TIF_32BIT); \
> + current->personality &= ~READ_IMPLIES_EXEC; \
> })
> /* update AT_VECTOR_SIZE_ARCH if the number of NEW_AUX_ENT entries changes */
This looks good to me:
Acked-by: Will Deacon <will.deacon@arm.com>
We might also want a comment in the compat code to say that we inherit
the flag to follow the arch/arm/ behaviour.
Anyway, I'd like to see this sit in -next for a bit, so would rather hold
this off until 4.12.
Will
WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will.deacon@arm.com>
To: "dongbo (E)" <dongbo4@huawei.com>
Cc: catalin.marinas@arm.com,
arm-mail-list <linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Linuxarm <linuxarm@huawei.com>
Subject: Re: [PATCH] arm64: Preventing READ_IMPLIES_EXEC propagation
Date: Tue, 25 Apr 2017 17:53:21 +0100 [thread overview]
Message-ID: <20170425165320.GT24484@arm.com> (raw)
In-Reply-To: <d4205c8c-c8cd-ef35-a6bd-3444a7b3ac48@huawei.com>
On Tue, Apr 25, 2017 at 02:11:29PM +0800, dongbo (E) wrote:
> From: Dong Bo <dongbo4@huawei.com>
>
> Once the READ_IMPLIES_EXEC flag is set on arm64, the flag is
> propagated to its child processes, even the ELF files are
> marked as not requiring executable stack.
>
> Signed-off-by: Dong Bo <dongbo4@huawei.com>
> ---
> arch/arm64/include/asm/elf.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h
> index 5d17004..5941e7f 100644
> --- a/arch/arm64/include/asm/elf.h
> +++ b/arch/arm64/include/asm/elf.h
> @@ -142,6 +142,7 @@
> ({ \
> clear_bit(TIF_32BIT, ¤t->mm->context.flags); \
> clear_thread_flag(TIF_32BIT); \
> + current->personality &= ~READ_IMPLIES_EXEC; \
> })
> /* update AT_VECTOR_SIZE_ARCH if the number of NEW_AUX_ENT entries changes */
This looks good to me:
Acked-by: Will Deacon <will.deacon@arm.com>
We might also want a comment in the compat code to say that we inherit
the flag to follow the arch/arm/ behaviour.
Anyway, I'd like to see this sit in -next for a bit, so would rather hold
this off until 4.12.
Will
next prev parent reply other threads:[~2017-04-25 16:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1493102296-229934-1-git-send-email-zhangshaokun@hisilicon.com>
2017-04-25 6:11 ` [PATCH] arm64: Preventing READ_IMPLIES_EXEC propagation dongbo (E)
2017-04-25 6:11 ` dongbo (E)
2017-04-25 16:53 ` Will Deacon [this message]
2017-04-25 16:53 ` Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170425165320.GT24484@arm.com \
--to=will.deacon@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.