* [PATCH] arm64: kernel: Add module symbols _text, _etext.
[not found] <CGME20200709082408epcas2p4369fa8f06a57c7358be38282aae0f501@epcas2p4.samsung.com>
@ 2020-07-09 8:23 ` sanggil2.kim
2020-07-09 9:49 ` Will Deacon
0 siblings, 1 reply; 3+ messages in thread
From: sanggil2.kim @ 2020-07-09 8:23 UTC (permalink / raw)
To: linux-arm-kernel; +Cc: linux-kernel, Sanggil Kim
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: kernel: Add module symbols _text, _etext.
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 11:01 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Will Deacon @ 2020-07-09 9:49 UTC (permalink / raw)
To: sanggil2.kim; +Cc: linux-arm-kernel, linux-kernel
On Thu, Jul 09, 2020 at 05:23:45PM +0900, sanggil2.kim@samsung.com wrote:
> 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.
Interesting! Can you post patches so that we can implement this solution
upstream? Without an in-tree user, we won't be exporting these symbols.
Thanks,
Will
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: kernel: Add module symbols _text, _etext.
2020-07-09 9:49 ` Will Deacon
@ 2020-07-09 11:01 ` Christoph Hellwig
0 siblings, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2020-07-09 11:01 UTC (permalink / raw)
To: Will Deacon; +Cc: sanggil2.kim, linux-arm-kernel, linux-kernel
On Thu, Jul 09, 2020 at 10:49:51AM +0100, Will Deacon wrote:
> On Thu, Jul 09, 2020 at 05:23:45PM +0900, sanggil2.kim@samsung.com wrote:
> > 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.
>
> Interesting! Can you post patches so that we can implement this solution
> upstream? Without an in-tree user, we won't be exporting these symbols.
And even with that I'm pretty sure the code doing the 'protection'
should be built-in and not modular..
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-09 11:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20200709082408epcas2p4369fa8f06a57c7358be38282aae0f501@epcas2p4.samsung.com>
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 11:01 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).