this isn't the direction we want to go for proper
kselftests, but perhaps it saves you some time/sanity for verifying this
patchset.
Hope this helps,
-- Joe
-- >8 -- >8 -- >8 -- >8 --
>From 0364430c53e12e21923bed20cb651374b4cf9ba9 Mon Sep 17 00:00:00 2001
From: Joe Lawrence
Date: Tue, 6
/livepatch
- Renamed livepatch.sh (filename suffix)
- Reduced between-test delay time
- Split off common functions.sh file
- Split into separate livepatch, callbacks, and shadow-vars scrips
- Gave the tests short descriptions instead of TEST1, TEST2, etc.
Joe Lawrence (1):
selftests/livepatch: i
Add a few livepatch modules and simple target modules that the included
regression suite can run tests against.
Signed-off-by: Joe Lawrence
---
lib/Kconfig.debug | 12 +
lib/Makefile | 2 +
lib/livepatch/Makefile
On 03/08/2018 10:01 AM, Petr Mladek wrote:
> On Wed 2018-03-07 16:55:53, Joe Lawrence wrote:
>> Running against v10, callbacks seem to be good up until I disable an
>> atomic replace patch. My understanding is that the original patch's
>> unpatch callbacks should be skipp
fc:
- SPDX-License-Identifiers
- Moved livepatch test modules into lib/livepatch
- Renamed livepatch.sh (filename suffix)
- Reduced between-test delay time
- Split off common functions.sh file
- Split into separate livepatch, callbacks, and shadow-vars scrips
- Gave the tests short descriptions inst
Add a few livepatch modules and simple target modules that the included
regression suite can run tests against:
- basic livepatching (multiple patches, atomic replace)
- pre/post (un)patch callbacks
- shadow variable API
Signed-off-by: Joe Lawrence
---
Documentation/livepatch
>On 04/25/2018 02:28 PM, Joe Lawrence wrote:
> [ ... snip ... ]
>
> base-commit: 0adb32858b0bddf4ada5f364a84ed60b196dbcda
> prerequisite-patch-id: 5ed747c1a89a5dc4bba08186e21f927d7f3bf049
> prerequisite-patch-id: e9800288b71a9f339ea066e58d9ef70dece67083
>
On Fri, May 11, 2018 at 10:53:24AM +0800, Ye Xiaolong wrote:
> Hi, Joe
>
> Sorry for the late response.
Hi Xiaolong, no worries...
> On 04/26, Joe Lawrence wrote:
> >>On 04/25/2018 02:28 PM, Joe Lawrence wrote:
> >
> >> [ .
On 08/29/2017 11:49 AM, Josh Poimboeuf wrote:
> On Fri, Aug 25, 2017 at 03:10:00PM -0400, Joe Lawrence wrote:
>> +Test 6
>> +--
>> +
>> +Test a scenario where a vmlinux pre-patch callback returns a non-zero
>> +status (ie, failure):
>> +
>> +- lo
On Tue, Aug 29, 2017 at 02:59:12PM -0500, Josh Poimboeuf wrote:
> On Tue, Aug 29, 2017 at 03:22:06PM -0400, Joe Lawrence wrote:
> > On 08/29/2017 11:49 AM, Josh Poimboeuf wrote:
> > > On Fri, Aug 25, 2017 at 03:10:00PM -0400, Joe Lawrence wrote:
> > >> +Test 6
> &
: 'livepatch_callbacks_demo': unpatching complete
% rmmod samples/livepatch/livepatch-callbacks-demo.ko
% rmmod samples/livepatch/livepatch-callbacks-mod.ko
[ 100.986947] livepatch_callbacks_mod: livepatch_callbacks_mod_exit
-- Joe
Joe Lawrence (3):
livepatch: add (un)patch callbacks
live
transition() and into klp_complete_transition().
Suggested-by: Josh Poimboeuf
Signed-off-by: Joe Lawrence
---
kernel/livepatch/transition.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/livepatch/transition.c b/kernel/livepatch/transition.c
index 7bf55b7f3687..53887f0bca10 100644
--
as the above messages.
Suggested-by: Josh Poimboeuf
Signed-off-by: Joe Lawrence
---
kernel/livepatch/transition.c | 18 +-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/kernel/livepatch/transition.c b/kernel/livepatch/transition.c
index 53887f0bca10..3d44a3cf27be 100644
include modification of global data and registration
of newly available services/handlers.
See Documentation/livepatch/callbacks.txt for details and
samples/livepatch/ for examples.
Signed-off-by: Joe Lawrence
---
Documentation/livepatch/callbacks.txt | 594
Hi Joao,
A few nitpicks in-line below...
On Tue, Aug 29, 2017 at 04:01:34PM -0300, Joao Moreira wrote:
> For automatic resolution of livepatch relocations, a file called
> Symbols.list is used. This file maps symbols within every compiled
> kernel object allowing the identification of symbols
mutual exclusion
Joe Lawrence (1):
livepatch: introduce shadow variable API
Documentation/livepatch/shadow-vars.txt | 192 +
include/linux/livepatch.h | 8 +
kernel/livepatch/Makefile | 2 +-
kernel/livepatch/shadow.c
ate shadow variables.
Signed-off-by: Joe Lawrence
---
Documentation/livepatch/shadow-vars.txt | 192 +
include/linux/livepatch.h | 8 +
kernel/livepatch/Makefile | 2 +-
kernel/livepatch/shadow.c | 277 +
ed
[ 102.977392] % rmmod samples/livepatch/livepatch-callbacks-demo.ko
Part 1: Livepatch is loaded first, so vmlinux callbacks run
Part 2: The livepatch's pre-patch-callback is setup to now return
-ENODEV
Part 3: When a targetted module is loaded, the pre-patch-callback
returns -ENODEV an
include modification of global data and registration
of newly available services/handlers.
See Documentation/livepatch/callback.txt for details.
Signed-off-by: Joe Lawrence
---
Documentation/livepatch/callbacks.txt| 87
include/linux/livepatch.h| 81
On 08/17/2017 10:05 AM, Petr Mladek wrote:
> On Mon 2017-08-14 16:02:43, Joe Lawrence wrote:
>> Add exported API for livepatch modules:
>>
>> klp_shadow_get()
>> klp_shadow_attach()
>> klp_shadow_get_or_attach()
>> klp_shadow_up
On 08/17/2017 10:05 AM, Petr Mladek wrote:
> On Mon 2017-08-14 16:02:43, Joe Lawrence wrote:
>> [ ... snip ... ]
>> diff --git a/samples/livepatch/livepatch-shadow-fix1.c
>> b/samples/livepatch/livepatch-shadow-fix1.c
>> new file mode 100644
>> index 00
On 08/18/2017 10:04 AM, Petr Mladek wrote:
> On Fri 2017-08-18 15:44:29, Nicolai Stange wrote:
>> Joe Lawrence writes:
>>
>>
>>> +
>>> +/**
>>> + * klp_shadow_get() - retrieve a shadow variable data pointer
>>> + * @obj: pointer
On 08/17/2017 10:05 AM, Petr Mladek wrote:
> On Mon 2017-08-14 16:02:43, Joe Lawrence wrote:
>> [ ... snip ... ]
>> +/* Allocate a new shadow variable for use inside the lock below */
>> +new_shadow = kzalloc(size + sizeof(*new_shadow), gfp_flags);
>
> We sh
objects fails to patch,
klp_module_coming()'s error path needs to unpatch and cleanup any kernel
objects that were already patched by a previous patch.
Reported-by: Miroslav Benes
Suggested-by: Petr Mladek
Signed-off-by: Joe Lawrence
---
v2:
- cleanup comment describing the new function
- s
ng the
new value from the user buffer, verifying bounds, and calling
round_pipe_size() with a single assignment to pipe_max_size.
Reported-by: Mikulas Patocka
Signed-off-by: Joe Lawrence
---
v2:
- Fix !CONFIG_PROC_SYSCTL build case
fs/pipe.c | 16 ++--
inc
transition() and into klp_complete_transition().
Suggested-by: Josh Poimboeuf
Signed-off-by: Joe Lawrence
Acked-by: Miroslav Benes
Reviewed-by: Petr Mladek
---
kernel/livepatch/transition.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/livepatch/transition.c b/kernel/livepatch/transiti
as the above messages.
Suggested-by: Josh Poimboeuf
Signed-off-by: Joe Lawrence
Acked-by: Miroslav Benes
---
kernel/livepatch/transition.c | 18 +-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/kernel/livepatch/transition.c b/kernel/livepatch/transition.c
index 53887f0bca10
include modification of global data and registration
of newly available services/handlers.
See Documentation/livepatch/callbacks.txt for details and
samples/livepatch/ for examples.
Signed-off-by: Joe Lawrence
---
Documentation/livepatch/callbacks.txt | 605
ist to a single per-klp_object instance
- revamp the sample callback demo
- revamp documentation
Joe Lawrence (3):
livepatch: add (un)patch callbacks
livepatch: move transition "complete" notice into
klp_complete_transition()
livepatch: add transition notices
Documentation/livepatch/
On 10/10/2017 02:04 PM, Joe Lawrence wrote:
> While backporting Michael's "pipe: fix limit handling" patchset to a
> distro-kernel, Mikulas noticed that current upstream pipe limit handling
> contains a few problems:
>
> 1 - procfs signed wrap: echo'ing a large number
objects fails to patch,
klp_module_coming()'s error path needs to unpatch and cleanup any kernel
objects that were already patched by a previous patch.
Reported-by: Miroslav Benes
Suggested-by: Petr Mladek
Signed-off-by: Joe Lawrence
---
v1:
- separated this patch from the klp_callbacks
pipe: simplify round_pipe_size()
> pipe: read buffer limits atomically
>
> fs/pipe.c | 57
> ---
> include/linux/pipe_fs_i.h | 5 ++---
> include/linux/sysctl.h| 3 ---
> kernel/sysctl.c | 33 +--
> 4 files changed, 32 ins
On 09/19/2017 03:53 AM, Mikulas Patocka wrote:
> On Fri, 15 Sep 2017, Joe Lawrence wrote:
> [ ... snip ... ]
>> Hi Mikulas,
>>
>> I'm not strong when it comes to memory barriers, but one of the
>> side-effects of using the mutex is that pipe_set_size() and
&g
On 09/14/2017 07:09 PM, Mikulas Patocka wrote:
> On Tue, 5 Sep 2017, Joe Lawrence wrote:
>
>> pipe_max_size is assigned directly via procfs sysctl:
>>
>> static struct ctl_table fs_table[] = {
>> ...
>> {
>>
On Wed, Sep 20, 2017 at 01:19:05PM +0200, Miroslav Benes wrote:
> On Wed, 13 Sep 2017, Joe Lawrence wrote:
>
> > Hi Miroslav,
>
> Hi,
>
> sorry for the late response. I'm also travelling now and we have SUSECon
> conference next week, so just a quick answer.
On Thu, Aug 10, 2017 at 04:40:05PM +0200, Miroslav Benes wrote:
>
> It generally looks ok. Only few questions below...
>
> [...]
>
> > +In-flight parent objects
> > +
> > + ps_lock = klp_shadow_get_or_attach(sta, PS_LOCK,
> > + _lock_fallback,
() and
klp_shadow_free_all()
- Samples: Fix use-after-free in memory leak fix modules
- Doc: Simplify code in sta_info_free() use-case
Joe Lawrence (1):
livepatch: introduce shadow variable API
Documentation/livepatch/shadow-vars.txt | 191 +++
include/linux/livepatch.h
ate shadow variables.
Signed-off-by: Joe Lawrence
---
Documentation/livepatch/shadow-vars.txt | 191 +++
include/linux/livepatch.h | 8 +
kernel/livepatch/Makefile | 2 +-
kernel/livepatch/shadow.c | 295 +
On Fri, Aug 18, 2017 at 03:58:16PM +0200, Petr Mladek wrote:
> On Wed 2017-08-16 15:17:04, Joe Lawrence wrote:
> > Provide livepatch modules a klp_object (un)patching notification
> > mechanism. Pre and post-(un)patch callbacks allow livepatch modules to
> > setup o
transition() and into klp_complete_transition().
Signed-off-by: Joe Lawrence
Suggested-by: Josh Poimboeuf
---
kernel/livepatch/transition.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/livepatch/transition.c b/kernel/livepatch/transition.c
index 7bf55b7f3687..53887f0bca10 100644
--
as the above messages.
Signed-off-by: Joe Lawrence
Suggested-by: Josh Poimboeuf
---
kernel/livepatch/transition.c | 18 +-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/kernel/livepatch/transition.c b/kernel/livepatch/transition.c
index 53887f0bca10..3d44a3cf27be 100644
include modification of global data and registration
of newly available services/handlers.
See Documentation/livepatch/callbacks.txt for details and
samples/livepatch/ for examples.
Signed-off-by: Joe Lawrence
---
Documentation/livepatch/callbacks.txt | 595
operations.
Note that these two patches could be standalone, I include them here
in this patchset since they affect the content/ordering of kernel logs
that were included as part of the Documentation.
Joe Lawrence (3):
livepatch: add (un)patch callbacks
livepatch: move transiti
() and klp_module_coming/going()
- reduce callbacks from a list to a single per-klp_object instance
- revamp the sample callback demo
- revamp documentation
Feedback appreciated as always.
Joe Lawrence (1):
livepatch: add (un)patch callbacks
Documentation/livepatch/callbacks.txt| 75
include modification of global data and registration
of newly available services/handlers.
See Documentation/livepatch/callback.txt for details.
Signed-off-by: Joe Lawrence
---
Documentation/livepatch/callbacks.txt| 75 +++
include/linux/livepatch.h| 38
ue.
Patch 3 - procfs signed wrap
Before:
% echo 2147483647 >/proc/sys/fs/pipe-max-size
% cat /proc/sys/fs/pipe-max-size
-2147483648
After:
% echo 2147483647 >/proc/sys/fs/pipe-max-size
% cat /proc/sys/fs/pipe-max-size
2147483648
Joe Lawrence (3):
pipe: avoid round
Reported-by: Mikulas Patocka
Signed-off-by: Joe Lawrence
---
fs/pipe.c | 28
1 file changed, 24 insertions(+), 4 deletions(-)
diff --git a/fs/pipe.c b/fs/pipe.c
index fa28910b3c59..33bb11b0d78e 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -35,6 +35,11 @@
unsigned int pip
size value, and update callers to handle accordingly.
Reported-by: Mikulas Patocka
Signed-off-by: Joe Lawrence
---
fs/pipe.c | 18 --
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/fs/pipe.c b/fs/pipe.c
index 97e5be897753..fa28910b3c59 100644
--- a/fs/pipe
s/fs/pipe-max-size
-2147483648
Use unsigned operations on this variable to avoid such negative values.
Reported-by: Mikulas Patocka
Signed-off-by: Joe Lawrence
---
fs/pipe.c | 2 +-
kernel/sysctl.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/pipe.c b/fs
On 08/11/2017 12:35 PM, Josh Poimboeuf wrote:
> On Fri, Jul 28, 2017 at 01:25:22PM -0400, Joe Lawrence wrote:
>> Add exported API for livepatch modules:
>>
>> klp_shadow_get()
>> klp_shadow_attach()
>> klp_shadow_get_or_attach()
>> klp_shadow_up
On 08/11/2017 04:44 PM, Josh Poimboeuf wrote:
> On Tue, Aug 08, 2017 at 03:36:07PM -0400, Joe Lawrence wrote:
>> +++ b/Documentation/livepatch/callbacks.txt
>> @@ -0,0 +1,75 @@
>> +(Un)patching Callbacks
>> +==
>> +
>> +Livepatch
or example modules that
demonstrate shadow variables.
Signed-off-by: Joe Lawrence
---
Documentation/livepatch/shadow-vars.txt | 215 +
include/linux/livepatch.h | 10 +
kernel/livepatch/Makefile | 2 +-
kernel/livepatch/shadow.c
(), klp_shadow_set(), klp_shadow_add()
- add "caller should hold lock" comments
- Documentation
- remove unnecessary klp_shadow_get() call in use-case
- s/its shadow variable lifetimes/their shadow variables lifetimes/
Joe Lawrence (1):
livepatch: introduce shadow variable API
Doc
On 08/16/2017 08:43 AM, Miroslav Benes wrote:
>
>> [ ... snip ... ]
>
> There is a comment above about locking and we do not take the spinlock
> here. That could surprise someone. So I'd keep only klp_shadow_add()
> comment, because there it is strictly needed. It depends on the context in
>
atch-callbacks-demo3.ko
% rmmod samples/livepatch/livepatch-callbacks-demo2.ko
% rmmod samples/livepatch/livepatch-callbacks-demo.ko
-->8-- -->8-- -->8-- -->8-- -->8-- -->8-- -->8-- -->8-- -->8-- -->8--
>From b80b90cb54b498d2b1165d409ce4b0ca47610b36 Mon Sep 17 00
On 09/14/2017 12:57 PM, Randy Dunlap wrote:
> On 09/14/17 06:26, Michael Kerrisk (man-pages) wrote:
>> Hello Joe,
>>
>> On 5 September 2017 at 16:44, Joe Lawrence wrote:
>>> While backporting Michael's "pipe: fix limit handling" [1] patchset to a
>>
On 09/14/2017 07:09 PM, Mikulas Patocka wrote:
> On Tue, 5 Sep 2017, Joe Lawrence wrote:
>> pipe_max_size is assigned directly via procfs sysctl:
>>
>> static struct ctl_table fs_table[] = {
>> ...
>> {
>>
gt; *data,
> size_t size, gfp_t gfp_flags, bool warn_on_exist)
> {
> struct klp_shadow *new_shadow;
> --
> 1.8.5.6
Acked-by: Joe Lawrence
Thanks for cleaning this up, Jiri.
Also thanks to Miroslav, Petr, Nicolai and Josh for the patchset
reviews!
-- Joe
On 07/20/2017 12:17 AM, Josh Poimboeuf wrote:
> - The pre-patch and pre-unpatch hooks can be run before the
> patching/unpatching process begins.
Hi Josh,
By "(un)patching process" are you referring to the klp_patch at large or
each klp_object? ie, would all klp_objects execute their hooks
erhaul usage/comments, drop the verbose dmesg logs
Joe Lawrence (1):
livepatch: introduce shadow variable API
Documentation/livepatch/shadow-vars.txt | 217 +
include/linux/livepatch.h | 10 +
kernel/livepatch/Makefile | 2 +-
kernel/livepa
or exmaple modules that
demonstrate shadow variables.
Signed-off-by: Joe Lawrence
---
Documentation/livepatch/shadow-vars.txt | 217 +
include/linux/livepatch.h | 10 +
kernel/livepatch/Makefile | 2 +-
kernel/livepatch/shadow.c
On 07/27/2017 05:36 PM, Josh Poimboeuf wrote:
> On Thu, Jul 27, 2017 at 04:43:58PM -0400, Joe Lawrence wrote:
>> On 07/20/2017 12:17 AM, Josh Poimboeuf wrote:
>>> - The post-patch and post-unpatch hooks will need to be run from either
>>> klp_complete_transition()
Add a few livepatch modules and simple target modules that the included
regression suite can run tests against.
Signed-off-by: Joe Lawrence
---
Documentation/livepatch/callbacks.txt | 487 -
lib/Kconfig.debug | 12 +
lib/Makefile
safely
https://lkml.kernel.org/r/20180405122315.29065-1-pmla...@suse.com
which have been combined into a git tree, then branched:
https://github.com/joe-lawrence/linux/tree/klp_kselftest_base
https://github.com/joe-lawrence/linux/tree/klp_kselftest_v3
so that the kbuild test robot could verify
On 04/13/2018 07:20 AM, Miroslav Benes wrote:
> Hi,
>
> On Thu, 12 Apr 2018, Joe Lawrence wrote:
>
>> Add a few livepatch modules and simple target modules that the included
>> regression suite can run tests against.
>
> Could you include a brief description whi
livepatch.sh (filename suffix)
- Reduced between-test delay time
- Split off common functions.sh file
- Split into separate livepatch, callbacks, and shadow-vars scrips
- Gave the tests short descriptions instead of TEST1, TEST2, etc.
Joe Lawrence (1):
selftests/livepatch: introduce tests
Add a few livepatch modules and simple target modules that the included
regression suite can run tests against.
Signed-off-by: Joe Lawrence
---
Documentation/livepatch/callbacks.txt | 487 -
lib/Kconfig.debug | 12 +
lib/Makefile
On 04/10/2018 04:00 PM, Josh Poimboeuf wrote:
> On Tue, Apr 10, 2018 at 11:15:54AM -0400, Joe Lawrence wrote:
>> +static void test_klp_shadow_vars_exit(void)
>> +{
>> +}
>> +
>> +module_init(test_klp_shadow_vars_init);
>> +module_init(test_klp_shadow
On 04/17/2018 04:06 AM, Miroslav Benes wrote:
> On Mon, 16 Apr 2018, Petr Mladek wrote:
>
>> On Mon 2018-04-16 13:33:55, Miroslav Benes wrote:
>>> On Fri, 13 Apr 2018, Joe Lawrence wrote:
>>>> Thanks for reviewing. I'll hold off on posting v4 until Petr (and
>
On Fri, Apr 20, 2018 at 02:56:05PM +0200, Libor Pechacek wrote:
> Hi Joe,
>
> I know I am late to the party, yet have some questions about the code.
Hi Libor,
I'm planning another version, so you're comments are not too late!
> On Thu 12-04-18 10:54:31, Joe Lawrence wrote:
&
On 04/23/2018 10:43 AM, Joe Lawrence wrote:
> On Fri, Apr 20, 2018 at 02:56:05PM +0200, Libor Pechacek wrote:
>> On Thu 12-04-18 10:54:31, Joe Lawrence wrote:
>>> + fi
>>> + echo "$ret" > /dev/kmsg
>>> +}
>>> +
>>> +# unload_
On Fri, Apr 06, 2018 at 09:36:46PM -0500, Josh Poimboeuf wrote:
> On Wed, Mar 28, 2018 at 03:49:48PM -0400, Joe Lawrence wrote:
> > Add a few livepatch modules and simple target modules that the included
> > regression suite can run tests against.
> >
> >
16 16:15:06 localhost kernel: runnable tasks:
Mar 16 16:15:06 localhost kernel: S task PID tree-key ...
Signed-off-by: Joe Lawrence
---
kernel/sched/debug.c | 27 ---
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/kernel/sched/deb
didn't suffer from these issues and its
output remains unchanged by this patchset.
Joe Lawrence (2):
sched/debug: fix per-task line continuation for console
sched/debug: adjust newlines for better alignment
kernel/sched/debug.c | 29 +
1 file changed, 17 insertions
runnable tasks:
...
[ 106.716329] Scpuhp/537 2006.31502614 120
0.00 0.496893 0.00 0 0 /
Signed-off-by: Joe Lawrence
---
kernel/sched/debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/debug.
On 03/19/2018 04:17 PM, Peter Zijlstra wrote:
> On Mon, Mar 19, 2018 at 02:35:54PM -0400, Joe Lawrence wrote:
>> When the SEQ_printf() macro prints to the console, it runs a simple
>> printk() without KERN_CONT "continued" line printing. The result of
>>
On 03/07/2018 03:20 AM, Petr Mladek wrote:
> The atomic replace allows to create cumulative patches. They
> are useful when you maintain many livepatches and want to remove
> one that is lower on the stack. In addition it is very useful when
> more patches touch the same function and there are
On 02/23/2018 05:41 AM, Miroslav Benes wrote:
> On Wed, 21 Feb 2018, Petr Mladek wrote:
>
>> User documentation for the atomic replace feature. It makes it easier
>> to maintain livepatches using so-called cumulative patches.
>>
>> Signed-off-by: Petr Mladek
>
> Acked-by: Miroslav Benes
>
>
Update livepatch callback documentation and samples with respect to new
atomic replace / cumulative patch functionality.
Signed-off-by: Joe Lawrence
---
Documentation/livepatch/callbacks.txt | 102
samples/livepatch/Makefile| 1 +
samples/livepatch
Add a simple atomic replace / cumulative livepatch example.
Signed-off-by: Joe Lawrence
---
samples/livepatch/Makefile | 1 +
samples/livepatch/livepatch-cumulative.c | 216 +++
2 files changed, 217 insertions(+)
create mode 100644 samples/livepatch
Update livepatch shadow variable documentation with respect to new
atomic replace / cumulative patch functionality.
Signed-off-by: Joe Lawrence
---
Documentation/livepatch/shadow-vars.txt | 24
1 file changed, 24 insertions(+)
diff --git a/Documentation/livepatch
some kind. Having regression tests would ease the burden of
reviewing patches and accounting for all these use cases!
Hope these help, let me know if you'd like any modification or other
tests.
Joe Lawrence (3):
livepatch: add sample cumulative patch
livepatch: update documentation/samples for
On 03/01/2018 05:28 AM, Petr Mladek wrote:
> On Thu 2018-02-22 22:00:28, Miroslav Benes wrote:
>> On Wed, 21 Feb 2018, Petr Mladek wrote:
>>> This patch allows the late initialization.
>>>
>>> diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c
>>> index ad508a86b2f9..da1438d47d83
On 03/02/2018 06:11 AM, Petr Mladek wrote:
> On Tue 2018-02-27 09:58:40, Joe Lawrence wrote:
>> In my mind, atomic replace is the mechanism that forces patching to be
>> cumulative. Perhaps this is too strict? Are there other use-cases for
>> atomic-replace?
>
&g
On 02/27/2018 07:36 AM, Miroslav Benes wrote:
> On Fri, 23 Feb 2018, Joe Lawrence wrote:
>
>> [ ... snip ... ]
>>
>> +If a livepatch is replaced by a cumulative patch, then only the
>> +callbacks belonging to the cumulative patch will be executed. This
>&g
Was this patch ever picked up in the tip tree? (Maybe I'm not looking
in the right branch?)
Thanks,
-- Joe
On 01/19/2018 02:06 AM, Masami Hiramatsu wrote:
> Hi Ingo,
>
> Could you pick this to tip tree?
>
> Thank you,
>
> On Wed, 10 Jan 2018 00:51:22 +0100
> Jessica Yu wrote:
>
>> Hi,
>>
On Tue, Feb 06, 2018 at 11:34:24AM +0100, Petr Mladek wrote:
> User documentation for the atomic replace feature. It makes it easier
> to maintain livepatches using so-called cumulative patches.
Thanks for adding this doc. A few minor wording suggestions and typos
below...
>
> Signed-off-by:
ing, going).
A new Documentation/ file is provided as well as a contrived sample
module and livepatch demo to demonstrate the callbacks. The example is
about as simple as possible, but could be further embellished to
resemble a real-world livepatch fix if desired.
Thanks,
Joe Lawrence (1):
livepatc
target and the livepatch module needs to execute code
after the target is loaded, but before its module_init code is run.
The patch-hook executes right before patching objects and the
unpatch-hook executes right after unpatching objects.
Signed-off-by: Joe Lawrence
---
Documentation/livepatch
On Thu, Jul 13, 2017 at 08:46:40PM -0500, Josh Poimboeuf wrote:
> Date: Thu, 13 Jul 2017 20:46:40 -0500
> From: Josh Poimboeuf
> To: Joe Lawrence
> Cc: live-patch...@vger.kernel.org, linux-kernel@vger.kernel.org, Jessica Yu
> , Jiri Kosina , Miroslav Benes
> , Petr Mlad
On Fri, Jun 30, 2017 at 09:49:46PM +0800, kbuild test robot wrote:
> Date: Fri, 30 Jun 2017 21:49:46 +0800
> From: kbuild test robot
> To: Joe Lawrence
> Cc: kbuild-...@01.org, live-patch...@vger.kernel.org,
> linux-kernel@vger.kernel.org, Josh Poimboeuf ,
> Jessica Yu , Jiri
e
code is easier to follow than the periodic kernel messages logged.
Suggestions welcome.
Joe Lawrence (2):
livepatch: introduce shadow variable API
livepatch: add shadow variable sample programs
Documentation/livepatch/shadow-vars.txt | 156 +
include/linux/livepatch.h
s intended to be used
by livepatch modules seeking to emulate additions to data structure
definitions.
See Documentation/livepatch/shadow-vars.txt for a summary of the new
shadow variable API, including a few common use cases.
Signed-off-by: Joe Lawrence
---
Documentation/livepatch/shadow-vars
Add sample livepatch modules to demonstrate the shadow variable API.
Signed-off-by: Joe Lawrence
---
Reviewers -- it's probably easier to grok reading livepatch-shadow-mod.c
*before* the two livepatch modules, livepatch-shadow-fix1.c
and livepatch-shadow-fix2.c
On Tue, Jul 18, 2017 at 04:47:45PM +0200, Petr Mladek wrote:
> Date: Tue, 18 Jul 2017 16:47:45 +0200
> From: Petr Mladek
> To: Joe Lawrence
> Cc: live-patch...@vger.kernel.org, linux-kernel@vger.kernel.org, Josh
> Poimboeuf , Jessica Yu , Jiri Kosina
> , Miroslav Benes
>
On Tue, Jul 18, 2017 at 03:00:47PM +0200, Petr Mladek wrote:
> Date: Tue, 18 Jul 2017 15:00:47 +0200
> From: Petr Mladek
> To: Miroslav Benes
> Cc: Josh Poimboeuf , Joe Lawrence
> , live-patch...@vger.kernel.org,
> linux-kernel@vger.kernel.org, Jessica Yu , Jiri Kosina
On Mon, Jul 17, 2017 at 05:29:41PM +0200, Miroslav Benes wrote:
>
> On Wed, 28 Jun 2017, Joe Lawrence wrote:
>
> > +Brief API summary
> > +-
> > + [ ... snip ...]
> > +* klp_shadow_detach() - detach and free all <*, num> shadow variabl
On 07/17/2017 11:51 AM, Petr Mladek wrote:
> On Wed 2017-07-12 10:10:00, Joe Lawrence wrote:
>> When the livepatch core executes klp_(un)patch_object, call out to a
>> livepatch-module specified array of callback hooks. These hooks provide
>> a notification mechanism for l
On 07/20/2017 10:45 AM, Miroslav Benes wrote:
>
> + *
> + * Note: allocates @new_size space for shadow variable data and copies
> + * @new_size bytes from @new_data into the shadow varaible's own
> @new_data
> + * space. If @new_data is NULL, @new_size is still allocated,
On 07/18/2017 08:45 AM, Petr Mladek wrote:
> On Wed 2017-06-28 11:37:26, Joe Lawrence wrote:
>> diff --git a/Documentation/livepatch/shadow-vars.txt
>> b/Documentation/livepatch/shadow-vars.txt
>> new file mode 100644
>> index ..7f28982e6b1c
>> ---
201 - 300 of 638 matches
Mail list logo