Re: [PATCH v6] checkpatch: add support to check 'Fixes:' tag format

2020-05-22 Thread Wang YanQing
On Mon, May 04, 2020 at 11:34:31AM -0700, Joe Perches wrote: > On Mon, 2020-05-04 at 16:20 +0800, Wang YanQing wrote: > > According to submitting-patches.rst, 'Fixes:' tag has a little > > stricter condition about the one line summary than normal git > > commit d

Re: [PATCH v6] checkpatch: add support to check 'Fixes:' tag format

2020-05-04 Thread Wang YanQing
On Mon, May 04, 2020 at 11:45:02AM +0200, Markus Elfring wrote: > > > 4: Add support to check and emit sensible diagnostics > > info for description which spans across more than > > two lines. > > My software concerns are growing also for the preferred dependency management. > https://gi

[PATCH v6] checkpatch: add support to check 'Fixes:' tag format

2020-05-04 Thread Wang YanQing
diagnostics info support for normal git commit description format check. Based on original patch by Joe Perches Link: https://lore.kernel.org/lkml/40bfc40958fca6e2cc9b86101153aa0715fac4f7.ca...@perches.com/ Signed-off-by: Wang YanQing --- v6: 1: Fix indentation issue. 2: Fix a typo issue, repo

[PATCH v2] checkpatch: allow commit description spans across three lines

2020-05-04 Thread Wang YanQing
s three lines, see above examples. This patch adds support to recognize commit description which spans across three lines, then it will not emit error message for such situation. Signed-off-by: Wang YanQing --- Hi! Joe I have tested with below command: git log -1 --format=%H -i --grep=

Re: [PATCH v5] checkpatch: add support to check 'Fixes:' tag format

