<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/arch, branch v4.4.186</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>KVM: x86: protect KVM_CREATE_PIT/KVM_CREATE_PIT2 with kvm-&gt;lock</title>
<updated>2019-07-21T07:07:16+00:00</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2016-06-01T12:09:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c02686acab234a36aeb678a040d8aee0c4a07845'/>
<id>c02686acab234a36aeb678a040d8aee0c4a07845</id>
<content type='text'>
commit 250715a6171a076748be8ab88b274e72f0cfb435 upstream.

The syzkaller folks reported a NULL pointer dereference that seems
to be cause by a race between KVM_CREATE_IRQCHIP and KVM_CREATE_PIT2.
The former takes kvm-&gt;lock (except when registering the devices,
which needs kvm-&gt;slots_lock); the latter takes kvm-&gt;slots_lock only.
Change KVM_CREATE_PIT2 to follow the same model as KVM_CREATE_IRQCHIP.

Testcase:

    #include &lt;pthread.h&gt;
    #include &lt;linux/kvm.h&gt;
    #include &lt;fcntl.h&gt;
    #include &lt;sys/ioctl.h&gt;
    #include &lt;stdint.h&gt;
    #include &lt;string.h&gt;
    #include &lt;stdlib.h&gt;
    #include &lt;sys/syscall.h&gt;
    #include &lt;unistd.h&gt;

    long r[23];

    void* thr1(void* arg)
    {
        struct kvm_pit_config pitcfg = { .flags = 4 };
        switch ((long)arg) {
        case 0: r[2]  = open("/dev/kvm", O_RDONLY|O_ASYNC);    break;
        case 1: r[3]  = ioctl(r[2], KVM_CREATE_VM, 0);         break;
        case 2: r[4]  = ioctl(r[3], KVM_CREATE_IRQCHIP, 0);    break;
        case 3: r[22] = ioctl(r[3], KVM_CREATE_PIT2, &amp;pitcfg); break;
        }
        return 0;
    }

    int main(int argc, char **argv)
    {
        long i;
        pthread_t th[4];

        memset(r, -1, sizeof(r));
        for (i = 0; i &lt; 4; i++) {
            pthread_create(&amp;th[i], 0, thr, (void*)i);
            if (argc &gt; 1 &amp;&amp; rand()%2) usleep(rand()%1000);
        }
        usleep(20000);
        return 0;
    }

Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Radim Krčmář &lt;rkrcmar@redhat.com&gt;
Signed-off-by: Zubin Mithra &lt;zsm@google.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 250715a6171a076748be8ab88b274e72f0cfb435 upstream.

The syzkaller folks reported a NULL pointer dereference that seems
to be cause by a race between KVM_CREATE_IRQCHIP and KVM_CREATE_PIT2.
The former takes kvm-&gt;lock (except when registering the devices,
which needs kvm-&gt;slots_lock); the latter takes kvm-&gt;slots_lock only.
Change KVM_CREATE_PIT2 to follow the same model as KVM_CREATE_IRQCHIP.

