On 12/06/2018 07:37 AM, Petr Mladek wrote:
> On Thu 2018-12-06 11:15:55, Petr Mladek wrote:
>> On Thu 2018-12-06 10:32:00, Miroslav Benes wrote:
>>>
> I don't have many code comments as the changes appear to safely and
> correctly do what the say. (We are at v14 after all :) I mainly
On 12/06/2018 05:14 AM, Petr Mladek wrote:
> On Thu 2018-12-06 10:23:40, Miroslav Benes wrote:
>> On Thu, 6 Dec 2018, Petr Mladek wrote:
>>
>>> On Wed 2018-12-05 14:32:53, Joe Lawrence wrote:
>>>>> diff --git a/kernel/livepatch/core.c b/kernel/li
Hi Peter,
A QA tester here has noticed that he can regularly provoke a
"rq->clock_update_flags & RQCF_UPDATED" warning when echo'ing into the
debugfs sched_features file:
% echo WARN_DOUBLE_CLOCK > /sys/kernel/debug/sched_features
...
[ cut here ]
rq->clock_update_flags
On 10/15/2018 08:37 AM, Petr Mladek wrote:
> From: Joe Lawrence
>
> 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 c
On 4/16/19 1:24 AM, Balbir Singh wrote:
Could we get some details with examples or a sample, sorry I might be dense
and missing simple information. The problem being solved is not clear to
me from the changelog.
Hi Balbir,
I see that Miroslav has already pointed to documentation, samples
On 4/10/19 11:50 AM, Joe Lawrence wrote:
Hi folks,
This is the third installment of the klp-convert tool for generating and
processing livepatch symbols for livepatch module builds. For those
following along at home, archive links to previous versions:
RFC:
https://lore.kernel.org/lkml
On 4/11/19 3:04 PM, Miroslav Benes wrote:
diff --git a/samples/livepatch/Makefile b/samples/livepatch/Makefile
index 2472ce39a18d..8b9b42a258ad 100644
--- a/samples/livepatch/Makefile
+++ b/samples/livepatch/Makefile
@@ -1,3 +1,4 @@
+LIVEPATCH_livepatch-sample := y
On Wed, Apr 10, 2019 at 11:50:49AM -0400, Joe Lawrence wrote:
>
> [ ... snip ... ]
>
> TODO
>
>
> There are a few outstanding items that I came across while reviewing v2,
> but as changes started accumulating, it made sense to defer those to a
> later version.
On 4/24/19 3:13 PM, Joao Moreira wrote:
Future Work
---
I don't see an easy way to support multiple homonym
symbols with unique values in the current livepatch module
Elf format. The only solutions that come to mind right now include
renaming homonym symbols somehow to retain the
On 4/24/19 1:47 PM, Miroslav Benes wrote:
On Tue, 23 Apr 2019, Joe Lawrence wrote:
diff --git a/scripts/livepatch/klp-convert.c b/scripts/livepatch/klp-convert.c
index 82c27d219372..126395f1c0cd 100644
--- a/scripts/livepatch/klp-convert.c
+++ b/scripts/livepatch/klp-convert.c
@@ -517,6 +517,7
On 4/25/19 11:26 AM, Josh Poimboeuf wrote:
Hi all,
On IRC, Peter expressed some concern about -flive-patching, specifically
that the flag isn't compatible with LTO.
The upstream kernel currently doesn't support LTO, but Android is using
it with LLVM:
@free_work:patch cleanup from workqueue-context
D'oh, missed that in the review. Good eye, Kamalesh.
Acked-by: Joe Lawrence
-- Joe
and store it in (MODVERDIR)/livepatchmods. Give
this list as an argument for modpost which will use it to identify
livepatch modules.
As MODULE_INFO is no longer needed, remove it.
Signed-off-by: Miroslav Benes
Signed-off-by: Joao Moreira
Signed-off-by: Joe Lawrence
---
lib/livepatch/test_klp_atomic
Poimboeuf
Signed-off-by: Joao Moreira
Signed-off-by: Joe Lawrence
---
MAINTAINERS| 1 +
include/linux/livepatch.h | 1 +
include/uapi/linux/livepatch.h | 15 +++
kernel/livepatch/core.c| 4 ++--
4 files changed, 19 insertions(+), 2 deletions(-)
create
to github:
1 - an expanded branch with changes separate from the original
https://github.com/joe-lawrence/linux/tree/klp-convert-v4-expanded
2 - a squashed branch of (1) that comprises v4:
https://github.com/joe-lawrence/linux/tree/klp-convert-v4
Non-trivial commits in the expanded branch have
was originally
proposed by Miroslav Benes as a workaround for identifying livepathes
without depending on modinfo during the modpost stage. It was moved to
this patch as the approach also shown to be useful while building
Symbols.list.
Signed-off-by: Joao Moreira
Signed-off-by: Joe Lawrence
From: Joao Moreira
Add a section to Documentation/livepatch/module-elf-format.txt
describing how klp-convert works for fixing relocations.
Signed-off-by: Joao Moreira
Signed-off-by: Joe Lawrence
---
Documentation/livepatch/livepatch.txt | 3 ++
Documentation/livepatch/module-elf
r this (ie,
moving data structure entries and relocations to their ".klp.arch"
equivalents) but the hardest part will be determining klp_object
relationships. This may require some larger changes to livepatch API,
so defer support for now.
Signed-off-by: Joe Lawrence
---
scripts/livepatc
Add a simple klp-convert livepatch selftest that exercises various
symbol homonym sympos scenarios.
Signed-off-by: Joe Lawrence
---
lib/livepatch/Makefile| 10 ++
lib/livepatch/test_klp_convert1.c | 106 ++
lib/livepatch/test_klp_convert2.c
sample updates the function cmdline_proc_show to
print the string referenced by the symbol saved_command_line
appended by the string "livepatch=1".
Update livepatch-sample.c to remove livepatch MODULE_INFO
statement.
Signed-off-by: Josh Poimboeuf
Signed-off-by: Joao Moreira
Signed-o
-by: Miroslav Benes
Signed-off-by: Joao Moreira
Signed-off-by: Joe Lawrence
---
scripts/Kbuild.include | 4 +++-
scripts/Makefile.modpost | 16 +++-
scripts/mod/modpost.c| 6 +-
scripts/mod/modpost.h| 1 +
4 files changed, 24 insertions(+), 3 deletions(-)
diff --git
From: Josh Poimboeuf
Define macros KLP_MODULE_RELOC and KLP_SYMPOS in
include/linux/livepatch.h to improve user-friendliness of the
livepatch annotation process.
Signed-off-by: Josh Poimboeuf
Signed-off-by: Joao Moreira
Signed-off-by: Joe Lawrence
---
include/linux/livepatch.h | 12
Signed-off-by: Konstantin Khlebnikov
Signed-off-by: Joao Moreira
Signed-off-by: Joe Lawrence
---
MAINTAINERS | 1 +
include/uapi/linux/livepatch.h | 5 +
scripts/Makefile| 1 +
scripts/livepatch/.gitignore| 1 +
scripts/livepatch/Makefile
On Wed, Apr 10, 2019 at 11:50:52AM -0400, Joe Lawrence wrote:
>
> [ ... snip ... ]
>
> +static bool convert_rela(struct section *oldsec, struct rela *r,
> + struct sympos *sp, struct elf *klp_elf)
> +{
> + struct section *sec;
> + struct rela *
On Tue, Apr 16, 2019 at 01:37:13PM +0200, Miroslav Benes wrote:
>
> [ ... snip ... ]
>
> Quick look, but it seems quite similar to the problem we had with
> apply_alternatives(). See arch/x86/kernel/livepatch.c and the commit which
> introduced it.
That was an interesting diversion :) I think I
atch: Remove custom kobject state handling
> livepatch: Remove duplicated code for early initialization
>
> include/linux/livepatch.h | 3 --
> kernel/livepatch/core.c | 86
> ---
> 2 files changed, 37 insertions(+), 52 deletions(-)
&
On 5/17/19 10:17 AM, Miroslav Benes wrote:
Hi,
I noticed that livepatching selftests fail on our master branch
(https://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching.git/).
...
TEST: busy target module ... not ok
--- expected
+++ result
@@ -7,16 +7,24 @@ livepatch:
trace retrieval")
Reported-by: Miroslav Benes
Signed-off-by: Joe Lawrence
---
kernel/stacktrace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/stacktrace.c b/kernel/stacktrace.c
index 27bafc1e271e..90d3e0bf0302 100644
--- a/kernel/stacktrace.c
+++
On Fri, May 17, 2019 at 02:51:17PM -0400, Joe Lawrence wrote:
> Miroslav reported that the livepatch self-tests were failing,
> specifically a case in which the consistency model ensures that we do
> not patch a current executing function, "TEST: busy target module".
>
ally
spent last week reviewing and testing. My goal was to write a klp
self-test based on the implementation and your sample module. Along the
way I spotted a few minor bugs and other small suggestions. Instead of
dumping a bunch of code or patch content in my replies, I posted my
rebase and modi
On Fri, Mar 01, 2019 at 11:13:07AM -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 whose name is
> unique, thus relocation can
On Fri, Mar 01, 2019 at 11:13:08AM -0300, Joao Moreira wrote:
> From: Josh Poimboeuf
>
> Livepatches may use symbols which are not contained in its own scope,
> and, because of that, may end up compiled with relocations that will
> only be resolved during module load. Yet, when the referenced
On Fri, Mar 01, 2019 at 11:13:10AM -0300, Joao Moreira wrote:
> From: Josh Poimboeuf
>
> Create cmd_klp_convert and hook it into scripts/Makefile.modpost.
> cmd_klp_convert invokes klp-convert with the right arguments for the
> conversion of unresolved symbols inside a livepatch.
>
>
On Fri, Mar 01, 2019 at 11:13:11AM -0300, Joao Moreira wrote:
> From: Miroslav Benes
>
> Currently, livepatch infrastructure in the kernel relies on
> MODULE_INFO(livepatch, "Y") statement in a livepatch module. Then the
> kernel module loader knows a module is indeed livepatch module and can
>
On Fri, Mar 01, 2019 at 11:13:12AM -0300, Joao Moreira wrote:
> From: Josh Poimboeuf
>
> Add a new livepatch sample in samples/livepatch/ to make use of
> symbols that must be post-processed to enable load-time relocation
> resolution. As the new sample is to be used as an example, it is
>
On Fri, Mar 01, 2019 at 11:13:13AM -0300, Joao Moreira wrote:
> Add a section to Documentation/livepatch/module-elf-format.txt
> describing how klp-convert works for fixing relocations.
>
> Signed-off-by: Joao Moreira
> ---
> Documentation/livepatch/module-elf-format.txt | 47
>
On 3/26/19 4:45 AM, Adrian Hunter wrote:
Hi
Doing:
make -C tools clean
Results in:
git diff --stat
tools/pci/pcitest.sh | 72
tools/testing/selftests/livepatch/test-callbacks.sh | 587
On 3/26/19 10:40 AM, Joao Moreira wrote:
On 3/20/19 4:08 PM, Miroslav Benes wrote:
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index fd03d60f6c5a..1e28ad21314c 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -247,6 +247,11 @@ cmd_gen_ksymdeps = \
On 3/26/19 2:13 PM, Joao Moreira wrote:
On 3/26/19 1:15 PM, Joe Lawrence wrote:
>>
Hi Joao,
This change seems to work okay for (again) single object modules, but
I'm having issues with multi-object modules.
Hi Joe, thanks for the sources, this made everything much easier in m
On 3/26/19 4:18 PM, Joao Moreira wrote:
On 3/18/19 4:18 PM, Joe Lawrence wrote:
On Fri, Mar 01, 2019 at 11:13:05AM -0300, Joao Moreira wrote:
Livepatches may use symbols which are not contained in its own scope,
and, because of that, may end up compiled with relocations that will
only
The ppc64le implementation of save_stack_trace_tsk_reliable() is
exported, so do the same with x86.
Signed-off-by: Joe Lawrence
---
arch/x86/kernel/stacktrace.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/kernel/stacktrace.c b/arch/x86/kernel/stacktrace.c
index 5c2d71a1dc06
On 2/27/19 4:31 PM, Thomas Gleixner wrote:
On Wed, 27 Feb 2019, Joe Lawrence wrote:
The ppc64le implementation of save_stack_trace_tsk_reliable() is
exported, so do the same with x86.
And what's the in tree module user of this? I can't find one and just
because PPC has an export with no user
On 2/27/19 5:25 PM, Joe Lawrence wrote:
On 2/27/19 4:31 PM, Thomas Gleixner wrote:
On Wed, 27 Feb 2019, Joe Lawrence wrote:
The ppc64le implementation of save_stack_trace_tsk_reliable() is
exported, so do the same with x86.
And what's the in tree module user of this? I can't find one
On Thu, Mar 28, 2019 at 04:17:03PM -0400, Joe Lawrence wrote:
> On Tue, Mar 26, 2019 at 04:53:12PM -0400, Joe Lawrence wrote:
> > On 3/26/19 2:13 PM, Joao Moreira wrote:
> > >
> > >
> > > On 3/26/19 1:15 PM, Joe Lawrence wrote:
> > >>
> > >
On 4/3/19 8:48 AM, Miroslav Benes wrote:
>
>> and it looks like the combined KLP_MODULE_RELOC still contains the two
>> unique symbol position values (2 and 3):
>>
>>% objcopy -O binary --only-section=.klp.module_relocs.vmlinux
>> lib/livepatch/test_klp_convert.klp.o >(hexdump -C)
>>
up to github:
1 - an expanded branch that with changes separate from the original
https://github.com/joe-lawrence/linux/commits/klp-convert-v3-expanded
2 - a squashed branch of (1) that comprises v3:
https://github.com/joe-lawrence/linux/commits/klp-convert-v3
Non-trivial commits
sample updates the function cmdline_proc_show to
print the string referenced by the symbol saved_command_line
appended by the string "livepatch=1".
Update livepatch-sample.c to remove livepatch MODULE_INFO
statement.
Signed-off-by: Josh Poimboeuf
Signed-off-by: Joao Moreira
Signed-o
Add a simple klp-convert livepatch selftest that exercises various
symbol homonym sympos scenarios.
Signed-off-by: Joe Lawrence
---
lib/livepatch/Makefile| 10 ++
lib/livepatch/test_klp_convert1.c | 106 ++
lib/livepatch/test_klp_convert2.c
From: Joao Moreira
Add a section to Documentation/livepatch/module-elf-format.txt
describing how klp-convert works for fixing relocations.
Signed-off-by: Joao Moreira
Signed-off-by: Joe Lawrence
---
Documentation/livepatch/livepatch.txt | 3 ++
Documentation/livepatch/module-elf
-by: Miroslav Benes
Signed-off-by: Joao Moreira
Signed-off-by: Joe Lawrence
---
scripts/Kbuild.include | 4 +++-
scripts/Makefile.modpost | 16 +++-
scripts/mod/modpost.c| 6 +-
scripts/mod/modpost.h| 1 +
4 files changed, 24 insertions(+), 3 deletions(-)
diff --git
and store it in (MODVERDIR)/livepatchmods. Give
this list as an argument for modpost which will use it to identify
livepatch modules.
As MODULE_INFO is no longer needed, remove it.
Signed-off-by: Miroslav Benes
Signed-off-by: Joao Moreira
Signed-off-by: Joe Lawrence
---
lib/livepatc
From: Josh Poimboeuf
Define macros KLP_MODULE_RELOC and KLP_SYMPOS in
include/linux/livepatch.h to improve user-friendliness of the
livepatch annotation process.
Signed-off-by: Josh Poimboeuf
Signed-off-by: Joao Moreira
Signed-off-by: Joe Lawrence
---
include/linux/livepatch.h | 12
Signed-off-by: Konstantin Khlebnikov
Signed-off-by: Joao Moreira
Signed-off-by: Joe Lawrence
---
MAINTAINERS | 1 +
include/uapi/linux/livepatch.h | 5 +
scripts/Makefile| 1 +
scripts/livepatch/.gitignore| 1 +
scripts/livepatch/Makefile
Poimboeuf
Signed-off-by: Joao Moreira
Signed-off-by: Joe Lawrence
---
MAINTAINERS| 1 +
include/linux/livepatch.h | 1 +
include/uapi/linux/livepatch.h | 17 +
kernel/livepatch/core.c| 4 ++--
4 files changed, 21 insertions(+), 2 deletions(-)
create
was originally
proposed by Miroslav Benes as a workaround for identifying livepathes
without depending on modinfo during the modpost stage. It was moved to
this patch as the approach also shown to be useful while building
Symbols.list.
Signed-off-by: Joao Moreira
Signed-off-by: Joe Lawrence
On Wed, Apr 10, 2019 at 11:50:53AM -0400, Joe Lawrence wrote:
> From: Josh Poimboeuf
>
> Define macros KLP_MODULE_RELOC and KLP_SYMPOS in
> include/linux/livepatch.h to improve user-friendliness of the
> livepatch annotation process.
>
> Signed-off-by: Josh Poimboeuf
On Wed, Apr 10, 2019 at 11:50:52AM -0400, Joe Lawrence wrote:
>
> [ ... snip ... ]
>
> diff --git a/scripts/livepatch/klp-convert.c b/scripts/livepatch/klp-convert.c
> new file mode 100644
> index ..62bd26941081
> --- /dev/null
> +++ b/scripts/livepatch/klp-c
On 4/10/19 8:32 PM, Masahiro Yamada wrote:
On Thu, Apr 11, 2019 at 12:52 AM Joe Lawrence wrote:
From: Josh Poimboeuf
Define klp prefixes in include/uapi/linux/livepatch.h, and use them for
replacing hard-coded values in kernel/livepatch/core.c.
[ ... snip ... ]
>>
diff --git a/i
On 4/11/19 5:18 AM, Artem Savkov wrote:
On Wed, Apr 10, 2019 at 11:50:51AM -0400, Joe Lawrence wrote:
-clean: archclean vmlinuxclean
+klpclean:
+ $(Q) rm -f $(objtree)/Symbols.list
nit: $(SLIST) can be used here.
+clean: archclean vmlinuxclean klpclean
# mrproper - Delete all
On Wed, Apr 10, 2019 at 11:50:54AM -0400, Joe Lawrence wrote:
>
> [ ... snip ... ]
>
> diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
> index 6b7f354f189a..1e8bb7442689 100644
> --- a/scripts/Makefile.modpost
> +++ b/scripts/Makefile.modpos
On 4/4/19 7:49 AM, Miroslav Benes wrote:
BTW, something I *just* noticed when putting together that toy out-of-tree
module to test out multi-object livepatch modules is that we aren't
considering out-of-tree symbols in Symbols.list.
Perhaps we can save that for v4 or beyond, but maybe we
On Tue, Mar 26, 2019 at 04:53:12PM -0400, Joe Lawrence wrote:
> On 3/26/19 2:13 PM, Joao Moreira wrote:
> >
> >
> > On 3/26/19 1:15 PM, Joe Lawrence wrote:
> >>
> > > Hi Joao,
> > >
> > > This change seems to work okay for (again) sing
On 4/12/19 1:05 PM, shuah wrote:
On 4/12/19 7:37 AM, Miroslav Benes wrote:
On Fri, 12 Apr 2019, shuah wrote:
On 4/12/19 1:03 AM, Miroslav Benes wrote:
On Thu, 11 Apr 2019, Shuah Khan wrote:
TEST_PROGS variable is for test shell scripts and common clean target
in lib.mk doesn't touch them.
On Wed, Apr 10, 2019 at 11:50:49AM -0400, Joe Lawrence wrote:
> Hi folks,
>
> This is the third installment of the klp-convert tool for generating and
> processing livepatch symbols for livepatch module builds. For those
> following along at home, archive links to previous ver
On Fri, Mar 01, 2019 at 11:13:10AM -0300, Joao Moreira wrote:
> From: Josh Poimboeuf
>
> Create cmd_klp_convert and hook it into scripts/Makefile.modpost.
> cmd_klp_convert invokes klp-convert with the right arguments for the
> conversion of unresolved symbols inside a livepatch.
>
>
On 3/22/19 12:37 PM, Joao Moreira wrote:
On 2019-03-22 11:54, Joe Lawrence wrote:
On Fri, Mar 01, 2019 at 11:13:10AM -0300, Joao Moreira wrote:
From: Josh Poimboeuf
Create cmd_klp_convert and hook it into scripts/Makefile.modpost.
cmd_klp_convert invokes klp-convert with the right arguments
t;8-- -->8-- -->8-- -->8-- -->8-- -->8--
>From e4c1e95a2145405115a984c6567740d12f20ccb7 Mon Sep 17 00:00:00 2001
From: Joe Lawrence
Date: Fri, 1 Feb 2019 10:53:25 -0500
Subject: [PATCH] livepatch: return -ENOMEM on ptr_id() allocation failure
Fixes the following smatch warning
On 1/31/19 8:44 AM, Masayoshi Mizuma wrote:
On Wed, Jan 30, 2019 at 09:14:00PM +0100, Peter Zijlstra wrote:
On Tue, Jan 29, 2019 at 10:12:45AM -0500, Masayoshi Mizuma wrote:
From: Hidetoshi Seto
register_sched_domain_sysctl() copies the cpu_possible_mask into
sd_sysctl_cpus, but only if
://lore.kernel.org/lkml/7f468285-b149-37e2-e782-c9e538b99...@redhat.com/
Joe Lawrence (3):
powerpc/livepatch: relax reliable stack tracer checks for first-frame
powerpc/livepatch: small cleanups in save_stack_trace_tsk_reliable()
powerpc/livepatch: return -ERRNO values
Mostly cosmetic changes:
- Group common stack pointer code at the top
- Simplify the first frame logic
- Code stackframe iteration into for...loop construct
- Check for trace->nr_entries overflow before adding any into the array
Suggested-by: Nicolai Stange
Signed-off-by: Joe Lawre
RKER magic,
as written by exception prologues, is found at a particular location.
However, as observed by Joe Lawrence, it is possible in practice that
non-exception stack frames can alias with prior exception frames and thus,
that the reliable stacktracer can find a stale STACK_FRAME_R
ME_LR_SAVE and STACK_FRAME_MARKER offsets that
may contain uninitialized residual data.
Fixes: df78d3f61480 ("powerpc/livepatch: Implement reliable stack tracing for
the consistency model")
Signed-off-by: Joe Lawrence
---
arch/powerpc/kernel/stacktrace.c | 32
To match its x86 counterpart, save_stack_trace_tsk_reliable() should
return -EINVAL in cases that it is currently returning 1. No caller is
currently differentiating non-zero error codes, but let's keep the
arch-specific implementations consistent.
Signed-off-by: Joe Lawrence
---
arch/powerpc
On 12/18/18 10:18 AM, Joe Lawrence wrote:
On 12/18/2018 03:49 AM, Miroslav Benes wrote:
On Mon, 17 Dec 2018, Joe Lawrence wrote:
I'm just being picky about its documentation and how we should note its
usage in the v3 patch. Think that s/__noclone/used/g of the v2 commit
message would
On 1/22/19 5:06 AM, Miroslav Benes wrote:
On Wed, 16 Jan 2019, Petr Mladek wrote:
diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c
index 684766d306ad..8e644837e668 100644
--- a/kernel/livepatch/core.c
+++ b/kernel/livepatch/core.c
@@ -59,6 +59,17 @@ static bool
el/livepatch/transition.c b/kernel/livepatch/transition.c
> index 300273819674..a3a6f32c6fd0 100644
> --- a/kernel/livepatch/transition.c
> +++ b/kernel/livepatch/transition.c
> @@ -642,6 +642,6 @@ void klp_force_transition(void)
> for_each_possible_cpu(cpu)
> klp_update_patch_state(idle_task(cpu));
>
> - list_for_each_entry(patch, _patches, list)
> + klp_for_each_patch(patch)
> patch->forced = true;
> }
> --
> 2.13.7
>
Acked-by: Joe Lawrence
-- Joe
On Wed, Jan 16, 2019 at 05:17:18PM +0100, Petr Mladek wrote:
> Do not dereference pointers to the shadow variables when either
> klp_shadow_alloc() or klp_shadow_get() fail.
>
> There is no need to check the other locations explicitly. The test
> would fail if any allocation fails. And the
t;enabled && patch != klp_transition_patch)
> - break;
> -
> pr_notice("applying patch '%s' to loading module
> '%s'\n",
> patch->mod->name, obj->mod->name);
>
> --
> 2.13.7
>
Any simplication to the callback code is welcome! Thanks for cleaning
this one up.
With a few commit msg nits,
Acked-by: Joe Lawrence
-- Joe
klp_target_state == KLP_PATCHED ? "patching to unpatching" :
> "unpatching to patching");
>
> - klp_transition_patch->enabled = !klp_transition_patch->enabled;
> -
> klp_target_state = !klp_target_state;
>
> /*
> diff --git a/kernel/livepatch/transition.h b/kernel/livepatch/transition.h
> index f9d0bc016067..b9f3e96d8c13 100644
> --- a/kernel/livepatch/transition.h
> +++ b/kernel/livepatch/transition.h
> @@ -5,6 +5,7 @@
> #include
>
> extern struct klp_patch *klp_transition_patch;
> +extern int klp_target_state;
>
> void klp_init_transition(struct klp_patch *patch, int state);
> void klp_cancel_transition(void);
> --
> 2.13.7
>
With commit msg nits,
Acked-by: Joe Lawrence
-- Joe
Hi all,
tl;dr: On ppc64le, what is top-most stack frame for scheduled tasks
about?
I am looking at a bug in which ~10% of livepatch tests on RHEL-7 and
RHEL-8 distro kernels, the ppc64le reliable stack unwinder consistently
reports an unreliable stack for a given task. This condition
On Fri, Jan 11, 2019 at 01:00:38AM +0100, Nicolai Stange wrote:
> Hi Joe,
>
> Joe Lawrence writes:
>
> > tl;dr: On ppc64le, what is top-most stack frame for scheduled tasks
> >about?
>
> If I'm reading the code in _switch() correctly, the first frame
On Thu, Nov 29, 2018 at 09:57:50AM -0600, Josh Poimboeuf wrote:
> On Thu, Nov 29, 2018 at 04:56:15PM +0100, Artem Savkov wrote:
> > In case when the number of entries in the section header table is larger
> > then or equal to SHN_LORESERVE the size of the table is held in the sh_size
> > member of
On Fri, Oct 12, 2018 at 05:08:33PM +0200, Martin Schwidefsky wrote:
> On Thu, 11 Oct 2018 15:02:11 +0200
> Martin Schwidefsky wrote:
>
> > On Thu, 11 Oct 2018 18:04:12 +0800
> > Li Wang wrote:
> >
> > > When running s390 system with LTP/cve-2017-17052.c[1], the following BUG
> > > is
> > >
On Mon, Aug 27, 2018 at 12:45:25AM -0700, Kees Cook wrote:
> On Tue, May 29, 2018 at 6:27 AM, Andy Whitcroft
> wrote:
> > On Wed, Mar 07, 2018 at 04:02:45PM -0800, Brian Belleville wrote:
> >> The final field of a floppy_struct is the field "name", which is a
> >> pointer to a string in kernel
On Sun, 28 Sep 2014, Tejun Heo wrote:
> Hello, Joe.
>
> On Fri, Sep 26, 2014 at 10:52:27AM -0400, Joe Lawrence wrote:
> ...
> > I was wondering if such behavior was expected on !PREEMPT kernels,
> > especially after b22ce2785d97 "workqueue: cond_resched() after
On Tue, 26 Aug 2014 18:01:23 -0400
Jeff Moyer wrote:
> Jens Axboe writes:
>
> >> I have applied the first one, will look over the second one and hand
> >> apply it. Seems the NULL return was completely removed, so we _should_
> >> be ok on the IS_ERR() conversion, though that sort of thing
On Wed, 27 Aug 2014 08:07:29 -0600
Jens Axboe wrote:
> On 08/26/2014 04:01 PM, Jeff Moyer wrote:
> >> Additionally, there's still quite a few places that call
> >> blk_get_request() and don't check the error return if __GFP_WAIT is set.
> >> Since most of the point of this is to fix segfaulting
> Try to standardize on a 12 character long lower case
> commit id along with a description of parentheses and
> the quoted subject line
>
> ie: commit 0123456789ab ("commit description")
Hi Joe / Andrew,
I don't know if checkpatch is built for multiline regex, but I noticed
that this new check
e line like:
>
> Some explanation as to why commit <12+hexdigits>
> ("commit description/subject line") is improved.
>
> Allow this form.
>
> Signed-off-by: Joe Perches
> Suggested-by: Joe Lawrence '. (Maybe another checkpatch validation
for anot
Hello Tejun,
(RHEL7 kernel, see config below)
I'm debugging an RCU stall where it seems that the culprit is a kworker
workqueue function that decides to reschedule itself over and over via
schedule_delayed_work with a 0 jiffy delay. If I watch rcudata, I can
see that the CPU currently running
On 07/12/2015 12:24 AM, Calvin Owens wrote:
> These objects can be referenced concurrently throughout the driver, we
> need a way to make sure threads can't delete them out from under each
> other. This patch adds the refcount, and refactors the code to use it.
>
> Additionally, we cannot iterate
d only iff there are other higher priority tasks to run, so force a
quiescent RCU state between work items with cond_resched_rcu_qs.
Signed-off-by: Joe Lawrence
Link:
https://lkml.kernel.org/r/20140926105227.01325...@jlaw-desktop.mno.stratus.com
Link:
https://lkml.kernel.org/r/20140929115445.402
d only iff there are other higher priority tasks to run, so force a
quiescent RCU state between work items.
Signed-off-by: Joe Lawrence
Link:
https://lkml.kernel.org/r/20140926105227.01325...@jlaw-desktop.mno.stratus.com
Link:
https://lkml.kernel.org/r/20140929115445.40221...@jlaw-desktop.mno.s
v2 - split into two patches: the first inlines the cond_resched_rcu_qs
macro suitable for stable backport, the second converts to using
cond_resched_rcu_qs.
Joe Lawrence (2):
workqueue: add quiescent state between work items
workqueue: use cond_resched_rcu_qs macro
kernel/workqueue.c |5
Tidy up and use cond_resched_rcu_qs when calling cond_resched and
reporting potential quiescent state to RCU.
Signed-off-by: Joe Lawrence
---
kernel/workqueue.c |3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 345bec9
On Tue, 7 Oct 2014 06:43:29 -0700
"Paul E. McKenney" wrote:
> On Tue, Oct 07, 2014 at 09:29:42AM +0200, Jiri Pirko wrote:
[ ... snip ... ]
> >
> > Paul, Tehun, how do you propose to fix this on older kernels which do
> > not have rcu_note_voluntary_context_switch? I'm particullary interested
>
On 06/12/2015 05:42 AM, Sreekanth Reddy wrote:
...
> +#if defined(alloc_ordered_workqueue)
> + ioc->firmware_event_thread = alloc_ordered_workqueue(
> + ioc->firmware_event_name, WQ_MEM_RECLAIM);
> +#else
> + ioc->firmware_event_thread = create_singlethread_workqueue(
>
On 06/26/2015 12:33 PM, Mauricio Faria de Oliveira wrote:
> Commit f3ddac1918fe963bcbf8d407a3a3c0881b47248b ("[SCSI] qla2xxx:
> Disable adapter when we encounter a PCI disconnect.") has introduced a
> code that disables the board, releasing some resources, when reading
> 0x.
>
> In case
On 06/16/2015 01:37 AM, Sreekanth Reddy wrote:
> Created a thread using alloc_ordered_workqueue() API in order to process
> the works from firmware Work-queue sequentially instead of
> create_singlethread_workqueue() API.
>
> Changes in v1:
> No need to check for backport compatibility in the
On 06/18/2015 09:06 AM, Sreekanth Reddy wrote:
> On Thu, Jun 18, 2015 at 5:40 PM, Joe Lawrence
> wrote:
>> On 06/16/2015 01:37 AM, Sreekanth Reddy wrote:
>>> Created a thread using alloc_ordered_workqueue() API in order to process
>>> the works from firmware W
501 - 600 of 638 matches
Mail list logo