Re: [PATCH] objtool: Don't fail the kernel build on fatal errors

2021-01-20 Thread Kamalesh Babulal
ooking for objtool warnings than > ever before, so such warnings not likely to be ignored for long. > > Suggested-by: Nick Desaulniers > Signed-off-by: Josh Poimboeuf Reviewed-by: Kamalesh Babulal -- Kamalesh

Re: [PATCH v4 23/52] docs: trace-uses.rst: remove bogus c-domain tags

2020-10-01 Thread Kamalesh Babulal
On 01/10/20 12:11 pm, Mauro Carvalho Chehab wrote: > Em Thu, 1 Oct 2020 11:36:53 +0530 > Kamalesh Babulal escreveu: > >> On 30/09/20 6:54 pm, Mauro Carvalho Chehab wrote: >>> There are some c-domain tags that are wrong. While this won't >>> cause problems with

Re: [PATCH v4 23/52] docs: trace-uses.rst: remove bogus c-domain tags

2020-10-01 Thread Kamalesh Babulal
put. > > Let's just place them at literal blocks. > tired with Sphinx v3.2.1, invalid C declaration warnings are not seen with the patch. > Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Kamalesh Babulal -- Kamalesh

Re: [PATCH] [v2] tools/objtool: Fix unnecessary jumps

2020-08-11 Thread Kamalesh Babulal
change. It can be written like: "Previously cleanup() function was called under the out label for both fatal errors (ret < 0) and warnings. Now that cleanup() function is removed, the out label is no longer required. Remove it and return immediately for the fatal errors with ret as ret

Re: [PATCH] tools/objtool: Fix unnecessary jumps

2020-08-10 Thread Kamalesh Babulal
On 10/08/20 9:36 am, Youling Tang wrote: > There is no need to jump to the "out" tag when "ret < 0", just return > directly to "ret". > > Signed-off-by: Youling Tang > --- > tools/objtool/check.c | 16 > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git

Re: [PATCH] Revert "kbuild: use -flive-patching when CONFIG_LIVEPATCH is enabled"

2020-07-20 Thread Kamalesh Babulal
On 20/07/20 9:05 am, Joe Lawrence wrote: > On 7/17/20 2:29 PM, Josh Poimboeuf wrote: >> Use of the new -flive-patching flag was introduced with the following >> commit: >> >>    43bd3a95c98e ("kbuild: use -flive-patching when CONFIG_LIVEPATCH is >> enabled") >> >> This flag has several drawbacks:

Re: [PATCH v2] selftests/livepatch: adopt to newer sysctl error format

2020-07-14 Thread Kamalesh Babulal
sions using '-q' option. > > Explicitly print the final status on success so that it can be verified > in the log. The error message is enough on failure. > > Reported-by: Kamalesh Babulal > Signed-off-by: Petr Mladek Reviewed-by: Kamalesh Babulal -- Kamalesh

Re: [PATCH] selftests/livepatch: adopt to newer sysctl error format

2020-07-13 Thread Kamalesh Babulal
On 11/07/20 12:01 am, Joe Lawrence wrote: > On Fri, Jul 10, 2020 at 05:27:35PM +0200, Petr Mladek wrote: >> On Fri 2020-07-10 10:40:43, Kamalesh Babulal wrote: >>> With procfs v3.3.16, the sysctl command doesn't prints the set key and >>> value on error. This change bre

[PATCH] selftests/livepatch: adopt to newer sysctl error format

2020-07-09 Thread Kamalesh Babulal
ith the patch, the test-ftrace.sh passes on v3.3.15, v3.3.16 versions of sysctl: ... # selftests: livepatch: test-ftrace.sh # TEST: livepatch interaction with ftrace_enabled sysctl ... ok ok 5 selftests: livepatch: test-ftrace.sh Signed-off-by: Kamalesh Babulal --- Based on livepatching/fo

Re: [RFC][PATCH v4 27/32] objtool: mcount: Generic location and relocation table types

2020-06-09 Thread Kamalesh Babulal
comes necessary to change the type before > moving the function (and eventually its callers) out of the wrapper. > > I feel I should credit you as author or at least co-author of the added > patch since it's basically a "backported" version of the changes you > suggested. I reviewed the pro

Re: [RFC][PATCH v4 27/32] objtool: mcount: Generic location and relocation table types

2020-06-09 Thread Kamalesh Babulal
On 6/3/20 1:20 AM, Matt Helsley wrote: > Rather than building the exact ELF section data we need and > avoiding libelf's conversion step, use more GElf types > and then libelf's elfxx_xlatetof() functions to convert > the mcount locations (GElf_Addr) and associated relocations. > > This converts

Re: [PATCH 2/2] objtool: Add support for relocations without addends

2020-06-02 Thread Kamalesh Babulal
- LGTM, minor nit-pick, checkpatch reports of missing space before '(' in the switch cases. With space issues resolved: Reviewed-by: Kamalesh Babulal -- Kamalesh

Re: [PATCH 2/3] objtool: Move struct objtool_file into arch-independent header

2020-05-27 Thread Kamalesh Babulal
e useful in all subcommands besides check, > and some subcommands may not want to include check.h to get the > definition, split the structure out into a new header meant for use > by all objtool subcommands. > > Signed-off-by: Matt Helsley Reviewed-by: Kamalesh Babulal -- Kamalesh