Testcase:

    #include &lt;pthread.h&gt;
    #include &lt;linux/kvm.h&gt;
    #include &lt;fcntl.h&gt;
    #include &lt;sys/ioctl.h&gt;
    #include &lt;stdint.h&gt;
    #include &lt;string.h&gt;
    #include &lt;stdlib.h&gt;
    #include &lt;sys/syscall.h&gt;
    #include &lt;unistd.h&gt;

    long r[23];

    void* thr1(void* arg)
    {
        struct kvm_pit_config pitcfg = { .flags = 4 };
        switch ((long)arg) {
        case 0: r[2]  = open("/dev/kvm", O_RDONLY|O_ASYNC);    break;
        case 1: r[3]  = ioctl(r[2], KVM_CREATE_VM, 0);         break;
        case 2: r[4]  = ioctl(r[3], KVM_CREATE_IRQCHIP, 0);    break;
        case 3: r[22] = ioctl(r[3], KVM_CREATE_PIT2, &amp;pitcfg); break;
        }
        return 0;
    }

    int main(int argc, char **argv)
    {
        long i;
        pthread_t th[4];

        memset(r, -1, sizeof(r));
        for (i = 0; i &lt; 4; i++) {
            pthread_create(&amp;th[i], 0, thr, (void*)i);
            if (argc &gt; 1 &amp;&amp; rand()%2) usleep(rand()%1000);
        }
        usleep(20000);
        return 0;
    }

Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Radim Krčmář &lt;rkrcmar@redhat.com&gt;
Signed-off-by: Zubin Mithra &lt;zsm@google.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s390: fix stfle zero padding</title>
<updated>2019-07-21T07:07:15+00:00</updated>
<author>
<name>Heiko Carstens</name>
<email>heiko.carstens@de.ibm.com</email>
</author>
<published>2019-06-17T12:02:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a4db5127609328f80d848d2660e5f6c5c68b25c0'/>
<id>a4db5127609328f80d848d2660e5f6c5c68b25c0</id>
<content type='text'>
commit 4f18d869ffd056c7858f3d617c71345cf19be008 upstream.

The stfle inline assembly returns the number of double words written
(condition code 0) or the double words it would have written
(condition code 3), if the memory array it got as parameter would have
been large enough.

The current stfle implementation assumes that the array is always
large enough and clears those parts of the array that have not been
written to with a subsequent memset call.

If however the array is not large enough memset will get a negative
length parameter, which means that memset clears memory until it gets
an exception and the kernel crashes.

To fix this simply limit the maximum length. Move also the inline
assembly to an extra function to avoid clobbering of register 0, which
might happen because of the added min_t invocation together with code
instrumentation.

