Re: [PATCH 1/3] x86/uaccess: Add stack frame output operand in get_user inline asm

2015-09-18 Thread Josh Poimboeuf
e setup code. > > This patch forces a stack frame to be created before the inline asm code if > CONFIG_FRAME_POINTER is enabled by listing the stack pointer as an output > operand for the get_user inline assembly statement. > > Signed-off-by: Chris J Arges <chris.j.ar...@canonical.

Re: [PATCH 3/3] kprobes/x86: stacktool: ignore kretprobe_trampoline_holder

2015-09-18 Thread Josh Poimboeuf
On Thu, Sep 17, 2015 at 05:14:37PM -0500, Chris J Arges wrote: > The function kretprobe_trampoline_holder isn't called explicility and > therefore > should be ignored by stacktool. > > Signed-off-by: Chris J Arges > --- > arch/x86/kernel/kprobes/core.c | 2 ++ > 1

Re: [PATCH v11 03/20] x86/stackvalidate: Compile-time stack validation

2015-08-28 Thread Josh Poimboeuf
On Fri, Aug 28, 2015 at 07:26:23PM +0200, Andi Kleen wrote: BTW how do handle the increasing number of JITs in the kernel? Yeah, compile-time CFI wouldn't be applicable for code which is generated at runtime. Maybe we will need a mechanism to allow eBPF to quickly create minimal

Re: [PATCH 00/13] perf tools: Move perf subcommand framework into lib/tools

2015-12-08 Thread Josh Poimboeuf
On Tue, Dec 08, 2015 at 11:55:31AM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Dec 08, 2015 at 11:52:33AM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Mon, Dec 07, 2015 at 09:46:48AM +0100, Jiri Olsa escreveu: > > > On Sun, Dec 06, 2015 at 02:02:42PM -0600, Josh Poimboeu

Re: [RFC PATCH v2 2/6] module: preserve Elf information for livepatch modules

2015-12-08 Thread Josh Poimboeuf
On Mon, Nov 30, 2015 at 11:21:15PM -0500, Jessica Yu wrote: > For livepatch modules, copy Elf section, symbol, and string information > from the load_info struct in the module loader. > > Livepatch uses special relocation sections in order to be able to patch > modules that are not yet loaded, as

Re: [PATCH v2 01/14] perf: Fix 'make clean'

2015-12-08 Thread Josh Poimboeuf
On Tue, Dec 08, 2015 at 07:40:43PM +0100, Jiri Olsa wrote: > On Tue, Dec 08, 2015 at 06:40:12PM +0100, Jiri Olsa wrote: > > On Mon, Dec 07, 2015 at 10:21:39PM -0600, Josh Poimboeuf wrote: > > > Add some missing files to the 'make clean' target. > > > > > > Repo

Re: [PATCH v2 14/14] perf tools: Move subcommand framework and related utils to libapi

2015-12-08 Thread Josh Poimboeuf
On Tue, Dec 08, 2015 at 07:16:26PM +0100, Jiri Olsa wrote: > On Mon, Dec 07, 2015 at 10:21:52PM -0600, Josh Poimboeuf wrote: > > The perf subcommand framework is needed for other tools. Move > > parse-options.c and its dependencies over to libapi. > > > > Any function

Re: [PATCH v2 14/14] perf tools: Move subcommand framework and related utils to libapi

2015-12-08 Thread Josh Poimboeuf
On Tue, Dec 08, 2015 at 04:09:31PM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Dec 08, 2015 at 12:49:53PM -0600, Josh Poimboeuf escreveu: > > On Tue, Dec 08, 2015 at 07:16:26PM +0100, Jiri Olsa wrote: > > > On Mon, Dec 07, 2015 at 10:21:52PM -0600, Josh Poimboeuf wrote

Re: [RFC PATCH v2 4/6] livepatch: reuse module loader code to write relocations

2015-12-08 Thread Josh Poimboeuf
On Mon, Nov 30, 2015 at 11:21:17PM -0500, Jessica Yu wrote: > Reuse module loader code to write relocations, thereby eliminating the need > for architecture specific relocation code in livepatch. Namely, we reuse > apply_relocate_add() in the module loader to write relocations instead of >

Re: [RFC PATCH v2 5/6] samples: livepatch: init reloc section array and mark as klp module

2015-12-08 Thread Josh Poimboeuf
On Mon, Nov 30, 2015 at 11:21:18PM -0500, Jessica Yu wrote: > Create the array of klp relocation sections in the sample > klp_object (even if the array is empty in this case). > > In addition, mark the module as a livepatch module so that > the module loader can appropriately identify and

Re: [PATCH v2 01/14] perf: Fix 'make clean'

