[GIT PULL 00/24] perf/core improvements and fixes

2015-06-26 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo Hi Ingo, Please consider pulling, - Arnaldo The following changes since commit 6eedf416429a32e0216f61b8b690d25577b2b91e: Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2015-06-26

[PATCH 18/24] perf stat: Move perf_stat initialization counter process code

2015-06-26 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa Moving perf_stat initialization counter process code, to make the reading path free of processing logic. Signed-off-by: Jiri Olsa Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link:

[PATCH 10/24] perf stat: Move perf_evsel__(alloc|free|reset)_stat_priv into stat object

2015-06-26 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa Moving perf_evsel__(alloc|free|reset)_stat_priv into stat object, so it could be used outside stat command in following patches. Signed-off-by: Jiri Olsa Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link:

[PATCH 12/24] perf stat: Move perf_evlist__(alloc|free|reset)_stats into stat object

2015-06-26 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa Moving perf_evlist__(alloc|free|reset)_stats into stat object, so it could be used in following patches. Signed-off-by: Jiri Olsa Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link:

[PATCH 13/24] perf stat: Introduce perf_evsel__alloc_stats function

2015-06-26 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa Move all stat allocation logic related to stat object under single function. This way we can use it separately for stat object out of evlist object. Signed-off-by: Jiri Olsa Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane

[PATCH 19/24] perf stat: Remove perf_evsel__read_cb function

2015-06-26 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa It's no longer used, the stat command uses perf_evsel__read now. Signed-off-by: Jiri Olsa Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link:

[PATCH 22/24] perf stat: Introduce print_counters function

2015-06-26 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa Centralize counters print code into single print_counters function. Signed-off-by: Jiri Olsa Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link:

[PATCH 11/24] perf stat: Move perf_evsel__(alloc|free)_prev_raw_counts into stat object

2015-06-26 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa Moving perf_evsel__(alloc|free)_prev_raw_counts into stat object, so it could be used in following patches. Signed-off-by: Jiri Olsa Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link:

[PATCH 01/24] perf trace: Validate syscall list passed via -e argument

2015-06-26 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo The 'trace' tool was accepting any names passed and just looking if syscalls returned via the raw_syscalls:* tracepoints were in that list, leading to it accepting perf events and then never finding any, as those are not valid syscall names, confusing users. Fix

[PATCH 04/24] perf tests: Add thread_map object tests

2015-06-26 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa Adding thread_map object tests for comm name values. Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link:

[PATCH 08/24] perf stat: Rename struct perf_counts::cpu member to values

2015-06-26 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa Renaming 'struct xyarray *cpu' pointer to more fitting/generic values, because now we store both cpu and thread values. Signed-off-by: Jiri Olsa Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link:

[PATCH 09/24] perf stat: Introduce perf_evlist__reset_stats

2015-06-26 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa To fit in with the rest of the helpers (alloc and free). Signed-off-by: Jiri Olsa Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/1435310967-14570-9-git-send-email-jo...@kernel.org

Re: [PATCH] perf tools: don't adjust symbols in vDSO

