<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/kernel, branch v5.4.38</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.4.38</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.4.38'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2020-05-02T06:48:55Z</updated>
<entry>
<title>signal: check sig before setting info in kill_pid_usb_asyncio</title>
<updated>2020-05-02T06:48:55Z</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=16976275b92992a7f86d91d86d341eefc9bade15'/>
<id>urn:sha1:16976275b92992a7f86d91d86d341eefc9bade15</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>perf/core: fix parent pid/tid in task exit events</title>
<updated>2020-05-02T06:48:52Z</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=9578a8c157b4bd5f04fe8a087e29d616b2f70c80'/>
<id>urn:sha1:9578a8c157b4bd5f04fe8a087e29d616b2f70c80</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:48:52Z</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=c04d01e918d89b61d01572ec3c68e9481465438f'/>
<id>urn:sha1:c04d01e918d89b61d01572ec3c68e9481465438f</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>
<entry>
<title>cpumap: Avoid warning when CONFIG_DEBUG_PER_CPU_MAPS is enabled</title>
<updated>2020-05-02T06:48:51Z</updated>
<author>
<name>Toke Høiland-Jørgensen</name>
<email>toke@redhat.com</email>
</author>
<published>2020-04-16T08:31:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6cfb8c2ada5819da41c4a0e97cc837ce9679b2d6'/>
<id>urn:sha1:6cfb8c2ada5819da41c4a0e97cc837ce9679b2d6</id>
<content type='text'>
commit bc23d0e3f717ced21fbfacab3ab887d55e5ba367 upstream.

When the kernel is built with CONFIG_DEBUG_PER_CPU_MAPS, the cpumap code
can trigger a spurious warning if CONFIG_CPUMASK_OFFSTACK is also set. This
happens because in this configuration, NR_CPUS can be larger than
nr_cpumask_bits, so the initial check in cpu_map_alloc() is not sufficient
to guard against hitting the warning in cpumask_check().

Fix this by explicitly checking the supplied key against the
nr_cpumask_bits variable before calling cpu_possible().

Fixes: 6710e1126934 ("bpf: introduce new bpf cpu map type BPF_MAP_TYPE_CPUMAP")
Reported-by: Xiumei Mu &lt;xmu@redhat.com&gt;
Signed-off-by: Toke Høiland-Jørgensen &lt;toke@redhat.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Tested-by: Xiumei Mu &lt;xmu@redhat.com&gt;
Acked-by: Jesper Dangaard Brouer &lt;brouer@redhat.com&gt;
Acked-by: Song Liu &lt;songliubraving@fb.com&gt;
Link: https://lore.kernel.org/bpf/20200416083120.453718-1-toke@redhat.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>bpf: Forbid XADD on spilled pointers for unprivileged users</title>
<updated>2020-05-02T06:48:46Z</updated>
<author>
<name>Jann Horn</name>
<email>jannh@google.com</email>
</author>
<published>2020-04-17T00:00:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=db2426f86d44fc423aa36fd8b8302aa7155e161f'/>
<id>urn:sha1:db2426f86d44fc423aa36fd8b8302aa7155e161f</id>
<content type='text'>
commit 6e7e63cbb023976d828cdb22422606bf77baa8a9 upstream.

When check_xadd() verifies an XADD operation on a pointer to a stack slot
containing a spilled pointer, check_stack_read() verifies that the read,
which is part of XADD, is valid. However, since the placeholder value -1 is
passed as `value_regno`, check_stack_read() can only return a binary
decision and can't return the type of the value that was read. The intent
here is to verify whether the value read from the stack slot may be used as
a SCALAR_VALUE; but since check_stack_read() doesn't check the type, and
the type information is lost when check_stack_read() returns, this is not
enforced, and a malicious user can abuse XADD to leak spilled kernel
pointers.

Fix it by letting check_stack_read() verify that the value is usable as a
SCALAR_VALUE if no type information is passed to the caller.

To be able to use __is_pointer_value() in check_stack_read(), move it up.

Fix up the expected unprivileged error message for a BPF selftest that,
until now, assumed that unprivileged users can use XADD on stack-spilled
pointers. This also gives us a test for the behavior introduced in this
patch for free.

