mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tim Abbott <tabbott@MIT.EDU>
To: linux-kernel@vger.kernel.org
Cc: Tim Abbott <tabbott@MIT.EDU>, Anders Kaseorg <andersk@MIT.EDU>,
	Jeff Arnold <jbarnold@MIT.EDU>, Waseem Daher <wdaher@MIT.EDU>,
	Denys Vlasenko <vda.linux@googlemail.com>,
	Nikanth Karthikesan <knikanth@suse.de>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Andi Kleen <andi@firstfloor.org>
Subject: [PATCH v2 3/4] Ksplice: Export symbols needed for Ksplice
Date: Tue, 24 Feb 2009 19:21:54 -0500	[thread overview]
Message-ID: <1235521315-3424-4-git-send-email-tabbott@mit.edu> (raw)
In-Reply-To: <1235521315-3424-3-git-send-email-tabbott@mit.edu>

Ksplice uses __module_address and __module_text_address to determine
which module contains various addresses.

Ksplice uses __kernel_text_address to limit its check for trampolines
(jump instructions inserted by Ksplice) to only text addresses.

Ksplice uses task_curr in order to confirm that no other tasks are
executing during Ksplice's kernel stack check.

Ksplice uses find_bug and search_exception_tables as part of its
conservative check that the user provided the correct source code for
the running kernel.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
---
 kernel/extable.c |    3 +++
 kernel/module.c  |    2 ++
 kernel/sched.c   |    1 +
 lib/bug.c        |    1 +
 4 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/kernel/extable.c b/kernel/extable.c
index 384f0da..ce08fe8 100644
--- a/kernel/extable.c
+++ b/kernel/extable.c
@@ -40,6 +40,7 @@ const struct exception_table_entry *search_exception_tables(unsigned long addr)
 		e = search_module_extables(addr);
 	return e;
 }
+EXPORT_SYMBOL_GPL(search_exception_tables);
 
 __notrace_funcgraph int core_kernel_text(unsigned long addr)
 {
@@ -60,6 +61,7 @@ __notrace_funcgraph int __kernel_text_address(unsigned long addr)
 		return 1;
 	return is_module_text_address(addr);
 }
+EXPORT_SYMBOL_GPL(__kernel_text_address);
 
 int kernel_text_address(unsigned long addr)
 {
@@ -83,3 +85,4 @@ int func_ptr_is_kernel_text(void *ptr)
 		return 1;
 	return is_module_text_address(addr);
 }
+EXPORT_SYMBOL_GPL(kernel_text_address);
diff --git a/kernel/module.c b/kernel/module.c
index 77fbf38..b3135db 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2760,6 +2760,7 @@ __notrace_funcgraph struct module *__module_address(unsigned long addr)
 			return mod;
 	return NULL;
 }
+EXPORT_SYMBOL_GPL(__module_address);
 
 /*
  * is_module_text_address - is this address inside module code?
@@ -2798,6 +2799,7 @@ struct module *__module_text_address(unsigned long addr)
 	}
 	return mod;
 }
+EXPORT_SYMBOL_GPL(__module_text_address);
 
 /* Don't grab lock, we're oopsing. */
 void print_modules(void)
diff --git a/kernel/sched.c b/kernel/sched.c
index c1d0ed3..a35f940 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1801,6 +1801,7 @@ inline int task_curr(const struct task_struct *p)
 {
 	return cpu_curr(task_cpu(p)) == p;
 }
+EXPORT_SYMBOL_GPL(task_curr);
 
 static inline void __set_task_cpu(struct task_struct *p, unsigned int cpu)
 {
diff --git a/lib/bug.c b/lib/bug.c
index 300e41a..c8491f9 100644
--- a/lib/bug.c
+++ b/lib/bug.c
@@ -124,6 +124,7 @@ const struct bug_entry *find_bug(unsigned long bugaddr)
 
 	return module_find_bug(bugaddr);
 }
+EXPORT_SYMBOL_GPL(find_bug);
 
 enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
 {
-- 
1.6.1.3


  reply	other threads:[~2009-02-25  0:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-25  0:21 [PATCH v2 0/4] Ksplice: Rebootless kernel updates Tim Abbott
2009-02-25  0:21 ` [PATCH v2 1/4] Make section names compatible with -ffunction-sections -fdata-sections Tim Abbott
2009-02-25  0:21   ` [PATCH v2 2/4] x86: Add an option to compile " Tim Abbott
2009-02-25  0:21     ` Tim Abbott [this message]
2009-02-25  0:21       ` [PATCH v2 4/4] Ksplice: Support updating x86-32 and x86-64 Tim Abbott
2009-02-25  1:21     ` [PATCH v2 2/4] x86: Add an option to compile with -ffunction-sections -fdata-sections H. Peter Anvin
2009-02-27  2:10       ` [PATCH] modpost: Check the section flags, not name, to catch missing "ax"/"aw" Anders Kaseorg
2009-02-27 12:35         ` H. Peter Anvin

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=1235521315-3424-4-git-send-email-tabbott@mit.edu \
    --to=tabbott@mit.edu \
    --cc=andersk@MIT.EDU \
    --cc=andi@firstfloor.org \
    --cc=jbarnold@MIT.EDU \
    --cc=knikanth@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=vda.linux@googlemail.com \
    --cc=wdaher@MIT.EDU \
    /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

Powered by JetHome