<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include, branch v4.20.16</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.20.16</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.20.16'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2019-03-13T21:04:19Z</updated>
<entry>
<title>drm: disable uncached DMA optimization for ARM and arm64</title>
<updated>2019-03-13T21:04:19Z</updated>
<author>
<name>Ard Biesheuvel</name>
<email>ard.biesheuvel@linaro.org</email>
</author>
<published>2019-01-24T12:06:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ccf970be985d3264a27e74b876951173c6fa650f'/>
<id>urn:sha1:ccf970be985d3264a27e74b876951173c6fa650f</id>
<content type='text'>
[ Upstream commit e02f5c1bb2283cfcee68f2f0feddcc06150f13aa ]

The DRM driver stack is designed to work with cache coherent devices
only, but permits an optimization to be enabled in some cases, where
for some buffers, both the CPU and the GPU use uncached mappings,
removing the need for DMA snooping and allocation in the CPU caches.

The use of uncached GPU mappings relies on the correct implementation
of the PCIe NoSnoop TLP attribute by the platform, otherwise the GPU
will use cached mappings nonetheless. On x86 platforms, this does not
seem to matter, as uncached CPU mappings will snoop the caches in any
case. However, on ARM and arm64, enabling this optimization on a
platform where NoSnoop is ignored results in loss of coherency, which
breaks correct operation of the device. Since we have no way of
detecting whether NoSnoop works or not, just disable this
optimization entirely for ARM and arm64.

Cc: Christian Koenig &lt;christian.koenig@amd.com&gt;
Cc: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Cc: David Zhou &lt;David1.Zhou@amd.com&gt;
Cc: Huang Rui &lt;ray.huang@amd.com&gt;
Cc: Junwei Zhang &lt;Jerry.Zhang@amd.com&gt;
Cc: Michel Daenzer &lt;michel.daenzer@amd.com&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Maxime Ripard &lt;maxime.ripard@bootlin.com&gt;
Cc: Sean Paul &lt;sean@poorly.run&gt;
Cc: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Cc: Christoph Hellwig &lt;hch@infradead.org&gt;
Cc: Robin Murphy &lt;robin.murphy@arm.com&gt;
Cc: amd-gfx list &lt;amd-gfx@lists.freedesktop.org&gt;
Cc: dri-devel &lt;dri-devel@lists.freedesktop.org&gt;
Reported-by: Carsten Haitzler &lt;Carsten.Haitzler@arm.com&gt;
Signed-off-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Link: https://patchwork.kernel.org/patch/10778815/
Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>netfilter: nf_tables: unbind set in rule from commit path</title>
<updated>2019-03-13T21:04:17Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2019-02-02T09:49:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6f9518c5bc88e5206ed68df1f911e47095414476'/>
<id>urn:sha1:6f9518c5bc88e5206ed68df1f911e47095414476</id>
<content type='text'>
[ Upstream commit f6ac8585897684374a19863fff21186a05805286 ]

Anonymous sets that are bound to rules from the same transaction trigger
a kernel splat from the abort path due to double set list removal and
double free.

This patch updates the logic to search for the transaction that is
responsible for creating the set and disable the set list removal and
release, given the rule is now responsible for this. Lookup is reverse
since the transaction that adds the set is likely to be at the tail of
the list.

Moreover, this patch adds the unbind step to deliver the event from the
commit path.  This should not be done from the worker thread, since we
have no guarantees of in-order delivery to the listener.

This patch removes the assumption that both activate and deactivate
callbacks need to be provided.

Fixes: cd5125d8f518 ("netfilter: nf_tables: split set destruction in deactivate and destroy phase")
Reported-by: Mikhail Morfikov &lt;mmorfikov@gmail.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpf: run bpf programs with preemption disabled</title>
<updated>2019-03-13T21:04:13Z</updated>
<author>
<name>Alexei Starovoitov</name>
<email>ast@kernel.org</email>
</author>
<published>2019-01-29T02:43:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=55bc09838a42a8479ba08f6cb553137f626c5de5'/>
<id>urn:sha1:55bc09838a42a8479ba08f6cb553137f626c5de5</id>
<content type='text'>
[ Upstream commit 6cab5e90ab2bd323c9f3811b6c70a4687df51e27 ]

