Re: [PATCH v2 3/4] bpf: clarify when bpf_trace_printk discards lines

2019-08-20 Thread Peter Wu
On Tue, Aug 20, 2019 at 04:22:23PM -0700, Alexei Starovoitov wrote: > On Wed, Aug 21, 2019 at 12:08:59AM +0100, Peter Wu wrote: > > I opened /sys/kernel/tracing/trace once and kept reading from it. > > bpf_trace_printk somehow did not seem to work, no entries were appended > &g

[PATCH v2 4/4] bpf: sync bpf.h to tools/

2019-08-20 Thread Peter Wu
Fix a 'struct pt_reg' typo and clarify when bpf_trace_printk discards lines. Affects documentation only. Signed-off-by: Peter Wu --- tools/include/uapi/linux/bpf.h | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/in

[PATCH v2 3/4] bpf: clarify when bpf_trace_printk discards lines

2019-08-20 Thread Peter Wu
in Documentation/trace/ftrace.rst, however the implication "tracing is disabled" did not immediate translate to "bpf_trace_printk silently discards entries". Signed-off-by: Peter Wu --- include/uapi/linux/bpf.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includ

[PATCH v2 0/4] BPF-related documentation fixes

2019-08-20 Thread Peter Wu
when bpf_trace_printk discards lines' patch. Kind regards, Peter [1]: https://lkml.kernel.org/r/20190819212122.10286-1-pe...@lekensteyn.nl Peter Wu (4): bpf: clarify description for CONFIG_BPF_EVENTS bpf: fix 'struct pt_reg' typo in documentation bpf: clarify when bpf_trace_printk

[PATCH v2 1/4] bpf: clarify description for CONFIG_BPF_EVENTS

2019-08-20 Thread Peter Wu
PERF_EVENT_IOC_SET_BPF supports uprobes since v4.3, and tracepoints since v4.7 via commit 04a22fae4cbc ("tracing, perf: Implement BPF programs attached to uprobes"), and commit 98b5c2c65c29 ("perf, bpf: allow bpf programs attach to tracepoints") respectively. Signed-off-by: P

[PATCH v2 2/4] bpf: fix 'struct pt_reg' typo in documentation

2019-08-20 Thread Peter Wu
There is no 'struct pt_reg'. Signed-off-by: Peter Wu --- include/uapi/linux/bpf.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index fa1c753dcdbc..9ca333c3ce91 100644 --- a/include/uapi/linux/bpf.h +++

[PATCH 0/2] Small BPF documentation fixes

2019-08-19 Thread Peter Wu
Hi, Some fixes for doc issues I ran into while playing with BPF and uprobes. Kind regards, Peter Peter Wu (2): bpf: fix 'struct pt_reg' typo in documentation bpf: clarify description for CONFIG_BPF_EVENTS include/uapi/linux/bpf.h | 6 +++--- kernel/trace/Kconfig

[PATCH 1/2] bpf: fix 'struct pt_reg' typo in documentation

2019-08-19 Thread Peter Wu
There is no 'struct pt_reg'. Signed-off-by: Peter Wu --- include/uapi/linux/bpf.h | 6 +++--- tools/include/uapi/linux/bpf.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index fa1c753dcdbc..9c

[PATCH 2/2] bpf: clarify description for CONFIG_BPF_EVENTS

2019-08-19 Thread Peter Wu
PERF_EVENT_IOC_SET_BPF supports uprobes since v4.3, and tracepoints since v4.7 via commit 04a22fae4cbc ("tracing, perf: Implement BPF programs attached to uprobes"), and commit 98b5c2c65c29 ("perf, bpf: allow bpf programs attach to tracepoints") respectively. Signed-off-by: P

[PATCH] tools: bpftool: add feature check for zlib