2015-12-08 Thread Josh Poimboeuf
On Tue, Dec 08, 2015 at 06:40:12PM +0100, Jiri Olsa wrote: > On Mon, Dec 07, 2015 at 10:21:39PM -0600, Josh Poimboeuf wrote: > > Add some missing files to the 'make clean' target. > > > > Reported-by: Jiri Olsa <jo...@redhat.com> > > Signed-off-by: Jo

Re: [PATCH v4] livepatch: Cleanup module page permission changes

2015-12-04 Thread Josh Poimboeuf
On Fri, Dec 04, 2015 at 07:27:24AM -0600, Josh Poimboeuf wrote: > On Fri, Dec 04, 2015 at 01:11:29AM +0100, Jiri Kosina wrote: > > On Thu, 3 Dec 2015, Josh Poimboeuf wrote: > > > > > Calling set_memory_rw() and set_memory_ro() for every iteration of the > > > loo

Re: [PATCH v4] livepatch: Cleanup module page permission changes

2015-12-04 Thread Josh Poimboeuf
On Fri, Dec 04, 2015 at 01:11:29AM +0100, Jiri Kosina wrote: > On Thu, 3 Dec 2015, Josh Poimboeuf wrote: > > > Calling set_memory_rw() and set_memory_ro() for every iteration of the > > loop in klp_write_object_relocations() is messy, inefficient, and > > error-prone. >

[PATCH 13/13] perf tools: Move subcommand framework and related utils to libapi

2015-12-04 Thread Josh Poimboeuf
the configuration at runtime allows the same binary to be shared by multiple tools without having to recompile it. 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/inclu

[PATCH 10/13] perf: Move help_unknown_cmd() to its own file

2015-12-04 Thread Josh Poimboeuf
help_unknown_cmd() is quite perf-specific because it relies on some perf_config*() functions. Move it and its supporting functions out into a separate file so that help.c can be moved to a library. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/util/Build

[PATCH 11/13] perf tools: Move strlcpy() to tools/lib/string.c

2015-12-04 Thread Josh Poimboeuf
Move strlcpy() to tools/lib/string.c so it can be used by other tools, namely abspath.c which is getting moved to a library. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/include/linux/string.h | 5 + tools/lib/string.c | 19 +++ tools/per

[PATCH 00/13] perf tools: Move perf subcommand framework into lib/tools

2015-12-04 Thread Josh Poimboeuf
e cleanups and splitting up of the code in preparation for the move. Patch 11 does the actual moving of the files into tools/lib/api/util. [*] https://lkml.kernel.org/r/cover.1445443144.git.jpoim...@redhat.com Josh Poimboeuf (13): perf: Use -iquote for local include paths perf: Split up util.h perf:

[PATCH 06/13] perf: Remove cache.h

2015-12-04 Thread Josh Poimboeuf
cache.h is now just a collection of some commonly used includes. Move the includes to util.h, which has a similar collection. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/builtin-annotate.c | 1 - tools/perf/builtin-buildid-c

[PATCH 07/13] perf: Save cmdline arguments earlier

2015-12-04 Thread Josh Poimboeuf
to a library. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/perf.c | 1 + tools/perf/util/env.c | 9 - tools/perf/util/parse-options.c | 2 -- 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/tools/perf/perf.c b/tools/perf/

[PATCH 08/13] perf: Remove check for unused PERF_PAGER_IN_USE

2015-12-04 Thread Josh Poimboeuf
PERF_PAGER_IN_USE doesn't seem to be used anywhere, so let's remove it. This will also make it easier to move pager.c into a separate library. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/util/pager.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff

[PATCH 12/13 v1.1] perf tools: Move tools/lib/string.c to libapi

2015-12-04 Thread Josh Poimboeuf
On Fri, Dec 04, 2015 at 03:59:23PM -0600, Josh Poimboeuf wrote: > The perf subcommand framework will soon be needed by stacktool. Move > parse-options.c, run-command.c, exec_cmd.c, help.c, usage.c, and their > dependencies over to libapi in 'tools/lib/api/util'. > > Funct

Re: [PATCH 00/13] perf tools: Move perf subcommand framework into lib/tools

2015-12-06 Thread Josh Poimboeuf
On Sun, Dec 06, 2015 at 04:50:06PM +0100, Jiri Olsa wrote: > On Sun, Dec 06, 2015 at 10:37:52AM +0100, Ingo Molnar wrote: > > > > * Josh Poimboeuf <jpoim...@redhat.com> wrote: > > > > > Ingo suggested that I factor out the perf subcommand functionali

Re: [PATCH v2 14/14] perf tools: Move subcommand framework and related utils to libapi

2015-12-08 Thread Josh Poimboeuf
On Tue, Dec 08, 2015 at 07:27:32PM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Dec 08, 2015 at 03:48:25PM -0600, Josh Poimboeuf escreveu: > > On Tue, Dec 08, 2015 at 04:40:26PM -0300, Arnaldo Carvalho de Melo wrote: > > > Em Tue, Dec 08, 2015 at 01:17:00PM -0600, Josh