2015-06-26 Thread Andy Lutomirski
On Fri, Jun 26, 2015 at 8:29 AM, Will Deacon wrote: > On Fri, Jun 26, 2015 at 04:18:59PM +0100, Andy Lutomirski wrote: >> On Fri, Jun 26, 2015 at 7:58 AM, Will Deacon wrote: >> > (CC'ing Andy, since the removal of VDSO_PRELINK is user-visible here) >> >> What arch is this? I removed

Re: [PATCH] staging: rtl8712: rtl871x_security.c: remove unnecessary variable initialization

2015-06-26 Thread Luis de Bethencourt
On Fri, Jun 26, 2015 at 07:42:24PM +0530, Sunil Shahu wrote: > Variable "u32 c" always re-initialize in for loop. > Initialized value of "u32 c" is not used in function > and is redundant, hence removed. > > Suggested-by: Dan Carpenter > Signed-off-by: Sunil Shahu > --- >

Re: [PATCH 2/2] arm/smmu: Make use of of_parse_phandle_with_var_args

2015-06-26 Thread Joerg Roedel
Hi Will, On Fri, Jun 26, 2015 at 12:10:47PM +0100, Will Deacon wrote: > Thanks for looking at this! I'm fine with the general idea, but obviously > the first patch needs an Ack from a devicetree person. Yeah, sure. I was looking into a simple solution that does not require to rewrite all the

Re: [PATCH 1/3] net: dsa: mv88e6xxx: add debugfs interface for VTU

2015-06-26 Thread Vivien Didelot
Hi Andrew, On Jun 26, 2015, at 11:23 AM, Andrew Lunn and...@lunn.ch wrote: >> >> +static int _mv88e6xxx_vtu_getnext(struct dsa_switch *ds, u16 vid, >> >> + struct mv88e6xxx_vtu_entry *entry) >> >> +{ >> >> +int ret, i; >> >> + >> >> +ret = _mv88e6xxx_vtu_wait(ds); >> >>

[PATCH 5/4] staging: wilc1000: switch printks to vsprintf IPv4 extension

2015-06-26 Thread Luis de Bethencourt
Switch printks with IP addresses to use vsprintf extension %pI4. Suggested-by: Joe Perches Signed-off-by: Luis de Bethencourt --- drivers/staging/wilc1000/host_interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c

Re: [PATCH v3 1/1] perf tools: Check access permission when reading symbol files

2015-06-26 Thread Arnaldo Carvalho de Melo
Em Fri, Jun 26, 2015 at 02:22:29PM +0800, Li Zhang escreveu: > ping ? Thanks, applied. - Arnaldo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] perf tools: don't adjust symbols in vDSO

2015-06-26 Thread Adrian Hunter
On 26/06/2015 5:58 p.m., Will Deacon wrote: (CC'ing Andy, since the removal of VDSO_PRELINK is user-visible here) On Fri, Jun 26, 2015 at 02:55:29PM +0100, Adrian Hunter wrote: On 26/06/15 15:23, Will Deacon wrote: On Thu, Jun 25, 2015 at 02:32:13PM +0100, Adrian Hunter wrote: On 24/06/15

[GIT PULL] workqueue changes for v4.2-rc1

2015-06-26 Thread Tejun Heo
Hello, Linus. Most of the changes are around implementing and fixing fallouts from sysfs and internal interface to limit the CPUs available to all unbound workqueues to help isolating CPUs. It needs more work as ordered workqueues can roam unrestricted but still is a significant improvement.

[PATCH] f2fs crypto: Delete an unnecessary check before the function call "key_put"

2015-06-26 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 26 Jun 2015 17:28:55 +0200 The key_put() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

Re: [PATCH] perf tools: don't adjust symbols in vDSO

2015-06-26 Thread Will Deacon
On Fri, Jun 26, 2015 at 04:18:59PM +0100, Andy Lutomirski wrote: > On Fri, Jun 26, 2015 at 7:58 AM, Will Deacon wrote: > > (CC'ing Andy, since the removal of VDSO_PRELINK is user-visible here) > > What arch is this? I removed VDSO_PRELINK entirely from x86 a while > back, and now x86's vdso has

Re: [PATCH 1/3] net: dsa: mv88e6xxx: add debugfs interface for VTU

2015-06-26 Thread Andrew Lunn
> >> +static int _mv88e6xxx_vtu_getnext(struct dsa_switch *ds, u16 vid, > >> + struct mv88e6xxx_vtu_entry *entry) > >> +{ > >> +int ret, i; > >> + > >> +ret = _mv88e6xxx_vtu_wait(ds); > >> +if (ret < 0) > >> +return ret; > >> + > >> +ret =

Re: [PATCH v2 16/17] libnvdimm: Add sysfs numa_node to NVDIMM devices

2015-06-26 Thread Dan Williams
On Thu, Jun 25, 2015 at 7:21 PM, Toshi Kani wrote: > On Thu, 2015-06-25 at 05:37 -0400, Dan Williams wrote: >> From: Toshi Kani >> >> Add support of sysfs 'numa_node' to I/O-related NVDIMM devices >> under /sys/bus/nd/devices, regionN, namespaceN.0, and bttN. >> When bttN is not set up, its

[PATCH net-next] test_bpf: extend tests for 32-bit endianness conversion

2015-06-26 Thread Xi Wang
Currently "ALU_END_FROM_BE 32" and "ALU_END_FROM_LE 32" do not test if the upper bits of the result are zeros (the arm64 JIT had such bugs). Extend the two tests to catch this. Cc: Alexei Starovoitov Signed-off-by: Xi Wang --- See the arm64 JIT bugs: https://lkml.org/lkml/2015/6/25/721 ---

Re: [PATCH][v2] asus-rbtn: new driver for asus radio button for Windows 8

2015-06-26 Thread Alex Hung
On Fri, Jun 26, 2015 at 10:56 PM, Pali Rohár wrote: > Hi! > > On Wednesday 24 June 2015 10:57:51 Alex Hung wrote: >> ASUS introduced a new approach to handle wireless hotkey >> since Windows 8. When the hotkey is pressed, BIOS generates >> a notification 0x88 to a new ACPI device, ATK4001. This

Re: [GIT PULL] Cgroup writeback support for 4.2

2015-06-26 Thread Tejun Heo
Hey, On Fri, Jun 26, 2015 at 04:56:11PM +0200, Geert Uytterhoeven wrote: > A handful every merge window. That's why I keep on doing this :-) > > Since the release of v4.1: > - https://lkml.org/lkml/2015/6/25/334 > - https://lkml.org/lkml/2015/6/25/337 > - https://lkml.org/lkml/2015/6/24/88

[git pull] device mapper fixes for 4.2-rc1

2015-06-26 Thread Mike Snitzer
On Fri, Jun 26 2015 at 4:05P -0400, Junichi Nomura wrote: > On 06/26/15 15:41, Linus Torvalds wrote: > > On Jun 25, 2015 23:17, "Junichi Nomura" > > wrote: > >> On 06/25/15 23:37, Jens Axboe wrote: > >> > block, dm: don't copy bios for request clones > >> >

Re: [PATCH] perf tools: don't adjust symbols in vDSO

2015-06-26 Thread Andy Lutomirski
On Fri, Jun 26, 2015 at 7:58 AM, Will Deacon wrote: > (CC'ing Andy, since the removal of VDSO_PRELINK is user-visible here) What arch is this? I removed VDSO_PRELINK entirely from x86 a while back, and now x86's vdso has a base address of 0 before relocations, and everything works just fine.

Re: [PATCH] hwmon: (nct7802) fix visibility of temp3

2015-06-26 Thread Guenter Roeck
On Fri, Jun 26, 2015 at 05:47:44PM +0300, Constantine Shulyupin wrote: > From: const > > Excerpt from datasheet: > 7.2.32 Mode Selection Register > RTD3_MD : 00=Closed , 01=Reserved , 10=Thermistor mode , 11=Voltage sense > > Show temp3 only in Thermistor mode > > Signed-off-by: Constantine

Re: [PATCH] mm: Add error check after call to rmap_walk in the function page_referenced

2015-06-26 Thread Dominik Dingel
On Fri, 26 Jun 2015 10:47:39 -0400 nick wrote: > > > On 2015-06-26 09:56 AM, Dominik Dingel wrote: > > On Thu, 25 Jun 2015 21:36:37 -0400 > > Nicholas Krause wrote: > > > >> This adds a return check after the call to the function rmap_walk > >> in the function page_referenced as this

Re: [PATCH 3/4] staging: wilc1000: remove whitespaces before quoted newlines

2015-06-26 Thread Joe Perches
On Fri, 2015-06-26 at 17:11 +0200, Luis de Bethencourt wrote: > On Fri, Jun 26, 2015 at 07:49:32AM -0700, Joe Perches wrote: > > On Fri, 2015-06-26 at 16:45 +0200, Luis de Bethencourt wrote: > > > Fix all checkpatch.pl warnings: > > > WARNING: unnecessary whitespace before a quoted newline > > >

Re: [PATCH] xen-netfront: Remove the meaningless code

2015-06-26 Thread David Vrabel
On 27/06/15 00:17, Liang Li wrote: > The function netif_set_real_num_tx_queues() will return -EINVAL if > the second parameter < 1, so call this function with the second > parameter set to 0 is meaningless. Reviewed-by: David Vrabel David -- To unsubscribe from this list: send the line

[PATCH v2] scripts/kernel-doc: Adding cross-reference links to html documentation.

2015-06-26 Thread Danilo Cesar Lemes de Paula
Functions, Structs and Parameters definitions on kernel documentation are pure cosmetic, it only highlights the element. To ease the navigation in the documentation we should use inside those tags so readers can easily jump between methods directly. This was discussed in 2014[1] and is

Re: [PATCH V6 08/17] perf tools: Add Intel PT support

2015-06-26 Thread Arnaldo Carvalho de Melo
Em Fri, Jun 26, 2015 at 04:47:39PM +0300, Adrian Hunter escreveu: > On 26/06/15 16:41, Arnaldo Carvalho de Melo wrote: > >> Another thing, the intel_bts implementation does not support > >> "instructions" samples because there is no timing information to > >> use to create periodic samples. But

Re: [PATCHv5 00/22] perf stat: Introduce --per-thread option

2015-06-26 Thread Arnaldo Carvalho de Melo
Em Fri, Jun 26, 2015 at 11:29:05AM +0200, Jiri Olsa escreveu: > hi, > adding the possibility to display stat data per thread. > > Allowing following commands and output: > > $ perf stat -e cycles,instructions --per-thread -p 30190,30242 > ^C >Performance counter stats for process id

Re: [PATCH 3/4] staging: wilc1000: remove whitespaces before quoted newlines

2015-06-26 Thread Luis de Bethencourt
On Fri, Jun 26, 2015 at 07:49:32AM -0700, Joe Perches wrote: > On Fri, 2015-06-26 at 16:45 +0200, Luis de Bethencourt wrote: > > Fix all checkpatch.pl warnings: > > WARNING: unnecessary whitespace before a quoted newline > > Unassociated but: > > > diff --git

Re: [PATCH 1/3] net: dsa: mv88e6xxx: add debugfs interface for VTU

2015-06-26 Thread Vivien Didelot
Hi Andrew, On Jun 26, 2015, at 10:04 AM, Andrew Lunn and...@lunn.ch wrote: > On Tue, Jun 23, 2015 at 05:46:08PM -0400, Vivien Didelot wrote: >> Implement the Get Next operation for the VLAN Table Unit, and a "vtu" >> debugfs file to dump the hardware VLANs. >> >> A populated VTU can look like

[PATCH 2/3] tracing/filter: Do not allow infix to exceed end of string

2015-06-26 Thread Steven Rostedt
From: "Steven Rostedt (Red Hat)" While debugging a WARN_ON() for filtering, I found that it is possible for the filter string to be referenced after its end. With the filter: # echo '>' > /sys/kernel/debug/events/ext4/ext4_truncate_exit/filter The filter_parse() function can call

[PATCH 0/3] [GIT PULL] tracing: some more fixes before my 4.2 pull request

2015-06-26 Thread Steven Rostedt
Linus, This isn't my 4.2 pull request (yet). I found a few more bugs that I would have sent to fix 4.1, but since 4.1 is already out, I'm sending this before sending my 4.2 request (which is ready to go). After fixing the previous filter issue reported by Vince Weaver, I could not come up with

[PATCH 1/3] tracing/filter: Do not WARN on operand count going below zero

2015-06-26 Thread Steven Rostedt
From: "Steven Rostedt (Red Hat)" When testing the fix for the trace filter, I could not come up with a scenario where the operand count goes below zero, so I added a WARN_ON_ONCE(cnt < 0) to the logic. But there is legitimate case that it can happen (although the filter would be wrong). # echo

[PATCH 3/3] tracing: Fix typo from "static inlin" to "static inline"

2015-06-26 Thread Steven Rostedt
From: "Steven Rostedt (Red Hat)" The trace.h header when called without CONFIG_EVENT_TRACING enabled (seldom done), will not compile because of a typo in the protocol of trace_event_enum_update(). Cc: sta...@vger.kernel.org # 4.1+ Signed-off-by: Steven Rostedt --- kernel/trace/trace.h | 2 +-

Re: [PATCH] perf tools: don't adjust symbols in vDSO

2015-06-26 Thread Will Deacon
(CC'ing Andy, since the removal of VDSO_PRELINK is user-visible here) Hi Adrian, Thanks for your helpful responses. On Fri, Jun 26, 2015 at 02:55:29PM +0100, Adrian Hunter wrote: > On 26/06/15 15:23, Will Deacon wrote: > > On Thu, Jun 25, 2015 at 02:32:13PM +0100, Adrian Hunter wrote: > >> On

Re: [PATCH][v2] asus-rbtn: new driver for asus radio button for Windows 8

2015-06-26 Thread Pali Rohár
Hi! On Wednesday 24 June 2015 10:57:51 Alex Hung wrote: > ASUS introduced a new approach to handle wireless hotkey > since Windows 8. When the hotkey is pressed, BIOS generates > a notification 0x88 to a new ACPI device, ATK4001. This > new driver not only translates the notification to

Re: [GIT PULL] Cgroup writeback support for 4.2

2015-06-26 Thread Geert Uytterhoeven
Hi Tejun, On Fri, Jun 26, 2015 at 4:28 PM, Tejun Heo wrote: >> That's why I keep on using gcc 4.1.2: it still gives build warnings for >> many "used uninitialized" cases that later gcc versions let pass silently. >> >> Granted, some of these are false positives (that's why it was disabled in >>

GFS2: Pull request (merge window)

2015-06-26 Thread Bob Peterson
Hi, Please consider pulling the following changes for the GFS2 file system. Regards, Bob Peterson The following changes since commit f4a3ae9308e34bcd704325a08879b2c1cfb74686: GFS2: Use average srttb value in congestion

[PATCH] hwmon: (nct7802) fix visibility of temp3

2015-06-26 Thread Constantine Shulyupin
From: const Excerpt from datasheet: 7.2.32 Mode Selection Register RTD3_MD : 00=Closed , 01=Reserved , 10=Thermistor mode , 11=Voltage sense Show temp3 only in Thermistor mode Signed-off-by: Constantine Shulyupin --- drivers/hwmon/nct7802.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH 3/4] staging: wilc1000: remove whitespaces before quoted newlines

2015-06-26 Thread Joe Perches
On Fri, 2015-06-26 at 16:45 +0200, Luis de Bethencourt wrote: > Fix all checkpatch.pl warnings: > WARNING: unnecessary whitespace before a quoted newline Unassociated but: > diff --git a/drivers/staging/wilc1000/host_interface.c > b/drivers/staging/wilc1000/host_interface.c [] > @@ -740,7

[PATCH 4/4] staging: wilc1000: fix typos in PRINT_ERR()

2015-06-26 Thread Luis de Bethencourt
Fix typo "packe" to "packet". Signed-off-by: Luis de Bethencourt --- drivers/staging/wilc1000/host_interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 79b7c2a..1915fc6

[PATCH v6] coccinelle: Improve checking for missing NULL terminators

2015-06-26 Thread Daniel Granat
Extend checking on tables containing structures which are initialized without specifying member name. Added new tables for checking: i2c_device_id and platform_device_id. Signed-off-by: Daniel Granat Acked-by: Julia Lawall --- scripts/coccinelle/misc/of_table.cocci | 33

[PATCH 3/4] staging: wilc1000: remove whitespaces before quoted newlines

2015-06-26 Thread Luis de Bethencourt
Fix all checkpatch.pl warnings: WARNING: unnecessary whitespace before a quoted newline Signed-off-by: Luis de Bethencourt --- drivers/staging/wilc1000/host_interface.c | 84 +++ 1 file changed, 42 insertions(+), 42 deletions(-) diff --git

[PATCH 2/4] staging: wilc1000: add blank lines after declarations

2015-06-26 Thread Luis de Bethencourt
Fix all checkpatch.pl warnings: WARNING: Missing a blank line after declarations Signed-off-by: Luis de Bethencourt --- drivers/staging/wilc1000/host_interface.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/staging/wilc1000/host_interface.c

[PATCH 1/4] staging: wilc1000: remove unnecessary braces

2015-06-26 Thread Luis de Bethencourt
Removing all checkpatch.pl warnings: WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Luis de Bethencourt --- drivers/staging/wilc1000/host_interface.c | 276 ++ 1 file changed, 92 insertions(+), 184 deletions(-) diff --git

Re: [PATCH 2/3] net: dsa: mv88e6xxx: add support to dump VLANs

2015-06-26 Thread Vivien Didelot
Hi Andrew, On Jun 26, 2015, at 10:10 AM, Andrew Lunn and...@lunn.ch wrote: > On Tue, Jun 23, 2015 at 05:46:09PM -0400, Vivien Didelot wrote: >> This commit implements the port_vlan_dump function in the >> dsa_switch_driver structure for Marvell 88E6xxx compatible switches. >> >> This allows to

[RFC PATCH v9 07/50] bpf tools: Check endianness and make libbpf fail early

2015-06-26 Thread Wang Nan
Check endianness according to EHDR. Code is taken from tools/perf/util/symbol-elf.c. Libbpf doesn't magically convert missmatched endianness. Even if we swap eBPF instructions to correct byte order, we are unable to deal with endianness in code logical generated by LLVM. Therefore, libbpf should

[RFC PATCH v9 10/50] bpf tools: Collect map definitions from 'maps' section

2015-06-26 Thread Wang Nan
If maps are used by eBPF programs, corresponding object file(s) should contain a section named 'map'. Which contains map definitions. This patch copies the data of the whole section. Map data parsing should be acted just before map loading. Signed-off-by: Wang Nan Acked-by: Alexei Starovoitov

[RFC PATCH v9 02/50] tools build: Add feature check for eBPF API

2015-06-26 Thread Wang Nan
In this patch, eBPF API is checked by compiling a c source file which uses fields in bpf_attr which will be used by libbpf. Signed-off-by: Wang Nan Acked-by: Alexei Starovoitov --- tools/build/Makefile.feature | 6 -- tools/build/feature/Makefile | 6 +-

[RFC PATCH v9 00/50] perf tools: filtering events using eBPF programs

2015-06-26 Thread Wang Nan
This is the 9th version which tries to introduce eBPF programs to perf. This patchset combined with 2 patchset I posted: 1. V8 of 'perf tools: filtering events using eBPF programs'; 2. 'tracing, perf tools: Attach BPF program on uprobe events' And patch 'tracing, perf: Implement BPF programs

[RFC PATCH v9 05/50] bpf tools: Open eBPF object file and do basic validation

2015-06-26 Thread Wang Nan
This patch defines basic interface of libbpf. 'struct bpf_object' will be the handler of each object file. Its internal structure is hide to user. eBPF object files are compiled by LLVM as ELF format. In this patch, libelf is used to open those files, read EHDR and do basic validation according to

[RFC PATCH v9 12/50] bpf tools: Collect eBPF programs from their own sections

2015-06-26 Thread Wang Nan
This patch collects all programs in an object file into an array of 'struct bpf_program' for further processing. That structure is for representing each eBPF program. 'bpf_prog' should be a better name, but it has been used by linux/filter.h. Although it is a kernel space name, I still prefer to

[RFC PATCH v9 03/50] bpf tools: Introduce 'bpf' library to tools

2015-06-26 Thread Wang Nan
This is the first patch of libbpf. The goal of libbpf is to create a standard way for accessing eBPF object files. This patch creates 'Makefile' and 'Build' for it, allows 'make' to build libbpf.a and libbpf.so, 'make install' to put them into proper directories. Most part of Makefile is borrowed

[RFC PATCH v9 06/50] bpf tools: Read eBPF object from buffer

2015-06-26 Thread Wang Nan
To support dynamic compiling, this patch allows caller to pass a in-memory buffer to libbpf by bpf_object__open_buffer(). libbpf calls elf_memory() to open it as ELF object file. Because __bpf_object__open() collects all required data and won't need that buffer anymore, libbpf uses that buffer

[RFC PATCH v9 11/50] bpf tools: Collect symbol table from SHT_SYMTAB section

2015-06-26 Thread Wang Nan
This patch collects symbols section. This section is useful when linking ELF maps. Signed-off-by: Wang Nan Acked-by: Alexei Starovoitov --- tools/lib/bpf/libbpf.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index

[RFC PATCH v9 13/50] bpf tools: Collect relocation sections from SHT_REL sections

2015-06-26 Thread Wang Nan
This patch collects relocation sections into 'struct object'. Such sections are used for connecting maps to bpf programs. 'reloc' field in 'struct bpf_object' is introduced for storing such information. This patch simply store the data into 'reloc' field. Following patch will parse them to know

Re: [PATCH 3/3] net: dsa: mv88e6352: add support for port_vlan_dump

2015-06-26 Thread Vivien Didelot
Hi Andrew, On Jun 26, 2015, at 10:12 AM, Andrew Lunn and...@lunn.ch wrote: > On Tue, Jun 23, 2015 at 05:46:10PM -0400, Vivien Didelot wrote: >> Add support for dumping the VLAN Table Unit entries by pointing to the >> port_vlan_dump function implemented for mv88e6xxx. >> >> Signed-off-by:

[PATCH] keys: Delete an unnecessary check before the function call "key_put"

2015-06-26 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 26 Jun 2015 16:10:54 +0200 The key_put() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

Re: [GIT PULL] Cgroup writeback support for 4.2

2015-06-26 Thread Tejun Heo
Hello, Geert. On Fri, Jun 26, 2015 at 03:57:18PM +0200, Geert Uytterhoeven wrote: > > Can you please tell me the version of gcc which triggered the above > > warnings? > > gcc 4.1.2 I see. I read wrong. > That's why I keep on using gcc 4.1.2: it still gives build warnings for > many "used

[RFC PATCH v9 01/50] tracing, perf: Implement BPF programs attached to uprobes

2015-06-26 Thread Wang Nan
By copying BPF related operation to uprobe processing path, this patch allow users attach BPF programs to uprobes like what they are already doing on kprobes. After this patch, users are allowed to use PERF_EVENT_IOC_SET_BPF on a uprobe perf event. Which make it possible to profile user space

Re: [4.1.0-07254-gc13c810] Regression: Bluetooth not working.

2015-06-26 Thread Jörg Otte
2015-06-26 12:03 GMT+02:00 Jörg Otte : > 2015-06-26 11:37 GMT+02:00 Marcel Holtmann : >> Hi Joerg, >> >>> Bluetooth is inoperable in current Linus tree and the >>> first bad commit is: >>> >>> 835a6a2f8603237a3e6cded5a6765090ecb06ea5 is the first bad commit >>> commit

[RFC PATCH v9 09/50] bpf tools: Collect version and license from ELF sections

2015-06-26 Thread Wang Nan
Expand bpf_obj_elf_collect() to collect license and kernel version information in eBPF object file. eBPF object file should have a section named 'license', which contains a string. It should also have a section named 'version', contains a u32 LINUX_VERSION_CODE. bpf_obj_validate() is introduced

[RFC PATCH v9 18/50] bpf tools: Introduce bpf_load_program() to bpf.c

2015-06-26 Thread Wang Nan
bpf_load_program() can be used to load bpf program into kernel. To make loading faster, first try to load without logbuf. Try again with logbuf if the first try failed. Signed-off-by: Wang Nan Acked-by: Alexei Starovoitov --- tools/lib/bpf/bpf.c | 34 ++

[RFC PATCH v9 19/50] bpf tools: Load eBPF programs in object files into kernel

2015-06-26 Thread Wang Nan
This patch utilizes previous introduced bpf_load_program to load programs in the ELF file into kernel. Result is stored in 'fd' field in 'struct bpf_program'. During loading, it allocs a log buffer and free it before return. Note that that buffer is not passed to bpf_load_program() if the first

[RFC PATCH v9 15/50] bpf tools: Add bpf.c/h for common bpf operations

2015-06-26 Thread Wang Nan
This patch introduces bpf.c and bpf.h, which hold common functions issuing bpf syscall. The goal of these two files is to hide syscall completely from user. Note that bpf.c and bpf.h deal with kernel interface only. Things like structure of 'map' section in the ELF object is not cared by of

[RFC PATCH v9 14/50] bpf tools: Record map accessing instructions for each program

2015-06-26 Thread Wang Nan
This patch records the indics of instructions which are needed to be relocated. Those information are saved in 'reloc_desc' field in 'struct bpf_program'. In loading phase (this patch takes effect in opening phase), the collected instructions will be replaced by map loading instructions. Since we

[RFC PATCH v9 17/50] bpf tools: Relocate eBPF programs

2015-06-26 Thread Wang Nan
If an eBPF program accesses a map, LLVM generates a load instruction which loads an absolute address into a register, like this: ld_64 r1, ... call2 That ld_64 instruction will be recorded in relocation section. To enable the usage of that map, relocation must be done by replacing

[RFC PATCH v9 25/50] perf tools: Call clang to compile C source to object code

2015-06-26 Thread Wang Nan
This is the core patch for supporting eBPF on-the-fly compiling, does the following work: 1. Search clang compiler using search_program(). 2. Run command template defined in llvm-bpf-cmd-template option in [llvm] config section using read_from_pipe(). Patch of clang and source code

[RFC PATCH v9 21/50] bpf tools: Introduce accessors for struct bpf_object

2015-06-26 Thread Wang Nan
This patch add an accessor which allows caller to get count of programs in an object file. Signed-off-by: Wang Nan Acked-by: Alexei Starovoitov --- tools/lib/bpf/libbpf.c | 9 + tools/lib/bpf/libbpf.h | 3 +++ 2 files changed, 12 insertions(+) diff --git a/tools/lib/bpf/libbpf.c

[RFC PATCH v9 04/50] bpf tools: Allow caller to set printing function

2015-06-26 Thread Wang Nan
By libbpf_set_print(), users of libbpf are allowed to register he/she own debug, info and warning printing functions. Libbpf will use those functions to print messages. If not provided, default info and warning printing functions are fprintf(stderr, ...); default debug printing is NULL. This API

[RFC PATCH v9 32/50] perf probe: Attach trace_probe_event with perf_probe_event

2015-06-26 Thread Wang Nan
This patch drops struct __event_package structure. Instead, it adds trace_probe_event into 'struct perf_probe_event'. trace_probe_event information give further patches a chance to access actual probe points and actual arguments. Using them, bpf_loader will be able to attach one bpf program to

[RFC PATCH v9 16/50] bpf tools: Create eBPF maps defined in an object file

2015-06-26 Thread Wang Nan
This patch creates maps based on 'map' section in object file using bpf_create_map(), and stores the fds into an array in 'struct bpf_object'. Previous patches parse ELF object file and collecte required data, but doesn't play with kernel. They belong to 'opening' phase. This patch is the first

Re: [PATCH 1/1] pci: xgene: Enable huge outbound bar support

2015-06-26 Thread Bjorn Helgaas
Hi Duc, On Thu, Jun 25, 2015 at 8:05 PM, Duc Dang wrote: > X-Gene PCIe controllers support huge outbound BARs (with size upto > 64GB). This patch configures additional 1 outbound BAR for X-Gene > PCIe controllers with size larger than 4GB. This is required to > support devices that request huge

[RFC PATCH v9 23/50] perf tools: Make perf depend on libbpf

2015-06-26 Thread Wang Nan
By adding libbpf into perf's Makefile, this patch enables perf to build libbpf during building if libelf is found and neither NO_LIBELF nor NO_LIBBPF is set. The newly introduced code is similar to libapi and libtraceevent building in Makefile.perf. MANIFEST is also updated for 'make

[RFC PATCH v9 28/50] perf tools: Auto detecting kernel include options

2015-06-26 Thread Wang Nan
To help user find correct kernel include options, this patch extracts them from kbuild system by an embedded script kinc_fetch_script, which creates a temporary directory, generates Makefile and an empty dummy.o then use the Makefile to fetch $(NOSTDINC_FLAGS), $(LINUXINCLUDE) and $(EXTRA_CFLAGS)

[PATCH] fs-ext4 crypto: Delete an unnecessary check before the function call "key_put"

2015-06-26 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 26 Jun 2015 16:10:54 +0200 Subject: [PATCH] fs-ext4 crypto: Delete an unnecessary check before the function call "key_put" The key_put() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This

Re: [-next] fib_dump_info() suspicious RCU usage

2015-06-26 Thread Andy Gospodarek
On Fri, Jun 26, 2015 at 06:35:40PM +0900, Sergey Senozhatsky wrote: > Hello, > > Since 0eeb075fad736 ('net: ipv4 sysctl option to ignore routes when nexthop > link is down') fib_dump_info() and fib_sync_up() are using __in_dev_get_rcu(), > which requires (missing) RCU read side protection. Yep,

[RFC PATCH v9 33/50] perf record: Probe at kprobe points

2015-06-26 Thread Wang Nan
In this patch, kprobe points are created using add_perf_probe_events. Since all events are already grouped together in an array, calling add_perf_probe_events() once creates all of them. probe_conf.max_probes is set to MAX_PROBES to support glob matching. Signed-off-by: Wang Nan ---

commit 4066c33d0308f8 breaks booting under KVM

2015-06-26 Thread Theodore Ts'o
I can no longer boot Linus's tree under KVM using a 32-bit i386 build; it just hangs before any messages get sent to the serial console. It bisects down to: commit 4066c33d0308f87e9a3b0c7fafb9141c0bfbfa77 Author: Gavin Guo Date: Wed Jun 24 16:55:54 2015 -0700 mm/slab_common: support the

[RFC PATCH v9 30/50] perf record: Compile scriptlets if pass '.c' to --event

2015-06-26 Thread Wang Nan
This patch enables passing source files to --event directly using: # perf record --event bpf-file.c command This patch does following works: 1) Allow passing '.c' file to '--event'. parse_events_load_bpf() is expanded to allow caller tell it whether the passed file is source file or

[RFC PATCH v9 24/50] perf tools: Introduce llvm config options

2015-06-26 Thread Wang Nan
This patch introduces [llvm] config section with 5 options. Following patches will use then to config llvm dynamica compiling. 'llvm-utils.[ch]' is introduced in this patch for holding all llvm/clang related stuffs. Example: [llvm] # Path to clang. If omit, search it from $PATH.

[RFC PATCH v9 26/50] perf tests: Add LLVM test for eBPF on-the-fly compiling

2015-06-26 Thread Wang Nan
Previous patch introduces llvm__compile_bpf() to compile source file to eBPF object. This patch adds testcase to test it. It also test libbpf by opening generated object. Signed-off-by: Wang Nan --- tools/perf/tests/Build | 1 + tools/perf/tests/builtin-test.c | 4 ++

[RFC PATCH v9 47/50] perf tools: Use same BPF program if arguments are identical

2015-06-26 Thread Wang Nan
This patch allows creating only one BPF program for different tevs in one pev, if their prologue are identical. This is done by comparing argument list of different tev, and maps type of prologue and tev using a mapping array. This patch use qsort to sort tevs prior type mapping for performance.

Re: [PATCH 2/3] net: dsa: mv88e6xxx: add support to dump VLANs

2015-06-26 Thread Andrew Lunn
On Tue, Jun 23, 2015 at 05:46:09PM -0400, Vivien Didelot wrote: > This commit implements the port_vlan_dump function in the > dsa_switch_driver structure for Marvell 88E6xxx compatible switches. > > This allows to access a switch VLAN Table Unit from standard userspace > commands such as "bridge

[RFC PATCH v9 08/50] bpf tools: Iterate over ELF sections to collect information

2015-06-26 Thread Wang Nan
bpf_obj_elf_collect() is introduced to iterate over each elf sections to collection information in eBPF object files. This function will futher enhanced to collect license, kernel version, programs, configs and map information. Signed-off-by: Wang Nan Acked-by: Alexei Starovoitov ---

[GIT PULL]: dma-buf changes for 4.2

2015-06-26 Thread Sumit Semwal
Hi Linus, Very small pull request on dma-buf for 4.2 merge window. May I request you to please pull? The following changes since commit 5ebe6afaf0057ac3eaeb98defd5456894b446d22: Linux 4.1-rc2 (2015-05-03 19:22:23 -0700) are available in the git repository at:

[RFC PATCH v9 39/50] bpf tools: Load a program with different instance using preprocessor

2015-06-26 Thread Wang Nan
In this patch, caller of libbpf is able to control the loaded programs by installing a preprocessor callback for a BPF program. With preprocessor, different instances can be created from one BPF program. This patch will be used by perf to generate different prologue for different 'struct

[RFC PATCH v9 46/50] perf tools: Generate prologue for BPF programs

2015-06-26 Thread Wang Nan
This patch generates prologue for each 'struct probe_trace_event' for fetching arguments for BPF programs. After bpf__probe(), iterate over each programs to check whether prologue is required. If none of 'struct perf_probe_event' a program will attach has at least one argument, simply skip

Re: [GIT PULL] Btrfs

2015-06-26 Thread David Sterba
On Tue, Jun 02, 2015 at 10:02:49AM -0400, Josh Boyer wrote: > >>> Chris Mason (1) commits (+18/-0): > >>> Btrfs: fix regression in raid level conversion > >> > >> Shouldn't this be CC'd to stable since it fixes a broken commit in 4.0? > > > > Yes, I'm retesting two of these against 4.0 > >

[RFC PATCH v9 44/50] perf tools: Introduce arch_get_reg_info() for x86

2015-06-26 Thread Wang Nan
From: He Kuang arch_get_reg_info() is a helper function which converts register name like "%rax" to offset of a register in 'struct pt_regs', which is required by BPF prologue generator. This patch replaces original string table by a 'struct reg_info' table, which records offset of registers

[RFC PATCH v9 45/50] perf tools: Add prologue for BPF programs for fetching arguments

2015-06-26 Thread Wang Nan
This patch generates prologue for a BPF program which fetch arguments for it. With this patch, the program can have arguments as follow: SEC("lock_page=__lock_page page->flags") int lock_page(struct pt_regs *ctx, int err, unsigned long flags) { return 1; } This patch passes at most

[RFC PATCH v9 29/50] perf record: Enable passing bpf object file to --event

2015-06-26 Thread Wang Nan
By introducing new rules in tools/perf/util/parse-events.[ly], this patch enables 'perf record --event bpf_file.o' to select events by an eBPF object file. It calls parse_events_load_bpf() to load that file, which uses bpf__prepare_load() and finally calls bpf_object__open() for the object files.

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