2019-08-12 Thread Peter Wu
on libbpf.a. Add a similar feature check for zlib. Suggested-by: Jakub Kicinski Signed-off-by: Peter Wu --- Hi, This is a follow-up for an earlier "tools: bpftool: fix reading from /proc/config.gz" patch. It applies Jakub and Daniel suggestions from: https://lkml.kernel.org/r/6154af6c

[PATCH] tools: bpftool: add feature check for zlib

2019-08-12 Thread Peter Wu
on libbpf.a. Add a similar feature check for zlib. Suggested-by: Jakub Kicinski Signed-off-by: Peter Wu --- Hi, This is a follow-up for an earlier "tools: bpftool: fix reading from /proc/config.gz" patch. It applies Jakub and Daniel suggestions from: https://lkml.kernel.org/r/6154af6c

Re: [PATCH v3] tools: bpftool: fix reading from /proc/config.gz

2019-08-09 Thread Peter Wu
ndant. Adding an explicit dependency helps if you want to build bpftool as static binary, or if libelf somehow drops zlib in the future. -- Kind regards, Peter Wu https://lekensteyn.nl

[PATCH v3] tools: bpftool: fix reading from /proc/config.gz

2019-08-08 Thread Peter Wu
uncompressed and gzip-compressed files. Cc: Quentin Monnet Signed-off-by: Peter Wu --- v3: replace popen(gunzip) by linking directly to zlib. Reword commit message, remove "Fixes" line. (this patch) v2: fix style (reorder vars as reverse xmas tree, rename function, braces), fallbac

[PATCH v2] tools: bpftool: fix reading from /proc/config.gz

2019-08-05 Thread Peter Wu
: 4567b983f78c ("tools: bpftool: add probes for kernel configuration options") Cc: Quentin Monnet Signed-off-by: Peter Wu --- v2: fix style (reorder vars as reverse xmas tree, rename function, braces), fallback to /proc/config.gz if uname() fails. Hi, Although Stanislav and Jakub sugges

Re: [PATCH] tools: bpftool: fix reading from /proc/config.gz

2019-08-05 Thread Peter Wu
> Can we have an option set multiple times in the config file? If so, > maybe have a p_info() if values are different to warn users that > conflicting values were found? scripts/kconfig/merge_config.sh seems to apply a merge strategy, overwriting earlier values and warning about it. However

[PATCH] tools: bpftool: fix reading from /proc/config.gz

2019-08-04 Thread Peter Wu
: 4567b983f78c ("tools: bpftool: add probes for kernel configuration options") Cc: Quentin Monnet Signed-off-by: Peter Wu --- tools/bpf/bpftool/feature.c | 92 + 1 file changed, 52 insertions(+), 40 deletions(-) diff --git a/tools/bpf/bpftool/feature.c b

Re: [PATCH] tcp: ensure non-empty connection request queue

2016-05-04 Thread Peter Wu
On Tue, May 03, 2016 at 05:25:44PM -0700, Eric Dumazet wrote: > On Tue, 2016-05-03 at 23:54 +0200, Peter Wu wrote: > > When applications use listen() with a backlog of 0, the kernel would > > set the maximum connection request queue to zero. This causes false > > report

[PATCH] tcp: ensure non-empty connection request queue

2016-05-03 Thread Peter Wu
: ef547f2ac16b ("tcp: remove max_qlen_log") Signed-off-by: Peter Wu --- Hi, This patch fixes a regression from Linux 4.4. Use of "qemu-arm -g 1234" would trigger the following warning in dmesg: TCP: request_sock_TCP: Possible SYN flooding on port 1234. Sending cookies. Check

Re: [PATCH v2] r8152: fix lockup when runtime PM is enabled

2015-12-08 Thread Peter Wu
On Tue, Dec 08, 2015 at 12:39:12PM +, Hayes Wang wrote: > Peter Wu [mailto:pe...@lekensteyn.nl] > > Sent: Tuesday, December 08, 2015 7:18 PM > > > > When an interface is brought up which was previously suspended (via > > runtime PM), it would hang. This happens bec