2020-05-03 Thread Wang YanQing
On Sun, May 03, 2020 at 03:51:39PM +0200, Markus Elfring wrote: > > > … > > + $diagnostics .= "The title is too > > abbreviated, at least half of orignial commit title is necessary.\n"; > > Will the word “original” be more appropriate here? > (Why did you not i

[PATCH v5] checkpatch: add support to check 'Fixes:' tag format

2020-05-03 Thread Wang YanQing
diagnostics info support for normal git commit description format check. Based on original patch by Joe Perches Link: https://lore.kernel.org/lkml/40bfc40958fca6e2cc9b86101153aa0715fac4f7.ca...@perches.com/ Signed-off-by: Wang YanQing --- Hi! Joe and all. This is the v5 version, and I have t

[PATCH] checkpatch: add support for title acrosses three lines in commit id description

2020-05-03 Thread Wang YanQing
ption, and emit diagnostics info when the title acrosses more than three lines. Signed-off-by: Wang YanQing --- Hi! Joe This is the third patch based on previous two patches. Thanks. scripts/checkpatch.pl | 30 +- 1 file changed, 21 insertions(+), 9 deletions(-

Re: [PATCH v4] checkpatch: add support to check 'Fixes:' tag format

2020-05-03 Thread Wang YanQing
On Sat, May 02, 2020 at 09:40:24PM +0200, Markus Elfring wrote: > > > > + $diagnostics .= "Missing a pair of parentheses > > '()' or a pair of double quotation marks (\"\").\n"; > > Can such a message trigger any more thoughts and development ideas? No, I don't think

[PATCH v2] checkpatch: fix can't check for too long invalid commit id

2020-05-03 Thread Wang YanQing
ription to GIT_COMMIT_ID, and uses ERROR instead of WARN, because unknown commit id is total useless to track change history in changelog, it deserves the ERROR. Signed-off-by: Wang YanQing --- v2: 1: Fix annonying "Invalid commit id" reports for non commit id number string. 2:

[PATCH] checkpatch: fix can't check for too long invalid commit id

2020-05-02 Thread Wang YanQing
ription to GIT_COMMIT_ID, and uses ERROR instead of WARN, because unknown commit id is total useless to track change history in changelog, it deserves the ERROR. Signed-off-by: Wang YanQing --- After this patch, in another patch 'checkpatch: add support to check 'Fixes:' ta

[PATCH v4] checkpatch: add support to check 'Fixes:' tag format

2020-05-02 Thread Wang YanQing
ts double quotation mark in title line, for example: Commit e33e2241e272 ("Revert "cfg80211: Use 5MHz bandwidth by default when checking usable channels"") Note: this patch also adds diagnostics info support for normal git commit description format

Re: [PATCH v3] checkpatch: add support to check 'Fixes:' tag format

2020-05-01 Thread Wang YanQing
On Fri, May 01, 2020 at 08:57:42AM -0700, Joe Perches wrote: > On Fri, 2020-05-01 at 23:40 +0800, Wang YanQing wrote: > > According to submitting-patches.rst, 'Fixes:' tag has a little > > stricter condition about the one line summary than normal git > > commit d

[PATCH v3] checkpatch: add support to check 'Fixes:' tag format

2020-05-01 Thread Wang YanQing
rmal git commit description, and now it supports double quotation mark in title line, for example: Commit e33e2241e272 ("Revert "cfg80211: Use 5MHz bandwidth by default when checking usable channels"") Based on original patch by Joe Perches Link: htt

[PATCH v2] checkpatch: add support to check 'Fixes:' tag format

2020-05-01 Thread Wang YanQing
rmal git commit description, and now it supports double quotation mark in title line, for example: Commit e33e2241e272 ("Revert "cfg80211: Use 5MHz bandwidth by default when checking usable channels"") Based on original patch by Joe Perches Link:

Re: [PATCH] checkpatch: add support to check 'Fixes:' tag format

2020-04-30 Thread Wang YanQing
On Wed, Apr 29, 2020 at 07:40:21PM +0200, Markus Elfring wrote: > > “... > > Do not split the tag across multiple > > lines, tags are exempt from the "wrap at 75 columns" rule in order to > > simplify > > parsing scripts > > ...” > > Why do you not like the reformatting of the quotation so far >

[PATCH] checkpatch: add support to check 'Fixes:' tag format

2020-04-29 Thread Wang YanQing
Perches Link: https://lore.kernel.org/lkml/40bfc40958fca6e2cc9b86101153aa0715fac4f7.ca...@perches.com/ Signed-off-by: Wang YanQing --- scripts/checkpatch.pl | 36 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 23a001a..879

Re: [PATCH v3] checkpatch: add dedicated checker for 'Fixes:' tag

2020-04-29 Thread Wang YanQing
On Tue, Apr 28, 2020 at 12:52:59PM +0200, Markus Elfring wrote: > > And there is no 'Fixes:' tag format checker in checkpatch > > I have taken another look at corresponding implementation details. > Will programming challenges get any more attention? > > > > to check the commit id length too, >

Re: [PATCH v3] checkpatch: add dedicated checker for 'Fixes:' tag

2020-04-28 Thread Wang YanQing
On Tue, Apr 28, 2020 at 08:21:37AM +0200, Markus Elfring wrote: > > ... > > Do not split the tag across multiple > > lines, tags are exempt from the "wrap at 75 columns" rule in order to > > simplify > > parsing scripts > > ... > > I suggest to reformat the quotation. > > “… > Do not split the t

Re: [PATCH] selftests/bpf: fix compile errors with older glibc

2019-04-18 Thread Wang YanQing
On Thu, Apr 18, 2019 at 05:09:53AM +, Yonghong Song wrote: > > > On 4/17/19 10:48 AM, Wang YanQing wrote: > > The older glibc (for example, 2.23) doesn't handle __UAPI_DEF_* > > in libc-compat.h properly, and it bring below compile errors: > > I have an

[PATCH v2] fix compile errors due to unsync linux/in6.h and netinet/in.h

2019-04-18 Thread Wang YanQing
patch fixes the compile errors by moving to before the . Signed-off-by: Wang YanQing --- Changes v1-v2: 1:Rewrite the changelog. tools/testing/selftests/bpf/progs/test_tcpbpf_kern.c| 2 +- tools/testing/selftests/bpf/progs/test_tcpnotify_kern.c | 2 +- 2 files changed, 2 insertions(+

Re: [PATCH] selftests/bpf: fix compile errors with older glibc

2019-04-18 Thread Wang YanQing
On Thu, Apr 18, 2019 at 05:09:53AM +, Yonghong Song wrote: > > > On 4/17/19 10:48 AM, Wang YanQing wrote: > > The older glibc (for example, 2.23) doesn't handle __UAPI_DEF_* > > in libc-compat.h properly, and it bring below compile errors: > > I have an

[PATCH] selftests/bpf: fix compile errors with older glibc

2019-04-17 Thread Wang YanQing
usr/include/linux/in6.h:133:26: note: expanded from macro 'IPPROTO_FRAGMENT' " The same compile errors are reported for test_tcpbpf_kern.c too. This patch fixes the compile errors by moving to before the . Signed-off-by: Wang YanQing --- tools/testing/selftests/bpf/progs/test_tcp

[PATCH] bpf, x32: Fix regression caused by commit 24dea04767e6

2018-07-25 Thread Wang YanQing
fix it. Fixes: 24dea04767e6 ("bpf, x32: remove ld_abs/ld_ind") Signed-off-by: Wang YanQing --- arch/x86/net/bpf_jit_comp32.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/net/bpf_jit_comp32.c b/arch/x86/net/bpf_jit_comp32.c index 5579987..8f6cc71

[PATCH v2] bpf, arm32: Correct check_imm24

2018-05-10 Thread Wang YanQing
imm24 is signed, so the right range is: [-(1<<(24 - 1)), (1<<(24 - 1)) - 1] Note:this patch also fix a typo. Signed-off-by: Wang YanQing --- Changes v1-v2: 1:Rewrite the patch, I make a mistake, the v1 is wrong totally, reported by Russell King. I use the fix suggested by

[PATCH v2] bpf, arm32: Fix inconsistent naming about emit_a32_lsr_r64|emit_a32_lsr_i64

2018-05-10 Thread Wang YanQing
ff-by: Wang YanQing --- Changes v1-v2: 1:Rewords the changelog. arch/arm/net/bpf_jit_32.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index b5030e1..caccc78 100644 --- a/arch/arm/net/bpf_jit_32.c +++ b/arc

Re: [PATCH] bpf, arm32: Correct check_imm24

2018-05-10 Thread Wang YanQing
On Thu, May 10, 2018 at 08:56:57AM +0100, Russell King - ARM Linux wrote: > On Thu, May 10, 2018 at 11:20:13AM +0800, Wang YanQing wrote: > > imm24 is signed, so the right range is: > > [-(2<<(24 - 1)), (2<<(24 - 1)) - 1] > > 2 << (24 - 1) is the same as

[PATCH] bpf, arm32: Correct check_imm24

2018-05-09 Thread Wang YanQing
imm24 is signed, so the right range is: [-(2<<(24 - 1)), (2<<(24 - 1)) - 1] Note:this patch also fix a typo. Signed-off-by: Wang YanQing --- arch/arm/net/bpf_jit_32.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/arch/arm/net/bpf_jit_32.c b/

[PATCH] bpf, arm32: Fix inconsistent naming about emit_a32_lsr_r64|emit_a32_lsr_i64

2018-05-09 Thread Wang YanQing
The reasonable names for emit_a32_lsr_r64|emit_a32_lsr_i64 are emit_a32_rsh_r64|emit_a32_rsh_i64. This patch also correct a wrong comment. Signed-off-by: Wang YanQing --- arch/arm/net/bpf_jit_32.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/net

[PATCH] bpf, doc: clarification for the meaning of 'id'

2018-05-09 Thread Wang YanQing
For me, as a reader whose mother language isn't English, the old words bring a little difficulty to catch the meaning, this patch rewords the subsection in a more clarificatory way. This patch also add blank lines as separator at two places to improve readability. Signed-off-by: Wang Ya

[PATCH v5] block: add verifier for cmdline partition

2018-05-09 Thread Wang YanQing
error: " Caizhiyong said: Partition overlap was intentionally designed in this cmdline partition. reference http://lists.infradead.org/pipermail/linux-mtd/2013-August/048092.html " Signed-off-by: Wang YanQing --- Changes v4-v5: 1:Delete unnecessary blank line at begin and end of

[PATCH v4] block: add verifier for cmdline partition

2018-05-07 Thread Wang YanQing
error: " Caizhiyong said: Partition overlap was intentionally designed in this cmdline partition. reference http://lists.infradead.org/pipermail/linux-mtd/2013-August/048092.html " Signed-off-by: Wang YanQing --- Changes v3-v4: 1:Fix grammar typo, reported by Randy Dunlap. 2:Delete u

Re: [PATCH] bpf: fix misaligned access for BPF_PROG_TYPE_PERF_EVENT program type on x86_32 platform

2018-05-07 Thread Wang YanQing
On Sat, Apr 28, 2018 at 01:29:17PM +0800, Wang YanQing wrote: > On Sat, Apr 28, 2018 at 01:33:15AM +0200, Daniel Borkmann wrote: > > On 04/28/2018 12:48 AM, Alexei Starovoitov wrote: > > > On Thu, Apr 26, 2018 at 05:57:49PM +0800, Wang YanQing wrote: > >

[PATCH v3] block: add verifier for cmdline partition

2018-05-05 Thread Wang YanQing
I meet strange filesystem corruption issue recently, the reason is there are overlaps partitions in cmdline partition argument. This patch add verifier for cmdline partition, then if there are overlaps partitions, cmdline_partition will log a warning. Signed-off-by: Wang YanQing --- Changes

[PATCH v2] block: add verifier for cmdline partition

2018-05-05 Thread Wang YanQing
error: " Caizhiyong said: Partition overlap was intentionally designed in this cmdline partition. reference http://lists.infradead.org/pipermail/linux-mtd/2013-August/048092.html " Signed-off-by: Wang YanQing --- Changes v1-v2: 1:Don't treat overlaps partition as a error, but lo

[PATCH] block: add verifier for cmdline partition

2018-05-03 Thread Wang YanQing
I meet strange filesystem corruption issue recently, the reason is there are overlaps partitions in cmdline partition argument. This patch add verifier for cmdline partition, then if there are overlaps partitions, cmdline_partition will return error and log a error message. Signed-off-by: Wang

[PATCH v6] bpf, x86_32: add eBPF JIT compiler for ia32

2018-05-02 Thread Wang YanQing
% improvement. See Documentation/networking/filter.txt for more information. Signed-off-by: Wang YanQing --- Changes v5-v6: 1:Add do {} while (0) to RETPOLINE_RAX_BPF_JIT for consistence reason. 2:Clean up non-standard comments, reported by Daniel Borkmann. 3:Fix a memory leak issue

[PATCH v5] bpf, x86_32: add eBPF JIT compiler for ia32

2018-04-29 Thread Wang YanQing
% improvement. See Documentation/networking/filter.txt for more information. Signed-off-by: Wang YanQing --- Changes v4-v5: 1:Delete is_on_stack, BPF_REG_AX is the only one on real hardware registers, so just check with it. 2:Apply commit 1612a981b766 ("bpf, x64: fix JIT e

Re: [PATCH] bpf: fix misaligned access for BPF_PROG_TYPE_PERF_EVENT program type on x86_32 platform

2018-04-27 Thread Wang YanQing
On Sat, Apr 28, 2018 at 01:33:15AM +0200, Daniel Borkmann wrote: > On 04/28/2018 12:48 AM, Alexei Starovoitov wrote: > > On Thu, Apr 26, 2018 at 05:57:49PM +0800, Wang YanQing wrote: > >> All the testcases for BPF_PROG_TYPE_PERF_EVENT program type in > >> test_verif

[PATCH v4] bpf, x86_32: add eBPF JIT compiler for ia32

2018-04-26 Thread Wang YanQing
% improvement. See Documentation/networking/filter.txt for more information. Signed-off-by: Wang YanQing --- Changes v3-v4: 1:Fix changelog in commit. I install llvm-6.0, then test_progs willn't report errors. I submit another patch: "bpf: fix misaligned access for BPF_PROG_TY

[PATCH] bpf: fix misaligned access for BPF_PROG_TYPE_PERF_EVENT program type on x86_32 platform

2018-04-26 Thread Wang YanQing
This patch fix it, the fix isn't only necessary for x86_32, it will fix the same problem for other platforms too, if their size of bpf_user_pt_regs_t can't divide exactly into 8. Signed-off-by: Wang YanQing --- Hi all! After mainline accept this patch, then we need to submit a sync

Re: [PATCH v2] bpf, x86_32: add eBPF JIT compiler for ia32

2018-04-25 Thread Wang YanQing
On Wed, Apr 25, 2018 at 02:11:16AM +0200, Daniel Borkmann wrote: > On 04/19/2018 05:54 PM, Wang YanQing wrote: > > Testing results on i5-5200U: > > > > 1) test_bpf: Summary: 349 PASSED, 0 FAILED, [319/341 JIT'ed] > > 2) test_progs: Summary: 81 PASSED, 2 FAILED.

[PATCH v3] bpf, x86_32: add eBPF JIT compiler for ia32

2018-04-25 Thread Wang YanQing
test_pkt_access:PASS:ipv6:5092/100=50 test_xdp:PASS:ipv4:131902/100=1319 test_xdp:PASS:ipv6:77932/100=779 test_l4lb:PASS:ipv4:38924/100=389 test_l4lb:PASS:ipv6:57520/100=575 The numbers show we get 30%~50% improvement. See Documentation/networking/filter.txt for more information. Signed-off-by: Wa

Re: [PATCH v2] bpf, x86_32: add eBPF JIT compiler for ia32

2018-04-25 Thread Wang YanQing
On Wed, Apr 25, 2018 at 02:11:16AM +0200, Daniel Borkmann wrote: > On 04/19/2018 05:54 PM, Wang YanQing wrote: > > The JIT compiler emits ia32 bit instructions. Currently, It supports > > eBPF only. Classic BPF is supported because of the conversion by BPF core. > > > &

[PATCH v2] bpf, x86_32: add eBPF JIT compiler for ia32

2018-04-19 Thread Wang YanQing
turn off jit_harden, if we want to speedup jit_harden, then we need to move BPF_REG_AX to *real* register instead of stack emulation, but when we do it, we need to face all the pain I describe above. We can do it in next step. See Documentation/networking/filter.txt for more information.

Re: [PATCH] bpf, x86_32: add eBPF JIT compiler for ia32 (x86_32)

2018-04-18 Thread Wang YanQing
On Wed, Apr 18, 2018 at 05:31:18PM +0800, Wang YanQing wrote: > The JIT compiler emits ia32 bit instructions. Currently, It supports > eBPF only. Classic BPF is supported because of the conversion by BPF core. > > Almost all instructions from eBPF ISA supported except the following:

[PATCH] bpf, x86_32: add eBPF JIT compiler for ia32 (x86_32)

2018-04-18 Thread Wang YanQing
but If we do it, we need to face all the pain I describe above. We can do it in next step. See Documentation/networking/filter.txt for more information. Signed-off-by: Wang YanQing --- arch/x86/Kconfig |2 +- arch/x86/include/asm/nospec-branch.h | 26 +- arch/x86/

[tip:perf/core] perf report: Provide libtraceevent with a kernel symbol resolver

2018-03-09 Thread tip-bot for Wang YanQing
Commit-ID: ea85ab24c502720d2eb3dec30bedb6df06d4900b Gitweb: https://git.kernel.org/tip/ea85ab24c502720d2eb3dec30bedb6df06d4900b Author: Wang YanQing AuthorDate: Thu, 8 Mar 2018 11:28:50 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 8 Mar 2018 11:30:51 -0300 perf report

[PATCH v3] perf report: Provide libtraceevent with a kernel symbol resolver

2018-03-07 Thread Wang YanQing
(aa_alloc_task_context+0x27) call_site=81370b87 ptr=0x428a3060 bytes_req=32 bytes_alloc=32 gfp_flags=GFP_KERNEL|GFP_ZERO 0.01% (__tty_buffer_request_room+0x88) call_site=814e5828 ptr=0x99bb000 bytes_req=3616 bytes_alloc=4096 gfp_flags=GFP_ATOMIC Signed-off-by: Wang YanQing Acked-by

[PATCH v2] perf report: Provide libtraceevent with a kernel symbol resolver

2018-03-07 Thread Wang YanQing
(aa_alloc_task_context+0x27) call_site=81370b87 ptr=0x428a3060 bytes_req=32 bytes_alloc=32 gfp_flags=GFP_KERNEL|GFP_ZERO 0.01% (__tty_buffer_request_room+0x88) call_site=814e5828 ptr=0x99bb000 bytes_req=3616 bytes_alloc=4096 gfp_flags=GFP_ATOMIC Signed-off-by: Wang YanQing Acked-by:

Re: [PATCH] perf report: Provide libtraceevent with a kernel symbol resolver

2018-03-05 Thread Wang YanQing
On Thu, Feb 08, 2018 at 01:20:31PM +0100, Jiri Olsa wrote: > On Mon, Jan 15, 2018 at 12:47:32PM +0800, Wang YanQing wrote: > > So that beautifiers wanting to resolve kernel function addresses to > > names can do its work, and when we use "perf report" for output of > &

[PATCH] bpf, doc: Correct one wrong value in "Register value tracking"

2018-01-24 Thread Wang YanQing
If we then OR this with 0x40, then the value of 6th bit (0th is first bit) become known, so the right mask is 0xbf instead of 0xcf. Signed-off-by: Wang YanQing --- Documentation/networking/filter.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/networking

[tip:perf/core] perf symbols: Using O_CLOEXEC in do_open

2018-01-24 Thread tip-bot for Wang YanQing
Commit-ID: 4c0d8d27954d9efb2a02ec9fc16f39b02f248bb7 Gitweb: https://git.kernel.org/tip/4c0d8d27954d9efb2a02ec9fc16f39b02f248bb7 Author: Wang YanQing AuthorDate: Mon, 15 Jan 2018 13:04:48 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 23 Jan 2018 09:49:28 -0300 perf symbols

Re: [PATCH] perf report: Provide libtraceevent with a kernel symbol resolver

2018-01-21 Thread Wang YanQing
On Fri, Jan 19, 2018 at 07:57:59PM +0100, Jiri Olsa wrote: > On Thu, Jan 18, 2018 at 10:22:30PM +0800, Wang YanQing wrote: > > On Thu, Jan 18, 2018 at 10:43:18AM +0100, Jiri Olsa wrote: > > > On Wed, Jan 17, 2018 at 12:48:12AM +0800, Wang YanQing wrote: > > > > On M

Re: [PATCH] perf report: Provide libtraceevent with a kernel symbol resolver

2018-01-18 Thread Wang YanQing
On Thu, Jan 18, 2018 at 10:43:18AM +0100, Jiri Olsa wrote: > On Wed, Jan 17, 2018 at 12:48:12AM +0800, Wang YanQing wrote: > > On Mon, Jan 15, 2018 at 11:06:11AM +0100, Jiri Olsa wrote: > > > On Mon, Jan 15, 2018 at 12:47:32PM +0800, Wang YanQing wrote: > > > >

Re: [PATCH] perf report: Provide libtraceevent with a kernel symbol resolver

2018-01-16 Thread Wang YanQing
On Mon, Jan 15, 2018 at 11:06:11AM +0100, Jiri Olsa wrote: > On Mon, Jan 15, 2018 at 12:47:32PM +0800, Wang YanQing wrote: > > So that beautifiers wanting to resolve kernel function addresses to > > names can do its work, and when we use "perf report" for output of > &

Re: [PATCH] perf:util:dso: Using O_CLOEXEC in do_open

2018-01-16 Thread Wang YanQing
On Mon, Jan 15, 2018 at 10:45:06AM +0100, Jiri Olsa wrote: > On Mon, Jan 15, 2018 at 01:04:48PM +0800, Wang YanQing wrote: > > I meet strange behavior with below commands on my gentoo box: > > 1:perf kmem record > > 2:CTRL-C to stop 1 > > 3:perf report > > 4:"

[PATCH] perf:util:dso: Using O_CLOEXEC in do_open

2018-01-14 Thread Wang YanQing
en "script_browse" uses popen to run "perf script" which run out of open files. The gentoo box has a small default value for "max open files", 1024. Yes, "ulimit -n " with a bigger number could fix it, but I think that using O_CLOEXEC in do_open is a better way

[PATCH] tools/lib/traceevent/event-parse: delete pevent_register_function

2018-01-14 Thread Wang YanQing
After commit 4263cece22e3da94f16fbbcf71ce3807946d3ef3 ("perf tools: Stop reading the kallsyms data from perf.data"), there is no users of pevent_register_function in tree, so we could just delete it. Signed-off-by: Wang YanQing --- tools/lib/traceevent/event-par

[PATCH] perf report: Provide libtraceevent with a kernel symbol resolver

2018-01-14 Thread Wang YanQing
So that beautifiers wanting to resolve kernel function addresses to names can do its work, and when we use "perf report" for output of "perf kmem record", we will get kernel symbol output. Signed-off-by: Wang YanQing --- tools/perf/builtin-report.c | 9 + 1 file c

[PATCH v2] ALSA: hda: Fix forget to free resource in error handling code path in hda_codec_driver_probe

2017-09-04 Thread Wang YanQing
When hda_codec_driver_probe meet error and return failure, we need to free resource with patch_ops.free, or we will get resource leak. Signed-off-by: Wang YanQing --- Changes v1-v2: 1: Fix calling patch_ops.free after module_put, reported by Takashi Iwai. Hi! Takashi Iwai Because the only

Re: [PATCH] ALSA: hda: Fix resource leak issue in snd_hda_codec_build_controls and snd_hda_codec_parse_pcms

2017-09-03 Thread Wang YanQing
On Sun, Sep 03, 2017 at 11:27:31PM +0800, Wang YanQing wrote: > When patch_ops.init, patch_ops.build_pcms and patch_ops.build_controls > return failure, we need to free resource with patch_ops.free, or we will > get resource leak. > > Signed-off-by: Wang YanQing > --

[PATCH] ALSA: hda: Fix resource leak issue in snd_hda_codec_build_controls and snd_hda_codec_parse_pcms

2017-09-03 Thread Wang YanQing
When patch_ops.init, patch_ops.build_pcms and patch_ops.build_controls return failure, we need to free resource with patch_ops.free, or we will get resource leak. Signed-off-by: Wang YanQing --- sound/pci/hda/hda_codec.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a

[PATCH] ALSA: hda: Fix forget to free resource in error handling code path in hda_codec_driver_probe

2017-09-03 Thread Wang YanQing
When hda_codec_driver_probe meet error and return failure, we need to free resource with patch_ops.free, or we will get resource leak. Signed-off-by: Wang YanQing --- sound/pci/hda/hda_bind.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/pci/hda/hda_bind.c b/sound/pci/hda

[PATCH] ALSA: hda: Fix assign invalid fixed slots pcm numbers to HDA_PCM_TYPE_HDMI in get_empty_pcm_device

2017-09-03 Thread Wang YanQing
umber is 7, and the first non-fixed slot is 8. Signed-off-by: Wang YanQing --- sound/pci/hda/hda_codec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 3db26c4..df6b57e 100644 --- a/sound/pci/hda/hda_codec.c +++ b

[PATCH] ALSA: hda: Fix regression of hdmi eld control created based on invalid pcm

2017-09-03 Thread Wang YanQing
atch add invalid pcm number filter before calling hdmi_create_eld_ctl. Fixes: fb087eaaef72 ("ALSA: hda - hdmi eld control created based on pcm") Signed-off-by: Wang YanQing --- sound/pci/hda/hda_codec.c | 4 +++- sound/pci/hda/hda_codec.h | 1 + sound/pci/hda/patch_hdmi.c | 14 +

[PATCH] tty:tty_ldisc: add tty_ldisc_lock|unlock to prevent concurrent update to ldisc in tty_ldisc_deinit

2017-04-09 Thread Wang YanQing
This patch could fix the issue that free_tty_struct in tty_io calling tty_ldisc_deinit without holding tty->ldisc_sem. Signed-off-by: Wang YanQing --- drivers/tty/tty_ldisc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c index b1f7

[PATCH] tty:tty_ldisc: add tty_ldisc_lock|unlock to prevent concurrent update to ldisc in tty_ldisc_reinit

2017-04-09 Thread Wang YanQing
This patch could fix the issue that tty_reopen in tty_io calling tty_ldisc_reinit without holding tty->ldisc_sem. Signed-off-by: Wang YanQing --- drivers/tty/tty_ldisc.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/drivers/tty/tty_ldisc.

Re: tty crash in tty_ldisc_receive_buf()

2017-04-06 Thread Wang YanQing
On Thu, Apr 06, 2017 at 05:04:41PM +1000, Michael Neuling wrote: > Hi all, > > We are seeing the following crash (in linux-next but has been around since at > least v4.10). > > [  417.514499] Unable to handle kernel paging request for data at address > 0x2260 > [  417.515361] Faulting instr

[PATCH v3] tty: pty: Fix ldisc flush after userspace become aware of the data already

2017-02-22 Thread Wang YanQing
s current pty_flush_buffer. Fixes: 1d1d14da12e7 ("pty: Fix buffer flush deadlock") CC: sta...@vger.kernel.org # v4.0+ Signed-off-by: Wang YanQing --- changes: v2-v3: 1: Rewrite the oneline description, subject, again. 2: Reword changelog. Please let me know if your reply is NACK :) d

[tip:perf/core] perf scripting perl: Fix compile error with some perl5 versions

2017-02-13 Thread tip-bot for Wang YanQing
Commit-ID: d7dd112ea5cacf91ae72c0714c3b911eb6016fea Gitweb: http://git.kernel.org/tip/d7dd112ea5cacf91ae72c0714c3b911eb6016fea Author: Wang YanQing AuthorDate: Sun, 12 Feb 2017 10:46:55 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 13 Feb 2017 17:22:32 -0300 perf

[PATCH] tools:perf:scripting-engines: Fix compile error with some perl5 versions

2017-02-11 Thread Wang YanQing
rrors After digging perl5 repository, I find out that we will meet this compile error with perl from v5.21.1 to v5.25.4 Signed-off-by: Wang YanQing --- tools/perf/util/scripting-engines/Build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/scripting-engines/Buil

[PATCH v2] tty: pty: Fix flush ldisc after userspace see the data already

2017-02-11 Thread Wang YanQing
2:CTRL-C Fixes: 1d1d14da12e7 ("pty: Fix buffer flush deadlock") CC: sta...@vger.kernel.org # v4.0+ Signed-off-by: Wang YanQing --- Changes: v1-v2: 1: Rewrite the oneline description, subject. 2: Reword changelog. drivers/tty/pty.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-)

[PATCH] tty: pty: don't flush line discipline of another side in pty_flush_buffer

2017-02-05 Thread Wang YanQing
es in konsole with kernel has commit 1d1d14da12e79a6c05fbe1a975401f0f56c93316 ("pty: Fix buffer flush deadlock") which bring this behavior: 1:cat BigFile 2:CTRL-C Signed-off-by: Wang YanQing --- drivers/tty/pty.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/driv

[PATCH v2] rtlwifi: pci: use dev_kfree_skb_irq instead of kfree_skb in rtl_pci_reset_trx_ring

2016-05-06 Thread Wang YanQing
/0x80 [ 7612.095832] [] do_fast_syscall_32+0x84/0x120 [ 7612.095839] [] sysenter_past_esp+0x36/0x55 [ 7612.095844] ---[ end trace 97e9c637a20e8348 ]--- Signed-off-by: Wang YanQing Cc: Stable --- Changes: v1-v2: 1: add a Cc to stable. drivers/net/wireless/realtek/rtlwifi/pci.c | 2 +- 1

[PATCH] rtlwifi: pci: use dev_kfree_skb_irq instead of kfree_skb in rtl_pci_reset_trx_ring

2016-05-05 Thread Wang YanQing
/0x80 [ 7612.095832] [] do_fast_syscall_32+0x84/0x120 [ 7612.095839] [] sysenter_past_esp+0x36/0x55 [ 7612.095844] ---[ end trace 97e9c637a20e8348 ]--- Signed-off-by: Wang YanQing --- drivers/net/wireless/realtek/rtlwifi/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dr

[PATCH v2] rtlwifi: Remove double check for cnt_after_linked

2016-05-05 Thread Wang YanQing
rtl_lps_enter does two successive check for cnt_after_linked to make sure some time has elapsed after linked. The second check isn't necessary, because if cnt_after_linked is bigger than 5, it is bigger than 2 of course! This patch remove the second check code. Signed-off-by: Wang Ya

[tip:efi/urgent] x86/sysfb_efi: Fix valid BAR address range check

2016-05-05 Thread tip-bot for Wang YanQing
Commit-ID: c10fcb14c7afd6688c7b197a814358fecf244222 Gitweb: http://git.kernel.org/tip/c10fcb14c7afd6688c7b197a814358fecf244222 Author: Wang YanQing AuthorDate: Thu, 5 May 2016 14:14:21 +0100 Committer: Ingo Molnar CommitDate: Thu, 5 May 2016 16:01:00 +0200 x86/sysfb_efi: Fix valid BAR

Re: [PATCH 2/3] x86/sysfb_efi: Fix valid BAR address range check

2016-05-04 Thread Wang YanQing
On Wed, May 04, 2016 at 08:35:24AM +0200, Ingo Molnar wrote: > > * Matt Fleming wrote: > > > From: Wang YanQing > > > > We can't just break out when meet start is equal to zero, > > Hm, wot? > > Thanks, > > Ingo Sorry for my poor En

[PATCH v2] rtlwifi: Fix logic error in enter/exit power-save mode

2016-05-02 Thread Wang YanQing
d rtl_lps_enter() to use work queue") Signed-off-by: Wang YanQing CC: Stable [3.10+] --- Hi, Larry! Because commit a269913c52ad is the first commit bring this problem, so maybe use above commit message is ok, right? And stable kernels 3.10-3.18 don't have commit fd09ff9587

[PATCH] rtlwifi:rtl_lps_enter: fix double check cnt_after_linked

2016-05-01 Thread Wang YanQing
We have checked cnt_after_linked in below code: " /*sleep after linked 10s, to let DHCP and 4-way handshake ok enough!! */ if (mac->cnt_after_linked < 5) return; " So the second check isn't necessary. This patch delete second check code. Signed-off-by: Wang YanQ

[PATCH] rtlwifi:rtl_watchdog_wq_callback: fix calling rtl_lps_enter|rtl_lps_leave in opposite condition

2016-05-01 Thread Wang YanQing
for enter/leave power state") follow previous mistake, bring us to current code. This patch fix it. Signed-off-by: Wang YanQing --- I think this patch should be ported back to stable kernels, 3.10+. In my machine, I will lost wifi connection after minutes if I enable fwlps. drivers/

[PATCH v2] x86:sysfb_efi:efifb_set_system: fix miss valid address range in later BARs

2016-04-30 Thread Wang YanQing
eak out after we find the address range is valid without test later BARs. Signed-off-by: Wang YanQing --- Due to the BUG this patch fix, I can't use video=efifb: boot parameter to get efifb on my new ThinkPad E550 for my old linux system hard disk with 3.10 kernel. In 3.10, efifb is t

[PATCH] x86:sysfb_efi:efifb_set_system: fix miss valid address range in later BARs

2016-04-10 Thread Wang YanQing
We can't just break out when meet start is equal to zero, this will cause we miss valid address range in later BARs. On the other hand, it isn't enough to test start only for below situation: 0(start) <= lfb_base < end Signed-off-by: Wang YanQing --- arch/x86/kernel/

Re: [PATCH] kbuild: support make dir/file.i for *.S

2015-12-14 Thread Wang YanQing
On Sat, Dec 12, 2015 at 02:13:03PM -0500, Brian Gerst wrote: > On Thu, Dec 10, 2015 at 11:33 AM, Wang YanQing wrote: > > This feature could reduce a little time to expand all > > the macros in *.S for reading. > > > > Signed-off-by: Wang YanQing > > --

[PATCH] Makefile: revert "Makefile: Document ability to make file.lst and file.S" partially

2015-12-10 Thread Wang YanQing
Commit 627189797807 ("Makefile: Document ability to make file.lst and file.S") document ability to make file.S, but there isn't such ability in kbuild, so revert it. Signed-off-by: Wang YanQing --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Make

[PATCH] kbuild: support make dir/file.i for *.S

2015-12-10 Thread Wang YanQing
This feature could reduce a little time to expand all the macros in *.S for reading. Signed-off-by: Wang YanQing --- Makefile | 2 ++ scripts/Makefile.build | 6 ++ 2 files changed, 8 insertions(+) diff --git a/Makefile b/Makefile index 7558c9c..d7e2060 100644 --- a/Makefile

[PATCH] Documentation: mtd: improve nand_ecc.txt for readability and correctness

2015-10-29 Thread Wang YanQing
This patch correct some representation errors, add a little clarification in some places, and fix indentation problems for pseudo code. It also delete one more white space for one place. Signed-off-by: Wang YanQing --- Documentation/mtd/nand_ecc.txt | 56

[RFC] Documentation: dontdiff: remove media from dontdiff

2015-10-29 Thread Wang YanQing
media will hide all the changes in drivers/media. Signed-off-by: Wang YanQing --- I don't know whether it is still acceptable to patch dontdiff, so I add Linus to CC list. Documentation/dontdiff | 1 - 1 file changed, 1 deletion(-) diff --git a/Documentation/dontdiff b/Document

[PATCH] [media] soc_camera: soc_camera_pdrv_probe: fix potential NULL pointer dereference

2015-09-16 Thread Wang YanQing
Move dereference of sdesc after NULL pointer checker. Signed-off-by: Wang YanQing --- drivers/media/platform/soc_camera/soc_camera.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera

[PATCH] ARM: mm: avoid unneeded page protection fault for memory range with (VM_PFNMAP|VM_PFNWRITE)

2015-09-11 Thread Wang YanQing
-off-by: Wang YanQing --- arch/arm/include/asm/mman.h | 21 + 1 file changed, 21 insertions(+) create mode 100644 arch/arm/include/asm/mman.h diff --git a/arch/arm/include/asm/mman.h b/arch/arm/include/asm/mman.h new file mode 100644 index 000..f59bbf3 --- /dev/null +++ b

[PATCH] fs:super:get_anon_bdev: fix race condition could cause dev exceed its upper limitation

2015-06-23 Thread Wang YanQing
Execution of get_anon_bdev concurrently and preemptive kernel all could bring race condition, it isn't enough to check dev against its upper limitation with equality operator only. This patch fix it. Signed-off-by: Wang YanQing --- fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 del

[PATCH v3] timekeeping: always make sure wall_to_monotonic isn't positive

2015-06-23 Thread Wang YanQing
me is 2147483647, then cache_flush always clear entries just added in ip_map_parse. In symptom 2: show_stat use "unsigned long" to print negative value return by getboottime. This patch fix the problem. Impact: You can't set the CLOCK_REALTIME time prio

Re: [PATCH v2] timekeeping: always make sure wall_to_monotonic isn't positive

2015-06-02 Thread Wang YanQing
On Mon, Jun 01, 2015 at 04:55:48PM -0700, John Stultz wrote: > On Sat, May 30, 2015 at 10:10 PM, Wang YanQing wrote: > > I meet two issues on an IMX6 development board without enable > > RTC device(so timekeeping_init will initialize the boot time > > and monotonic to 0). >

[PATCH v2] timekeeping: always make sure wall_to_monotonic isn't positive

2015-05-30 Thread Wang YanQing
on system which timekeeping_init initialize the xtime, boot and monotonic to 0 before set current time to a more reasonable time point. Signed-off-by: Wang YanQing --- Changes v1-v2: 1: fix subject, use "isn't positive" instead of "is negative". 2: rewrite

[PATCH v2]block:bounce: fix call inc_|dec_zone_page_state on different pages confuse value of NR_BOUNCE

2015-04-26 Thread Wang YanQing
and global. This patch fix it. Signed-off-by: Wang YanQing --- Changes v1-v2: fix comment issue reported by Leon Romanovsky block/bounce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/bounce.c b/block/bounce.c index ab21ba2..ed9dd80 100644 --- a/block/bounce.c +

[PATCH v2]block:bounce: fix call inc_|dec_zone_page_state on different pages confuse value of NR_BOUNCE

2015-04-26 Thread Wang YanQing
and global. This patch fix it. Signed-off-by: Wang YanQing --- Changes v1-v2: fix comment issue reported by Leon Romanovsky block/bounce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/bounce.c b/block/bounce.c index ab21ba2..ed9dd80 100644 --- a/block/bounce.c +

[PATCH] timekeeping: always make sure wall_to_monotonic is negative

2015-03-16 Thread Wang YanQing
oc/stat error: seq_printf use "unsigned long" to show a negative number return by getboottime. This patch fix it by validate new value of wall_to_monotonic before assign it. Signed-off-by: Wang YanQing --- kernel/time/timekeeping.c | 71 ++

[PATCH] net:Kconfig: drop no sense dependence entry for BONDING

2015-03-12 Thread Wang YanQing
"IPV6 || IPV6=n" means no dependence! Signed-off-by: Wang YanQing --- drivers/net/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index df51d60..37b364f 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -40,7 +40,6 @@ i

[PATCH RESEND] block:bounce: fix call inc_|dec_zone_page_state on different pages confuse value of NR_BOUNCE

2015-03-06 Thread Wang YanQing
and global. This patch fix it. Signed-off-by: Wang YanQing --- I find previous email can't be "git am" properly, so resend it. Thanks. block/bounce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/bounce.c b/block/bounce.c index ab21ba2..ed9dd80 10

[PATCH] serial:8250:8250_pci: fix redundant entry report for WCH_CH352_2S

2015-03-06 Thread Wang YanQing
Commit 8b5c913f7ee6464849570bacb6bcd9ef0eaf7dce ("serial: 8250_pci: Add WCH CH352 quirk to avoid Xscale detection") trigger one redundant entry report message. This patch fix it. Reported-by: Russell King Signed-off-by: Wang YanQing --- drivers/tty/serial/8250/8250_pci.c | 4 --

  1   2   3   >