Disabled preemption is necessary for proper access to per-cpu maps
from BPF programs.

But the sender side of socket filters didn't have preemption disabled:
unix_dgram_sendmsg-&gt;sk_filter-&gt;sk_filter_trim_cap-&gt;bpf_prog_run_save_cb-&gt;BPF_PROG_RUN

and a combination of af_packet with tun device didn't disable either:
tpacket_snd-&gt;packet_direct_xmit-&gt;packet_pick_tx_queue-&gt;ndo_select_queue-&gt;
  tun_select_queue-&gt;tun_ebpf_select_queue-&gt;bpf_prog_run_clear_cb-&gt;BPF_PROG_RUN

Disable preemption before executing BPF programs (both classic and extended).

Reported-by: Jann Horn &lt;jannh@google.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Song Liu &lt;songliubraving@fb.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>irqchip/gic-v3-its: Fix ITT_entry_size accessor</title>
<updated>2019-03-13T21:04:13Z</updated>
<author>
<name>Zenghui Yu</name>
<email>yuzenghui@huawei.com</email>
</author>
<published>2019-01-31T11:19:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=01fe6b413d552e1db7f90919bda928e0d91fcd8c'/>
<id>urn:sha1:01fe6b413d552e1db7f90919bda928e0d91fcd8c</id>
<content type='text'>
[ Upstream commit 56841070ccc87b463ac037d2d1f2beb8e5e35f0c ]

According to ARM IHI 0069C (ID070116), we should use GITS_TYPER's
bits [7:4] as ITT_entry_size instead of [8:4]. Although this is
pretty annoying, it only results in a potential over-allocation
of memory, and nothing bad happens.

Fixes: 3dfa576bfb45 ("irqchip/gic-v3-its: Add probing for VLPI properties")
Signed-off-by: Zenghui Yu &lt;yuzenghui@huawei.com&gt;
[maz: massaged subject and commit message]
Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: stmmac: Fallback to Platform Data clock in Watchdog conversion</title>
<updated>2019-03-13T21:04:13Z</updated>
<author>
<name>Jose Abreu</name>
<email>jose.abreu@synopsys.com</email>
</author>
<published>2019-01-30T14:54:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a1a649c0292ff81e7884a36d5cc2091f842aaa26'/>
<id>urn:sha1:a1a649c0292ff81e7884a36d5cc2091f842aaa26</id>
<content type='text'>
[ Upstream commit 4ec5302fa906ec9d86597b236f62315bacdb9622 ]

If we don't have DT then stmmac_clk will not be available. Let's add a
new Platform Data field so that we can specify the refclk by this mean.

This way we can still use the coalesce command in PCI based setups.

Signed-off-by: Jose Abreu &lt;joabreu@synopsys.com&gt;
Cc: Joao Pinto &lt;jpinto@synopsys.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Giuseppe Cavallaro &lt;peppe.cavallaro@st.com&gt;
Cc: Alexandre Torgue &lt;alexandre.torgue@st.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>signal: Make siginmask safe when passed a signal of 0</title>
<updated>2019-03-13T21:04:10Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2019-01-12T17:48:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3ea947843fc94c194ea51a7d2ff597e246b15458'/>
<id>urn:sha1:3ea947843fc94c194ea51a7d2ff597e246b15458</id>
<content type='text'>
[ Upstream commit ee17e5d6201c66492a0e8053190fca2ed2b8457d ]