[PATCH v2] r8152: fix lockup when runtime PM is enabled

2015-12-08 Thread Peter Wu
is up, rtl8152_open is not called. - When link is down during system/auto suspend/resume, it is not set. Fixes: 41cec84cf285 ("r8152: don't enable napi before rx ready") Link: https://lkml.kernel.org/r/20151205105912.GA1766@al Signed-off-by: Peter Wu --- v2: moved rtl_runtime_susp

Re: [PATCH] r8152: fix lockup when runtime PM is enabled

2015-12-08 Thread Peter Wu
On Tue, Dec 08, 2015 at 03:18:59AM +, Hayes Wang wrote: > Peter Wu > > Sent: Tuesday, December 08, 2015 12:59 AM > [...] > > + if (tp->netdev->flags & IFF_UP) { > > Maybe you could just replace the checking of netif_running(tp->n

[PATCH] r8152: fix lockup when runtime PM is enabled

2015-12-07 Thread Peter Wu
api before rx ready") Link: https://lkml.kernel.org/r/20151205105912.GA1766@al Signed-off-by: Peter Wu --- drivers/net/usb/r8152.c | 23 +++ 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index d9427ca..b8b08

Re: (4.3.0) r8152: deadlock related to runtime suspend?

2015-12-07 Thread Peter Wu
On Mon, Dec 07, 2015 at 07:08:50PM +0800, Lu Baolu wrote: > > > On 12/07/2015 05:37 PM, Peter Wu wrote: > > On Mon, Dec 07, 2015 at 05:11:50PM +0800, Lu Baolu wrote: > >> Hi Peter, > >> > >> Have you ever tried disabling auto-pm? Did things go smoothly

Re: (4.3.0) r8152: deadlock related to runtime suspend?

2015-12-07 Thread Peter Wu
ning (when trying to bring an interface down if I remember correctly). Its trace can be found on the bottom of this mail. I'll keep testing. For the lockdep warning, my initial guess is that calling schedule_delayed_work_sync under tp->lock is a bad idea because scheduled work can execu

[PATCH v2] rtlwifi: fix memory leak for USB device

2015-12-06 Thread Peter Wu
-off-by: Peter Wu --- v2: updated commit message based on Larry's feedback v1: https://lkml.kernel.org/r/1449424677-3140-1-git-send-email-pe...@lekensteyn.nl Tested with v4.3, rebased on v4.4-rc3 (changed paths). The bug goes back to its introduction in the v2.6.x kernel. --- drivers/net/wir

Re: [PATCH] rtlwifi: fix gigantic memleak in rtl_usb

2015-12-06 Thread Peter Wu
On Sun, Dec 06, 2015 at 02:18:36PM -0600, Larry Finger wrote: > On 12/06/2015 11:57 AM, Peter Wu wrote: > >Free skb for received frames with a wrong checksum. > > > >While using the rtl8192cu driver in monitor mode, somehow 5G of memory > >was permanently lost (observab

[PATCH] rtlwifi: fix gigantic memleak in rtl_usb

2015-12-06 Thread Peter Wu
iw wlan1 set channel 11 Then stream a video on a smartphone on channel 11. Without this patch the memory usage grows linearly with the number of received packets: grep MemAvailable /proc/meminfo ip -s link show dev wlan1 Signed-off-by: Peter Wu --- Hi, This issue has existed since the

(4.3.0) r8152: deadlock related to runtime suspend?

2015-12-05 Thread Peter Wu
or all devices). This is the USB 3.0 port: 02:00.0 USB controller [0c03]: NEC Corporation uPD720200 USB 3.0 Host Controller [1033:0194] (rev 03) -- Kind regards, Peter Wu https://lekensteyn.nl Dec 05 00:32:58 al kernel: usb 3-1: USB disconnect, device number 4 Dec 05 00:34:43 al NetworkManag