linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Rongwei Wang <rongwei.wang@linux.alibaba.com>
To: catalin.marinas@arm.com, will@kernel.org,
	bjorn.andersson@linaro.org, shawnguo@kernel.org
Cc: gshan@redhat.com, geert+renesas@glider.be, Anson.Huang@nxp.com,
	masahiroy@kernel.org, michael@walle.cc, krzk@kernel.org,
	linux-kernel@vger.kernel.org, vkoul@kernel.org, olof@lixom.net,
	vincenzo.frascino@arm.com, ardb@kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] arm64:insn: Export symbols for MSR ARM driver
Date: Tue,  1 Dec 2020 01:48:31 +0800	[thread overview]
Message-ID: <20201130174833.41315-2-rongwei.wang@linux.alibaba.com> (raw)
In-Reply-To: <20201130174833.41315-1-rongwei.wang@linux.alibaba.com>

In order to use the MSR-ARM driver in module and built-in ways, we need export
following symbols.

The MSR-ARM driver depends on function aarch64_insn_patch_text to modify the
text at runtime, and function aarch64_insn_read to read one instruction in the
specified address.

In addition, we need register_undef_hook and unregister_undef_hook to handle
the low probability undefined exception which triggered only by MSR-ARM driver.

Signed-off-by: Rongwei Wang <rongwei.wang@linux.alibaba.com>
---
 arch/arm64/kernel/insn.c  | 2 ++
 arch/arm64/kernel/traps.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/arch/arm64/kernel/insn.c b/arch/arm64/kernel/insn.c
index 6c0de2f..67a1f78 100644
--- a/arch/arm64/kernel/insn.c
+++ b/arch/arm64/kernel/insn.c
@@ -135,6 +135,7 @@ int __kprobes aarch64_insn_read(void *addr, u32 *insnp)
 
 	return ret;
 }
+EXPORT_SYMBOL(aarch64_insn_read);
 
 static int __kprobes __aarch64_insn_write(void *addr, __le32 insn)
 {
@@ -247,6 +248,7 @@ int __kprobes aarch64_insn_patch_text(void *addrs[], u32 insns[], int cnt)
 	return stop_machine_cpuslocked(aarch64_insn_patch_text_cb, &patch,
 				       cpu_online_mask);
 }
+EXPORT_SYMBOL(aarch64_insn_patch_text);
 
 static int __kprobes aarch64_get_imm_shift_mask(enum aarch64_insn_imm_type type,
 						u32 *maskp, int *shiftp)
diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c
index 8af4e0e..c76efa5 100644
--- a/arch/arm64/kernel/traps.c
+++ b/arch/arm64/kernel/traps.c
@@ -292,6 +292,7 @@ void register_undef_hook(struct undef_hook *hook)
 	list_add(&hook->node, &undef_hook);
 	raw_spin_unlock_irqrestore(&undef_lock, flags);
 }
+EXPORT_SYMBOL(register_undef_hook);
 
 void unregister_undef_hook(struct undef_hook *hook)
 {
@@ -301,6 +302,7 @@ void unregister_undef_hook(struct undef_hook *hook)
 	list_del(&hook->node);
 	raw_spin_unlock_irqrestore(&undef_lock, flags);
 }
+EXPORT_SYMBOL(unregister_undef_hook);
 
 static int call_undef_hook(struct pt_regs *regs)
 {
-- 
1.8.3.1


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

  reply	other threads:[~2020-11-30 17:50 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-30 17:48 [PATCH 0/3] arm64:msr: Add MSR driver Rongwei Wang
2020-11-30 17:48 ` Rongwei Wang [this message]
2020-11-30 17:48 ` [PATCH 2/3] arm64:msr: Introduce MSR ARM driver Rongwei Wang
2020-11-30 17:48 ` [PATCH 3/3] arm64:msr: Enable " Rongwei Wang
2020-11-30 17:57 ` [PATCH 0/3] arm64:msr: Add MSR driver Will Deacon
2020-12-01  2:55   ` wangrongwei
2020-12-01  5:44   ` wangrongwei
2020-11-30 18:05 ` Marc Zyngier
2020-11-30 18:20   ` Randy Dunlap
2020-12-01  3:09   ` wangrongwei
2020-12-01  8:12     ` Marc Zyngier
2020-12-01 14:25       ` wangrongwei
2020-12-01 15:37         ` Marc Zyngier
2020-12-03  5:45           ` Rongwei Wang
2020-12-03  8:35             ` Marc Zyngier
2020-12-03 11:25               ` Rongwei Wang
2020-12-03 11:45                 ` Marc Zyngier
2020-12-03 12:22                   ` Rongwei Wang
2020-12-03 11:50                 ` Mark Rutland
2020-11-30 19:03 ` Borislav Petkov
2020-12-01  3:44   ` wangrongwei
2020-12-01 11:26     ` Borislav Petkov
2020-12-01 14:33       ` wangrongwei
2020-12-01 14:54         ` Borislav Petkov
2020-12-01 15:17           ` Rongwei Wang
2020-12-01 15:25             ` Borislav Petkov
2020-12-03  2:09               ` Rongwei Wang
2020-12-01 15:26             ` Ard Biesheuvel

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=20201130174833.41315-2-rongwei.wang@linux.alibaba.com \
    --to=rongwei.wang@linux.alibaba.com \
    --cc=Anson.Huang@nxp.com \
    --cc=ardb@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=geert+renesas@glider.be \
    --cc=gshan@redhat.com \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=michael@walle.cc \
    --cc=olof@lixom.net \
    --cc=shawnguo@kernel.org \
    --cc=vincenzo.frascino@arm.com \
    --cc=vkoul@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 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).