Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1267471 > unrolled thread

[GIT PULL 0/5] perf/urgent fixes

Started byArnaldo Carvalho de Melo <acme@kernel.org>
First post2015-11-11 23:00 +0100
Last post2015-11-12 07:40 +0100
Articles 4 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [GIT PULL 0/5] perf/urgent fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-11-11 23:00 +0100
    [PATCH 4/5] perf probe: Verify parameters in two functions Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-11-11 23:00 +0100
    [PATCH 5/5] tools include: Add compiler.h to list.h Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-11-11 23:00 +0100
    Re: [GIT PULL 0/5] perf/urgent fixes Ingo Molnar <mingo@kernel.org> - 2015-11-12 07:40 +0100

#1267471 — [GIT PULL 0/5] perf/urgent fixes

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2015-11-11 23:00 +0100
Subject[GIT PULL 0/5] perf/urgent fixes
Message-ID<qtLAR-8mQ-9@gated-at.bofh.it>
Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit b71b437eedaed985062492565d9d421d975ae845:

  perf: Fix inherited events vs. tracepoint filters (2015-11-09 16:13:11 +0100)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo

for you to fetch changes up to 5602ea09c19e85557f2b4d30be1d6ba349b7a038:

  tools include: Add compiler.h to list.h (2015-11-11 18:41:33 -0300)

----------------------------------------------------------------
perf/urgent fixes:

User visible:

- Add missing newlines to some pr_err() calls (Arnaldo Carvalho de Melo)

- Print full source file paths when using
  'perf annotate --print-line --full-paths' (Michael Petlan)

- Fix 'perf probe -d' when just one out of uprobes and kprobes is
  enabled (Wang Nan)

Developer stuff:

- Add compiler.h to list.h to fix 'make perf-tar-src-pkg' generated
  tarballs, i.e. out of tree building (Arnaldo Carvalho de Melo)

- Add the llvm-src-base.c and llvm-src-kbuild.c files, generated by the
  'perf test' LLVM entries, when running it in-tree, to .gitignore (Yunlong Song)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Arnaldo Carvalho de Melo (2):
      perf session: Add missing newlines to some pr_err() calls
      tools include: Add compiler.h to list.h

Michael Petlan (1):
      perf annotate: Support full source file paths for srcline fix

Wang Nan (1):
      perf probe: Verify parameters in two functions

Yunlong Song (1):
      perf test: Add llvm-src-base.c and llvm-src-kbuild.c to .gitignore

 tools/include/linux/list.h   | 1 +
 tools/perf/tests/.gitignore  | 2 ++
 tools/perf/util/annotate.c   | 1 +
 tools/perf/util/probe-file.c | 6 ++++++
 tools/perf/util/session.c    | 8 ++++----
 5 files changed, 14 insertions(+), 4 deletions(-)
 create mode 100644 tools/perf/tests/.gitignore
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1267472 — [PATCH 4/5] perf probe: Verify parameters in two functions

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2015-11-11 23:00 +0100
Subject[PATCH 4/5] perf probe: Verify parameters in two functions
Message-ID<qtLAS-8mQ-27@gated-at.bofh.it>
In reply to#1267471
From: Wang Nan <wangnan0@huawei.com>

On kernel with only one out of CONFIG_KPROBE_EVENTS and
CONFIG_UPROBE_EVENTS enabled, 'perf probe -d' causes a segfault because
perf_del_probe_events() calls probe_file__get_events() with a negative
fd.

This patch fixes it by adding parameter validation at the entry of
probe_file__get_events() and probe_file__get_rawlist(). Since they are
both non-static public functions (in .h file), parameter verifying is
required.

v1 -> v2: Verify fd at the head of probe_file__get_rawlist() instead of
          checking at call site (suggested by Masami and Arnaldo at [1,2]).

[1] http://lkml.kernel.org/r/50399556C9727B4D88A595C8584AAB37526048E3@GSjpTKYDCembx32.service.hitachi.net
[2] http://lkml.kernel.org/r/20151105155830.GV13236@kernel.org

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1446803415-83382-1-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/probe-file.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/perf/util/probe-file.c b/tools/perf/util/probe-file.c
index 89dbeb92c68e..e3b3b92e4458 100644
--- a/tools/perf/util/probe-file.c
+++ b/tools/perf/util/probe-file.c
@@ -138,6 +138,9 @@ struct strlist *probe_file__get_rawlist(int fd)
 	char *p;
 	struct strlist *sl;
 
