On Fri, Jan 22, 2016 at 11:05:06AM +0100, Paolo Bonzini wrote:
>
>
> On 21/01/2016 23:49, Josh Poimboeuf wrote:
> > With some configs, gcc doesn't inline test_cc(). When that happens, it
> > doesn't create a stack frame before inserting the call instruction.
> >
On Fri, Jan 22, 2016 at 09:18:23AM -0800, Alexei Starovoitov wrote:
> On Fri, Jan 22, 2016 at 09:58:04AM -0600, Josh Poimboeuf wrote:
> > On Thu, Jan 21, 2016 at 08:18:46PM -0800, Alexei Starovoitov wrote:
> > > On Thu, Jan 21, 2016 at 09:55:31PM -0600, Josh Poimboeuf wrote:
>
;
> Reviewed-by: Petr Mladek <pmla...@suse.cz>
> Acked-by: Rusty Russell <ru...@rustcorp.com.au>
Reviewed-by: Josh Poimboeuf <jpoim...@redhat.com>
> ---
> Patch based on linux-next-20160216.
>
> v5:
> - Make the ftrace notifier patch standalon
he unlikely
___preempt_schedule() call path. Going through a sampling of the
differences in the asm, that's the most common change I see.
Otherwise it has no real effect on callers which already have stack
frames (though it does result in the reordering of some 'mov's).
Reported-by: Jiri Sla
On Fri, Feb 12, 2016 at 09:10:11PM +0100, Peter Zijlstra wrote:
> On Fri, Feb 12, 2016 at 12:32:06PM -0600, Josh Poimboeuf wrote:
> > What I actually see in the listing is:
> >
> > decl__percpu_prefix:__preempt_count
> > je 1f:
> &
On Mon, Feb 15, 2016 at 08:56:21AM -0800, Linus Torvalds wrote:
> On Feb 15, 2016 8:31 AM, "Josh Poimboeuf" <jpoim...@redhat.com> wrote:
> >
> > So is the goal to optimize for size? If I replace the calls to
> > __preempt_schedule[_notrace]() with real C cal
On Sun, Feb 14, 2016 at 11:59:00PM +0100, Jiri Kosina wrote:
> On Wed, 10 Feb 2016, Jiri Kosina wrote:
>
> > > > Remove the livepatch module notifier in favor of directly enabling and
> > > > disabling patches to modules in the module loader. Hard-coding the
> > > > function calls ensures that
try to fix it then.
>From a3c65947011a420743f308b698171c4209105d3f Mon Sep 17 00:00:00 2001
Message-Id:
<a3c65947011a420743f308b698171c4209105d3f.1456868910.git.jpoim...@redhat.com>
From: Josh Poimboeuf <jpoim...@redhat.com>
Date: Tue, 1 Mar 2016 13:35:51 -0600
Subject: [PATCH]
On Mon, Mar 07, 2016 at 11:45:36PM +, Deucher, Alexander wrote:
> > -Original Message-
> > From: Josh Poimboeuf [mailto:jpoim...@redhat.com]
> > Sent: Monday, March 07, 2016 6:10 PM
> > To: Deucher, Alexander; Koenig, Christian
> > Cc: dri-de...@lists
On Wed, Mar 09, 2016 at 03:01:46PM +0100, Petr Mladek wrote:
> LivePatch framework deserves some documentation, definitely.
> This is an attempt to provide some basic info. I hope that
> it will be useful for both LivePatch producers and also
> potential developers of the framework itself.
>
>
patch->mod->name, obj->mod->name, obj->mod->name);
> klp_free_object_loaded(obj);
> + mutex_unlock(_mutex);
> +
> + return ret;
> }
>
> -static int klp_module_notify(struct notifier_block *nb, unsigned long action,
> - void *data)
> +void klp_module_going(struct module *mod)
> {
> - int ret;
> - struct module *mod = data;
> struct klp_patch *patch;
> struct klp_object *obj;
>
> - if (action != MODULE_STATE_COMING && action != MODULE_STATE_GOING)
> - return 0;
> + if (WARN_ON(mod->state != MODULE_STATE_GOING))
> + return;
If we're removing patch 2/3, then mod->state isn't necessarily GOING. I
think the check can probably just be removed altogether.
With that fixed,
Acked-by: Josh Poimboeuf <jpoim...@redhat.com>
--
Josh
anup after all the COMING-actions have completed.
>
> Signed-off-by: Jessica Yu <j...@redhat.com>
Reviewed-by: Josh Poimboeuf <jpoim...@redhat.com>
--
Josh
On Fri, Mar 11, 2016 at 03:03:48PM -0500, Jessica Yu wrote:
> +/* Module can be either COMING or GOING */
IMO this comment doesn't really add anything: the below WARN_ON already
says as much. Also the location of the comment right above the function
is confusing: someone not familiar with the
Add some helper macros to make it easier to traverse instructions, and
to abstract the details of the instruction list implementation in
preparation for creating a hash structure.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
tools/objtool/builtin-check.c
Compile objtool with debugging symbols ('-g') to help tools like perf
and gdb understand what it's doing. Combined with '-O2', it's not
always helpful, but it's better than nothing.
Reported-by: Ingo Molnar <mi...@kernel.org>
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
t
/r/20160308154909.ga20...@gmail.com
Reported-by: Ingo Molnar <mi...@kernel.org>
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
tools/objtool/builtin-check.c | 24
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/tools/objtool/builtin-che
user 0m1.163s
sys 0m0.005s
to:
real 0m0.059s
user 0m0.042s
sys 0m0.017s
for a 20x speedup.
With the same object, it should be noted that the memory heap usage grew
from 8MB to 62MB. Reducing the memory usage is on the TODO list.
Reported-by: Ingo Molnar <mi...@kernel.o
Reported-by: Ingo Molnar <mi...@kernel.org>
Reported-by: kbuild test robot <fengguang...@intel.com>
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
tools/objtool/builtin-check.c | 145 +-
1 file changed, 100 insertions(+), 45 deleti
ela refers to a rela entry in .rela.text.
- rodata_rela refers to a rela entry in .rela.rodata.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
tools/objtool/builtin-check.c | 80 ++-
tools/objtool/elf.c | 22 ++--
too
of brackets so gcc can find them.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
tools/include/asm-generic/bitops/__fls.h | 2 +-
tools/include/asm-generic/bitops/fls.h | 2 +-
tools/include/asm-generic/bitops/fls64.h | 2 +-
tools/include/linux/hashtable.h
The insns list is initialized twice, in cmd_check() and in
decode_instructions(). Remove the latter.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
tools/objtool/builtin-check.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/tools/objtool/builtin-check.c b/tools/objtool/b
ed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
tools/objtool/builtin-check.c | 48 ++-
1 file changed, 25 insertions(+), 23 deletions(-)
diff --git a/tools/objtool/builtin-check.c b/tools/objtool/builtin-check.c
index bfeee22..7515cb2 100644
--- a/t
I don't _think_ dead_end_function() can get into a recursive loop, but
just in case, stop the loop and print a warning.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
tools/objtool/builtin-check.c | 45 +++
1 file changed, 33 insertions(
to compare the frame pointer
state. But it also accidentally compares the FENTRY state, resulting in
a false positive warning.
[1] https://lkml.kernel.org/r/20160308154909.ga20...@gmail.com
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
tools/objtool/builtin-check.c | 7 ++-
Based on tip/master.
These patches fix all known objtool issues:
- infinite loop
- sibling call false positives
- switch statement jump table fix
- performance improvements
- print one warning per function
Josh Poimboeuf (11):
objtool: Prevent infinite recursion in noreturn detection
] https://lists.01.org/pipermail/kbuild-all/2016-March/018249.html
Reported-by: kbuild test robot <fengguang...@intel.com>
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
arch/x86/kvm/emulate.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kvm/emul
Simplify the control flow of si_tiling_mode_table_init() similar to how
it was done in gfx_v7_0.c and gfx_v8_0.c.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
drivers/gpu/drm/radeon/si.c | 925 +---
1 file changed, 439 insertions(+
Simplify the control flow of cik_tiling_mode_table_init() similar to how
it was done in gfx_v7_0.c and gfx_v8_0.c.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
drivers/gpu/drm/radeon/cik.c | 1691 +-
1 file changed, 666 insertions(+)
On Fri, Mar 18, 2016 at 01:45:22PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Fri, Mar 18, 2016 at 11:38:15AM -0500, Josh Poimboeuf escreveu:
> > On Fri, Mar 18, 2016 at 01:25:47PM -0300, Arnaldo Carvalho de Melo wrote:
> > > Em Thu, Mar 17, 2016 at 06:27:50PM +0100, Lu
On Fri, Mar 18, 2016 at 11:38:15AM -0500, Josh Poimboeuf wrote:
> On Fri, Mar 18, 2016 at 01:25:47PM -0300, Arnaldo Carvalho de Melo wrote:
> > Em Thu, Mar 17, 2016 at 06:27:50PM +0100, Lucas Stach escreveu:
> > > This fixes cross compilation of libapi.
> >
> > Humm,
On Wed, Mar 09, 2016 at 10:47:59AM +0100, Ingo Molnar wrote:
>
> * Josh Poimboeuf <jpoim...@redhat.com> wrote:
>
> > Copy hashtable.h from include/linux/tools.h. It's needed by objtool in
> > the next patch in the series.
> >
> > Add some includ
On Wed, Mar 09, 2016 at 11:39:05AM +0100, Jiri Kosina wrote:
> On Tue, 8 Mar 2016, Jessica Yu wrote:
>
> > Hm, I should've caught this earlier, but the notifier cleanup patch
> > that removes the livepatch module notifier had kernel/module.c include
> > livepatch.h for the
resolvable ambiguity (%lu matches) on symbol '%s' in
> object '%s'\n",
> -args.count, name, objname);
> + pr_err("unresolvable ambiguity on symbol '%s' in object '%s'\n",
While you're at it, can you improve the grammar: s/on/for/ ?
"unresolvable ambiguity *for* symbol..."
Either way,
Acked-by: Josh Poimboeuf <jpoim...@redhat.com>
--
Josh
On Tue, Apr 05, 2016 at 04:24:33PM +0200, Miroslav Benes wrote:
> On Mon, 4 Apr 2016, Josh Poimboeuf wrote:
>
> > > I'd add a fake signal facility for sleeping non-migrated tasks. This
> > > would accelerate a migration to a new universe. We have it in kgraft fo
On Fri, Apr 01, 2016 at 03:39:44PM +0200, Petr Mladek wrote:
> On Fri 2016-03-25 14:34:47, Josh Poimboeuf wrote:
> > These patches are still a work in progress, but Jiri asked that I share
> > them before I go on vacation next week. Based on origin/master bec
On Tue, Apr 05, 2016 at 03:07:13PM +0200, Miroslav Benes wrote:
> On Mon, 4 Apr 2016, Josh Poimboeuf wrote:
>
> > So I think this doesn't fix the problem. Dynamic relocations are
> > applied to the "patch module", whereas the above code deals with the
> > in
On Tue, Apr 05, 2016 at 01:36:34PM +0200, Vojtech Pavlik wrote:
> On Mon, Apr 04, 2016 at 01:33:07PM -0500, Josh Poimboeuf wrote:
> > On Mon, Apr 04, 2016 at 08:27:59PM +0200, Vojtech Pavlik wrote:
> > > On Mon, Apr 04, 2016 at 01:21:38PM -0500, Josh Poimboeuf wrote:
> >
On Thu, Apr 07, 2016 at 02:10:30PM +0200, Petr Mladek wrote:
> On Fri 2016-03-25 14:34:47, Josh Poimboeuf wrote:
> > TODO:
> > - try ftrace handler switching idea from v1 cover letter
>
> I have had a discussion about it with Mirek. This would help with
> kthrea
On Thu, Apr 07, 2016 at 01:55:52PM +0200, Petr Mladek wrote:
> On Fri 2016-03-25 14:34:54, Josh Poimboeuf wrote:
> > For live patching and possibly other use cases, a stack trace is only
> > useful if you can be assured that it's completely reliable. Add a new
> > save_sta
On Thu, Apr 07, 2016 at 11:47:00AM +0200, Petr Mladek wrote:
> On Wed 2016-04-06 11:33:56, Josh Poimboeuf wrote:
> > On Wed, Apr 06, 2016 at 03:06:19PM +0200, Petr Mladek wrote:
> > > On Fri 2016-03-25 14:34:52, Josh Poimboeuf wrote:
> > > > This is a horrible way to
On Thu, Apr 07, 2016 at 11:37:19PM +0200, Jiri Kosina wrote:
> On Thu, 7 Apr 2016, Jessica Yu wrote:
>
> > Been sort of rattling my head over the scheduler code :-) Just following
> > the calls in and out of __schedule() it doesn't look like there is a
> > current flag/mechanism to tell whether
On Thu, Apr 07, 2016 at 05:47:00PM +0200, Jiri Kosina wrote:
> On Thu, 7 Apr 2016, Josh Poimboeuf wrote:
>
> > > > - try ftrace handler switching idea from v1 cover letter
> [ ... ]
> > > We probably should not check the stack in atomic context
> >
&
the livepatch API before sanity (NULL) checking them (patch
> and patch->mod).
>
> Spotted by smatch tool.
>
> Reported-by: Dan Carpenter <dan.carpen...@oracle.com>
> Signed-off-by: Jiri Kosina <jkos...@suse.cz>
Acked-by: Josh Poimboeuf <jpoim...@redhat.com>
--
Josh
On Wed, Apr 06, 2016 at 01:32:48AM +0800, Minfei Huang wrote:
> On 03/25/16 at 02:34P, Josh Poimboeuf wrote:
> > +static int klp_check_stack(struct task_struct *task)
> > +{
> > + static unsigned long entries[MAX_STACK_ENTRIES];
> > + struct stack_trace trace;
>
On Tue, Apr 12, 2016 at 09:44:43AM -0500, Chris J Arges wrote:
> On Fri, Mar 25, 2016 at 02:34:55PM -0500, Josh Poimboeuf wrote:
> > Once we have a consistency model, patches and their objects will be
> > enabled and disabled at different times. For example, when a patch is
&g
On Tue, Apr 12, 2016 at 12:35:49PM -0500, Chris J Arges wrote:
> On Tue, Apr 12, 2016 at 12:16:00PM -0500, Josh Poimboeuf wrote:
> > On Tue, Apr 12, 2016 at 09:44:43AM -0500, Chris J Arges wrote:
> > > On Fri, Mar 25, 2016 at 02:34:55PM -0500, Josh Poimboeuf wrote:
&g
On Thu, Feb 04, 2016 at 08:45:35PM +0100, Denys Vlasenko wrote:
> Sometimes gcc mysteriously doesn't inline
> very small functions we expect to be inlined. See
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66122
>
> With this .config:
>
On Wed, Apr 13, 2016 at 02:12:25PM +0200, Denys Vlasenko wrote:
> On 04/13/2016 05:36 AM, Josh Poimboeuf wrote:
> > On Thu, Feb 04, 2016 at 08:45:35PM +0100, Denys Vlasenko wrote:
> >> Sometimes gcc mysteriously doesn't inline
> >> very small functions we expect to be
On Fri, Apr 08, 2016 at 10:03:04AM +0200, Petr Mladek wrote:
> On Fri 2016-04-08 09:05:28, Jiri Kosina wrote:
> > On Thu, 7 Apr 2016, Jessica Yu wrote:
> >
> > > > Alternatively, without eating up a TIF_ space, it'd be possible to push
> > > > a
> > > > magic contents on top of the stack in
On Fri, Apr 08, 2016 at 10:07:10AM +0200, Petr Mladek wrote:
> On Thu 2016-04-07 09:34:03, Josh Poimboeuf wrote:
> > On Thu, Apr 07, 2016 at 11:47:00AM +0200, Petr Mladek wrote:
> > > On Wed 2016-04-06 11:33:56, Josh Poimboeuf wrote:
> > > > On Wed, Apr 06, 2016 at
Hi Tomas,
On Mon, Apr 04, 2016 at 02:11:22PM +0300, Tomas Winkler wrote:
> Add simple RPMB host testing tool. It can be used
> to program key, write and read data block, and retrieve
> write counter.
>
> Signed-off-by: Tomas Winkler
> ---
> V2: resend
> MAINTAINERS
On Mon, Apr 11, 2016 at 04:16:14PM +0200, Jiri Slaby wrote:
> On 04/04/2016, 07:54 PM, Josh Poimboeuf wrote:
> > On Thu, Mar 31, 2016 at 03:03:16PM +0200, Miroslav Benes wrote:
> >> On Fri, 25 Mar 2016, Josh Poimboeuf wrote:
> >>
> >>> diff --git a/arch/x86
On Wed, Apr 06, 2016 at 03:06:19PM +0200, Petr Mladek wrote:
> On Fri 2016-03-25 14:34:52, Josh Poimboeuf wrote:
> > This is a horrible way to detect whether a task has been preempted.
> > Come up with something better: task flag? or is there already an
> > existing mecha
Seth and Vojtech are no longer active maintainers of livepatch, so
remove them in favor of Jessica and Miroslav.
Also add Petr as a designated reviewer.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
MAINTAINERS | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff
On Mon, Mar 21, 2016 at 11:32:34PM +0100, Jiri Kosina wrote:
> On Mon, 21 Mar 2016, Josh Poimboeuf wrote:
>
> > The objtool stack validation patches have been merged into Linus's tree
> > for 4.6 with commit 26660a4046b1, and all known warnings are fixed.
>
> Yup, I'
Hi all,
Just an update about the proposed consistency model, since several
people have asked.
The objtool stack validation patches have been merged into Linus's tree
for 4.6 with commit 26660a4046b1, and all known warnings are fixed. So
I'll be posting a revamped RFC of the hybrid consistency
On Mon, Mar 21, 2016 at 10:16:17PM +0100, Jiri Kosina wrote:
> On Mon, 21 Mar 2016, Jessica Yu wrote:
>
> > Yes, this is a concern and I'm not sure what the best way to fix it
> > is. If both MODULE_NAME_LEN and KSYM_NAME_LEN were straight up
> > constants, then I think Josh's stringify approach
On Tue, Mar 22, 2016 at 01:57:01PM -0400, Jessica Yu wrote:
> +++ Josh Poimboeuf [21/03/16 09:06 -0500]:
> >On Wed, Mar 16, 2016 at 03:47:04PM -0400, Jessica Yu wrote:
> >>For livepatch modules, copy Elf section, symbol, and string information
> >>from the load_info
On Wed, Mar 23, 2016 at 07:15:08PM +0800, kbuild test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> master
> head: a24e3d414e59ac76566dedcad1ed1d319a93ec14
> commit: d4883d5d6b146fd65f762c462b2c6d4a327c7d50 objtool: Enable stack
> metadata
On Wed, Mar 23, 2016 at 04:11:04PM -0500, Josh Poimboeuf wrote:
> On Wed, Mar 23, 2016 at 07:15:08PM +0800, kbuild test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> > master
> > head: a24e3d414e59ac76566dedcad1ed1d
On Wed, Mar 16, 2016 at 03:47:04PM -0400, Jessica Yu wrote:
> For livepatch modules, copy Elf section, symbol, and string information
> from the load_info struct in the module loader. Persist copies of the
> original symbol table and string table.
>
> Livepatch manages its own relocation sections
On Mon, Mar 21, 2016 at 05:31:57PM +0100, Petr Mladek wrote:
> > diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c
> > index 780f00c..2aa20fa 100644
> > --- a/kernel/livepatch/core.c
> > +++ b/kernel/livepatch/core.c
> > +static int klp_resolve_symbols(Elf_Shdr *relasec, struct module
On Wed, Mar 16, 2016 at 03:47:06PM -0400, Jessica Yu wrote:
> Reuse module loader code to write relocations, thereby eliminating the need
> for architecture specific relocation code in livepatch. Specifically, reuse
> the apply_relocate_add() function in the module loader to write relocations
>
On Wed, Mar 16, 2016 at 03:47:07PM -0400, Jessica Yu wrote:
> 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-sample.c | 1 +
> 1 file changed, 1
On Fri, Mar 18, 2016 at 01:25:47PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Thu, Mar 17, 2016 at 06:27:50PM +0100, Lucas Stach escreveu:
> > This fixes cross compilation of libapi.
>
> Humm, I guess that tools/lib/subcmd/Makefile has the same problem? And
> there are also other cases where LD
On Mon, Mar 21, 2016 at 11:46:51AM -0500, Josh Poimboeuf wrote:
> On Mon, Mar 21, 2016 at 05:31:57PM +0100, Petr Mladek wrote:
> > > diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c
> > > index 780f00c..2aa20fa 100644
> > > --- a/kernel/livepatch/core.
K set
Make the idle tasks conform to the new stack bottom convention by
starting their stack at a sizeof(pt_regs) offset from the end of the
stack page.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
arch/x86/kernel/head_64.S | 8 +---
1 file changed, 5 insertions(+), 3 deletions
_each_object/func helpers
v1 was here:
https://lkml.kernel.org/r/cover.1423499826.git.jpoim...@redhat.com
Josh Poimboeuf (14):
x86/asm/head: cleanup initial stack variable
x86/asm/head: use a common function for starting CPUs
x86/asm/head: standardize the bottom of the stack for idle tasks
x86
:
- Remove the unused init_rsp variable declaration.
- Remove the ".word 0" statement after the initial_stack definition
because it has no apparent function.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
arch/x86/include/asm/realmode.h | 2 +-
arch/x86/include/asm
There are two different pieces of code for starting a CPU: start_cpu0()
and the end of secondary_startup_64(). They're identical except for the
stack setup. Combine the common parts into a shared start_cpu()
function.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
arch/x86/
the
intent of other users of the _stext symbol, and it also seems consistent
with what other architectures are already doing.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
arch/x86/kernel/vmlinux.lds.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/
in the
previous universe.
A transition can be reversed and effectively canceled by writing the
opposite value to the /sys/kernel/livepatch//enabled file while
the transition is in progress. Then all the tasks will attempt to
converge back to the original universe.
Signed-off-by: Josh Poimboeuf <jp
- corrupted stack data
- newly forked tasks
- running tasks
- the user didn't provide a large enough entries array
Also add a config option so arch-independent code can determine at build
time whether the function is implemented.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
arch/K
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>
---
kernel/livepatch/Makefile | 2 +-
kernel/livepatch/core.c | 174 +--
kernel/livepatch/patch.c
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>
---
include/linux/livepatch.h | 17 ---
kernel/livepatch/core.c
This is a horrible way to detect whether a task has been preempted.
Come up with something better: task flag? or is there already an
existing mechanism?
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
include/linux/sched.h | 11 ++-
kernel/sched/core.c
klp_patch_object()'s callers already ensure that the object is loaded,
so its call to klp_is_object_loaded() is unnecessary.
This will also make it possible to move the patching code into a
separate file.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
kernel/livepatch/core.c | 3
In preparation for being able to determine whether a given stack trace
is reliable, allow the stacktrace_ops functions to propagate errors to
dump_trace().
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
arch/x86/include/asm/stacktrace.h | 36 +++---
arch/x86/
Expose the per-task klp_universe value so users can determine which
tasks are holding up completion of a patching operation.
Call it "patch_status" rather than "universe": it's at least more
descriptive for the average user.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.c
switch universes when
returning from an interrupt. If a task is sleeping on a to-be-patched
function, the user can send SIGSTOP and SIGCONT to force it to switch.
Since the idle "swapper" tasks don't ever exit the kernel, they're
updated from within the idle loop.
Signed-off-by: Josh
For the consistency model we'll need to know the sizes of the old and
new functions to determine if they're on stacks of any tasks.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
include/linux/livepatch.h | 3 +++
kernel/livepatch/core.c | 16
2 files chang
tion, as sscanf() takes care to put a null byte at the end of
>the bufs.
> - Fix compiler kbuild errors for the !CONFIG_LIVEPATCH case
> - Fixed some small module.c nits
For the series:
Acked-by: Josh Poimboeuf <jpoim...@redhat.com>
Thanks Jessica!
--
Josh
On Fri, Mar 18, 2016 at 02:38:52PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Fri, Mar 18, 2016 at 12:16:23PM -0500, Josh Poimboeuf escreveu:
> > On Fri, Mar 18, 2016 at 01:45:22PM -0300, Arnaldo Carvalho de Melo wrote:
> > > Em Fri, Mar 18, 2016 at 11:38:15AM -0500, Josh
On Tue, Mar 08, 2016 at 11:37:16AM +0100, Ingo Molnar wrote:
>
> * Josh Poimboeuf <jpoim...@redhat.com> wrote:
>
> > This is v19 of the compile-time stack metadata validation patch set.
> >
> > It's based on tip:core/objtool.
>
> So I've upgraded my main
On Tue, Mar 08, 2016 at 02:44:57PM +0100, Ingo Molnar wrote:
>
> * Josh Poimboeuf <jpoim...@redhat.com> wrote:
>
> > On Tue, Mar 08, 2016 at 11:37:16AM +0100, Ingo Molnar wrote:
> > >
> > > * Josh Poimboeuf <jpoim...@redhat.com> wrote:
> &g
On Fri, Mar 04, 2016 at 10:53:39AM +0100, Miroslav Benes wrote:
> There is an #error in asm/livepatch.h for both x86 and s390 in
> !CONFIG_LIVEPATCH cases. It does not make much sense as pointed out by
> Michael Ellerman. One can happily include asm/livepatch.h with
> CONFIG_LIVEPATCH. Remove it
Hi Petr,
On Thu, Mar 03, 2016 at 05:52:01PM +0100, Petr Mladek wrote:
> From: Balbir Singh
>
> Changelog v4:
> 1. Renamed klp_matchaddr() to klp_get_ftrace_location()
> and used it just to convert the function address.
> 2. Synced
On Sun, Mar 06, 2016 at 10:13:56PM +0100, Jiri Kosina wrote:
> On Fri, 4 Mar 2016, Josh Poimboeuf wrote:
>
> > > There is an #error in asm/livepatch.h for both x86 and s390 in
> > > !CONFIG_LIVEPATCH cases. It does not make much sense as pointed out by
> > >
On Wed, Mar 02, 2016 at 01:27:35PM +1100, Stephen Rothwell wrote:
> Hi Josh,
>
> On Tue, 1 Mar 2016 15:54:51 -0600 Josh Poimboeuf <jpoim...@redhat.com> wrote:
> >
> > Changing it to use the host compiler would probably be an easy fix, but
> > that would expose a
This adds the ability for CONFIG_STACK_VALIDATION to work in a
cross-compiled environment against an x86 kernel. Based on tip/master.
Josh Poimboeuf (2):
x86/asm/decoder: Use explicitly signed chars
objtool: Support CROSS_COMPILE
arch/x86/lib/insn.c | 6 +++---
tools
h are all kept in sync via makefile checks and
warnings: in-kernel, perf, and objtool. This fixes all three locations.
Eventually we should probably try to at least converge the two separate
"tools" locations into a single shared location.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com
endian system would result
in a bunch of false positive objtool warnings during the kernel build
because it isn't endian-aware. But that's generally a rare edge case
and there haven't been any reports of anybody needing that.
Reported-by: Stephen Rothwell <s...@canb.auug.org.au>
Signed-off-by
On Thu, Mar 03, 2016 at 01:43:14PM +1100, Stephen Rothwell wrote:
> Hi Josh,
>
> Just a couple of quick comments ...
>
> On Wed, 2 Mar 2016 18:39:37 -0600 Josh Poimboeuf <jpoim...@redhat.com> wrote:
> >
> > diff --git a/tools/objtool/Makefile b/tools/objtool/Ma
On Thu, Mar 03, 2016 at 02:38:43PM +1100, Stephen Rothwell wrote:
> Hi Josh,
>
> On Wed, 2 Mar 2016 21:20:58 -0600 Josh Poimboeuf <jpoim...@redhat.com> wrote:
> >
> > On Thu, Mar 03, 2016 at 01:43:14PM +1100, Stephen Rothwell wrote:
> > >
> > > I wa
and disable
stack validation.
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
Based on tip/master.
Makefile | 13 -
scripts/Makefile.build | 2 ++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 750df29..1fd8328
ld
objtool in tools/foo. Convert the output directory to an absolute path
before passing it to the tools Makefile.
Reported-by: Sudip Mukherjee <sudipm.mukher...@gmail.com>
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 de
ve ever done. :)
> bisect shows the first bad commit as:
> d4883d5d6b14 ("objtool: Enable stack metadata validation on 64-bit x86")
>
> After reverting it the issue I am facing is fixed.
>
> Adding Cc to: Josh Poimboeuf, Ingo Molnar and Andrew Morton
Hi Sudip,
It looks like setting 'O=' with a relative path is broken. I'll have a
patch to fix it shortly.
I'll also try to improve the error message for when libelf-dev isn't
installed.
--
Josh
On Thu, Mar 03, 2016 at 03:12:01PM +0100, Sebastian Andrzej Siewior wrote:
> On 2016-02-29 03:01:35 [-0800], tip-bot for Josh Poimboeuf wrote:
> > Gitweb:
> > http://git.kernel.org/tip/b9ab5ebb14ec389bd80f66613f1fe3f8f65f2521
> > Author: Josh Poimboeuf <jpoim...
ed-off-by: Josh Poimboeuf <jpoim...@redhat.com>
---
drivers/rtc/rtc-ds1685.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/rtc/rtc-ds1685.c b/drivers/rtc/rtc-ds1685.c
index 08e0ff8..1e6cfc8 100644
--- a/drivers/rtc/rtc-ds1685.c
+++ b/drivers/rtc/rtc-ds1685.c
@@ -21
On Mon, Mar 07, 2016 at 04:30:50PM -0500, Joshua Kinard wrote:
> On 03/07/2016 10:03, Josh Poimboeuf wrote:
> > objtool reports the following warnings:
> >
> > drivers/rtc/rtc-ds1685.o: warning: objtool: ds1685_rtc_work_queue()+0x0:
> > duplicate frame pointer save
&
901 - 1000 of 7789 matches
Mail list logo