In theory, this could also be fixed by forbidding XADD on stack spills
entirely, since XADD is a locked operation (for operations on memory with
concurrency) and there can't be any concurrency on the BPF stack; but
Alexei has said that he wants to keep XADD on stack slots working to avoid
changes to the test suite [1].

The following BPF program demonstrates how to leak a BPF map pointer as an
unprivileged user using this bug:

    // r7 = map_pointer
    BPF_LD_MAP_FD(BPF_REG_7, small_map),
    // r8 = launder(map_pointer)
    BPF_STX_MEM(BPF_DW, BPF_REG_FP, BPF_REG_7, -8),
    BPF_MOV64_IMM(BPF_REG_1, 0),
    ((struct bpf_insn) {
      .code  = BPF_STX | BPF_DW | BPF_XADD,
      .dst_reg = BPF_REG_FP,
      .src_reg = BPF_REG_1,
      .off = -8
    }),
    BPF_LDX_MEM(BPF_DW, BPF_REG_8, BPF_REG_FP, -8),

    // store r8 into map
    BPF_MOV64_REG(BPF_REG_ARG1, BPF_REG_7),
    BPF_MOV64_REG(BPF_REG_ARG2, BPF_REG_FP),
    BPF_ALU64_IMM(BPF_ADD, BPF_REG_ARG2, -4),
    BPF_ST_MEM(BPF_W, BPF_REG_ARG2, 0, 0),
    BPF_EMIT_CALL(BPF_FUNC_map_lookup_elem),
    BPF_JMP_IMM(BPF_JNE, BPF_REG_0, 0, 1),
    BPF_EXIT_INSN(),
    BPF_STX_MEM(BPF_DW, BPF_REG_0, BPF_REG_8, 0),

    BPF_MOV64_IMM(BPF_REG_0, 0),
    BPF_EXIT_INSN()

[1] https://lore.kernel.org/bpf/20200416211116.qxqcza5vo2ddnkdq@ast-mbp.dhcp.thefacebook.com/

Fixes: 17a5267067f3 ("bpf: verifier (add verifier core)")
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-1-jannh@google.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>printk: queue wake_up_klogd irq_work only if per-CPU areas are ready</title>
<updated>2020-05-02T06:48:42Z</updated>
<author>
<name>Sergey Senozhatsky</name>
<email>sergey.senozhatsky@gmail.com</email>
</author>
<published>2020-03-03T11:30:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4a5c9ae67b12f628fdc8f9ffac7e5677d510dd5e'/>
<id>urn:sha1:4a5c9ae67b12f628fdc8f9ffac7e5677d510dd5e</id>
<content type='text'>
commit ab6f762f0f53162d41497708b33c9a3236d3609e upstream.

printk_deferred(), similarly to printk_safe/printk_nmi, does not
immediately attempt to print a new message on the consoles, avoiding
calls into non-reentrant kernel paths, e.g. scheduler or timekeeping,
which potentially can deadlock the system.

Those printk() flavors, instead, rely on per-CPU flush irq_work to print
messages from safer contexts.  For same reasons (recursive scheduler or
timekeeping calls) printk() uses per-CPU irq_work in order to wake up
user space syslog/kmsg readers.

However, only printk_safe/printk_nmi do make sure that per-CPU areas
have been initialised and that it's safe to modify per-CPU irq_work.
This means that, for instance, should printk_deferred() be invoked "too
early", that is before per-CPU areas are initialised, printk_deferred()
will perform illegal per-CPU access.

