display_thread() will handle the EOF on the next iteration.
02: perf kvm: Allow running without stdin
Make "perf kvm --stdio" handle EOF from stdin correctly.
03: perf kvm: Use evlist layer api when possible
This is a simple fix for a needless layering violation.
Igor Lubas
No need for layer violations when a proper evlist api is available.
Signed-off-by: Igor Lubashev
---
tools/perf/builtin-kvm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index 5217aa3596c7..340927c2b243 100644
Allow perf kvm --stdio to run without access to stdin.
This lets perf kvm to run in a batch mode until interrupted.
The following now works as expected:
$ perf kvm top --stdio < /dev/null
Signed-off-by: Igor Lubashev
---
tools/perf/builtin-kvm.c | 33 -
Allow perf top --stdio to run without access to stdin.
This lets perf top to run in a batch mode until interrupted.
The following now works as expected:
$ perf top < /dev/null
Signed-off-by: Igor Lubashev
---
tools/perf/builtin-top.c | 10 --
1 file changed, 8 insertions(+)
The following commit has been merged into the perf/core branch of tip:
Commit-ID: d06e5fad8c4692c6e5f1bd626056f23716bfe4a6
Gitweb:
https://git.kernel.org/tip/d06e5fad8c4692c6e5f1bd626056f23716bfe4a6
Author:Igor Lubashev
AuthorDate:Mon, 26 Aug 2019 21:39:16 -04:00
The following commit has been merged into the perf/core branch of tip:
Commit-ID: 8859aedefefe7eeea5e67968b7fe39c828d589a0
Gitweb:
https://git.kernel.org/tip/8859aedefefe7eeea5e67968b7fe39c828d589a0
Author:Igor Lubashev
AuthorDate:Mon, 26 Aug 2019 21:39:15 -04:00
The following commit has been merged into the perf/core branch of tip:
Commit-ID: aa97293ff129f504e7c8589e56007ecfe3e3e835
Gitweb:
https://git.kernel.org/tip/aa97293ff129f504e7c8589e56007ecfe3e3e835
Author:Igor Lubashev
AuthorDate:Mon, 26 Aug 2019 21:39:14 -04:00
The following commit has been merged into the perf/core branch of tip:
Commit-ID: dda1bf8ea78add78739d128a20b555c4a1a19c27
Gitweb:
https://git.kernel.org/tip/dda1bf8ea78add78739d128a20b555c4a1a19c27
Author:Igor Lubashev
AuthorDate:Mon, 26 Aug 2019 21:39:13 -04:00
The following commit has been merged into the perf/core branch of tip:
Commit-ID: e9a6882f267a8105461066e3ea6b4b6b9be1b807
Gitweb:
https://git.kernel.org/tip/e9a6882f267a8105461066e3ea6b4b6b9be1b807
Author:Igor Lubashev
AuthorDate:Mon, 26 Aug 2019 21:39:12 -04:00
has been reviewed previously, but I
* modified it in a non-trivial way, so I removed Acks.
05: perf: warn perf_event_paranoid restrict kernel symbols
Warn that /proc/sys/kernel/perf_event_paranoid can also restrict kernel
symbols.
Igor Lubashev (5):
perf event: Check ref_reloc_sym bef
Check for ref_reloc_sym before using it instead of checking
symbol_conf.kptr_restrict and relying solely on that check.
Signed-off-by: Igor Lubashev
Reported-by: Mathieu Poirier
---
tools/perf/util/event.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tools/perf
Perf was too restrictive about sysctl kernel.perf_event_paranoid. The
kernel only disallows profiling when perf_event_paranoid > 1. Make perf do
the same.
Signed-off-by: Igor Lubashev
---
tools/perf/util/evsel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/u
The kernel is using CAP_SYS_ADMIN instead of euid==0 to override
perf_event_paranoid check. Make perf do the same.
Signed-off-by: Igor Lubashev
Acked-by: Jiri Olsa
Cc: Alexander Shishkin
Cc: Alexey Budankov
Cc: James Morris
Cc: Mathieu Poirier
Cc: Namhyung Kim
Cc: Peter Zijlstra
Cc
Warn that /proc/sys/kernel/perf_event_paranoid can also restrict kernel
symbols.
Signed-off-by: Igor Lubashev
---
tools/perf/builtin-record.c | 2 +-
tools/perf/builtin-top.c| 2 +-
tools/perf/builtin-trace.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/perf
The kernel is using CAP_SYSLOG capability instead of uid==0 and euid==0
when checking kptr_restrict. Make perf do the same.
Also, the kernel is a more restrictive than "no restrictions" in case of
kptr_restrict==0, so add the same logic to perf.
Signed-off-by: Igor Lubashev
Cc: Jir
Commit-ID: c766f3df635de14295e410c6dd5410bc416c24a0
Gitweb: https://git.kernel.org/tip/c766f3df635de14295e410c6dd5410bc416c24a0
Author: Igor Lubashev
AuthorDate: Wed, 7 Aug 2019 10:44:17 -0400
Committer: Arnaldo Carvalho de Melo
CommitDate: Wed, 14 Aug 2019 10:59:59 -0300
perf ftrace
Commit-ID: c22e150e3afa6f8db2300bd510e4ac26bbee1bf3
Gitweb: https://git.kernel.org/tip/c22e150e3afa6f8db2300bd510e4ac26bbee1bf3
Author: Igor Lubashev
AuthorDate: Wed, 7 Aug 2019 10:44:14 -0400
Committer: Arnaldo Carvalho de Melo
CommitDate: Wed, 14 Aug 2019 10:48:39 -0300
perf tools
Commit-ID: 74d5f3d06f707eb5f7e1908ad88954bde02000ce
Gitweb: https://git.kernel.org/tip/74d5f3d06f707eb5f7e1908ad88954bde02000ce
Author: Igor Lubashev
AuthorDate: Wed, 7 Aug 2019 10:44:14 -0400
Committer: Arnaldo Carvalho de Melo
CommitDate: Mon, 12 Aug 2019 17:14:14 -0300
tools build
Add utilities to help checking capabilities of the running procss.
Make perf link with libcap, if it is available. If no libcap-dev[el],
assume no capabilities.
Signed-off-by: Igor Lubashev
---
tools/build/Makefile.feature | 2 ++
tools/build/feature/Makefile | 4
tools/build
and Jiri)
v2: * Added a build feature check for libcap-dev[el] as suggested by Arnaldo
Igor Lubashev (4):
perf: Add capability-related utilities
perf: Use CAP_SYS_ADMIN with perf_event_paranoid checks
perf: Use CAP_SYSLOG with kptr_restrict checks
perf: Use CAP_SYS_ADMIN instead of euid==0
The kernel is using CAP_SYS_ADMIN instead of euid==0 to override
perf_event_paranoid check. Make perf do the same.
Signed-off-by: Igor Lubashev
---
tools/perf/arch/arm/util/cs-etm.c| 3 ++-
tools/perf/arch/arm64/util/arm-spe.c | 3 ++-
tools/perf/arch/x86/util/intel-bts.c | 3 ++-
tools
Kernel is using CAP_SYSLOG capability instead of uid==0 and euid==0 when
checking kptr_restrict. Make perf do the same.
Also, the kernel is a more restrictive than "no restrictions" in case of
kptr_restrict==0, so add the same logic to perf.
Signed-off-by: Igor Lubashev
---
tools
Kernel requires CAP_SYS_ADMIN instead of euid==0 to mount debugfs for ftrace.
Make perf do the same.
Signed-off-by: Igor Lubashev
---
tools/perf/builtin-ftrace.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c
Kernel requires CAP_SYS_ADMIN instead of euid==0 to mount debugfs for ftrace.
Make perf do the same.
Signed-off-by: Igor Lubashev
---
tools/perf/builtin-ftrace.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c
-dev[el] as suggested by Arnaldo
Igor Lubashev (4):
perf: Add capability-related utilities
perf: Use CAP_SYS_ADMIN with perf_event_paranoid checks
perf: Use CAP_SYSLOG with kptr_restrict checks
perf: Use CAP_SYS_ADMIN instead of euid==0 with ftrace
tools/build/Makefile.feature
The kernel is using CAP_SYS_ADMIN instead of euid==0 to override
perf_event_paranoid check. Make perf do the same.
Signed-off-by: Igor Lubashev
---
tools/perf/arch/arm/util/cs-etm.c| 3 ++-
tools/perf/arch/arm64/util/arm-spe.c | 4 ++--
tools/perf/arch/x86/util/intel-bts.c | 3 ++-
tools
Add utilities to help checking capabilities of the running procss.
Make perf link with libcap, if it is available. If no libcap-dev[el],
assume no capabilities.
Signed-off-by: Igor Lubashev
---
tools/build/Makefile.feature | 2 ++
tools/build/feature/Makefile | 4
tools/build
Kernel is using CAP_SYSLOG capability instead of uid==0 and euid==0 when
checking kptr_restrict. Make perf do the same.
Also, the kernel is a more restrictive than "no restrictions" in case of
kptr_restrict==0, so add the same logic to perf.
Signed-off-by: Igor Lubashev
---
tools
Kernel requires CAP_SYS_ADMIN instead of euid==0 to mount debugfs for ftrace.
Make perf require the same.
Signed-off-by: Igor Lubashev
---
tools/perf/builtin-ftrace.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c
Kernel is using CAP_SYSLOG capcbility instead of uid==0 and euid==0 when
checking kptr_restrict. Make perf do the same.
Also, the kernel is a more restrictive than "no restrictions" in case of
kptr_restrict==0, so add the same logic to perf.
Signed-off-by: Igor Lubashev
---
tools
is in perf_users group (setup via instructions
above), I executed:
perf record -a -- sleep 1
Without the patch, perf record did not capture any kernel functions.
With the patch, perf included all kernel funcitons.
Igor Lubashev (3):
perf: Add capability-related utilities
perf: Use CAP_SYS_ADMIN
Add utilities to help checking capabilities of the running process.
Make perf link with libcap.
Signed-off-by: Igor Lubashev
---
tools/perf/Makefile.config | 2 +-
tools/perf/util/Build | 1 +
tools/perf/util/cap.c | 24
tools/perf
The kernel is using CAP_SYS_ADMIN instead of euid==0 to override
perf_event_paranoid check. Make perf do the same.
Signed-off-by: Igor Lubashev
---
tools/perf/arch/arm/util/cs-etm.c| 3 ++-
tools/perf/arch/arm64/util/arm-spe.c | 3 ++-
tools/perf/arch/x86/util/intel-bts.c | 3 ++-
tools
of
delegating the minimal set of privileges.
Setting SECURE_KEEP_FSUID bit ensures that the current fsuid/fsgiud is
retained by execve.
Signed-off-by: Igor Lubashev
---
include/uapi/linux/securebits.h | 10 +-
security/commoncap.c| 9 +++--
2 files changed, 16 insertions(+), 3
root uid/euid, so a general
solution that does not involve updating all such programs seems
warranted.
I will update man pages, if this patch is deemed a good idea.
Igor Lubashev (1):
security: add SECURE_KEEP_FSUID to preserve fsuid/fsgid across execve
include/uapi/linux/securebits.h | 10
of
delegating the minimal set of privileges.
Setting SECURE_KEEP_FSUID bit ensures that the current fsuid/fsgiud is
retained by execve.
Signed-off-by: Igor Lubashev
---
include/uapi/linux/securebits.h | 10 +-
security/commoncap.c| 9 +++--
2 files changed, 16 insertions(+), 3
uid/suid/euid in
setfsuid (and similarly for set*gid and setfsgid).
I will update man pages as needed.
Igor Lubashev (1):
security: add SECURE_KEEP_FSUID to preserve fsuid/fsgid across execve
include/uapi/linux/securebits.h | 10 +-
security/commoncap.c| 9 +++--
2
37 matches
Mail list logo