Re: [PATCH v2 14/14] perf tools: Move subcommand framework and related utils to libapi

2015-12-09 Thread Josh Poimboeuf
On Wed, Dec 09, 2015 at 09:03:43AM +0100, Ingo Molnar wrote: > > * Josh Poimboeuf <jpoim...@redhat.com> wrote: > > > > > wouldn't necessarily be a clean split. It would also possibly create > > > > more > > > > room for error for t

Re: [PATCH v2 14/14] perf tools: Move subcommand framework and related utils to libapi

2015-12-08 Thread Josh Poimboeuf
On Tue, Dec 08, 2015 at 04:40:26PM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Dec 08, 2015 at 01:17:00PM -0600, Josh Poimboeuf escreveu: > > On Tue, Dec 08, 2015 at 04:09:31PM -0300, Arnaldo Carvalho de Melo wrote: > > > Em Tue, Dec 08, 2015 at 12:49:53PM -0600, Josh

Re: [PATCH v2 14/14] perf tools: Move subcommand framework and related utils to libapi

2015-12-09 Thread Josh Poimboeuf
On Wed, Dec 09, 2015 at 12:58:08PM -0300, Arnaldo Carvalho de Melo wrote: > Em Wed, Dec 09, 2015 at 06:33:15AM -0600, Josh Poimboeuf escreveu: > > On Wed, Dec 09, 2015 at 09:03:43AM +0100, Ingo Molnar wrote: > > > > > > * Josh Poimboeuf <jpoim...@redhat.com> w

[PATCH 03/13] perf: Move term functions out of util.c

2015-12-04 Thread Josh Poimboeuf
The term functions are needed by help.c which is going to be moved into a separate library. Move them out of util.c and into their own file. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/util/Build | 1 + tools/perf/util/term.

[PATCH 02/13] perf: Split up util.h

2015-12-04 Thread Josh Poimboeuf
locations, creating new header files where needed. This makes the code better organized and will make it easier to untangle these pieces into separate components later. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/util/compat-util.h | 130 + tools/per

[PATCH 05/13] perf: Split up cache.h

2015-12-04 Thread Josh Poimboeuf
will be moved out of perf into a separate library. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/perf.h | 12 tools/perf/util/abspath.h | 11 tools/perf/util/alias.h | 7 + tools/perf/util/cache.h

[PATCH 04/13] perf: Remove unused pager_use_color variable

2015-12-04 Thread Josh Poimboeuf
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/util/Build | 1 - tools/perf/util/cache.h | 1 - tools/perf/util/color.c | 2 +- tools/perf/util/environment.c | 8 4 files changed, 1 insertion(+), 11 deletions(-) delete mode 100644 tools/per

[PATCH 09/13] perf: Move cmd_version() to builtin-version.c

2015-12-04 Thread Josh Poimboeuf
Move cmd_version() to its own file so that help.c can be moved to a library. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/Build | 1 + tools/perf/builtin-version.c | 9 + tools/perf/util/help.c | 7 --- 3 files changed, 10 insertions

[PATCH 01/13] perf: Use -iquote for local include paths

2015-12-04 Thread Josh Poimboeuf
' picks up the local version. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/config/Makefile | 4 ++-- tools/perf/tests/Build | 6 +++--- tools/perf/tests/bpf.c | 4 ++-- tools/perf/tests/llvm.c| 4 ++-- tools/perf/util/thread.h | 4 ++-- 5 files changed, 11 i

Re: [PATCH v4] livepatch: Cleanup module page permission changes

2015-12-04 Thread Josh Poimboeuf
On Fri, Dec 04, 2015 at 10:57:45PM +0100, Jiri Kosina wrote: > On Fri, 4 Dec 2015, Josh Poimboeuf wrote: > > > > (1) I pull your 'modules-next' branch, apply this patch on top, and wait > > > for your merge with Linus and send merge request afterwards > > >

[PATCH 12/13] perf tools: Move perf subcommand framework into a library

2015-12-04 Thread Josh Poimboeuf
for passing perf-specific configuration to the library. Specifying the configuration at runtime allows the same binary to be shared by multiple tools without having to recompile it. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/lib/api/Build

[PATCH v3] livepatch: Cleanup module page permission changes

2015-12-03 Thread Josh Poimboeuf
<mbe...@suse.cz> Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- Based on linux-next. - v3: use new module_{disable,enable}_ro() functions (in linux-next) arch/x86/kernel/livepatch.c | 25 ++--- kernel/livepatch/core.c | 15 ++- 2 files

[PATCH v4] livepatch: Cleanup module page permission changes

2015-12-03 Thread Josh Poimboeuf
<mbe...@suse.cz> Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- Based on the following branches: - git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching.git for-4.5/core - git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux.git modules-next - v4: rebase onto Ch

[PATCH v2 14/14] perf tools: Move subcommand framework and related utils to libapi

