<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/kernel, branch v5.6.12</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.6.12</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.6.12'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2020-05-10T08:32:49Z</updated>
<entry>
<title>ftrace: Fix memory leak caused by not freeing entry in unregister_ftrace_direct()</title>
<updated>2020-05-10T08:32:49Z</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2020-04-23T01:38:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f34a2ce2ae8037303c09a295f55eb79bd3006fdf'/>
<id>urn:sha1:f34a2ce2ae8037303c09a295f55eb79bd3006fdf</id>
<content type='text'>
[ Upstream commit 353da87921a5ec654e7e9024e083f099f1b33c97 ]

kmemleak reported the following:

unreferenced object 0xffff90d47127a920 (size 32):
  comm "modprobe", pid 1766, jiffies 4294792031 (age 162.568s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 22 01 00 00 00 00 ad de  ........".......
    00 78 12 a7 ff ff ff ff 00 00 b6 c0 ff ff ff ff  .x..............
  backtrace:
    [&lt;00000000bb79e72e&gt;] register_ftrace_direct+0xcb/0x3a0
    [&lt;00000000295e4f79&gt;] do_one_initcall+0x72/0x340
    [&lt;00000000873ead18&gt;] do_init_module+0x5a/0x220
    [&lt;00000000974d9de5&gt;] load_module+0x2235/0x2550
    [&lt;0000000059c3d6ce&gt;] __do_sys_finit_module+0xc0/0x120
    [&lt;000000005a8611b4&gt;] do_syscall_64+0x60/0x230
    [&lt;00000000a0cdc49e&gt;] entry_SYSCALL_64_after_hwframe+0x49/0xb3

The entry used to save the direct descriptor needs to be freed
when unregistering.

Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>tracing: Fix memory leaks in trace_events_hist.c</title>
<updated>2020-05-10T08:32:49Z</updated>
<author>
<name>Vamshi K Sthambamkadi</name>
<email>vamshi.k.sthambamkadi@gmail.com</email>
</author>
<published>2020-04-22T06:15:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=edc28823ab8f2c7fe111aac9010a149489e3ba7d'/>
<id>urn:sha1:edc28823ab8f2c7fe111aac9010a149489e3ba7d</id>
<content type='text'>
[ Upstream commit 9da73974eb9c965dd9989befb593b8c8da9e4bdc ]

kmemleak report 1:
    [&lt;9092c50b&gt;] kmem_cache_alloc_trace+0x138/0x270
    [&lt;05a2c9ed&gt;] create_field_var+0xcf/0x180
    [&lt;528a2d68&gt;] action_create+0xe2/0xc80
    [&lt;63f50b61&gt;] event_hist_trigger_func+0x15b5/0x1920
    [&lt;28ea5d3d&gt;] trigger_process_regex+0x7b/0xc0
    [&lt;3138e86f&gt;] event_trigger_write+0x4d/0xb0
    [&lt;ffd66c19&gt;] __vfs_write+0x30/0x200
    [&lt;4f424a0d&gt;] vfs_write+0x96/0x1b0
    [&lt;da59a290&gt;] ksys_write+0x53/0xc0
    [&lt;3717101a&gt;] __ia32_sys_write+0x15/0x20
    [&lt;c5f23497&gt;] do_fast_syscall_32+0x70/0x250
    [&lt;46e2629c&gt;] entry_SYSENTER_32+0xaf/0x102

This is because save_vars[] of struct hist_trigger_data are
not destroyed

kmemleak report 2:
    [&lt;9092c50b&gt;] kmem_cache_alloc_trace+0x138/0x270
    [&lt;6e5e97c5&gt;] create_var+0x3c/0x110
    [&lt;de82f1b9&gt;] create_field_var+0xaf/0x180
    [&lt;528a2d68&gt;] action_create+0xe2/0xc80
    [&lt;63f50b61&gt;] event_hist_trigger_func+0x15b5/0x1920
    [&lt;28ea5d3d&gt;] trigger_process_regex+0x7b/0xc0
    [&lt;3138e86f&gt;] event_trigger_write+0x4d/0xb0
    [&lt;ffd66c19&gt;] __vfs_write+0x30/0x200
    [&lt;4f424a0d&gt;] vfs_write+0x96/0x1b0
    [&lt;da59a290&gt;] ksys_write+0x53/0xc0
    [&lt;3717101a&gt;] __ia32_sys_write+0x15/0x20
    [&lt;c5f23497&gt;] do_fast_syscall_32+0x70/0x250
    [&lt;46e2629c&gt;] entry_SYSENTER_32+0xaf/0x102

struct hist_field allocated through create_var() do not initialize
"ref" field to 1. The code in __destroy_hist_field() does not destroy
object if "ref" is initialized to zero, the condition
if (--hist_field-&gt;ref &gt; 1) always passes since unsigned int wraps.

kmemleak report 3:
    [&lt;f8666fcc&gt;] __kmalloc_track_caller+0x139/0x2b0
    [&lt;bb7f80a5&gt;] kstrdup+0x27/0x50
    [&lt;39d70006&gt;] init_var_ref+0x58/0xd0
    [&lt;8ca76370&gt;] create_var_ref+0x89/0xe0
    [&lt;f045fc39&gt;] action_create+0x38f/0xc80
    [&lt;7c146821&gt;] event_hist_trigger_func+0x15b5/0x1920
    [&lt;07de3f61&gt;] trigger_process_regex+0x7b/0xc0
    [&lt;e87daf8f&gt;] event_trigger_write+0x4d/0xb0
    [&lt;19bf1512&gt;] __vfs_write+0x30/0x200
    [&lt;64ce4d27&gt;] vfs_write+0x96/0x1b0
    [&lt;a6f34170&gt;] ksys_write+0x53/0xc0
    [&lt;7d4230cd&gt;] __ia32_sys_write+0x15/0x20
    [&lt;8eadca00&gt;] do_fast_syscall_32+0x70/0x250
    [&lt;235cf985&gt;] entry_SYSENTER_32+0xaf/0x102

hist_fields (system &amp; event_name) are not freed

Link: http://lkml.kernel.org/r/20200422061503.GA5151@cosmos

Signed-off-by: Vamshi K Sthambamkadi &lt;vamshi.k.sthambamkadi@gmail.com&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>PM: hibernate: Freeze kernel threads in software_resume()</title>
<updated>2020-05-06T06:16:38Z</updated>
<author>
<name>Dexuan Cui</name>
<email>decui@microsoft.com</email>
</author>
<published>2020-04-24T03:40:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a19b2be507973e96bc484bee24119ce4d9f9a9a7'/>
<id>urn:sha1:a19b2be507973e96bc484bee24119ce4d9f9a9a7</id>
<content type='text'>
commit 2351f8d295ed63393190e39c2f7c1fee1a80578f upstream.

Currently the kernel threads are not frozen in software_resume(), so
between dpm_suspend_start(PMSG_QUIESCE) and resume_target_kernel(),
system_freezable_power_efficient_wq can still try to submit SCSI
commands and this can cause a panic since the low level SCSI driver
(e.g. hv_storvsc) has quiesced the SCSI adapter and can not accept
any SCSI commands: https://lkml.org/lkml/2020/4/10/47

At first I posted a fix (https://lkml.org/lkml/2020/4/21/1318) trying
to resolve the issue from hv_storvsc, but with the help of
Bart Van Assche, I realized it's better to fix software_resume(),
since this looks like a generic issue, not only pertaining to SCSI.

Cc: All applicable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Dexuan Cui &lt;decui@microsoft.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>sched/vtime: Work around an unitialized variable warning</title>
<updated>2020-05-02T06:51:02Z</updated>
<author>
<name>Borislav Petkov</name>
<email>bp@suse.de</email>
</author>
<published>2020-03-27T21:43:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=cb0986223caa3f2cc9dd8be3b556fd6f03d94f05'/>
<id>urn:sha1:cb0986223caa3f2cc9dd8be3b556fd6f03d94f05</id>
<content type='text'>
[ Upstream commit e0d648f9d883ec1efab261af158d73aa30e9dd12 ]

Work around this warning:

  kernel/sched/cputime.c: In function ‘kcpustat_field’:
  kernel/sched/cputime.c:1007:6: warning: ‘val’ may be used uninitialized in this function [-Wmaybe-uninitialized]

because GCC can't see that val is used only when err is 0.

Acked-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Link: https://lore.kernel.org/r/20200327214334.GF8015@zn.tnic
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>sched/isolation: Allow "isolcpus=" to skip unknown sub-parameters</title>
<updated>2020-05-02T06:51:02Z</updated>
<author>
<name>Peter Xu</name>
<email>peterx@redhat.com</email>
</author>
<published>2020-04-03T22:35:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7cc55e70cbe6bbbbf492805cd0af3c5fc3683cf5'/>
<id>urn:sha1:7cc55e70cbe6bbbbf492805cd0af3c5fc3683cf5</id>
<content type='text'>
[ Upstream commit 3662daf023500dc084fa3b96f68a6f46179ddc73 ]

The "isolcpus=" parameter allows sub-parameters before the cpulist is
specified, and if the parser detects an unknown sub-parameters the whole
parameter will be ignored.

This design is incompatible with itself when new sub-parameters are added.
An older kernel will not recognize the new sub-parameter and will
invalidate the whole parameter so the CPU isolation will not take
effect. It emits a warning:

    isolcpus: Error, unknown flag

The better and compatible way is to allow "isolcpus=" to skip unknown
sub-parameters, so that even if new sub-parameters are added an older
kernel will still be able to behave as usual even if with the new
sub-parameter specified on the command line.

Ideally this should have been there when the first sub-parameter for
"isolcpus=" was introduced.

Suggested-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Peter Xu &lt;peterx@redhat.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: https://lkml.kernel.org/r/20200403223517.406353-1-peterx@redhat.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>signal: check sig before setting info in kill_pid_usb_asyncio</title>
<updated>2020-05-02T06:50:57Z</updated>
<author>
<name>Zhiqiang Liu</name>
<email>liuzhiqiang26@huawei.com</email>
</author>
<published>2020-03-30T02:18:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f632bd49aa2956e3353af9a03878977af772156d'/>
<id>urn:sha1:f632bd49aa2956e3353af9a03878977af772156d</id>
<content type='text'>
[ Upstream commit eaec2b0bd30690575c581eebffae64bfb7f684ac ]

In kill_pid_usb_asyncio, if signal is not valid, we do not need to
set info struct.

Signed-off-by: Zhiqiang Liu &lt;liuzhiqiang26@huawei.com&gt;
Acked-by: Christian Brauner &lt;christian.brauner@ubuntu.com&gt;
Link: https://lore.kernel.org/r/f525fd08-1cf7-fb09-d20c-4359145eb940@huawei.com
Signed-off-by: Christian Brauner &lt;christian.brauner@ubuntu.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpf: Propagate expected_attach_type when verifying freplace programs</title>
<updated>2020-05-02T06:50:56Z</updated>
<author>
<name>Toke Høiland-Jørgensen</name>
<email>toke@redhat.com</email>
</author>
<published>2020-04-24T13:34:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=cbde2870a193d0a458f30350355694cf45f510b4'/>
<id>urn:sha1:cbde2870a193d0a458f30350355694cf45f510b4</id>
<content type='text'>
commit 03f87c0b45b177ba5f6b4a9bbe9f95e4aba31026 upstream.

For some program types, the verifier relies on the expected_attach_type of
the program being verified in the verification process. However, for
freplace programs, the attach type was not propagated along with the
verifier ops, so the expected_attach_type would always be zero for freplace
programs.

This in turn caused the verifier to sometimes make the wrong call for
freplace programs. For all existing uses of expected_attach_type for this
purpose, the result of this was only false negatives (i.e., freplace
functions would be rejected by the verifier even though they were valid
programs for the target they were replacing). However, should a false
positive be introduced, this can lead to out-of-bounds accesses and/or
crashes.

The fix introduced in this patch is to propagate the expected_attach_type
to the freplace program during verification, and reset it after that is
done.

Fixes: be8704ff07d2 ("bpf: Introduce dynamic program extensions")
Signed-off-by: Toke Høiland-Jørgensen &lt;toke@redhat.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/bpf/158773526726.293902.13257293296560360508.stgit@toke.dk
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>bpf: Fix handling of XADD on BTF memory</title>
<updated>2020-05-02T06:50:54Z</updated>
<author>
<name>Jann Horn</name>
<email>jannh@google.com</email>
</author>
<published>2020-04-17T00:00:07Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7cc3a7ff2658e8aadfa4656e09d7df153acf4a95'/>
<id>urn:sha1:7cc3a7ff2658e8aadfa4656e09d7df153acf4a95</id>
<content type='text'>
commit 8ff3571f7e1bf3f293cc5e3dc14f2943f4fa7fcf upstream.

check_xadd() can cause check_ptr_to_btf_access() to be executed with
atype==BPF_READ and value_regno==-1 (meaning "just check whether the access
is okay, don't tell me what type it will result in").
Handle that case properly and skip writing type information, instead of
indexing into the registers at index -1 and writing into out-of-bounds
memory.

Note that at least at the moment, you can't actually write through a BTF
pointer, so check_xadd() will reject the program after calling
check_ptr_to_btf_access with atype==BPF_WRITE; but that's after the
verifier has already corrupted memory.

This patch assumes that BTF pointers are not available in unprivileged
programs.

Fixes: 9e15db66136a ("bpf: Implement accurate raw_tp context access via BTF")
Signed-off-by: Jann Horn &lt;jannh@google.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20200417000007.10734-2-jannh@google.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>perf/core: fix parent pid/tid in task exit events</title>
<updated>2020-05-02T06:50:53Z</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2020-04-17T18:28:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d0bccfb1c871012ce88cc164eb4c8a87dd62c442'/>
<id>urn:sha1:d0bccfb1c871012ce88cc164eb4c8a87dd62c442</id>
<content type='text'>
commit f3bed55e850926614b9898fe982f66d2541a36a5 upstream.

Current logic yields the child task as the parent.

Before:
$ perf record bash -c "perf list &gt; /dev/null"
$ perf script -D |grep 'FORK\|EXIT'
4387036190981094 0x5a70 [0x30]: PERF_RECORD_FORK(10472:10472):(10470:10470)
4387036606207580 0xf050 [0x30]: PERF_RECORD_EXIT(10472:10472):(10472:10472)
4387036607103839 0x17150 [0x30]: PERF_RECORD_EXIT(10470:10470):(10470:10470)
                                                   ^
  Note the repeated values here -------------------/

After:
383281514043 0x9d8 [0x30]: PERF_RECORD_FORK(2268:2268):(2266:2266)
383442003996 0x2180 [0x30]: PERF_RECORD_EXIT(2268:2268):(2266:2266)
383451297778 0xb70 [0x30]: PERF_RECORD_EXIT(2266:2266):(2265:2265)

Fixes: 94d5d1b2d891 ("perf_counter: Report the cloning task as parent on perf_counter_fork()")
Reported-by: KP Singh &lt;kpsingh@google.com&gt;
Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Link: https://lkml.kernel.org/r/20200417182842.12522-1-irogers@google.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>sched/core: Fix reset-on-fork from RT with uclamp</title>
<updated>2020-05-02T06:50:53Z</updated>
<author>
<name>Quentin Perret</name>
<email>qperret@google.com</email>
</author>
<published>2020-04-16T08:59:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5ec78aa305cacac96db7bc332bfbadb69000478c'/>
<id>urn:sha1:5ec78aa305cacac96db7bc332bfbadb69000478c</id>
<content type='text'>
commit eaf5a92ebde5bca3bb2565616115bd6d579486cd upstream.

uclamp_fork() resets the uclamp values to their default when the
reset-on-fork flag is set. It also checks whether the task has a RT
policy, and sets its uclamp.min to 1024 accordingly. However, during
reset-on-fork, the task's policy is lowered to SCHED_NORMAL right after,
hence leading to an erroneous uclamp.min setting for the new task if it
was forked from RT.

Fix this by removing the unnecessary check on rt_task() in
uclamp_fork() as this doesn't make sense if the reset-on-fork flag is
set.

Fixes: 1a00d999971c ("sched/uclamp: Set default clamps for RT tasks")
Reported-by: Chitti Babu Theegala &lt;ctheegal@codeaurora.org&gt;
Signed-off-by: Quentin Perret &lt;qperret@google.com&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Patrick Bellasi &lt;patrick.bellasi@matbug.net&gt;
Reviewed-by: Dietmar Eggemann &lt;dietmar.eggemann@arm.com&gt;
Link: https://lkml.kernel.org/r/20200416085956.217587-1-qperret@google.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