Eric Biggers reported:
&gt; The following commit, which went into v4.20, introduced undefined behavior when
&gt; sys_rt_sigqueueinfo() is called with sig=0:
&gt;
&gt; commit 4ce5f9c9e7546915c559ffae594e6d73f918db00
&gt; Author: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
&gt; Date:   Tue Sep 25 12:59:31 2018 +0200
&gt;
&gt;     signal: Use a smaller struct siginfo in the kernel
&gt;
&gt; In sig_specific_sicodes(), used from known_siginfo_layout(), the expression
&gt; '1ULL &lt;&lt; ((sig)-1)' is undefined as it evaluates to 1ULL &lt;&lt; 4294967295.
&gt;
&gt; Reproducer:
&gt;
&gt; #include &lt;signal.h&gt;
&gt; #include &lt;sys/syscall.h&gt;
&gt; #include &lt;unistd.h&gt;
&gt;
&gt; int main(void)
&gt; {
&gt; 	siginfo_t si = { .si_code = 1 };
&gt; 	syscall(__NR_rt_sigqueueinfo, 0, 0, &amp;si);
&gt; }
&gt;
&gt; UBSAN report for v5.0-rc1:
&gt;
&gt; UBSAN: Undefined behaviour in kernel/signal.c:2946:7
&gt; shift exponent 4294967295 is too large for 64-bit type 'long unsigned int'
&gt; CPU: 2 PID: 346 Comm: syz_signal Not tainted 5.0.0-rc1 #25
&gt; Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014
&gt; Call Trace:
&gt;  __dump_stack lib/dump_stack.c:77 [inline]
&gt;  dump_stack+0x70/0xa5 lib/dump_stack.c:113
&gt;  ubsan_epilogue+0xd/0x40 lib/ubsan.c:159
&gt;  __ubsan_handle_shift_out_of_bounds+0x12c/0x170 lib/ubsan.c:425
&gt;  known_siginfo_layout+0xae/0xe0 kernel/signal.c:2946
&gt;  post_copy_siginfo_from_user kernel/signal.c:3009 [inline]
&gt;  __copy_siginfo_from_user+0x35/0x60 kernel/signal.c:3035
&gt;  __do_sys_rt_sigqueueinfo kernel/signal.c:3553 [inline]
&gt;  __se_sys_rt_sigqueueinfo kernel/signal.c:3549 [inline]
&gt;  __x64_sys_rt_sigqueueinfo+0x31/0x70 kernel/signal.c:3549
&gt;  do_syscall_64+0x4c/0x1b0 arch/x86/entry/common.c:290
&gt;  entry_SYSCALL_64_after_hwframe+0x49/0xbe
&gt; RIP: 0033:0x433639
&gt; Code: c4 18 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 &lt;48&gt; 3d 01 f0 ff ff 0f 83 7b 27 00 00 c3 66 2e 0f 1f 84 00 00 00 00
&gt; RSP: 002b:00007fffcb289fc8 EFLAGS: 00000246 ORIG_RAX: 0000000000000081
&gt; RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000433639
&gt; RDX: 00007fffcb289fd0 RSI: 0000000000000000 RDI: 0000000000000000
&gt; RBP: 00000000006b2018 R08: 000000000000004d R09: 0000000000000000
&gt; R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401560
&gt; R13: 00000000004015f0 R14: 0000000000000000 R15: 0000000000000000

I have looked at the other callers of siginmask and they all appear to
in locations where sig can not be zero.

I have looked at the code generation of adding an extra test against
zero and gcc was able with a simple decrement instruction to combine
the two tests together. So the at most adding this test cost a single
cpu cycle.  In practice that decrement instruction was already present
as part of the mask comparison, so the only change was when the
instruction was executed.

So given that it is cheap, and obviously correct to update siginmask
to verify the signal is not zero.  Fix this issue there to avoid any
future problems.

Reported-by: Eric Biggers &lt;ebiggers@kernel.org&gt;
Fixes: 4ce5f9c9e754 ("signal: Use a smaller struct siginfo in the kernel")
Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Fix locking in bt_accept_enqueue() for BH context</title>
<updated>2019-03-10T06:10:16Z</updated>
<author>
<name>Matthias Kaehlcke</name>
<email>mka@chromium.org</email>
</author>
<published>2019-01-03T00:11:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c296ec4e2650924bab809171102a172e67793a3a'/>
<id>urn:sha1:c296ec4e2650924bab809171102a172e67793a3a</id>
<content type='text'>
commit c4f5627f7eeecde1bb6b646d8c0907b96dc2b2a6 upstream.