The bug was introduced with commit 14375bc4eb8d ("[S390] cleanup
facility list handling") but was rather harmless, since it would only
write to a rather large array. It became a potential problem with
commit 3ab121ab1866 ("[S390] kernel: Add z/VM LGR detection"). Since
then it writes to an array with only four double words, while some
machines already deliver three double words. As soon as machines have
a facility bit within the fifth double a crash on IPL would happen.

Fixes: 14375bc4eb8d ("[S390] cleanup facility list handling")
Cc: &lt;stable@vger.kernel.org&gt; # v2.6.37+
Reviewed-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 4f18d869ffd056c7858f3d617c71345cf19be008 upstream.

The stfle inline assembly returns the number of double words written
(condition code 0) or the double words it would have written
(condition code 3), if the memory array it got as parameter would have
been large enough.

The current stfle implementation assumes that the array is always
large enough and clears those parts of the array that have not been
written to with a subsequent memset call.

If however the array is not large enough memset will get a negative
length parameter, which means that memset clears memory until it gets
an exception and the kernel crashes.

To fix this simply limit the maximum length. Move also the inline
assembly to an extra function to avoid clobbering of register 0, which
might happen because of the added min_t invocation together with code
instrumentation.

The bug was introduced with commit 14375bc4eb8d ("[S390] cleanup
facility list handling") but was rather harmless, since it would only
write to a rather large array. It became a potential problem with
commit 3ab121ab1866 ("[S390] kernel: Add z/VM LGR detection"). Since
then it writes to an array with only four double words, while some
machines already deliver three double words. As soon as machines have
a facility bit within the fifth double a crash on IPL would happen.

Fixes: 14375bc4eb8d ("[S390] cleanup facility list handling")
Cc: &lt;stable@vger.kernel.org&gt; # v2.6.37+
Reviewed-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>ARC: hide unused function unw_hdr_alloc</title>
<updated>2019-07-21T07:07:14+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2019-07-03T13:39:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=07724b2fad568c08578df99067a226c958fb532a'/>
<id>07724b2fad568c08578df99067a226c958fb532a</id>
<content type='text'>
commit fd5de2721ea7d16e2b16c4049ac49f229551b290 upstream.

As kernelci.org reports, this function is not used in
vdk_hs38_defconfig:

arch/arc/kernel/unwind.c:188:14: warning: 'unw_hdr_alloc' defined but not used [-Wunused-function]

Fixes: bc79c9a72165 ("ARC: dw2 unwind: Reinstante unwinding out of modules")
Link: https://kernelci.org/build/id/5d1cae3f59b514300340c132/logs/
Cc: stable@vger.kernel.org
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit fd5de2721ea7d16e2b16c4049ac49f229551b290 upstream.

As kernelci.org reports, this function is not used in
vdk_hs38_defconfig:

arch/arc/kernel/unwind.c:188:14: warning: 'unw_hdr_alloc' defined but not used [-Wunused-function]

Fixes: bc79c9a72165 ("ARC: dw2 unwind: Reinstante unwinding out of modules")
Link: https://kernelci.org/build/id/5d1cae3f59b514300340c132/logs/
Cc: stable@vger.kernel.org
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>kvm: x86: avoid warning on repeated KVM_SET_TSS_ADDR</title>
<updated>2019-07-21T07:07:14+00:00</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2016-06-01T12:09:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=30c54ffcb95ccd61f76b5d3fbc41b91e63a05916'/>
<id>30c54ffcb95ccd61f76b5d3fbc41b91e63a05916</id>
<content type='text'>
commit b21629da120dd6145d14dbd6d028e1bba680a92b upstream.

Found by syzkaller:

    WARNING: CPU: 3 PID: 15175 at arch/x86/kvm/x86.c:7705 __x86_set_memory_region+0x1dc/0x1f0 [kvm]()
    CPU: 3 PID: 15175 Comm: a.out Tainted: G        W       4.4.6-300.fc23.x86_64 #1
    Hardware name: LENOVO 2325F51/2325F51, BIOS G2ET32WW (1.12 ) 05/30/2012
     0000000000000286 00000000950899a7 ffff88011ab3fbf0 ffffffff813b542e
     0000000000000000 ffffffffa0966496 ffff88011ab3fc28 ffffffff810a40f2
     00000000000001fd 0000000000003000 ffff88014fc50000 0000000000000000
    Call Trace:
     [&lt;ffffffff813b542e&gt;] dump_stack+0x63/0x85
     [&lt;ffffffff810a40f2&gt;] warn_slowpath_common+0x82/0xc0
     [&lt;ffffffff810a423a&gt;] warn_slowpath_null+0x1a/0x20
     [&lt;ffffffffa09251cc&gt;] __x86_set_memory_region+0x1dc/0x1f0 [kvm]
     [&lt;ffffffffa092521b&gt;] x86_set_memory_region+0x3b/0x60 [kvm]
     [&lt;ffffffffa09bb61c&gt;] vmx_set_tss_addr+0x3c/0x150 [kvm_intel]
     [&lt;ffffffffa092f4d4&gt;] kvm_arch_vm_ioctl+0x654/0xbc0 [kvm]
     [&lt;ffffffffa091d31a&gt;] kvm_vm_ioctl+0x9a/0x6f0 [kvm]
     [&lt;ffffffff81241248&gt;] do_vfs_ioctl+0x298/0x480
     [&lt;ffffffff812414a9&gt;] SyS_ioctl+0x79/0x90
     [&lt;ffffffff817a04ee&gt;] entry_SYSCALL_64_fastpath+0x12/0x71

Testcase:

    #include &lt;unistd.h&gt;
    #include &lt;sys/ioctl.h&gt;
    #include &lt;fcntl.h&gt;
    #include &lt;string.h&gt;
    #include &lt;linux/kvm.h&gt;

    long r[8];

    int main()
    {
        memset(r, -1, sizeof(r));
	r[2] = open("/dev/kvm", O_RDONLY|O_TRUNC);
        r[3] = ioctl(r[2], KVM_CREATE_VM, 0x0ul);
        r[5] = ioctl(r[3], KVM_SET_TSS_ADDR, 0x20000000ul);
        r[7] = ioctl(r[3], KVM_SET_TSS_ADDR, 0x20000000ul);
        return 0;
    }

Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Radim Krčmář &lt;rkrcmar@redhat.com&gt;
Cc: Zubin Mithra &lt;zsm@chromium.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit b21629da120dd6145d14dbd6d028e1bba680a92b upstream.

Found by syzkaller:

    WARNING: CPU: 3 PID: 15175 at arch/x86/kvm/x86.c:7705 __x86_set_memory_region+0x1dc/0x1f0 [kvm]()
    CPU: 3 PID: 15175 Comm: a.out Tainted: G        W       4.4.6-300.fc23.x86_64 #1
    Hardware name: LENOVO 2325F51/2325F51, BIOS G2ET32WW (1.12 ) 05/30/2012
     0000000000000286 00000000950899a7 ffff88011ab3fbf0 ffffffff813b542e
     0000000000000000 ffffffffa0966496 ffff88011ab3fc28 ffffffff810a40f2
     00000000000001fd 0000000000003000 ffff88014fc50000 0000000000000000
    Call Trace:
     [&lt;ffffffff813b542e&gt;] dump_stack+0x63/0x85
     [&lt;ffffffff810a40f2&gt;] warn_slowpath_common+0x82/0xc0
     [&lt;ffffffff810a423a&gt;] warn_slowpath_null+0x1a/0x20
     [&lt;ffffffffa09251cc&gt;] __x86_set_memory_region+0x1dc/0x1f0 [kvm]
     [&lt;ffffffffa092521b&gt;] x86_set_memory_region+0x3b/0x60 [kvm]
     [&lt;ffffffffa09bb61c&gt;] vmx_set_tss_addr+0x3c/0x150 [kvm_intel]
     [&lt;ffffffffa092f4d4&gt;] kvm_arch_vm_ioctl+0x654/0xbc0 [kvm]
     [&lt;ffffffffa091d31a&gt;] kvm_vm_ioctl+0x9a/0x6f0 [kvm]
     [&lt;ffffffff81241248&gt;] do_vfs_ioctl+0x298/0x480
     [&lt;ffffffff812414a9&gt;] SyS_ioctl+0x79/0x90
     [&lt;ffffffff817a04ee&gt;] entry_SYSCALL_64_fastpath+0x12/0x71

Testcase:

    #include &lt;unistd.h&gt;
    #include &lt;sys/ioctl.h&gt;
    #include &lt;fcntl.h&gt;
    #include &lt;string.h&gt;
    #include &lt;linux/kvm.h&gt;

    long r[8];

    int main()
    {
        memset(r, -1, sizeof(r));
	r[2] = open("/dev/kvm", O_RDONLY|O_TRUNC);
        r[3] = ioctl(r[2], KVM_CREATE_VM, 0x0ul);
        r[5] = ioctl(r[3], KVM_SET_TSS_ADDR, 0x20000000ul);
        r[7] = ioctl(r[3], KVM_SET_TSS_ADDR, 0x20000000ul);
        return 0;
    }

Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Radim Krčmář &lt;rkrcmar@redhat.com&gt;
Cc: Zubin Mithra &lt;zsm@chromium.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>ARM: omap2: remove incorrect __init annotation</title>
<updated>2019-07-21T07:07:13+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2019-06-19T13:04:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f40fdfa57bc485144008962bb81940e29945ae2d'/>
<id>f40fdfa57bc485144008962bb81940e29945ae2d</id>
<content type='text'>
[ Upstream commit 27e23d8975270df6999f8b5b3156fc0c04927451 ]

omap3xxx_prm_enable_io_wakeup() is marked __init, but its caller is not, so
we get a warning with clang-8:

WARNING: vmlinux.o(.text+0x343c8): Section mismatch in reference from the function omap3xxx_prm_late_init() to the function .init.text:omap3xxx_prm_enable_io_wakeup()
The function omap3xxx_prm_late_init() references
the function __init omap3xxx_prm_enable_io_wakeup().
This is often because omap3xxx_prm_late_init lacks a __init
annotation or the annotation of omap3xxx_prm_enable_io_wakeup is wrong.

When building with gcc, omap3xxx_prm_enable_io_wakeup() is always
inlined, so we never noticed in the past.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Nathan Chancellor &lt;natechancellor@gmail.com&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Reviewed-by: Andrew Murray &lt;andrew.murray@arm.com&gt;
Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 27e23d8975270df6999f8b5b3156fc0c04927451 ]

omap3xxx_prm_enable_io_wakeup() is marked __init, but its caller is not, so
we get a warning with clang-8:

WARNING: vmlinux.o(.text+0x343c8): Section mismatch in reference from the function omap3xxx_prm_late_init() to the function .init.text:omap3xxx_prm_enable_io_wakeup()
The function omap3xxx_prm_late_init() references
the function __init omap3xxx_prm_enable_io_wakeup().
This is often because omap3xxx_prm_late_init lacks a __init
annotation or the annotation of omap3xxx_prm_enable_io_wakeup is wrong.

When building with gcc, omap3xxx_prm_enable_io_wakeup() is always
inlined, so we never noticed in the past.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Nathan Chancellor &lt;natechancellor@gmail.com&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Reviewed-by: Andrew Murray &lt;andrew.murray@arm.com&gt;
Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>MIPS: Remove superfluous check for __linux__</title>
<updated>2019-07-21T07:07:12+00:00</updated>
<author>
<name>Sean Young</name>
<email>sean@mess.org</email>
</author>
<published>2018-11-16T16:09:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9b62316b424e5ce03880a9da3145cde664495f7a'/>
<id>9b62316b424e5ce03880a9da3145cde664495f7a</id>
<content type='text'>
commit 1287533d3d95d5ad8b02773733044500b1be06bc upstream.

When building BPF code using "clang -target bpf -c", clang does not
define __linux__.

To build BPF IR decoders the include linux/lirc.h is needed which
includes linux/types.h. Currently this workaround is needed:

https://git.linuxtv.org/v4l-utils.git/commit/?id=dd3ff81f58c4e1e6f33765dc61ad33c48ae6bb07

This check might otherwise be useful to stop users from using a non-linux
compiler, but if you're doing that you are going to have a lot more
trouble anyway.

Signed-off-by: Sean Young &lt;sean@mess.org&gt;
Signed-off-by: Paul Burton &lt;paul.burton@mips.com&gt;
Patchwork: https://patchwork.linux-mips.org/patch/21149/
Cc: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: James Hogan &lt;jhogan@kernel.org&gt;
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 1287533d3d95d5ad8b02773733044500b1be06bc upstream.

When building BPF code using "clang -target bpf -c", clang does not
define __linux__.

To build BPF IR decoders the include linux/lirc.h is needed which
includes linux/types.h. Currently this workaround is needed:

https://git.linuxtv.org/v4l-utils.git/commit/?id=dd3ff81f58c4e1e6f33765dc61ad33c48ae6bb07

This check might otherwise be useful to stop users from using a non-linux
compiler, but if you're doing that you are going to have a lot more
trouble anyway.

Signed-off-by: Sean Young &lt;sean@mess.org&gt;
Signed-off-by: Paul Burton &lt;paul.burton@mips.com&gt;
Patchwork: https://patchwork.linux-mips.org/patch/21149/
Cc: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: James Hogan &lt;jhogan@kernel.org&gt;
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>x86/tls: Fix possible spectre-v1 in do_get_thread_area()</title>
<updated>2019-07-21T07:07:09+00:00</updated>
<author>
<name>Dianzhang Chen</name>
<email>dianzhangchen0@gmail.com</email>
</author>
<published>2019-06-26T04:50:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=85707634a0acda245eb78f2aa05a4254b7fd2fb2'/>
<id>85707634a0acda245eb78f2aa05a4254b7fd2fb2</id>
<content type='text'>
commit 993773d11d45c90cb1c6481c2638c3d9f092ea5b upstream.

The index to access the threads tls array is controlled by userspace
via syscall: sys_ptrace(), hence leading to a potential exploitation
of the Spectre variant 1 vulnerability.

The index can be controlled from:
        ptrace -&gt; arch_ptrace -&gt; do_get_thread_area.

Fix this by sanitizing the user supplied index before using it to access
the p-&gt;thread.tls_array.

Signed-off-by: Dianzhang Chen &lt;dianzhangchen0@gmail.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: bp@alien8.de
Cc: hpa@zytor.com
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/1561524630-3642-1-git-send-email-dianzhangchen0@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 993773d11d45c90cb1c6481c2638c3d9f092ea5b upstream.

The index to access the threads tls array is controlled by userspace
via syscall: sys_ptrace(), hence leading to a potential exploitation
of the Spectre variant 1 vulnerability.

The index can be controlled from:
        ptrace -&gt; arch_ptrace -&gt; do_get_thread_area.

Fix this by sanitizing the user supplied index before using it to access
the p-&gt;thread.tls_array.

Signed-off-by: Dianzhang Chen &lt;dianzhangchen0@gmail.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: bp@alien8.de
Cc: hpa@zytor.com
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/1561524630-3642-1-git-send-email-dianzhangchen0@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>x86/ptrace: Fix possible spectre-v1 in ptrace_get_debugreg()</title>
<updated>2019-07-21T07:07:09+00:00</updated>
<author>
<name>Dianzhang Chen</name>
<email>dianzhangchen0@gmail.com</email>
</author>
<published>2019-06-25T15:30:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=92c407615582d079f4e629c7c3a86ae6e476e22a'/>
<id>92c407615582d079f4e629c7c3a86ae6e476e22a</id>
<content type='text'>
commit 31a2fbb390fee4231281b939e1979e810f945415 upstream.

The index to access the threads ptrace_bps is controlled by userspace via
syscall: sys_ptrace(), hence leading to a potential exploitation of the
Spectre variant 1 vulnerability.

The index can be controlled from:
    ptrace -&gt; arch_ptrace -&gt; ptrace_get_debugreg.

Fix this by sanitizing the user supplied index before using it access
thread-&gt;ptrace_bps.

Signed-off-by: Dianzhang Chen &lt;dianzhangchen0@gmail.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: bp@alien8.de
Cc: hpa@zytor.com
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/1561476617-3759-1-git-send-email-dianzhangchen0@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 31a2fbb390fee4231281b939e1979e810f945415 upstream.

The index to access the threads ptrace_bps is controlled by userspace via
syscall: sys_ptrace(), hence leading to a potential exploitation of the
Spectre variant 1 vulnerability.

The index can be controlled from:
    ptrace -&gt; arch_ptrace -&gt; ptrace_get_debugreg.

Fix this by sanitizing the user supplied index before using it access
thread-&gt;ptrace_bps.

Signed-off-by: Dianzhang Chen &lt;dianzhangchen0@gmail.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: bp@alien8.de
Cc: hpa@zytor.com
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/1561476617-3759-1-git-send-email-dianzhangchen0@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>ARM: davinci: da8xx: specify dma_coherent_mask for lcdc</title>
<updated>2019-07-21T07:07:08+00:00</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2019-06-07T14:33:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=44aa12109c339399ac6c695ed54c04c50f549c9c'/>
<id>44aa12109c339399ac6c695ed54c04c50f549c9c</id>
<content type='text'>
[ Upstream commit 68f2515bb31a664ba3e2bc1eb78dd9f529b10067 ]

The lcdc device is missing the dma_coherent_mask definition causing the
following warning on da850-evm:

da8xx_lcdc da8xx_lcdc.0: found Sharp_LK043T1DG01 panel
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at kernel/dma/mapping.c:247 dma_alloc_attrs+0xc8/0x110
Modules linked in:
CPU: 0 PID: 1 Comm: swapper Not tainted 5.2.0-rc3-00077-g16d72dd4891f #18
Hardware name: DaVinci DA850/OMAP-L138/AM18x EVM
[&lt;c000fce8&gt;] (unwind_backtrace) from [&lt;c000d900&gt;] (show_stack+0x10/0x14)
[&lt;c000d900&gt;] (show_stack) from [&lt;c001a4f8&gt;] (__warn+0xec/0x114)
[&lt;c001a4f8&gt;] (__warn) from [&lt;c001a634&gt;] (warn_slowpath_null+0x3c/0x48)
[&lt;c001a634&gt;] (warn_slowpath_null) from [&lt;c0065860&gt;] (dma_alloc_attrs+0xc8/0x110)
[&lt;c0065860&gt;] (dma_alloc_attrs) from [&lt;c02820f8&gt;] (fb_probe+0x228/0x5a8)
[&lt;c02820f8&gt;] (fb_probe) from [&lt;c02d3e9c&gt;] (platform_drv_probe+0x48/0x9c)
[&lt;c02d3e9c&gt;] (platform_drv_probe) from [&lt;c02d221c&gt;] (really_probe+0x1d8/0x2d4)
[&lt;c02d221c&gt;] (really_probe) from [&lt;c02d2474&gt;] (driver_probe_device+0x5c/0x168)
[&lt;c02d2474&gt;] (driver_probe_device) from [&lt;c02d2728&gt;] (device_driver_attach+0x58/0x60)
[&lt;c02d2728&gt;] (device_driver_attach) from [&lt;c02d27b0&gt;] (__driver_attach+0x80/0xbc)
[&lt;c02d27b0&gt;] (__driver_attach) from [&lt;c02d047c&gt;] (bus_for_each_dev+0x64/0xb4)
[&lt;c02d047c&gt;] (bus_for_each_dev) from [&lt;c02d1590&gt;] (bus_add_driver+0xe4/0x1d8)
[&lt;c02d1590&gt;] (bus_add_driver) from [&lt;c02d301c&gt;] (driver_register+0x78/0x10c)
[&lt;c02d301c&gt;] (driver_register) from [&lt;c000a5c0&gt;] (do_one_initcall+0x48/0x1bc)
[&lt;c000a5c0&gt;] (do_one_initcall) from [&lt;c05cae6c&gt;] (kernel_init_freeable+0x10c/0x1d8)
[&lt;c05cae6c&gt;] (kernel_init_freeable) from [&lt;c048a000&gt;] (kernel_init+0x8/0xf4)
[&lt;c048a000&gt;] (kernel_init) from [&lt;c00090e0&gt;] (ret_from_fork+0x14/0x34)
Exception stack(0xc6837fb0 to 0xc6837ff8)
7fa0:                                     00000000 00000000 00000000 00000000
7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
7fe0: 00000000 00000000 00000000 00000000 00000013 00000000
---[ end trace 8a8073511be81dd2 ]---

Add a 32-bit mask to the platform device's definition.

Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;

Signed-off-by: Sekhar Nori &lt;nsekhar@ti.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 68f2515bb31a664ba3e2bc1eb78dd9f529b10067 ]

