All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Dan Li <ashimida@linux.alibaba.com>
Cc: catalin.marinas@arm.com, will@kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [RFC]arm64:Mark __stack_chk_guard as __ro_after_init
Date: Tue, 14 Sep 2021 10:58:46 +0100	[thread overview]
Message-ID: <YUByVivmmDr4T6Dx@shell.armlinux.org.uk> (raw)
In-Reply-To: <1631612642-102881-1-git-send-email-ashimida@linux.alibaba.com>

On Tue, Sep 14, 2021 at 05:44:02PM +0800, Dan Li wrote:
> __stack_chk_guard is setup once while init stage and never changed
> after that.
> 
> Although the modification of this variable at runtime will usually
> cause the kernel to crash (so dose the attacker), it should be marked
> as _ro_after_init, and it should not affect performance if it is
> placed in the ro_after_init section.
> 
> This should also be the case on the ARM platform, or am I missing
> something?

I don't see why it can't be - we only write to it in
boot_init_stack_canary(), same as ARM64.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

WARNING: multiple messages have this Message-ID (diff)
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Dan Li <ashimida@linux.alibaba.com>
Cc: catalin.marinas@arm.com, will@kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [RFC]arm64:Mark __stack_chk_guard as __ro_after_init
Date: Tue, 14 Sep 2021 10:58:46 +0100	[thread overview]
Message-ID: <YUByVivmmDr4T6Dx@shell.armlinux.org.uk> (raw)
In-Reply-To: <1631612642-102881-1-git-send-email-ashimida@linux.alibaba.com>

On Tue, Sep 14, 2021 at 05:44:02PM +0800, Dan Li wrote:
> __stack_chk_guard is setup once while init stage and never changed
> after that.
> 
> Although the modification of this variable at runtime will usually
> cause the kernel to crash (so dose the attacker), it should be marked
> as _ro_after_init, and it should not affect performance if it is
> placed in the ro_after_init section.
> 
> This should also be the case on the ARM platform, or am I missing
> something?

I don't see why it can't be - we only write to it in
boot_init_stack_canary(), same as ARM64.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-09-14  9:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-14  9:44 [PATCH] [RFC]arm64:Mark __stack_chk_guard as __ro_after_init Dan Li
2021-09-14  9:44 ` Dan Li
2021-09-14  9:58 ` Russell King (Oracle) [this message]
2021-09-14  9:58   ` Russell King (Oracle)
2021-09-14 10:17 ` Mark Rutland
2021-09-14 10:17   ` Mark Rutland
2021-09-15  1:57   ` ashimida
2021-09-15  1:57     ` ashimida
2021-09-15  9:19     ` Mark Rutland
2021-09-15  9:19       ` Mark Rutland
2021-09-15  9:35       ` Dan Li
2021-09-15  9:35         ` Dan Li
2021-09-16 17:08 ` Catalin Marinas
2021-09-16 17:08   ` Catalin Marinas

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=YUByVivmmDr4T6Dx@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=ashimida@linux.alibaba.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=will@kernel.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.