With commit e16337622016 ("Bluetooth: Handle bt_accept_enqueue() socket
atomically") lock_sock[_nested]() is used to acquire the socket lock
before manipulating the socket. lock_sock[_nested]() may block, which
is problematic since bt_accept_enqueue() can be called in bottom half
context (e.g. from rfcomm_connect_ind()):

[&lt;ffffff80080d81ec&gt;] __might_sleep+0x4c/0x80
[&lt;ffffff800876c7b0&gt;] lock_sock_nested+0x24/0x58
[&lt;ffffff8000d7c27c&gt;] bt_accept_enqueue+0x48/0xd4 [bluetooth]
[&lt;ffffff8000e67d8c&gt;] rfcomm_connect_ind+0x190/0x218 [rfcomm]

Add a parameter to bt_accept_enqueue() to indicate whether the
function is called from BH context, and acquire the socket lock
with bh_lock_sock_nested() if that's the case.

Also adapt all callers of bt_accept_enqueue() to pass the new
parameter:

- l2cap_sock_new_connection_cb()
  - uses lock_sock() to lock the parent socket =&gt; process context

- rfcomm_connect_ind()
  - acquires the parent socket lock with bh_lock_sock() =&gt; BH
    context

- __sco_chan_add()
  - called from sco_chan_add(), which is called from sco_connect().
    parent is NULL, hence bt_accept_enqueue() isn't called in this
    code path and we can ignore it
  - also called from sco_conn_ready(). uses bh_lock_sock() to acquire
    the parent lock =&gt; BH context

Fixes: e16337622016 ("Bluetooth: Handle bt_accept_enqueue() socket atomically")
Signed-off-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>net: avoid use IPCB in cipso_v4_error</title>
<updated>2019-03-10T06:10:13Z</updated>
<author>
<name>Nazarov Sergey</name>
<email>s-nazarov@yandex.ru</email>
</author>
<published>2019-02-25T16:27:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2268fa54b4d382600bbe31e44a5c9e7828481f17'/>
<id>urn:sha1:2268fa54b4d382600bbe31e44a5c9e7828481f17</id>
<content type='text'>
[ Upstream commit 3da1ed7ac398f34fff1694017a07054d69c5f5c5 ]

Extract IP options in cipso_v4_error and use __icmp_send.

Signed-off-by: Sergey Nazarov &lt;s-nazarov@yandex.ru&gt;
Acked-by: Paul Moore &lt;paul@paul-moore.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: Add __icmp_send helper.</title>
<updated>2019-03-10T06:10:13Z</updated>
<author>
<name>Nazarov Sergey</name>
<email>s-nazarov@yandex.ru</email>
</author>
<published>2019-02-25T16:24:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=977466209dc752a0eec826f7b57f7b1d4a02c058'/>
<id>urn:sha1:977466209dc752a0eec826f7b57f7b1d4a02c058</id>
<content type='text'>
[ Upstream commit 9ef6b42ad6fd7929dd1b6092cb02014e382c6a91 ]

Add __icmp_send function having ip_options struct parameter

Signed-off-by: Sergey Nazarov &lt;s-nazarov@yandex.ru&gt;
Reviewed-by: Paul Moore &lt;paul@paul-moore.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ipv4: Add ICMPv6 support when parse route ipproto</title>
<updated>2019-03-10T06:10:12Z</updated>
<author>
<name>Hangbin Liu</name>
<email>liuhangbin@gmail.com</email>
</author>
<published>2019-02-27T08:15:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b17fa7944c7c50e195dc556b2e02448c372ac261'/>
<id>urn:sha1:b17fa7944c7c50e195dc556b2e02448c372ac261</id>
<content type='text'>
[ Upstream commit 5e1a99eae84999a2536f50a0beaf5d5262337f40 ]

For ip rules, we need to use 'ipproto ipv6-icmp' to match ICMPv6 headers.
But for ip -6 route, currently we only support tcp, udp and icmp.

Add ICMPv6 support so we can match ipv6-icmp rules for route lookup.

v2: As David Ahern and Sabrina Dubroca suggested, Add an argument to
rtm_getroute_parse_ip_proto() to handle ICMP/ICMPv6 with different family.

Reported-by: Jianlin Shi &lt;jishi@redhat.com&gt;
Fixes: eacb9384a3fe ("ipv6: support sport, dport and ip_proto in RTM_GETROUTE")
Signed-off-by: Hangbin Liu &lt;liuhangbin@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