Lech Perczak [0] reports that after commit 1b710b1b10ef ("char/random:
silence a lockdep splat with printk()") user-space syslog/kmsg readers
are not able to read new kernel messages.

The reason is printk_deferred() being called too early (as was pointed
out by Petr and John).

Fix printk_deferred() and do not queue per-CPU irq_work before per-CPU
areas are initialized.

Link: https://lore.kernel.org/lkml/aa0732c6-5c4e-8a8b-a1c1-75ebe3dca05b@camlintechnologies.com/
Reported-by: Lech Perczak &lt;l.perczak@camlintechnologies.com&gt;
Signed-off-by: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;
Tested-by: Jann Horn &lt;jannh@google.com&gt;
Reviewed-by: Petr Mladek &lt;pmladek@suse.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: John Ogness &lt;john.ogness@linutronix.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>audit: check the length of userspace generated audit records</title>
<updated>2020-04-29T14:33:18Z</updated>
<author>
<name>Paul Moore</name>
<email>paul@paul-moore.com</email>
</author>
<published>2020-04-20T20:24:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=83f82fd5552c91f4f01921428c871dc8d82abccf'/>
<id>urn:sha1:83f82fd5552c91f4f01921428c871dc8d82abccf</id>
<content type='text'>
commit 763dafc520add02a1f4639b500c509acc0ea8e5b upstream.

Commit 756125289285 ("audit: always check the netlink payload length
in audit_receive_msg()") fixed a number of missing message length
checks, but forgot to check the length of userspace generated audit
records.  The good news is that you need CAP_AUDIT_WRITE to submit
userspace audit records, which is generally only given to trusted
processes, so the impact should be limited.

Cc: stable@vger.kernel.org
Fixes: 756125289285 ("audit: always check the netlink payload length in audit_receive_msg()")
Reported-by: syzbot+49e69b4d71a420ceda3e@syzkaller.appspotmail.com
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>signal: Avoid corrupting si_pid and si_uid in do_notify_parent</title>
<updated>2020-04-29T14:33:17Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2020-04-20T16:41:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=20821047aca466571b81e04cc24e2944564ecc86'/>
<id>urn:sha1:20821047aca466571b81e04cc24e2944564ecc86</id>
<content type='text'>
commit 61e713bdca3678e84815f2427f7a063fc353a1fc upstream.

Christof Meerwald &lt;cmeerw@cmeerw.org&gt; writes:
&gt; Hi,
&gt;
&gt; this is probably related to commit
&gt; 7a0cf094944e2540758b7f957eb6846d5126f535 (signal: Correct namespace
&gt; fixups of si_pid and si_uid).
&gt;
&gt; With a 5.6.5 kernel I am seeing SIGCHLD signals that don't include a
&gt; properly set si_pid field - this seems to happen for multi-threaded
&gt; child processes.
&gt;
&gt; A simple test program (based on the sample from the signalfd man page):
&gt;
&gt; #include &lt;sys/signalfd.h&gt;
&gt; #include &lt;signal.h&gt;
&gt; #include &lt;unistd.h&gt;
&gt; #include &lt;spawn.h&gt;
&gt; #include &lt;stdlib.h&gt;
&gt; #include &lt;stdio.h&gt;
&gt;
&gt; #define handle_error(msg) \
&gt;     do { perror(msg); exit(EXIT_FAILURE); } while (0)
&gt;
&gt; int main(int argc, char *argv[])
&gt; {
&gt;   sigset_t mask;
&gt;   int sfd;
&gt;   struct signalfd_siginfo fdsi;
&gt;   ssize_t s;
&gt;
&gt;   sigemptyset(&amp;mask);
&gt;   sigaddset(&amp;mask, SIGCHLD);
&gt;
&gt;   if (sigprocmask(SIG_BLOCK, &amp;mask, NULL) == -1)
&gt;     handle_error("sigprocmask");
&gt;
&gt;   pid_t chldpid;
&gt;   char *chldargv[] = { "./sfdclient", NULL };
&gt;   posix_spawn(&amp;chldpid, "./sfdclient", NULL, NULL, chldargv, NULL);
&gt;
&gt;   sfd = signalfd(-1, &amp;mask, 0);
&gt;   if (sfd == -1)
&gt;     handle_error("signalfd");
&gt;
&gt;   for (;;) {
&gt;     s = read(sfd, &amp;fdsi, sizeof(struct signalfd_siginfo));
&gt;     if (s != sizeof(struct signalfd_siginfo))
&gt;       handle_error("read");
&gt;
&gt;     if (fdsi.ssi_signo == SIGCHLD) {
&gt;       printf("Got SIGCHLD %d %d %d %d\n",
&gt;           fdsi.ssi_status, fdsi.ssi_code,
&gt;           fdsi.ssi_uid, fdsi.ssi_pid);
&gt;       return 0;
&gt;     } else {
&gt;       printf("Read unexpected signal\n");
&gt;     }
&gt;   }
&gt; }
&gt;
&gt;
&gt; and a multi-threaded client to test with:
&gt;
&gt; #include &lt;unistd.h&gt;
&gt; #include &lt;pthread.h&gt;
&gt;
&gt; void *f(void *arg)
&gt; {
&gt;   sleep(100);
&gt; }
&gt;
&gt; int main()
&gt; {
&gt;   pthread_t t[8];
&gt;
&gt;   for (int i = 0; i != 8; ++i)
&gt;   {
&gt;     pthread_create(&amp;t[i], NULL, f, NULL);
&gt;   }
&gt; }
&gt;
&gt; I tried to do a bit of debugging and what seems to be happening is
&gt; that
&gt;
&gt;   /* From an ancestor pid namespace? */
&gt;   if (!task_pid_nr_ns(current, task_active_pid_ns(t))) {
&gt;
&gt; fails inside task_pid_nr_ns because the check for "pid_alive" fails.
&gt;
&gt; This code seems to be called from do_notify_parent and there we
&gt; actually have "tsk != current" (I am assuming both are threads of the
&gt; current process?)

I instrumented the code with a warning and received the following backtrace:
&gt; WARNING: CPU: 0 PID: 777 at kernel/pid.c:501 __task_pid_nr_ns.cold.6+0xc/0x15
&gt; Modules linked in:
&gt; CPU: 0 PID: 777 Comm: sfdclient Not tainted 5.7.0-rc1userns+ #2924
&gt; Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
&gt; RIP: 0010:__task_pid_nr_ns.cold.6+0xc/0x15
&gt; Code: ff 66 90 48 83 ec 08 89 7c 24 04 48 8d 7e 08 48 8d 74 24 04 e8 9a b6 44 00 48 83 c4 08 c3 48 c7 c7 59 9f ac 82 e8 c2 c4 04 00 &lt;0f&gt; 0b e9 3fd
&gt; RSP: 0018:ffffc9000042fbf8 EFLAGS: 00010046
&gt; RAX: 000000000000000c RBX: 0000000000000000 RCX: ffffc9000042faf4
&gt; RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff81193d29
&gt; RBP: ffffc9000042fc18 R08: 0000000000000000 R09: 0000000000000001
&gt; R10: 000000100f938416 R11: 0000000000000309 R12: ffff8880b941c140
&gt; R13: 0000000000000000 R14: 0000000000000000 R15: ffff8880b941c140
&gt; FS:  0000000000000000(0000) GS:ffff8880bca00000(0000) knlGS:0000000000000000
&gt; CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
&gt; CR2: 00007f2e8c0a32e0 CR3: 0000000002e10000 CR4: 00000000000006f0
&gt; Call Trace:
&gt;  send_signal+0x1c8/0x310
&gt;  do_notify_parent+0x50f/0x550
&gt;  release_task.part.21+0x4fd/0x620
&gt;  do_exit+0x6f6/0xaf0
&gt;  do_group_exit+0x42/0xb0
&gt;  get_signal+0x13b/0xbb0
&gt;  do_signal+0x2b/0x670
&gt;  ? __audit_syscall_exit+0x24d/0x2b0
&gt;  ? rcu_read_lock_sched_held+0x4d/0x60
&gt;  ? kfree+0x24c/0x2b0
&gt;  do_syscall_64+0x176/0x640
&gt;  ? trace_hardirqs_off_thunk+0x1a/0x1c
&gt;  entry_SYSCALL_64_after_hwframe+0x49/0xb3

The immediate problem is as Christof noticed that "pid_alive(current) == false".
This happens because do_notify_parent is called from the last thread to exit
in a process after that thread has been reaped.

The bigger issue is that do_notify_parent can be called from any
process that manages to wait on a thread of a multi-threaded process
from wait_task_zombie.  So any logic based upon current for
do_notify_parent is just nonsense, as current can be pretty much
anything.

So change do_notify_parent to call __send_signal directly.

Inspecting the code it appears this problem has existed since the pid
namespace support started handling this case in 2.6.30.  This fix only
backports to 7a0cf094944e ("signal: Correct namespace fixups of si_pid and si_uid")
where the problem logic was moved out of __send_signal and into send_signal.

Cc: stable@vger.kernel.org
Fixes: 6588c1e3ff01 ("signals: SI_USER: Masquerade si_pid when crossing pid ns boundary")
Ref: 921cf9f63089 ("signals: protect cinit from unblocked SIG_DFL signals")
Link: https://lore.kernel.org/lkml/20200419201336.GI22017@edge.cmeerw.net/
Reported-by: Christof Meerwald &lt;cmeerw@cmeerw.org&gt;
Acked-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Acked-by: Christian Brauner &lt;christian.brauner@ubuntu.com&gt;
Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>perf/core: Disable page faults when getting phys address</title>
<updated>2020-04-29T14:33:02Z</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@kernel.org</email>
</author>
<published>2020-04-07T14:14:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=16c370534d6c483978e18ef7ca02ae7b22d480f4'/>
<id>urn:sha1:16c370534d6c483978e18ef7ca02ae7b22d480f4</id>
<content type='text'>
[ Upstream commit d3296fb372bf7497b0e5d0478c4e7a677ec6f6e9 ]

We hit following warning when running tests on kernel
compiled with CONFIG_DEBUG_ATOMIC_SLEEP=y:

 WARNING: CPU: 19 PID: 4472 at mm/gup.c:2381 __get_user_pages_fast+0x1a4/0x200
 CPU: 19 PID: 4472 Comm: dummy Not tainted 5.6.0-rc6+ #3
 RIP: 0010:__get_user_pages_fast+0x1a4/0x200
 ...
 Call Trace:
  perf_prepare_sample+0xff1/0x1d90
  perf_event_output_forward+0xe8/0x210
  __perf_event_overflow+0x11a/0x310
  __intel_pmu_pebs_event+0x657/0x850
  intel_pmu_drain_pebs_nhm+0x7de/0x11d0
  handle_pmi_common+0x1b2/0x650
  intel_pmu_handle_irq+0x17b/0x370
  perf_event_nmi_handler+0x40/0x60
  nmi_handle+0x192/0x590
  default_do_nmi+0x6d/0x150
  do_nmi+0x2f9/0x3c0
  nmi+0x8e/0xd7

While __get_user_pages_fast() is IRQ-safe, it calls access_ok(),
which warns on:

  WARN_ON_ONCE(!in_task() &amp;&amp; !pagefault_disabled())

Peter suggested disabling page faults around __get_user_pages_fast(),
which gets rid of the warning in access_ok() call.

Suggested-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Link: https://lkml.kernel.org/r/20200407141427.3184722-1-jolsa@kernel.org
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>kernel/gcov/fs.c: gcov_seq_next() should increase position index</title>
<updated>2020-04-29T14:33:00Z</updated>
<author>
<name>Vasily Averin</name>
<email>vvs@virtuozzo.com</email>
</author>
<published>2020-04-10T21:34:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=16846f6fcbcfc0de495305b588e439f08ef28899'/>
<id>urn:sha1:16846f6fcbcfc0de495305b588e439f08ef28899</id>
<content type='text'>
[ Upstream commit f4d74ef6220c1eda0875da30457bef5c7111ab06 ]

If seq_file .next function does not change position index, read after
some lseek can generate unexpected output.

https://bugzilla.kernel.org/show_bug.cgi?id=206283
Signed-off-by: Vasily Averin &lt;vvs@virtuozzo.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Acked-by: Peter Oberparleiter &lt;oberpar@linux.ibm.com&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Davidlohr Bueso &lt;dave@stgolabs.net&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Manfred Spraul &lt;manfred@colorfullife.com&gt;
Cc: NeilBrown &lt;neilb@suse.com&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Waiman Long &lt;longman@redhat.com&gt;
Link: http://lkml.kernel.org/r/f65c6ee7-bd00-f910-2f8a-37cc67e4ff88@virtuozzo.com
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
