+++ Jessica Yu [30/11/15 23:21 -0500]:
Reuse module loader code to write relocations, thereby eliminating the need
for architecture specific relocation code in livepatch. Namely, we reuse
apply_relocate_add() in the module loader to write relocations instead of
duplicating functionality in
ed to module
loader.
Signed-off-by: Jessica Yu
---
arch/x86/include/asm/livepatch.h | 2 -
arch/x86/kernel/Makefile | 1 -
arch/x86/kernel/livepatch.c | 91 --
include/linux/livepatch.h| 30 ++---
include/linux/module.h
) is called in do_init_module(). Keep a reference to syminfo if
the module is a livepatch module and free the structures in
module_arch_cleanup(). If the module isn't a livepatch module, we free the
structures in module_arch_freeing_init() as usual.
Signed-off-by: Jessica Yu
---
arch/s390/k
Create the array of klp relocation sections in the sample
klp_object (even if the array is empty in this case).
In addition, mark the module as a livepatch module so that
the module loader can appropriately identify and initialize it.
Signed-off-by: Jessica Yu
---
samples/livepatch/livepatch
cannot be determined at compile time (for
example, when kaslr is enabled). Livepatch modules must preserve Elf
information such as section indices in order to apply the remaining
relocation sections at the appropriate time (i.e. when the target module
loads).
Signed-off-by: Jessica Yu
---
include
Document the special Elf sections and constants livepatch modules use.
Signed-off-by: Jessica Yu
---
Documentation/livepatch/patch-module-format.txt | 117
1 file changed, 117 insertions(+)
create mode 100644 Documentation/livepatch/patch-module-format.txt
diff --git
STB_LIVEPATCH_EXT symbol bind marks the scope of certain livepatch
symbols, so that livepatch can appropriately resolve them.
Signed-off-by: Jessica Yu
---
include/uapi/linux/elf.h | 17 ++---
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/include/uapi/linux/elf.h b
n of livepatch modules
- s390: remove redundant vfree() and preserve mod_arch_specific if
livepatch module
- Use array format instead of a linked list for klp_reloc_secs
- Add new documentation describing the format of a livepatch module in
Documentation/livepatch
Jessica Yu (6):
Elf
+++ Miroslav Benes [13/11/15 13:56 +0100]:
On Fri, 13 Nov 2015, Miroslav Benes wrote:
I agree this seems like the best approach. So if we preserve
mod_arch_syminfo (in case of s390) we should free it not in
module_finalize, but somewhere in free_module... where
module_arch_cleanup() is called..
+++ Miroslav Benes [13/11/15 13:46 +0100]:
On Fri, 13 Nov 2015, Miroslav Benes wrote:
As for load_info, I don't have a strong opinion whether to keep it for all
modules or for livepatch modules only.
I have. We cannot keep it, even for livepatch modules...
In info->hdr there is a temporary c
+++ Petr Mladek [12/11/15 11:05 +0100]:
On Wed 2015-11-11 23:44:08, Jessica Yu wrote:
+++ Petr Mladek [11/11/15 15:31 +0100]:
>On Mon 2015-11-09 23:45:52, Jessica Yu wrote:
>>diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c
>>index 6e53441..087a8c7 100644
>>-
+++ Josh Poimboeuf [12/11/15 14:32 -0600]:
On Thu, Nov 12, 2015 at 03:22:44PM -0500, Jessica Yu wrote:
Looking into this more, I think we do need one __klp_rela section per
function being patched. Each rela section is linked to the section to
which the relocations apply via the rela section
+++ Josh Poimboeuf [12/11/15 09:45 -0600]:
On Mon, Nov 09, 2015 at 11:45:51PM -0500, Jessica Yu wrote:
Add livepatch elf reloc section flag, livepatch symbol bind
and section index
Signed-off-by: Jessica Yu
---
include/uapi/linux/elf.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a
+++ Miroslav Benes [12/11/15 15:19 +0100]:
On Thu, 12 Nov 2015, Petr Mladek wrote:
On Wed 2015-11-11 23:44:08, Jessica Yu wrote:
> +++ Petr Mladek [11/11/15 15:31 +0100]:
> >On Mon 2015-11-09 23:45:52, Jessica Yu wrote:
> >>diff --git a/kernel/livepatch/core.c b/kerne
+++ Miroslav Benes [12/11/15 14:22 +0100]:
On Thu, 12 Nov 2015, Petr Mladek wrote:
On Thu 2015-11-12 00:33:12, Jessica Yu wrote:
> +++ Miroslav Benes [11/11/15 15:17 +0100]:
> >On Mon, 9 Nov 2015, Jessica Yu wrote:
> >
> >>diff --git a/include/linux/module.h b/include/
+++ Josh Poimboeuf [12/11/15 11:05 -0600]:
On Thu, Nov 12, 2015 at 04:03:45PM +0100, Petr Mladek wrote:
On Thu 2015-11-12 14:22:28, Miroslav Benes wrote:
> On Thu, 12 Nov 2015, Petr Mladek wrote:
> > > >Maybe I am missing something but isn't it necessary to call vfree() on
> > > >info somewhere
+++ Jessica Yu [12/11/15 14:14 -0500]:
+++ Miroslav Benes [12/11/15 16:27 +0100]:
On Wed, 11 Nov 2015, Jessica Yu wrote:
+++ Miroslav Benes [11/11/15 15:30 +0100]:
On Mon, 9 Nov 2015, Jessica Yu wrote:
So I guess we don't need klp_reloc anymore.
Yes, that's correct. I am noticin
+++ Josh Poimboeuf [12/11/15 11:40 -0600]:
On Thu, Nov 12, 2015 at 04:27:01PM +0100, Miroslav Benes wrote:
On Wed, 11 Nov 2015, Jessica Yu wrote:
> +++ Miroslav Benes [11/11/15 15:30 +0100]:
> > On Mon, 9 Nov 2015, Jessica Yu wrote:
> >
> > So I guess we don't need
+++ Miroslav Benes [12/11/15 16:27 +0100]:
On Wed, 11 Nov 2015, Jessica Yu wrote:
+++ Miroslav Benes [11/11/15 15:30 +0100]:
> On Mon, 9 Nov 2015, Jessica Yu wrote:
>
> So I guess we don't need klp_reloc anymore.
Yes, that's correct. I am noticing just now that I f
+++ Petr Mladek [11/11/15 16:42 +0100]:
On Mon 2015-11-09 23:45:54, Jessica Yu wrote:
Intialize the list of relocation sections in the sample
klp_object (even if the list will be empty in this case).
Also mark module as a livepatch module so that the module
loader can appropriately initialize
+++ Miroslav Benes [11/11/15 15:17 +0100]:
On Mon, 9 Nov 2015, Jessica Yu wrote:
diff --git a/include/linux/module.h b/include/linux/module.h
index 3a19c79..c8680b1 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
[...]
+#ifdef CONFIG_LIVEPATCH
+extern void
+++ Petr Mladek [11/11/15 15:31 +0100]:
On Mon 2015-11-09 23:45:52, Jessica Yu wrote:
In livepatch modules, preserve section, symbol, string information from
the load_info struct in the module loader. This information is used to
patch modules that are not loaded in memory yet; specifically it
+++ Miroslav Benes [11/11/15 15:30 +0100]:
On Mon, 9 Nov 2015, Jessica Yu wrote:
diff --git a/include/linux/livepatch.h b/include/linux/livepatch.h
index 31db7a0..601e892 100644
--- a/include/linux/livepatch.h
+++ b/include/linux/livepatch.h
@@ -85,7 +85,7 @@ struct klp_reloc {
/**
* struct
+++ Petr Mladek [11/11/15 16:22 +0100]:
On Mon 2015-11-09 23:45:53, Jessica Yu wrote:
Reuse module loader code to write relocations, thereby eliminating the
need for architecture specific code in livepatch. Namely, we reuse
apply_relocate_add() in the module loader to write relocs instead of
+++ Josh Poimboeuf [10/11/15 07:50 -0600]:
On Tue, Nov 10, 2015 at 09:15:54AM +0100, Jiri Slaby wrote:
On 11/10/2015, 05:45 AM, Jessica Yu wrote:
> Intialize the list of relocation sections in the sample
> klp_object (even if the list will be empty in this case).
> Also mark mo
es these symbols (and does not attempt to resolve them).
Finally, the STB_LIVEPATCH_EXT symbol bind marks the scope of certain
livepatch symbols, so that livepatch can find the symbol in the right
place. These ELF constants were selected from OS-specific ranges according
to the definitions f
Intialize the list of relocation sections in the sample
klp_object (even if the list will be empty in this case).
Also mark module as a livepatch module so that the module
loader can appropriately initialize it.
Signed-off-by: Jessica Yu
---
samples/livepatch/livepatch-sample.c | 2 ++
1 file
Architecture-specific relocation code no longer needed, since symbol
resolution and relocation work will be offloaded to module loader.
Signed-off-by: Jessica Yu
---
arch/x86/kernel/Makefile| 1 -
arch/x86/kernel/livepatch.c | 91 -
2 files
.
Signed-off-by: Jessica Yu
---
include/linux/module.h | 25 +
kernel/livepatch/core.c | 17 +
kernel/module.c | 36 ++--
3 files changed, 64 insertions(+), 14 deletions(-)
diff --git a/include/linux/module.h b/include
Add livepatch elf reloc section flag, livepatch symbol bind
and section index
Signed-off-by: Jessica Yu
---
include/uapi/linux/elf.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h
index 71e1d0e..967ce1b 100644
--- a/include/uapi/linux
ation sections, remaining SHN_LIVEPATCH symbols referenced by
relocs are resolved and then apply_relocate_add() is called to apply
those relocations.
Signed-off-by: Jessica Yu
---
include/linux/livepatch.h | 11 --
include/linux/module.h| 6
kernel/livepatch/core.c
example of this issue is documented here:
https://github.com/dynup/kpatch/issues/493
Signed-off-by: Chris J Arges
Thanks Chris. Verified that the patch fixes the panic caused by
multiple functions with the same name and object.
Acked-by: Jessica Yu
--
To unsubscribe from this list: send
+++ Jiri Kosina [01/11/15 10:07 +0100]:
On Sat, 31 Oct 2015, Chris J Arges wrote:
Makes sense to me. Is there a reason why the sysfs entries are visible
to non-root users?
Well, kptr_restrict applies only to values printed using '%pK'. So if the
sysfs handler is using other printk() format st
+++ Chris J Arges [30/10/15 22:44 -0500]:
The following directory structure will allow for cases when the same
function name exists in a single object.
/sys/kernel/livepatch///
Hi Chris, thanks for the patch.
I think the last time this issue was discussed, the conclusion was
that conca
Remove extraneous space after open paren and before close paren.
Signed-off-by: Jessica Yu
---
drivers/staging/lustre/lustre/libcfs/linux/linux-module.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c
b/drivers
Remove unnecessary parens from return statements, return is not a function
Signed-off-by: Jessica Yu
---
drivers/staging/lustre/lustre/libcfs/linux/linux-module.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c
b
Add the const modifier to the file_operations struct, since it is
normally const.
Signed-off-by: Jessica Yu
---
drivers/staging/lustre/lustre/libcfs/linux/linux-module.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c
Fix pointer code style (foo * bar -> foo *bar)
Signed-off-by: Jessica Yu
---
drivers/staging/lustre/lustre/libcfs/linux/linux-module.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c
b/drivers/staging/lus
I revisited my original patch and realized that it should be split into
separate parts.
Jessica Yu (4):
Staging: lustre: linux-module: fix pointer style issue
Staging: lustre: linux-module: remove unnecessary spaces
Staging: lustre: linux-module: remove extraneous parens
Staging: lustre
* bar -> foo *bar)
Signed-off-by: Jessica Yu
---
drivers/staging/lustre/lustre/libcfs/linux/linux-module.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c
b/drivers/staging/lustre/lustre/libcfs/linux/li
Fixed some coding style issues.
Signed-off-by: Jessica Yu
---
drivers/staging/lustre/lustre/libcfs/linux/linux-module.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c
b/drivers/staging/lustre/lustre
Fixed some coding style issues.
Signed-off-by: Jessica Yu
---
drivers/staging/lustre/lustre/libcfs/linux/linux-module.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-module.c
b/drivers/staging/lustre/lustre
601 - 642 of 642 matches
Mail list logo