All of lore.kernel.org
 help / color / mirror / Atom feed
From: sanggil2.kim@samsung.com
To: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, Sanggil Kim <sanggil2.kim@samsung.com>
Subject: [PATCH] arm64: kernel: Add module symbols _text, _etext.
Date: Thu,  9 Jul 2020 17:23:45 +0900	[thread overview]
Message-ID: <1594283025-4166-1-git-send-email-sanggil2.kim@samsung.com> (raw)
In-Reply-To: CGME20200709082408epcas2p4369fa8f06a57c7358be38282aae0f501@epcas2p4.samsung.com

From: Sanggil Kim <sanggil2.kim@samsung.com>

We have a solution to protect kernel code section(autually from _text to
_etext) by not MMU. In order to do this, we have to know the addresses
of _text and _etext at runtime.

Signed-off-by: Sanggil Kim <sanggil2.kim@samsung.com>
---
 arch/arm64/kernel/head.S | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S
index 037421c..09b405e 100644
--- a/arch/arm64/kernel/head.S
+++ b/arch/arm64/kernel/head.S
@@ -1003,3 +1003,6 @@ SYM_FUNC_START_LOCAL(__primary_switch)
 	adrp	x0, __PHYS_OFFSET
 	br	x8
 SYM_FUNC_END(__primary_switch)
+
+EXPORT_SYMBOL(_text)
+EXPORT_SYMBOL(_etext)
-- 
2.7.4


WARNING: multiple messages have this Message-ID (diff)
From: sanggil2.kim@samsung.com
To: linux-arm-kernel@lists.infradead.org
Cc: Sanggil Kim <sanggil2.kim@samsung.com>, linux-kernel@vger.kernel.org
Subject: [PATCH] arm64: kernel: Add module symbols _text, _etext.
Date: Thu,  9 Jul 2020 17:23:45 +0900	[thread overview]
Message-ID: <1594283025-4166-1-git-send-email-sanggil2.kim@samsung.com> (raw)
In-Reply-To: CGME20200709082408epcas2p4369fa8f06a57c7358be38282aae0f501@epcas2p4.samsung.com

From: Sanggil Kim <sanggil2.kim@samsung.com>

We have a solution to protect kernel code section(autually from _text to
_etext) by not MMU. In order to do this, we have to know the addresses
of _text and _etext at runtime.

Signed-off-by: Sanggil Kim <sanggil2.kim@samsung.com>
---
 arch/arm64/kernel/head.S | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S
index 037421c..09b405e 100644
--- a/arch/arm64/kernel/head.S
+++ b/arch/arm64/kernel/head.S
@@ -1003,3 +1003,6 @@ SYM_FUNC_START_LOCAL(__primary_switch)
 	adrp	x0, __PHYS_OFFSET
 	br	x8
 SYM_FUNC_END(__primary_switch)
+
+EXPORT_SYMBOL(_text)
+EXPORT_SYMBOL(_etext)
-- 
2.7.4


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

       reply	other threads:[~2020-07-09  8:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20200709082408epcas2p4369fa8f06a57c7358be38282aae0f501@epcas2p4.samsung.com>
2020-07-09  8:23 ` sanggil2.kim [this message]
2020-07-09  8:23   ` [PATCH] arm64: kernel: Add module symbols _text, _etext sanggil2.kim
2020-07-09  9:49   ` Will Deacon
2020-07-09  9:49     ` Will Deacon
2020-07-09 11:01     ` Christoph Hellwig
2020-07-09 11:01       ` Christoph Hellwig

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=1594283025-4166-1-git-send-email-sanggil2.kim@samsung.com \
    --to=sanggil2.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.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.