2015-12-07 Thread Josh Poimboeuf
the configuration at runtime allows the same binary to be shared by multiple tools without having to recompile it. 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/inclu

[PATCH v2 11/14] perf: Move help_unknown_cmd() to its own file

2015-12-07 Thread Josh Poimboeuf
help_unknown_cmd() is quite perf-specific because it relies on some perf_config*() functions. Move it and its supporting functions out into a separate file so that help.c can be moved to a library. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/util/Build

[PATCH v2 10/14] perf: Move cmd_version() to builtin-version.c

2015-12-07 Thread Josh Poimboeuf
Move cmd_version() to its own file so that help.c can be moved to a library. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/Build | 1 + tools/perf/builtin-version.c | 9 + tools/perf/util/help.c | 7 --- 3 files changed, 10 insertions

[PATCH v2 13/14] perf tools: Move tools/lib/string.c to libapi

2015-12-07 Thread Josh Poimboeuf
Get rid of libstring and move tools/lib/string.c to libapi where it can more easily be used by other tools. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/lib/api/Build | 1 + tools/lib/api/string/Build | 1 + tools/lib/{

[PATCH v2 04/14] perf: Move term functions out of util.c

2015-12-07 Thread Josh Poimboeuf
The term functions are needed by help.c which is going to be moved into a separate library. Move them out of util.c and into their own file. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/util/Build | 1 + tools/perf/util/term.

[PATCH v2 02/14] perf: Use -iquote for local include paths

2015-12-07 Thread Josh Poimboeuf
' picks up the local version. Note that after applying this patch, a 'make clean' is needed to clear out the old versions of tools/perf/tests/llvm-src-*.c. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/config/Makefile | 4 ++-- tools/perf/tests/Build | 6 +++--- tools/

[PATCH v2 00/14] perf tools: Move perf subcommand framework into lib/tools

2015-12-07 Thread Josh Poimboeuf
iles - Fix description for "Move tools/lib/string.c to libapi" patch Josh Poimboeuf (14): perf: Fix 'make clean' perf: Use -iquote for local include paths perf: Split up util.h perf: Move term functions out of util.c perf: Remove unused pager_use_color variable perf: Spl

[PATCH v2 06/14] perf: Split up cache.h

2015-12-07 Thread Josh Poimboeuf
will be moved out of perf into a separate library. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/perf.h | 12 tools/perf/util/abspath.h | 11 tools/perf/util/alias.h | 7 + tools/perf/util/cache.h

[PATCH v2 12/14] perf tools: Move strlcpy() to tools/lib/string.c

2015-12-07 Thread Josh Poimboeuf
Move strlcpy() to tools/lib/string.c so it can be used by other tools, namely abspath.c which is getting moved to a library. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/include/linux/string.h | 5 + tools/lib/string.c | 19 +++ tools/per

[PATCH v2 01/14] perf: Fix 'make clean'

2015-12-07 Thread Josh Poimboeuf
Add some missing files to the 'make clean' target. Reported-by: Jiri Olsa <jo...@redhat.com> Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/Makefile.perf | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tools/perf/Makefile.perf

[PATCH v2 07/14] perf: Remove cache.h

2015-12-07 Thread Josh Poimboeuf
cache.h is now just a collection of some commonly used includes. Move the includes to util.h, which has a similar collection. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/builtin-annotate.c | 1 - tools/perf/builtin-buildid-c

[PATCH v2 09/14] perf: Remove check for unused PERF_PAGER_IN_USE

2015-12-07 Thread Josh Poimboeuf
PERF_PAGER_IN_USE doesn't seem to be used anywhere, so let's remove it. This will also make it easier to move pager.c into a separate library. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/util/pager.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff

[PATCH v2 08/14] perf: Save cmdline arguments earlier

2015-12-07 Thread Josh Poimboeuf
to a library. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/perf.c | 1 + tools/perf/util/env.c | 9 - tools/perf/util/parse-options.c | 2 -- 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/tools/perf/perf.c b/tools/perf/

[PATCH v2 03/14] perf: Split up util.h

2015-12-07 Thread Josh Poimboeuf
locations, creating new header files where needed. This makes the code better organized and will make it easier to untangle these pieces into separate components later. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/util/compat-util.h | 130 + tools/per

[PATCH v2 05/14] perf: Remove unused pager_use_color variable

2015-12-07 Thread Josh Poimboeuf
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/util/Build | 1 - tools/perf/util/cache.h | 1 - tools/perf/util/color.c | 2 +- tools/perf/util/environment.c | 8 4 files changed, 1 insertion(+), 11 deletions(-) delete mode 100644 tools/per

Re: [PATCH 0/3 v9] livepatch: disambiguate symbols with the same name

2015-12-03 Thread Josh Poimboeuf
plicate functions. > > v9: > - use mod->name instead of mod->obj->name for klp_find_object_symbol in >klp_write_object_relocations > - rebase on current master > - tested with kpatch For the series: Acked-by: Josh Poimboeuf <jpoim...@redhat.com> -- Josh -- To unsubscribe from th

Re: [PATCH v3] livepatch: Cleanup module page permission changes

2015-12-03 Thread Josh Poimboeuf
On Thu, Dec 03, 2015 at 11:07:28AM -0600, Josh Poimboeuf wrote: > Calling set_memory_rw() and set_memory_ro() for every iteration of the > loop in klp_write_object_relocations() is messy, inefficient, and > error-prone. > > Change all the read-only pages to read-write before the l

Re: [RFC PATCH v2 4/6] livepatch: reuse module loader code to write relocations

2015-12-10 Thread Josh Poimboeuf
On Thu, Dec 10, 2015 at 08:56:27PM +0100, Jiri Kosina wrote: > On Thu, 10 Dec 2015, Minfei Huang wrote: > > > > + klp_for_each_reloc_sec(obj, reloc_sec) { > > > + relindex = reloc_sec->index; > > > + num_relas = pmod->sechdrs[relindex].sh_size / sizeof(Elf_Rela); > > > +

Re: [PATCH v2 14/14] perf tools: Move subcommand framework and related utils to libapi

2015-12-10 Thread Josh Poimboeuf
On Thu, Dec 10, 2015 at 08:54:45AM -0600, Josh Poimboeuf wrote: > On Thu, Dec 10, 2015 at 10:40:39AM +0900, Namhyung Kim wrote: > > > - usage.c: used in several places for die() and error(), but these are > > > trivial functions which can be duplicated. > > >

Re: livepatch: reuse module loader code to write relocations

2015-12-10 Thread Josh Poimboeuf
On Thu, Dec 10, 2015 at 04:33:29PM -0500, Jessica Yu wrote: > +++ Josh Poimboeuf [10/12/15 08:28 -0600]: > >On Wed, Dec 09, 2015 at 02:10:14PM -0500, Jessica Yu wrote: > >>+++ Josh Poimboeuf [08/12/15 12:38 -0600]: > >>>>+ /* For each _

Re: [PATCH v4 7/9] perf: Finalize subcmd independence

2015-12-16 Thread Josh Poimboeuf
On Wed, Dec 16, 2015 at 10:27:11PM -0300, Arnaldo Carvalho de Melo wrote: > Em Wed, Dec 16, 2015 at 07:09:53PM -0600, Josh Poimboeuf escreveu: > > On Wed, Dec 16, 2015 at 09:57:41PM -0300, Arnaldo Carvalho de Melo wrote: > > > Em Tue, Dec 15, 2015 at 09:39:38AM -0600, Josh

Re: [PATCH v4 7/9] perf: Finalize subcmd independence

2015-12-16 Thread Josh Poimboeuf
On Wed, Dec 16, 2015 at 09:57:41PM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Dec 15, 2015 at 09:39:38AM -0600, Josh Poimboeuf escreveu: > > For the files that will be moved to the subcmd library, remove all their > > perf-specific includes and duplicate any needed functionali

Re: [PATCH v3.1 02/17] tools build: Fix feature Makefile dependencies for 'O='

2015-12-14 Thread Josh Poimboeuf
On Mon, Dec 14, 2015 at 04:55:28PM +0100, Jiri Olsa wrote: > On Mon, Dec 14, 2015 at 09:38:15AM -0600, Josh Poimboeuf wrote: > > On Mon, Dec 14, 2015 at 04:29:39PM +0100, Jiri Olsa wrote: > > > On Mon, Dec 14, 2015 at 08:29:07AM -0600, Josh Poimboeuf wrote: > > > >

Re: [PATCH v3 14/17] perf: Remove subcmd dependencies on strbuf

2015-12-14 Thread Josh Poimboeuf
On Mon, Dec 14, 2015 at 12:44:21PM -0300, Arnaldo Carvalho de Melo wrote: > Em Sun, Dec 13, 2015 at 10:18:14PM -0600, Josh Poimboeuf escreveu: > > Introduce and use new astrcat() and astrcatf() functions which replace > > the strbuf functionality for subcmd. > > > >

Re: [PATCH v3.1 02/17] tools build: Fix feature Makefile dependencies for 'O='

2015-12-14 Thread Josh Poimboeuf
On Mon, Dec 14, 2015 at 04:29:39PM +0100, Jiri Olsa wrote: > On Mon, Dec 14, 2015 at 08:29:07AM -0600, Josh Poimboeuf wrote: > > Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> > > you might want to work on your changelogs > a little.. aaand actually include s

Re: [PATCH v3 10/17] perf: Provide subcmd configuration at runtime

2015-12-14 Thread Josh Poimboeuf
On Mon, Dec 14, 2015 at 11:33:58AM +0100, Jiri Olsa wrote: > On Sun, Dec 13, 2015 at 10:18:10PM -0600, Josh Poimboeuf wrote: > > SNIP > > > > > typedef int (*config_fn_t)(const char *, const char *, void *); > > extern int perf_default_config(const char *, c

Re: [PATCH v3 14/17] perf: Remove subcmd dependencies on strbuf

2015-12-14 Thread Josh Poimboeuf
On Mon, Dec 14, 2015 at 11:25:51AM +0100, Jiri Olsa wrote: > On Sun, Dec 13, 2015 at 10:18:14PM -0600, Josh Poimboeuf wrote: > > Introduce and use new astrcat() and astrcatf() functions which replace > > the strbuf functionality for subcmd. > > hum, would it be better then t

[PATCH v3.1 02/17] tools build: Fix feature Makefile dependencies for 'O='

2015-12-14 Thread Josh Poimboeuf
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/build/Makefile.feature | 2 +- tools/build/feature/Makefile | 93 ++-- 2 files changed, 48 insertions(+), 47 deletions(-) diff --git a/tools/build/Makefile.feature b/tools

Re: [PATCH v3 02/17] tools build: Fix feature Makefile dependencies for 'O='

2015-12-14 Thread Josh Poimboeuf
On Mon, Dec 14, 2015 at 11:08:51AM +0100, Jiri Olsa wrote: > On Sun, Dec 13, 2015 at 10:18:02PM -0600, Josh Poimboeuf wrote: > > Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> > > --- > > tools/build/Makefile.feature | 2 +- > >

Re: [PATCH v3 15/17] perf: Finalize subcmd independence

2015-12-14 Thread Josh Poimboeuf
On Mon, Dec 14, 2015 at 11:32:20AM +0100, Jiri Olsa wrote: > On Sun, Dec 13, 2015 at 10:18:15PM -0600, Josh Poimboeuf wrote: > > For the files that will be moved to the subcmd library, remove all their > > perf-specific includes and duplicate any needed functionality. > > &g

[PATCH v3 01/17] perf build: Remove unnecessary line in Makefile.feature

2015-12-13 Thread Josh Poimboeuf
This line always silently fails because it doesn't add the 'test-' prefix to the .bin file. And it seems to be unnecessary anyway: the line immediately after it does all the individual feature checks. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/build/Makefile.feature |

[PATCH v3 00/17] perf tools: Move perf subcommand framework to a library

2015-12-13 Thread Josh Poimboeuf
and other leftover files - Fix description for second-to-last patch Josh Poimboeuf (17): perf build: Remove unnecessary line in Makefile.feature tools build: Fix feature Makefile dependencies for 'O=' perf test: Add Build file to dependencies for llvm-src-*.c perf test: remove tarpkg

[PATCH v3 02/17] tools build: Fix feature Makefile dependencies for 'O='

2015-12-13 Thread Josh Poimboeuf
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/build/Makefile.feature | 2 +- tools/build/feature/Makefile | 95 ++-- 2 files changed, 49 insertions(+), 48 deletions(-) diff --git a/tools/build/Makefile.feature b/tools

[PATCH v3 05/17] perf build: Fix 'make clean'

2015-12-13 Thread Josh Poimboeuf
Add some missing files to the 'make clean' target. Reported-by: Jiri Olsa <jo...@redhat.com> Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/Makefile.perf | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/perf/Makefile.perf

[PATCH v3 15/17] perf: Finalize subcmd independence

2015-12-13 Thread Josh Poimboeuf
For the files that will be moved to the subcmd library, remove all their perf-specific includes and duplicate any needed functionality. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/util/exec_cmd.c | 75 + tools/perf/util/

[PATCH v3 04/17] perf test: remove tarpkg at end of test

2015-12-13 Thread Josh Poimboeuf
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/tests/make | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf/tests/make b/tools/perf/tests/make index 8ea3dff..c1fbb8e 100644 --- a/tools/perf/tests/make +++ b/tools/perf/tests/make @@ -259,7

[PATCH v3 12/17] perf: Convert parse-options.c internal functions to static

2015-12-13 Thread Josh Poimboeuf
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/util/parse-options.c | 18 +- tools/perf/util/parse-options.h | 9 - 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/tools/perf/util/parse-options.c b/tools/perf/util/parse-options.c

[PATCH v3 14/17] perf: Remove subcmd dependencies on strbuf

2015-12-13 Thread Josh Poimboeuf
Introduce and use new astrcat() and astrcatf() functions which replace the strbuf functionality for subcmd. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/util/exec_cmd.c | 27 +- tools/perf/util/help.c | 14 ++ tool

[PATCH v3 11/17] perf: Remove 'perf' from subcmd function and variable names

2015-12-13 Thread Josh Poimboeuf
In preparation for moving exec_cmd.c and run-command.c out of perf and into a library, remove 'perf' from all the symbol names. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/builtin-help.c | 2 +- tools/perf/builtin-script.c | 8 tools/perf/

[PATCH v3 13/17] perf: Document the fact that parse_options*() may exit

2015-12-13 Thread Josh Poimboeuf
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/util/parse-options.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/perf/util/parse-options.h b/tools/perf/util/parse-options.h index b04190a..fff954e 100644 --- a/tools/perf/util/parse-options.h +++ b/tool

[PATCH v3 09/17] perf: Move help_unknown_cmd() to its own file

2015-12-13 Thread Josh Poimboeuf
help_unknown_cmd() is quite perf-specific because it relies on some perf_config*() functions. Move it and its supporting functions out into a separate file so that help.c can be moved to a library. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/util/Build

[PATCH v3 16/17] perf subcmd: Create subcmd library

2015-12-13 Thread Josh Poimboeuf
Move the subcommand-related files from perf to a new library named libsubcmd.a. Since we're moving files anyway, go ahead and rename 'exec_cmd.*' to 'exec-cmd.*' to be consistent with the naming of all the other files. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/lib/

[PATCH v3 17/17] tools subcmd: Rename subcmd header include guards

2015-12-13 Thread Josh Poimboeuf
Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/lib/subcmd/exec-cmd.h | 6 +++--- tools/lib/subcmd/help.h | 6 +++--- tools/lib/subcmd/pager.h | 6 +++--- tools/lib/subcmd/parse-options.h | 7 --- tools/lib/subcmd/run-command.h | 6 +++--- too

[PATCH v3 06/17] perf build: Rename LIB_PATH -> API_PATH

2015-12-13 Thread Josh Poimboeuf
'LIB_PATH' is a misnomer because there are multiple library paths. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/Makefile.perf | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 9

[PATCH v3 07/17] perf: Create pager.h

2015-12-13 Thread Josh Poimboeuf
Move the 'pager' function prototypes into a new pager.h so that the pager code can be moved out to a library. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/util/cache.h | 5 + tools/perf/util/pager.h | 7 +++ 2 files changed, 8 insertions(+), 4 deletions(-)

[PATCH v3 08/17] perf: Remove check for unused PERF_PAGER_IN_USE

2015-12-13 Thread Josh Poimboeuf
PERF_PAGER_IN_USE doesn't seem to be used anywhere, so let's remove it. This will also make it easier to move pager.c into a separate library. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/util/pager.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff

[PATCH v3 03/17] perf test: Add Build file to dependencies for llvm-src-*.c

2015-12-13 Thread Josh Poimboeuf
Because the Build file writes source code to the generated llvm-src-*.c files, it should be listed as one of the dependencies, so that any future changes to the code being echoed won't require a 'make clean'. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf/tests/Bui

[PATCH v3 10/17] perf: Provide subcmd configuration at runtime

2015-12-13 Thread Josh Poimboeuf
Create init functions for exec_cmd.c, parse-option.c, and pager.c. This allows their configuration to be specified at runtime so they can be split out into a separate library which can be used by other programs. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/perf

[PATCH v15 02/25] tools: Make list.h self-sufficient

2015-12-18 Thread Josh Poimboeuf
into tools list.h. This is a straight copy except for adjustments to the include statements and copying of the tools-specific list routines (list_del_range and list_for_each_from). Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- tools/include/linux/list.h

[PATCH v15 23/25] x86/asm/power: Create stack frames in hibernate_asm_64.S

2015-12-18 Thread Josh Poimboeuf
is enabled and give them proper ELF function annotations. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Acked-by: Pavel Machek <pa...@ucw.cz> Cc: Rafael J. Wysocki <r...@rjwysocki.net> --- arch/x86/power/hibernate_asm_64.S | 7 +++ 1 file changed, 7 insertions(+) diff --gi

[PATCH v15 24/25] x86/uaccess: Add stack frame output operand in get_user inline asm

2015-12-18 Thread Josh Poimboeuf
stack frame to be created before the inline asm code if CONFIG_FRAME_POINTER is enabled by listing the stack pointer as an output operand for the get_user inline assembly statement. Signed-off-by: Chris J Arges <chris.j.ar...@canonical.com> Signed-off-by: Josh Poimboeuf <jpoim...@redhat

[PATCH v15 22/25] x86/asm/efi: Create a stack frame in efi_call()

2015-12-18 Thread Josh Poimboeuf
efi_call() is a callable non-leaf function which doesn't honor CONFIG_FRAME_POINTER, which can result in bad stack traces. Create a stack frame for it when CONFIG_FRAME_POINTER is enabled. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Reviewed-by: Matt Fleming <m...@codebluepr

[PATCH v15 25/25] x86/stacktool: Ignore head_$(BITS) files.

2015-12-18 Thread Josh Poimboeuf
From: Chris J Arges <chris.j.ar...@canonical.com> Tell stacktool to skip validation of head_64, head_32 as they don't affect runtime kernel stack traces. Signed-off-by: Chris J Arges <chris.j.ar...@canonical.com> Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- arch/x

[PATCH v15 19/25] x86/asm/entry: Create stack frames in thunk functions

2015-12-18 Thread Josh Poimboeuf
type. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- arch/x86/entry/thunk_64.S | 4 1 file changed, 4 insertions(+) diff --git a/arch/x86/entry/thunk_64.S b/arch/x86/entry/thunk_64.S index efb2b93..98df1fa 100644 --- a/arch/x86/entry/thunk_64.S +++ b/arch/x86/entry/thun

[PATCH v15 17/25] x86/asm/crypto: Move jump_table to .rodata section

2015-12-18 Thread Josh Poimboeuf
. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Cc: Herbert Xu <herb...@gondor.apana.org.au> Cc: David S. Miller <da...@davemloft.net> --- arch/x86/crypto/crc32c-pcl-intel-asm_64.S | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/crypto/crc32c-

[PATCH v15 21/25] x86/asm: Create stack frames in rwsem functions

2015-12-18 Thread Josh Poimboeuf
rwsem.S has several callable non-leaf functions which don't honor CONFIG_FRAME_POINTER, which can result in bad stack traces. Create stack frames for them when CONFIG_FRAME_POINTER is enabled. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- arch/x86/lib/rwsem.S | 11 ++-

[PATCH v15 20/25] x86/asm/acpi: Create a stack frame in do_suspend_lowlevel()

2015-12-18 Thread Josh Poimboeuf
do_suspend_lowlevel() is a callable non-leaf function which doesn't honor CONFIG_FRAME_POINTER, which can result in bad stack traces. Create a stack frame for it when CONFIG_FRAME_POINTER is enabled. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Acked-by: Pavel Machek <pa...@u

[PATCH v15 18/25] x86/asm/crypto: Create stack frames in clmul_ghash_mul/update()

2015-12-18 Thread Josh Poimboeuf
clmul_ghash_mul() and clmul_ghash_update() are callable non-leaf functions which don't honor CONFIG_FRAME_POINTER, which can result in bad stack traces. Create stack frames for them when CONFIG_FRAME_POINTER is enabled. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Cc: Herbert Xu

[PATCH v15 16/25] x86/asm/crypto: Move .Lbswap_mask data to .rodata section

2015-12-18 Thread Josh Poimboeuf
, 7, 6, 5, 4, 3, 2, 1, 0 Move it to .rodata which is a more appropriate section for read-only data. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Cc: Herbert Xu <herb...@gondor.apana.org.au> Cc: David S. Miller <da...@davemloft.net> --- arch/x86/crypto/aesni-intel_as

[PATCH v15 10/25] x86/paravirt: Add stack frame dependency to PVOP inline asm calls

2015-12-18 Thread Josh Poimboeuf
if CONFIG_FRAME_POINTER is enabled by listing the stack pointer as an output operand for the PVOP inline asm statements. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Cc: Jeremy Fitzhardinge <jer...@goop.org> Cc: Chris Wright <chr...@sous-sol.org> Cc: Alok Kataria <akata...@vmware.com&g

[PATCH v15 14/25] x86/xen: Add xen_cpuid() and xen_setup_gdt() to stacktool whitelists

2015-12-18 Thread Josh Poimboeuf
use of the instruction. Add both functions to the stacktool whitelist. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Reviewed-by: David Vrabel <david.vra...@citrix.com> Cc: Konrad Rzeszutek Wilk <konrad.w...@oracle.com> Cc: Boris Ostrovsky <boris.ostrov...@oracle.c

[PATCH v15 09/25] x86/xen: Add stack frame dependency to hypercall inline asm calls

2015-12-18 Thread Josh Poimboeuf
is enabled by listing the stack pointer as an output operand for the hypercall inline asm statements. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Reviewed-by: David Vrabel <david.vra...@citrix.com> Cc: Konrad Rzeszutek Wilk <konrad.w...@oracle.com> Cc: Boris Ostro

[PATCH v15 08/25] x86/stacktool: Add ignore macros

2015-12-18 Thread Josh Poimboeuf
Add new stacktool ignore macros: STACKTOOL_IGNORE_INSN and STACKTOOL_IGNORE_FUNC. These can be used to tell stacktool to skip validation of an instruction or a function, respectively. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> --- arch/x86/include/asm/stacktool.

[PATCH v15 15/25] x86/asm/crypto: Create stack frames in aesni-intel_asm.S

2015-12-18 Thread Josh Poimboeuf
aesni-intel_asm.S has several callable non-leaf functions which don't honor CONFIG_FRAME_POINTER, which can result in bad stack traces. Create stack frames for them when CONFIG_FRAME_POINTER is enabled. Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> Cc: Herbert Xu

<    2   3   4   5   6   7   8   9   10   11   >