Re: [PATCH 3/3] objtool: Enable compilation of objtool for all architectures

2020-05-27 Thread Kamalesh Babulal
e for x86. As more > command support is enabled on various architectures the necessary > KConfig changes can be made (e.g. adding "STACK_VALIDATION") to > trigger building objtool. > > [ jpoimboe: remove aliases, add __weak macro, add error messages ] > > Cc: Jul

Re: [PATCH 1/3] objtool: Exit successfully when requesting help

2020-05-27 Thread Kamalesh Babulal
e to crudely check that, for > example, building an objtool executable succeeds. > > Signed-off-by: Matt Helsley Reviewed-by: Kamalesh Babulal -- Kamalesh

[PATCH] MAINTAINERS: add lib/livepatch to LIVE PATCHING

2020-05-15 Thread Kamalesh Babulal
Add lib/livepatch to list of livepatching F: patterns in MAINTAINERS. Suggested-by: Jiri Kosina Signed-off-by: Kamalesh Babulal --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8e1eb98d..de4f6af03198 100644 --- a/MAINTAINERS +++ b

Re: [PATCH] MAINTAINERS: adjust to livepatch .klp.arch removal

2020-05-15 Thread Kamalesh Babulal
On 5/15/20 3:15 AM, Jiri Kosina wrote: > On Sat, 9 May 2020, Kamalesh Babulal wrote: > >>> Commit 1d05334d2899 ("livepatch: Remove .klp.arch") removed >>> arch/x86/kernel/livepatch.c, but missed to adjust the LIVE PATCHING entry >>> in MAINTAINERS. >

[PATCH] MAINTAINERS: Update LIVE PATCHING file list

2020-05-11 Thread Kamalesh Babulal
The current list of livepatching files is incomplete, update the list with the missing files. Included files are ordered by the command: ./scripts/parse-maintainers.pl --input=MAINTAINERS --output=MAINTAINERS --order Signed-off-by: Kamalesh Babulal --- The patch applies on top of livepatching

Re: [PATCH] MAINTAINERS: adjust to livepatch .klp.arch removal

2020-05-09 Thread Kamalesh Babulal
On 5/9/20 1:02 PM, Lukas Bulwahn wrote: > Commit 1d05334d2899 ("livepatch: Remove .klp.arch") removed > arch/x86/kernel/livepatch.c, but missed to adjust the LIVE PATCHING entry > in MAINTAINERS. > > Since then, ./scripts/get_maintainer.pl --self-test=patterns complains: > > warning: no file

Re: [PATCH -next] livepatch: Make klp_apply_object_relocs static

2020-05-08 Thread Kamalesh Babulal
relocs() has only one call site within core.c Reviewed-by: Kamalesh Babulal > --- > kernel/livepatch/core.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c > index 96d2da1..f76fdb9 100644 > --

Re: [PATCH v3 3/3] selftests/livepatch: Test interaction with ftrace_enabled

2019-10-17 Thread Kamalesh Babulal
On 10/17/19 3:17 AM, Joe Lawrence wrote: > On 10/16/19 1:06 PM, Kamalesh Babulal wrote: >> On 10/16/19 5:03 PM, Miroslav Benes wrote: >>> From: Joe Lawrence >>> >>> Since livepatching depends upon ftrace handlers to implement "patched" >>> co

Re: [PATCH v3 2/3] selftests/livepatch: Make dynamic debug setup and restore generic

2019-10-16 Thread Kamalesh Babulal
On 10/16/19 5:03 PM, Miroslav Benes wrote: > From: Joe Lawrence > > Livepatch selftests currently save the current dynamic debug config and > tweak it for the selftests. The config is restored at the end. Make the > infrastructure generic, so that more variables can be saved and > restored. > >

Re: [PATCH v3 3/3] selftests/livepatch: Test interaction with ftrace_enabled

2019-10-16 Thread Kamalesh Babulal
On 10/16/19 5:03 PM, Miroslav Benes wrote: > From: Joe Lawrence > > Since livepatching depends upon ftrace handlers to implement "patched" > code functionality, verify that the ftrace_enabled sysctl value > interacts with livepatch registration as expected. At the same time, > ensure that

Re: [PATCH v2] ftrace: Introduce PERMANENT ftrace_ops flag

2019-10-15 Thread Kamalesh Babulal
allback with the flag > set cannot be registered if ftrace_enabled is disabled. > > Signed-off-by: Miroslav Benes The patch looks good to me. A minor typo in flag description below. Reviewed-by: Kamalesh Babulal [...] > diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h &g

Re: [PATCH v4 3/3] livepatch: Remove duplicate warning about missing reliable stacktrace support

2019-06-12 Thread Kamalesh Babulal
liable() cannot return > -ENOSYS thanks to klp_have_reliable_stack() check in > klp_try_switch_task(). > > Signed-off-by: Petr Mladek > [ mbenes: changelog edited ] > Signed-off-by: Miroslav Benes Reviewed-by: Kamalesh Babulal

Re: [PATCH v4 2/3] Revert "livepatch: Remove reliable stacktrace check in klp_try_switch_task()"

2019-06-12 Thread Kamalesh Babulal
> to have reliable stack traces support. The system only warns now about > it. > > It only makes sense to reintroduce the compile time checking in > klp_try_switch_task() again and bail out early. > > Signed-off-by: Miroslav Benes Reviewed-by: Kamalesh Babulal