+	if (fd < 0)
+		return NULL;
+
 	sl = strlist__new(NULL, NULL);
 
 	fp = fdopen(dup(fd), "r");
@@ -271,6 +274,9 @@ int probe_file__get_events(int fd, struct strfilter *filter,
 	const char *p;
 	int ret = -ENOENT;
 
+	if (!plist)
+		return -EINVAL;
+
 	namelist = __probe_file__get_namelist(fd, true);
 	if (!namelist)
 		return -ENOENT;
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1267473 — [PATCH 5/5] tools include: Add compiler.h to list.h

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2015-11-11 23:00 +0100
Subject[PATCH 5/5] tools include: Add compiler.h to list.h
Message-ID<qtLAS-8mQ-29@gated-at.bofh.it>
In reply to#1267471
From: Arnaldo Carvalho de Melo <acme@redhat.com>

list.h needs WRITE_ONCE() since 7f5f873c6a07 ("rculist: Use WRITE_ONCE()
when deleting from reader-visible list") add it before including the
kernel's list.h file.

This fixes builds of 'make perf-tar-src-pkg' perf tool tarball builds,
i.e. out of tree builds.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-e0rb8f7jwz0jn24ttyick9u6@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/include/linux/list.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/include/linux/list.h b/tools/include/linux/list.h
index 76b014c96893..a017f1595676 100644
--- a/tools/include/linux/list.h
+++ b/tools/include/linux/list.h
@@ -1,3 +1,4 @@
+#include <linux/compiler.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
 
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1267654

FromIngo Molnar <mingo@kernel.org>
Date2015-11-12 07:40 +0100
Message-ID<qtTI5-5lX-5@gated-at.bofh.it>
In reply to#1267471
* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit b71b437eedaed985062492565d9d421d975ae845:
> 
>   perf: Fix inherited events vs. tracepoint filters (2015-11-09 16:13:11 +0100)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo
> 
> for you to fetch changes up to 5602ea09c19e85557f2b4d30be1d6ba349b7a038:
> 
>   tools include: Add compiler.h to list.h (2015-11-11 18:41:33 -0300)
> 
> ----------------------------------------------------------------
> perf/urgent fixes:
> 
> User visible:
> 
> - Add missing newlines to some pr_err() calls (Arnaldo Carvalho de Melo)
> 
> - Print full source file paths when using
>   'perf annotate --print-line --full-paths' (Michael Petlan)
> 
> - Fix 'perf probe -d' when just one out of uprobes and kprobes is
>   enabled (Wang Nan)
> 
> Developer stuff:
> 
> - Add compiler.h to list.h to fix 'make perf-tar-src-pkg' generated
>   tarballs, i.e. out of tree building (Arnaldo Carvalho de Melo)
> 
> - Add the llvm-src-base.c and llvm-src-kbuild.c files, generated by the
>   'perf test' LLVM entries, when running it in-tree, to .gitignore (Yunlong Song)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (2):
>       perf session: Add missing newlines to some pr_err() calls
>       tools include: Add compiler.h to list.h
> 
> Michael Petlan (1):
>       perf annotate: Support full source file paths for srcline fix
> 
> Wang Nan (1):
>       perf probe: Verify parameters in two functions
> 
> Yunlong Song (1):
>       perf test: Add llvm-src-base.c and llvm-src-kbuild.c to .gitignore
> 
>  tools/include/linux/list.h   | 1 +
>  tools/perf/tests/.gitignore  | 2 ++
>  tools/perf/util/annotate.c   | 1 +
>  tools/perf/util/probe-file.c | 6 ++++++
>  tools/perf/util/session.c    | 8 ++++----
>  5 files changed, 14 insertions(+), 4 deletions(-)
>  create mode 100644 tools/perf/tests/.gitignore

Pulled, thanks a lot Arnaldo!

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web