The lcdc device is missing the dma_coherent_mask definition causing the
following warning on da850-evm:

da8xx_lcdc da8xx_lcdc.0: found Sharp_LK043T1DG01 panel
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at kernel/dma/mapping.c:247 dma_alloc_attrs+0xc8/0x110
Modules linked in:
CPU: 0 PID: 1 Comm: swapper Not tainted 5.2.0-rc3-00077-g16d72dd4891f #18
Hardware name: DaVinci DA850/OMAP-L138/AM18x EVM
[&lt;c000fce8&gt;] (unwind_backtrace) from [&lt;c000d900&gt;] (show_stack+0x10/0x14)
[&lt;c000d900&gt;] (show_stack) from [&lt;c001a4f8&gt;] (__warn+0xec/0x114)
[&lt;c001a4f8&gt;] (__warn) from [&lt;c001a634&gt;] (warn_slowpath_null+0x3c/0x48)
[&lt;c001a634&gt;] (warn_slowpath_null) from [&lt;c0065860&gt;] (dma_alloc_attrs+0xc8/0x110)
[&lt;c0065860&gt;] (dma_alloc_attrs) from [&lt;c02820f8&gt;] (fb_probe+0x228/0x5a8)
[&lt;c02820f8&gt;] (fb_probe) from [&lt;c02d3e9c&gt;] (platform_drv_probe+0x48/0x9c)
[&lt;c02d3e9c&gt;] (platform_drv_probe) from [&lt;c02d221c&gt;] (really_probe+0x1d8/0x2d4)
[&lt;c02d221c&gt;] (really_probe) from [&lt;c02d2474&gt;] (driver_probe_device+0x5c/0x168)
[&lt;c02d2474&gt;] (driver_probe_device) from [&lt;c02d2728&gt;] (device_driver_attach+0x58/0x60)
[&lt;c02d2728&gt;] (device_driver_attach) from [&lt;c02d27b0&gt;] (__driver_attach+0x80/0xbc)
[&lt;c02d27b0&gt;] (__driver_attach) from [&lt;c02d047c&gt;] (bus_for_each_dev+0x64/0xb4)
[&lt;c02d047c&gt;] (bus_for_each_dev) from [&lt;c02d1590&gt;] (bus_add_driver+0xe4/0x1d8)
[&lt;c02d1590&gt;] (bus_add_driver) from [&lt;c02d301c&gt;] (driver_register+0x78/0x10c)
[&lt;c02d301c&gt;] (driver_register) from [&lt;c000a5c0&gt;] (do_one_initcall+0x48/0x1bc)
[&lt;c000a5c0&gt;] (do_one_initcall) from [&lt;c05cae6c&gt;] (kernel_init_freeable+0x10c/0x1d8)
[&lt;c05cae6c&gt;] (kernel_init_freeable) from [&lt;c048a000&gt;] (kernel_init+0x8/0xf4)
[&lt;c048a000&gt;] (kernel_init) from [&lt;c00090e0&gt;] (ret_from_fork+0x14/0x34)
Exception stack(0xc6837fb0 to 0xc6837ff8)
7fa0:                                     00000000 00000000 00000000 00000000
7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
7fe0: 00000000 00000000 00000000 00000000 00000013 00000000
---[ end trace 8a8073511be81dd2 ]---