Re: [PATCH v4 1/3] stacktrace: Remove weak version of save_stack_trace_tsk_reliable()

2019-06-12 Thread Kamalesh Babulal
-ENOSYS returning version for them. > > In short, stack_trace_save_tsk_reliable() returning -ENOSYS defined in > include/linux/stacktrace.h serves the same purpose as the old weak > version of save_stack_trace_tsk_reliable() which is therefore no longer > needed. > > Cc: Thomas Gleixner > Signed-off-by: Miroslav Benes Reviewed-by: Kamalesh Babulal

Re: [PATCH] stacktrace: fix CONFIG_ARCH_STACKWALK stack_trace_save_tsk_reliable return

2019-05-18 Thread Kamalesh Babulal
rage > array. > > In the case of the above config and trace, be sure to return the > stacktrace_cookie.len on stack_trace_save_tsk_reliable() success. > > Fixes: 25e39e32b0a3f ("livepatch: Simplify stack trace retrieval") > Reported-by: Miroslav Benes > Signed-off-by: Joe Lawrence Reviewed-by: Kamalesh Babulal

Re: [PATCH] livepatch: Remove stale kobj_added entries from kernel-doc descriptions

2019-05-07 Thread Kamalesh Babulal
t; them. > > Reported-by: Kamalesh Babulal > Signed-off-by: Miroslav Benes Reviewed-by: Kamalesh Babulal -- Kamalesh

Re: [PATCH 2/2] livepatch: Remove duplicated code for early initialization

2019-05-03 Thread Kamalesh Babulal
ialization code > was not duplicated. Let's deduplicate it for future generations > of livepatching hackers. > > The patch does not change the existing behavior. > > Signed-off-by: Petr Mladek Reviewed-by: Kamalesh Babulal -- Kamalesh

Re: [PATCH 1/2] livepatch: Remove custom kobject state handling

2019-05-03 Thread Kamalesh Babulal
bool patched; > bool transition; Minor nitpick, the description of kobj_added needs to be removed from structure descriptions. Reviewed-by: Kamalesh Babulal -- Kamalesh

Re: [PATCH v2 2/2] livepatch: Use static buffer for debugging messages under rq lock

2019-04-30 Thread Kamalesh Babulal
On Tue, Apr 30, 2019 at 11:10:49AM +0200, Petr Mladek wrote: > klp_try_switch_task() is called under klp_mutex. The buffer for > debugging messages might be static. > > Signed-off-by: Petr Mladek Reviewed-by: Kamalesh Babulal

Re: [PATCH v2 1/2] livepatch: Remove duplicate warning about missing reliable stacktrace support

2019-04-30 Thread Kamalesh Babulal
adek Reviewed-by: Kamalesh Babulal

Re: [PATCH 3/3] livepatch: Cleanup message handling in klp_try_switch_task()

2019-04-24 Thread Kamalesh Babulal
On Wed, Apr 24, 2019 at 08:48:58PM +0200, Miroslav Benes wrote: > On Wed, 24 Apr 2019, Josh Poimboeuf wrote: > [...] > > > ret = save_stack_trace_tsk_reliable(task, ); > > > - WARN_ON_ONCE(ret == -ENOSYS); > > > + if (ret == -ENOSYS) { > > > + if (!enosys_warned) { > > > +

Re: [PATCH 2/3] stacktrace: Remove superfluous WARN_ONCE() from save_stack_trace_tsk_reliable()

2019-04-24 Thread Kamalesh Babulal
On Wed, Apr 24, 2019 at 10:55:49AM +0200, Petr Mladek wrote: > WARN_ONCE() in the generic save_stack_trace_tsk_reliable() is superfluous. > The only current user klp_check_stack() writes its own warning when > -ENOSYS is returned. > > Signed-off-by: Petr Mladek Reviewed-by: K

Re: [PATCH 1/3] livepatch: Convert error about unsupported reliable stacktrace into a warning

2019-04-24 Thread Kamalesh Babulal
ition. > > Suggested-by: Josh Poimboeuf > Signed-off-by: Petr Mladek Reviewed-by: Kamalesh Babulal -- Kamalesh

Re: [PATCH] livepatch: Enforce reliable stack trace as config dependency

2019-02-11 Thread Kamalesh Babulal
On Mon, Feb 11, 2019 at 08:08:13AM -0600, Josh Poimboeuf wrote: > On Sat, Feb 09, 2019 at 02:47:28PM +0530, Kamalesh Babulal wrote: > > After removal of the immediate flag by commit d0807da78e11 > > ("livepatch: Remove immediate feature"), reliable stack trace became

[PATCH] livepatch: Enforce reliable stack trace as config dependency

2019-02-09 Thread Kamalesh Babulal
Signed-off-by: Kamalesh Babulal Cc: Miroslav Benes Cc: Petr Mladek Cc: Josh Poimboeuf Cc: Jiri Kosina --- Patch is based on a087cdd4073b (origin/for-5.1/atomic-replace) branch include/linux/livepatch.h | 6 -- kernel/livepatch/Kconfig | 2 ++ kernel/livepatch/core.c | 6 -- 3 files

Re: [PATCH v2] livepatch: core: Return EOPNOTSUPP instead of ENOSYS

2019-02-08 Thread Kamalesh Babulal
On Fri, Feb 08, 2019 at 10:34:45AM +0100, Petr Mladek wrote: > On Fri 2019-02-08 11:50:05, Kamalesh Babulal wrote: > > On Wed, Feb 06, 2019 at 11:28:32AM +0100, Petr Mladek wrote: > > > On Tue 2019-02-05 09:59:33, Josh Poimboeuf wrote: > > > > On Tue, Feb 05, 2

Re: [PATCH v2] livepatch: core: Return EOPNOTSUPP instead of ENOSYS

2019-02-08 Thread Kamalesh Babulal
Hi Miroslav, On Fri, Feb 08, 2019 at 10:24:21AM +0100, Miroslav Benes wrote: > Hi Kamalesh, > > On Fri, 8 Feb 2019, Kamalesh Babulal wrote: > > > On Wed, Feb 06, 2019 at 11:28:32AM +0100, Petr Mladek wrote: > > > On Tue 2019-02-05 09:59:33, Josh Poimboeuf wrote: &

Re: [PATCH v2] livepatch: core: Return EOPNOTSUPP instead of ENOSYS

2019-02-07 Thread Kamalesh Babulal
On Wed, Feb 06, 2019 at 11:28:32AM +0100, Petr Mladek wrote: > On Tue 2019-02-05 09:59:33, Josh Poimboeuf wrote: > > On Tue, Feb 05, 2019 at 03:33:28AM +0900, Alice Ferrazzi wrote: > > > From: Alice Ferrazzi > > > > > > As a result of an unsupported operation is better to use EOPNOTSUPP > > > as

[PATCH] static_keys.txt: Fix trivial spelling mistake

2019-02-04 Thread Kamalesh Babulal
Fix the spelling of 'functionnality' -> 'functionality'. Signed-off-by: Kamalesh Babulal --- Documentation/static-keys.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/static-keys.txt b/Documentation/static-keys.txt index d68135560895..9803e14639bf 100

[PATCH] livepatch: Validate module/old func name length

2018-07-20 Thread Kamalesh Babulal
ues apply, to misspelled/incorrect names. At least gatekeep the modules with over the limit string length, by checking for their length during livepatch module registration. Signed-off-by: Kamalesh Babulal --- kernel/livepatch/core.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/kernel/livepatch

[PATCH] livepatch: Validate module/old func name length

2018-07-20 Thread Kamalesh Babulal
ues apply, to misspelled/incorrect names. At least gatekeep the modules with over the limit string length, by checking for their length during livepatch module registration. Signed-off-by: Kamalesh Babulal --- kernel/livepatch/core.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/kernel/livepatch

[PATCH v2] doc: livepatch: fix minor typo/grammar in shadow-vars.txt

2018-07-16 Thread Kamalesh Babulal
Fix the spelling of 'varibles' -> 'variables' and grammar in shadows->vars.txt file. Signed-off-by: Kamalesh Babulal Cc: Josh Poimboeuf --- v2 changes: - Fixed the grammar of the sentence as suggested by Josh Documentation/livepatch/shadow-vars.txt | 2 +- 1 file changed, 1 insertion

[PATCH v2] doc: livepatch: fix minor typo/grammar in shadow-vars.txt

2018-07-16 Thread Kamalesh Babulal
Fix the spelling of 'varibles' -> 'variables' and grammar in shadows->vars.txt file. Signed-off-by: Kamalesh Babulal Cc: Josh Poimboeuf --- v2 changes: - Fixed the grammar of the sentence as suggested by Josh Documentation/livepatch/shadow-vars.txt | 2 +- 1 file changed, 1 insertion

[PATCH] doc: livepatch: fix minor typo in shadow-vars.txt

2018-07-15 Thread Kamalesh Babulal
Fix the spelling of 'varibles' -> 'variables' in shadows->vars.txt file. Signed-off-by: Kamalesh Babulal --- Documentation/livepatch/shadow-vars.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/livepatch/shadow-vars.txt b/Documentation/livepatch/

[PATCH] doc: livepatch: fix minor typo in shadow-vars.txt

2018-07-15 Thread Kamalesh Babulal
Fix the spelling of 'varibles' -> 'variables' in shadows->vars.txt file. Signed-off-by: Kamalesh Babulal --- Documentation/livepatch/shadow-vars.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/livepatch/shadow-vars.txt b/Documentation/livepatch/

Re: [PATCH] livepatch: Remove reliable stacktrace check in klp_try_switch_task()

2018-07-15 Thread Kamalesh Babulal
On Saturday 14 July 2018 12:07 AM, Josh Poimboeuf wrote: We bail out during patch registration for architectures, those don't support reliable stack trace. Does anybody know if that change was intentional? I thought the plan was to allow non-consistency-model arches to still use livepatch,

Re: [PATCH] livepatch: Remove reliable stacktrace check in klp_try_switch_task()

2018-07-15 Thread Kamalesh Babulal
On Saturday 14 July 2018 12:07 AM, Josh Poimboeuf wrote: We bail out during patch registration for architectures, those don't support reliable stack trace. Does anybody know if that change was intentional? I thought the plan was to allow non-consistency-model arches to still use livepatch,

[PATCH] livepatch: Remove reliable stacktrace check in klp_try_switch_task()

2018-07-12 Thread Kamalesh Babulal
Support for immediate flag was removed by commit d0807da78e11 ("livepatch: Remove immediate feature"). We bail out during patch registration for architectures, those don't support reliable stack trace. Remove the check in klp_try_switch_task(), as its not required. Signed-off-by

[PATCH] livepatch: Remove reliable stacktrace check in klp_try_switch_task()

2018-07-12 Thread Kamalesh Babulal
Support for immediate flag was removed by commit d0807da78e11 ("livepatch: Remove immediate feature"). We bail out during patch registration for architectures, those don't support reliable stack trace. Remove the check in klp_try_switch_task(), as its not required. Signed-off-by

Re: [PATCH] powerpc/modules: remove unused mod_arch_specific.toc field

2018-05-25 Thread Kamalesh Babulal
of the __powerpc64__ #ifdef. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Reviewed-by: Kamalesh Babulal <kamal...@linux.vnet.ibm.com>

Re: [PATCH] powerpc/modules: remove unused mod_arch_specific.toc field

2018-05-25 Thread Kamalesh Babulal
of the __powerpc64__ #ifdef. Signed-off-by: Josh Poimboeuf Reviewed-by: Kamalesh Babulal

Re: [PATCH v4.2] powerpc/modules: Don't try to restore r2 after a sibling call

2017-11-17 Thread Kamalesh Babulal
after the branch in that case. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Reviewed-and-tested-by: Kamalesh Babulal <kamal...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/code-patching.h | 1 + arch/powerpc/kernel/module_64.c | 12 +++- arch/powerpc/lib

Re: [PATCH v4.2] powerpc/modules: Don't try to restore r2 after a sibling call

2017-11-17 Thread Kamalesh Babulal
14c 14c: R_PPC64_REL24 net_set_todo 150: 00 00 82 3c addis r4,r2,0 GCC didn't insert a nop after the branch to net_set_todo() because it's a sibling call, so it never returns. The nop isn't needed after the branch in that case. Signed-off-by: Josh Poim

Re: [PATCH v4 2/3] powerpc/modules: Don't try to restore r2 after a sibling call

2017-11-14 Thread Kamalesh Babulal
On Tuesday 14 November 2017 09:23 PM, Josh Poimboeuf wrote: On Tue, Nov 14, 2017 at 03:59:21PM +0530, Naveen N. Rao wrote: Kamalesh Babulal wrote: From: Josh Poimboeuf <jpoim...@redhat.com> When attempting to load a livepatch module, I got the following error: module_64: patch_

Re: [PATCH v4 2/3] powerpc/modules: Don't try to restore r2 after a sibling call

2017-11-14 Thread Kamalesh Babulal
On Tuesday 14 November 2017 09:23 PM, Josh Poimboeuf wrote: On Tue, Nov 14, 2017 at 03:59:21PM +0530, Naveen N. Rao wrote: Kamalesh Babulal wrote: From: Josh Poimboeuf When attempting to load a livepatch module, I got the following error: module_64: patch_module: Expect noop after

[PATCH v4 0/3] ppc64le: Add REL24 relocation support of livepatch symbols

2017-11-14 Thread Kamalesh Babulal
. Josh Poimboeuf (2): powerpc/modules: Don't try to restore r2 after a sibling call powerpc/modules: Improve restore_r2() error message Kamalesh Babulal (1): kernel/modules: Add REL24 relocation support of livepatch symbols arch/powerpc/kernel/module_64.c | 11 --- 1 file changed, 8

[PATCH v4 0/3] ppc64le: Add REL24 relocation support of livepatch symbols

2017-11-14 Thread Kamalesh Babulal
. Josh Poimboeuf (2): powerpc/modules: Don't try to restore r2 after a sibling call powerpc/modules: Improve restore_r2() error message Kamalesh Babulal (1): kernel/modules: Add REL24 relocation support of livepatch symbols arch/powerpc/kernel/module_64.c | 11 --- 1 file changed, 8

[PATCH v4 3/3] powerpc/modules: Improve restore_r2() error message

2017-11-14 Thread Kamalesh Babulal
ch_foo: Expected noop after call, got 7c630034 at netdev_has_upper_dev+0x54/0xb0 [patch_foo] Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Signed-off-by: Kamalesh Babulal <kamal...@linux.vnet.ibm.com> --- arch/powerpc/kernel/module_64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deleti

[PATCH v4 3/3] powerpc/modules: Improve restore_r2() error message

2017-11-14 Thread Kamalesh Babulal
, got 7c630034 at netdev_has_upper_dev+0x54/0xb0 [patch_foo] Signed-off-by: Josh Poimboeuf Signed-off-by: Kamalesh Babulal --- arch/powerpc/kernel/module_64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c

[PATCH v4 2/3] powerpc/modules: Don't try to restore r2 after a sibling call

2017-11-14 Thread Kamalesh Babulal
r the branch in that case. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Signed-off-by: Kamalesh Babulal <kamal...@linux.vnet.ibm.com> --- arch/powerpc/kernel/module_64.c | 4 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/m

[PATCH v4 2/3] powerpc/modules: Don't try to restore r2 after a sibling call

2017-11-14 Thread Kamalesh Babulal
-by: Kamalesh Babulal --- arch/powerpc/kernel/module_64.c | 4 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c index 39b01fd..9e5391f 100644 --- a/arch/powerpc/kernel/module_64.c +++ b/arch/powerpc/kernel/module_64.c @@ -489,6 +489,10

[PATCH v4 1/3] kernel/modules: Add REL24 relocation support of livepatch symbols

2017-11-14 Thread Kamalesh Babulal
for global calls. This issue can be fixed by teaching apply_relocate_add() to handle both SHN_UNDEF/SHN_LIVEPATCH symbols via the same stub. This patch extends SHN_UNDEF code to handle livepatch symbols too. Signed-off-by: Kamalesh Babulal <kamal...@linux.vnet.ibm.com> CC: Balbir Singh <

[PATCH v4 1/3] kernel/modules: Add REL24 relocation support of livepatch symbols

2017-11-14 Thread Kamalesh Babulal
for global calls. This issue can be fixed by teaching apply_relocate_add() to handle both SHN_UNDEF/SHN_LIVEPATCH symbols via the same stub. This patch extends SHN_UNDEF code to handle livepatch symbols too. Signed-off-by: Kamalesh Babulal CC: Balbir Singh Cc: Naveen N. Rao Cc: Josh Poimboeuf Cc

[PATCH] objtool: Fix ignore_func() description

2017-10-23 Thread Kamalesh Babulal
ignore_func() is limited to check if a symbol has been manually whitelisted using STACK_FRAME_NON_STANDARD macro. Change the function description accordingly. Cc: Ingo Molnar <mi...@kernel.org> Signed-off-by: Kamalesh Babulal <kamal...@linux.vnet.ibm.com> --- tools/objtool/check.

[PATCH] objtool: Fix ignore_func() description

2017-10-23 Thread Kamalesh Babulal
ignore_func() is limited to check if a symbol has been manually whitelisted using STACK_FRAME_NON_STANDARD macro. Change the function description accordingly. Cc: Ingo Molnar Signed-off-by: Kamalesh Babulal --- tools/objtool/check.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[PATCH] objtool: Refactor insn search in add_dead_ends()

2017-10-22 Thread Kamalesh Babulal
Move the search for instruction dead_end into helper function __add_dead_ends(), instead of duplicating the search for unreachable and reachable sections in add_dead_ends(). Cc: Ingo Molnar <mi...@kernel.org> Signed-off-by: Kamalesh Babulal <kamal...@linux.vnet.ibm.com> --- tools/obj

[PATCH] objtool: Refactor insn search in add_dead_ends()

2017-10-22 Thread Kamalesh Babulal
Move the search for instruction dead_end into helper function __add_dead_ends(), instead of duplicating the search for unreachable and reachable sections in add_dead_ends(). Cc: Ingo Molnar Signed-off-by: Kamalesh Babulal --- tools/objtool/check.c | 108

Re: [PATCH] objtool: Fix memory leak in decode_instructions()

2017-10-22 Thread Kamalesh Babulal
On Thursday 19 October 2017 08:02 PM, Josh Poimboeuf wrote: On Thu, Oct 19, 2017 at 09:31:37AM -0500, Josh Poimboeuf wrote: On Fri, Oct 13, 2017 at 11:20:58AM +0530, Kamalesh Babulal wrote: On Friday 13 October 2017 10:36 AM, Josh Poimboeuf wrote: On Fri, Oct 13, 2017 at 10:14:36AM +0530

Re: [PATCH] objtool: Fix memory leak in decode_instructions()

2017-10-22 Thread Kamalesh Babulal
On Thursday 19 October 2017 08:02 PM, Josh Poimboeuf wrote: On Thu, Oct 19, 2017 at 09:31:37AM -0500, Josh Poimboeuf wrote: On Fri, Oct 13, 2017 at 11:20:58AM +0530, Kamalesh Babulal wrote: On Friday 13 October 2017 10:36 AM, Josh Poimboeuf wrote: On Fri, Oct 13, 2017 at 10:14:36AM +0530

[tip:core/urgent] objtool: Fix memory leak in decode_instructions()

2017-10-20 Thread tip-bot for Kamalesh Babulal
Commit-ID: b703798386fb7288d5a995bd2284a984a5e24f3c Gitweb: https://git.kernel.org/tip/b703798386fb7288d5a995bd2284a984a5e24f3c Author: Kamalesh Babulal <kamal...@linux.vnet.ibm.com> AuthorDate: Thu, 19 Oct 2017 11:27:24 -0500 Committer: Ingo Molnar <mi...@kernel.org> CommitD

[tip:core/urgent] objtool: Fix memory leak in decode_instructions()

2017-10-20 Thread tip-bot for Kamalesh Babulal
Commit-ID: b703798386fb7288d5a995bd2284a984a5e24f3c Gitweb: https://git.kernel.org/tip/b703798386fb7288d5a995bd2284a984a5e24f3c Author: Kamalesh Babulal AuthorDate: Thu, 19 Oct 2017 11:27:24 -0500 Committer: Ingo Molnar CommitDate: Fri, 20 Oct 2017 09:43:21 +0200 objtool: Fix memory

[tip:core/objtool] objtool: Print top level commands on incorrect usage

2017-10-18 Thread tip-bot for Kamalesh Babulal
Commit-ID: 6a93bb7e4a7d6670677d5b0eb980936eb9cc5d2e Gitweb: https://git.kernel.org/tip/6a93bb7e4a7d6670677d5b0eb980936eb9cc5d2e Author: Kamalesh Babulal <kamal...@linux.vnet.ibm.com> AuthorDate: Sat, 14 Oct 2017 20:17:54 +0530 Committer: Ingo Molnar <mi...@kernel.org> CommitD

[tip:core/objtool] objtool: Print top level commands on incorrect usage

2017-10-18 Thread tip-bot for Kamalesh Babulal
Commit-ID: 6a93bb7e4a7d6670677d5b0eb980936eb9cc5d2e Gitweb: https://git.kernel.org/tip/6a93bb7e4a7d6670677d5b0eb980936eb9cc5d2e Author: Kamalesh Babulal AuthorDate: Sat, 14 Oct 2017 20:17:54 +0530 Committer: Ingo Molnar CommitDate: Wed, 18 Oct 2017 15:22:26 +0200 objtool: Print top

[PATCH v2] objtool: Print top level commands on incorrect usage

2017-10-14 Thread Kamalesh Babulal
: objtool COMMAND [ARGS] Commands: check Perform stack metadata validation on an object file orc Generate in-place ORC unwind tables for an object file $ echo $? 129 Cc: Ingo Molnar <mi...@kernel.org> Signed-off-by: Kamalesh Babulal <kamal...@linux.vnet.ibm.com> --- v2:

[PATCH v2] objtool: Print top level commands on incorrect usage

2017-10-14 Thread Kamalesh Babulal
: objtool COMMAND [ARGS] Commands: check Perform stack metadata validation on an object file orc Generate in-place ORC unwind tables for an object file $ echo $? 129 Cc: Ingo Molnar Signed-off-by: Kamalesh Babulal --- v2: - Changes to commit message only. tools/objtool

Re: [PATCH] objtool: Print top level commands on incorrect usage

2017-10-14 Thread Kamalesh Babulal
On Friday 13 October 2017 10:08 PM, Josh Poimboeuf wrote: [...] Signed-off-by: Kamalesh Babulal <kamal...@linux.vnet.ibm.com> --- tools/objtool/objtool.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/objtool/objtool.c b/tools/objtool/objtool.c index 3

Re: [PATCH] objtool: Print top level commands on incorrect usage

2017-10-14 Thread Kamalesh Babulal
On Friday 13 October 2017 10:08 PM, Josh Poimboeuf wrote: [...] Signed-off-by: Kamalesh Babulal --- tools/objtool/objtool.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/objtool/objtool.c b/tools/objtool/objtool.c index 31e0f91..07f3299 100644 --- a/tools

[PATCH] objtool: Print top level commands on incorrect usage

2017-10-13 Thread Kamalesh Babulal
: objtool COMMAND [ARGS] Commands: check Perform stack metadata validation on an object file orc Generate in-place ORC unwind tables for an object file $ echo $? 129 Cc: Ingo Molnar <mi...@kernel.org> Signed-off-by: Kamalesh Babulal <kamal...@linux.vnet.ibm.com> --- t

[PATCH] objtool: Print top level commands on incorrect usage

2017-10-13 Thread Kamalesh Babulal
: objtool COMMAND [ARGS] Commands: check Perform stack metadata validation on an object file orc Generate in-place ORC unwind tables for an object file $ echo $? 129 Cc: Ingo Molnar Signed-off-by: Kamalesh Babulal --- tools/objtool/objtool.c | 6 ++ 1 file changed, 2 insertions

Re: [PATCH] objtool: Fix memory leak in decode_instructions()

2017-10-12 Thread Kamalesh Babulal
On Friday 13 October 2017 10:36 AM, Josh Poimboeuf wrote: On Fri, Oct 13, 2017 at 10:14:36AM +0530, Kamalesh Babulal wrote: On Thursday 12 October 2017 09:40 PM, Josh Poimboeuf wrote: On Thu, Oct 12, 2017 at 02:32:14PM +0530, Kamalesh Babulal wrote: free the allocated insn before returning

Re: [PATCH] objtool: Fix memory leak in decode_instructions()

2017-10-12 Thread Kamalesh Babulal
On Friday 13 October 2017 10:36 AM, Josh Poimboeuf wrote: On Fri, Oct 13, 2017 at 10:14:36AM +0530, Kamalesh Babulal wrote: On Thursday 12 October 2017 09:40 PM, Josh Poimboeuf wrote: On Thu, Oct 12, 2017 at 02:32:14PM +0530, Kamalesh Babulal wrote: free the allocated insn before returning

Re: [PATCH] objtool: Fix memory leak in decode_instructions()

2017-10-12 Thread Kamalesh Babulal
On Thursday 12 October 2017 09:40 PM, Josh Poimboeuf wrote: On Thu, Oct 12, 2017 at 02:32:14PM +0530, Kamalesh Babulal wrote: free the allocated insn before returning, when an error occurs before adding insn to file->insn_list. Signed-off-by: Kamalesh Babulal <kamal...@linux.vnet.i

Re: [PATCH] objtool: Fix memory leak in decode_instructions()

2017-10-12 Thread Kamalesh Babulal
On Thursday 12 October 2017 09:40 PM, Josh Poimboeuf wrote: On Thu, Oct 12, 2017 at 02:32:14PM +0530, Kamalesh Babulal wrote: free the allocated insn before returning, when an error occurs before adding insn to file->insn_list. Signed-off-by: Kamalesh Babulal Any chance you're work

[PATCH] objtool: Fix memory leak in decode_instructions()

2017-10-12 Thread Kamalesh Babulal
free the allocated insn before returning, when an error occurs before adding insn to file->insn_list. Signed-off-by: Kamalesh Babulal <kamal...@linux.vnet.ibm.com> --- tools/objtool/check.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/objtool/check.

[PATCH] objtool: Fix memory leak in decode_instructions()

2017-10-12 Thread Kamalesh Babulal
free the allocated insn before returning, when an error occurs before adding insn to file->insn_list. Signed-off-by: Kamalesh Babulal --- tools/objtool/check.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/objtool/check.c b/tools/objtool/check.c in

Re: [PATCH v3 12/15] livepatch: store function sizes

2017-01-11 Thread Kamalesh Babulal
On Thursday 08 December 2016 11:38 PM, Josh Poimboeuf wrote: For the consistency model we'll need to know the sizes of the old and new functions to determine if they're on the stacks of any tasks. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Reviewed-by: Kamalesh Babulal

Re: [PATCH v3 12/15] livepatch: store function sizes

2017-01-11 Thread Kamalesh Babulal
On Thursday 08 December 2016 11:38 PM, Josh Poimboeuf wrote: For the consistency model we'll need to know the sizes of the old and new functions to determine if they're on the stacks of any tasks. Signed-off-by: Josh Poimboeuf Reviewed-by: Kamalesh Babulal -- cheers, Kamalesh.

Re: [PATCH v3 04/15] livepatch/x86: add TIF_PATCH_PENDING thread flag

2017-01-10 Thread Kamalesh Babulal
is placed in the _TIF_ALLWORK_MASK macro, which results in exit_to_usermode_loop() calling klp_update_patch_state() when it's set. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Reviewed-by: Kamalesh Babulal <kamal...@linux.vnet.ibm.com> -- cheers, Kamalesh.

Re: [PATCH v3 04/15] livepatch/x86: add TIF_PATCH_PENDING thread flag

2017-01-10 Thread Kamalesh Babulal
is placed in the _TIF_ALLWORK_MASK macro, which results in exit_to_usermode_loop() calling klp_update_patch_state() when it's set. Signed-off-by: Josh Poimboeuf Reviewed-by: Kamalesh Babulal -- cheers, Kamalesh.

Re: [PATCH v3 10/15] livepatch: move patching functions into patch.c

2017-01-10 Thread Kamalesh Babulal
On Thursday 08 December 2016 11:38 PM, Josh Poimboeuf wrote: Move functions related to the actual patching of functions and objects into a new patch.c file. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Reviewed-by: Kamalesh Babulal <kamal...@linux.vnet.ibm.com> -- cheers, Kamalesh.

Re: [PATCH v3 10/15] livepatch: move patching functions into patch.c

2017-01-10 Thread Kamalesh Babulal
On Thursday 08 December 2016 11:38 PM, Josh Poimboeuf wrote: Move functions related to the actual patching of functions and objects into a new patch.c file. Signed-off-by: Josh Poimboeuf Reviewed-by: Kamalesh Babulal -- cheers, Kamalesh.

Re: [PATCH v3 09/15] livepatch: remove unnecessary object loaded check

2017-01-10 Thread Kamalesh Babulal
Poimboeuf <jpoim...@redhat.com> Reviewed-by: Kamalesh Babulal <kamal...@linux.vnet.ibm.com> -- cheers, Kamalesh.

Re: [PATCH v3 09/15] livepatch: remove unnecessary object loaded check

2017-01-10 Thread Kamalesh Babulal
Poimboeuf Reviewed-by: Kamalesh Babulal -- cheers, Kamalesh.

Re: [PATCH v3 08/15] livepatch: separate enabled and patched states

2017-01-10 Thread Kamalesh Babulal
). - Patched means that an object's funcs are registered with ftrace and added to the klp_ops func stack. Also, since these states are binary, represent them with booleans instead of ints. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Reviewed-by: Kamalesh Babulal <kamal...@linux.vne

Re: [PATCH v3 08/15] livepatch: separate enabled and patched states

2017-01-10 Thread Kamalesh Babulal
). - Patched means that an object's funcs are registered with ftrace and added to the klp_ops func stack. Also, since these states are binary, represent them with booleans instead of ints. Signed-off-by: Josh Poimboeuf Reviewed-by: Kamalesh Babulal -- cheers, Kamalesh.

Re: [PATCH v3 02/15] x86/entry: define _TIF_ALLWORK_MASK flags explicitly

2017-01-10 Thread Kamalesh Babulal
explicitly. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> For the version with swapped _TIF_SINGLESTEP and _TIF_NEED_RESCHED flags. Reviewed-by: Kamalesh Babulal <kamal...@linux.vnet.ibm.com> -- cheers, Kamalesh.

Re: [PATCH v3 02/15] x86/entry: define _TIF_ALLWORK_MASK flags explicitly

2017-01-10 Thread Kamalesh Babulal
explicitly. Signed-off-by: Josh Poimboeuf For the version with swapped _TIF_SINGLESTEP and _TIF_NEED_RESCHED flags. Reviewed-by: Kamalesh Babulal -- cheers, Kamalesh.

  1   2   3   4   5   6   7   8   >