Add a 32-bit mask to the platform device's definition.

Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;

Signed-off-by: Sekhar Nori &lt;nsekhar@ti.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ARM: davinci: da850-evm: call regulator_has_full_constraints()</title>
<updated>2019-07-21T07:07:07+00:00</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2019-06-07T09:02:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d1fe78cac7b9b7cd5460f136b2d9dcb70b83f9d0'/>
<id>d1fe78cac7b9b7cd5460f136b2d9dcb70b83f9d0</id>
<content type='text'>
[ Upstream commit 0c0c9b5753cd04601b17de09da1ed2885a3b42fe ]

The BB expander at 0x21 i2c bus 1 fails to probe on da850-evm because
the board doesn't set has_full_constraints to true in the regulator
API.

Call regulator_has_full_constraints() at the end of board registration
just like we do in da850-lcdk and da830-evm.

Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Sekhar Nori &lt;nsekhar@ti.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 0c0c9b5753cd04601b17de09da1ed2885a3b42fe ]

The BB expander at 0x21 i2c bus 1 fails to probe on da850-evm because
the board doesn't set has_full_constraints to true in the regulator
API.

Call regulator_has_full_constraints() at the end of board registration
just like we do in da850-lcdk and da830-evm.

Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Sekhar Nori &lt;nsekhar@ti.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
