<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers, branch v4.9.170</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.170</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.170'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2019-04-20T07:07:54Z</updated>
<entry>
<title>net: stmmac: Set dma ring length before enabling the DMA</title>
<updated>2019-04-20T07:07:54Z</updated>
<author>
<name>Lars Persson</name>
<email>lars.persson@axis.com</email>
</author>
<published>2019-04-15T07:50:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b142075137c31c1009069f01d6882c06cf760156'/>
<id>urn:sha1:b142075137c31c1009069f01d6882c06cf760156</id>
<content type='text'>
This was fixed in upstream by commit 7d9e6c5afab6 ("net: stmmac: Integrate
XGMAC into main driver flow") that is a new feature commit.

We found a race condition in the DMA init sequence that hits if the
PHY already has link up during stmmac_hw_setup. Since the ring length
was programmed after enabling the RX path, we might receive a packet
before the correct ring length is programmed. When that happened we
could not get reliable interrupts for DMA RX and the MTL complained
about RX FIFO overrun.

Signed-off-by: Lars Persson &lt;larper@axis.com&gt;
Cc: stable@vger.kernel.org # 4.9.x
Cc: Giuseppe Cavallaro &lt;peppe.cavallaro@st.com&gt;
Cc: Alexandre Torgue &lt;alexandre.torgue@st.com&gt;
Cc: Jose Abreu &lt;joabreu@synopsys.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tpm/tpm_crb: Avoid unaligned reads in crb_recv()</title>
<updated>2019-04-20T07:07:54Z</updated>
<author>
<name>Jarkko Sakkinen</name>
<email>jarkko.sakkinen@linux.intel.com</email>
</author>
<published>2019-04-17T14:59:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b6178400e55080fd1fcf3ddbfd2e5c61b83c6421'/>
<id>urn:sha1:b6178400e55080fd1fcf3ddbfd2e5c61b83c6421</id>
<content type='text'>
commit 3d7a850fdc1a2e4d2adbc95cc0fc962974725e88 upstream

The current approach to read first 6 bytes from the response and then tail
of the response, can cause the 2nd memcpy_fromio() to do an unaligned read
(e.g. read 32-bit word from address aligned to a 16-bits), depending on how
memcpy_fromio() is implemented. If this happens, the read will fail and the
memory controller will fill the read with 1's.

This was triggered by 170d13ca3a2f, which should be probably refined to
check and react to the address alignment. Before that commit, on x86
memcpy_fromio() turned out to be memcpy(). By a luck GCC has done the right
thing (from tpm_crb's perspective) for us so far, but we should not rely on
that. Thus, it makes sense to fix this also in tpm_crb, not least because
the fix can be then backported to stable kernels and make them more robust
when compiled in differing environments.

Cc: stable@vger.kernel.org
Cc: James Morris &lt;jmorris@namei.org&gt;
Cc: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Cc: Jerry Snitselaar &lt;jsnitsel@redhat.com&gt;
Fixes: 30fc8d138e91 ("tpm: TPM 2.0 CRB Interface")
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Reviewed-by: Jerry Snitselaar &lt;jsnitsel@redhat.com&gt;
Acked-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Signed-off-by: Sasha Levin (Microsoft) &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>lkdtm: Add tests for NULL pointer dereference</title>
<updated>2019-04-20T07:07:53Z</updated>
<author>
<name>Christophe Leroy</name>
<email>christophe.leroy@c-s.fr</email>
</author>
<published>2018-12-14T15:26:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=14c328b46e23fcac4d9e2e38b989827e612e6d1e'/>
<id>urn:sha1:14c328b46e23fcac4d9e2e38b989827e612e6d1e</id>
<content type='text'>
[ Upstream commit 59a12205d3c32aee4c13ca36889fdf7cfed31126 ]

Introduce lkdtm tests for NULL pointer dereference: check access or exec
at NULL address, since these errors tend to be reported differently from
the general fault error text. For example from x86:

    pr_alert("BUG: unable to handle kernel %s at %px\n",
        address &lt; PAGE_SIZE ? "NULL pointer dereference" : "paging request",
        (void *)address);

Signed-off-by: Christophe Leroy &lt;christophe.leroy@c-s.fr&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>soc/tegra: pmc: Drop locking from tegra_powergate_is_powered()</title>
<updated>2019-04-20T07:07:53Z</updated>
<author>
<name>Dmitry Osipenko</name>
<email>digetx@gmail.com</email>
</author>
<published>2018-10-21T18:36:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=52796ff1a545a6fe5d4a5504ae14b871134d0f76'/>
<id>urn:sha1:52796ff1a545a6fe5d4a5504ae14b871134d0f76</id>
<content type='text'>
[ Upstream commit b6e1fd17a38bd1d97c11d69fd3207b3ef9bfa4b3 ]

This fixes splats like the one below if CONFIG_DEBUG_ATOMIC_SLEEP=y
and machine (Tegra30) booted with SMP=n or all secondary CPU's are put
offline. Locking isn't needed because it protects atomic operation.

BUG: sleeping function called from invalid context at kernel/locking/mutex.c:254
in_atomic(): 1, irqs_disabled(): 128, pid: 0, name: swapper/0
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G         C        4.18.0-next-20180821-00180-gc3ebb6544e44-dirty #823
Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
[&lt;c01134f4&gt;] (unwind_backtrace) from [&lt;c010db2c&gt;] (show_stack+0x20/0x24)
[&lt;c010db2c&gt;] (show_stack) from [&lt;c0bd0f3c&gt;] (dump_stack+0x94/0xa8)
[&lt;c0bd0f3c&gt;] (dump_stack) from [&lt;c0151df8&gt;] (___might_sleep+0x13c/0x174)
[&lt;c0151df8&gt;] (___might_sleep) from [&lt;c0151ea0&gt;] (__might_sleep+0x70/0xa8)
[&lt;c0151ea0&gt;] (__might_sleep) from [&lt;c0bec2b8&gt;] (mutex_lock+0x2c/0x70)
[&lt;c0bec2b8&gt;] (mutex_lock) from [&lt;c0589844&gt;] (tegra_powergate_is_powered+0x44/0xa8)
[&lt;c0589844&gt;] (tegra_powergate_is_powered) from [&lt;c0581a60&gt;] (tegra30_cpu_rail_off_ready+0x30/0x74)
[&lt;c0581a60&gt;] (tegra30_cpu_rail_off_ready) from [&lt;c0122244&gt;] (tegra30_idle_lp2+0xa0/0x108)
[&lt;c0122244&gt;] (tegra30_idle_lp2) from [&lt;c0853438&gt;] (cpuidle_enter_state+0x140/0x540)
[&lt;c0853438&gt;] (cpuidle_enter_state) from [&lt;c08538a4&gt;] (cpuidle_enter+0x40/0x4c)
[&lt;c08538a4&gt;] (cpuidle_enter) from [&lt;c01595e0&gt;] (call_cpuidle+0x30/0x48)
[&lt;c01595e0&gt;] (call_cpuidle) from [&lt;c01599f8&gt;] (do_idle+0x238/0x28c)
[&lt;c01599f8&gt;] (do_idle) from [&lt;c0159d28&gt;] (cpu_startup_entry+0x28/0x2c)
[&lt;c0159d28&gt;] (cpu_startup_entry) from [&lt;c0be76c8&gt;] (rest_init+0xd8/0xdc)
[&lt;c0be76c8&gt;] (rest_init) from [&lt;c1200f50&gt;] (start_kernel+0x41c/0x430)

Signed-off-by: Dmitry Osipenko &lt;digetx@gmail.com&gt;
Acked-by: Jon Hunter &lt;jonathanh@nvidia.com&gt;
Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>iommu/dmar: Fix buffer overflow during PCI bus notification</title>
<updated>2019-04-20T07:07:53Z</updated>
<author>
<name>Julia Cartwright</name>
<email>julia@ni.com</email>
</author>
<published>2019-02-20T16:46:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0afa6d86e036e9de1db8d9a5236529e149b4fccf'/>
<id>urn:sha1:0afa6d86e036e9de1db8d9a5236529e149b4fccf</id>
<content type='text'>
[ Upstream commit cffaaf0c816238c45cd2d06913476c83eb50f682 ]

Commit 57384592c433 ("iommu/vt-d: Store bus information in RMRR PCI
device path") changed the type of the path data, however, the change in
path type was not reflected in size calculations.  Update to use the
correct type and prevent a buffer overflow.

This bug manifests in systems with deep PCI hierarchies, and can lead to
an overflow of the static allocated buffer (dmar_pci_notify_info_buf),
or can lead to overflow of slab-allocated data.

   BUG: KASAN: global-out-of-bounds in dmar_alloc_pci_notify_info+0x1d5/0x2e0
   Write of size 1 at addr ffffffff90445d80 by task swapper/0/1
   CPU: 0 PID: 1 Comm: swapper/0 Tainted: G        W       4.14.87-rt49-02406-gd0a0e96 #1
   Call Trace:
    ? dump_stack+0x46/0x59
    ? print_address_description+0x1df/0x290
    ? dmar_alloc_pci_notify_info+0x1d5/0x2e0
    ? kasan_report+0x256/0x340
    ? dmar_alloc_pci_notify_info+0x1d5/0x2e0
    ? e820__memblock_setup+0xb0/0xb0
    ? dmar_dev_scope_init+0x424/0x48f
    ? __down_write_common+0x1ec/0x230
    ? dmar_dev_scope_init+0x48f/0x48f
    ? dmar_free_unused_resources+0x109/0x109
    ? cpumask_next+0x16/0x20
    ? __kmem_cache_create+0x392/0x430
    ? kmem_cache_create+0x135/0x2f0
    ? e820__memblock_setup+0xb0/0xb0
    ? intel_iommu_init+0x170/0x1848
    ? _raw_spin_unlock_irqrestore+0x32/0x60
    ? migrate_enable+0x27a/0x5b0
    ? sched_setattr+0x20/0x20
    ? migrate_disable+0x1fc/0x380
    ? task_rq_lock+0x170/0x170
    ? try_to_run_init_process+0x40/0x40
    ? locks_remove_file+0x85/0x2f0
    ? dev_prepare_static_identity_mapping+0x78/0x78
    ? rt_spin_unlock+0x39/0x50
    ? lockref_put_or_lock+0x2a/0x40
    ? dput+0x128/0x2f0
    ? __rcu_read_unlock+0x66/0x80
    ? __fput+0x250/0x300
    ? __rcu_read_lock+0x1b/0x30
    ? mntput_no_expire+0x38/0x290
    ? e820__memblock_setup+0xb0/0xb0
    ? pci_iommu_init+0x25/0x63
    ? pci_iommu_init+0x25/0x63
    ? do_one_initcall+0x7e/0x1c0
    ? initcall_blacklisted+0x120/0x120
    ? kernel_init_freeable+0x27b/0x307
    ? rest_init+0xd0/0xd0
    ? kernel_init+0xf/0x120
    ? rest_init+0xd0/0xd0
    ? ret_from_fork+0x1f/0x40
   The buggy address belongs to the variable:
    dmar_pci_notify_info_buf+0x40/0x60

Fixes: 57384592c433 ("iommu/vt-d: Store bus information in RMRR PCI device path")
Signed-off-by: Julia Cartwright &lt;julia@ni.com&gt;
Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ACPI / SBS: Fix GPE storm on recent MacBookPro's</title>
<updated>2019-04-20T07:07:52Z</updated>
<author>
<name>Ronald Tschalär</name>
<email>ronald@innovation.ch</email>
</author>
<published>2018-10-01T02:52:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3fbf4c0a856f64dca5127c12e7a24d38bd9ea4b7'/>
<id>urn:sha1:3fbf4c0a856f64dca5127c12e7a24d38bd9ea4b7</id>
<content type='text'>
[ Upstream commit ca1721c5bee77105829cbd7baab8ee0eab85b06d ]

On Apple machines, plugging-in or unplugging the power triggers a GPE
for the EC. Since these machines expose an SBS device, this GPE ends
up triggering the acpi_sbs_callback(). This in turn tries to get the
status of the SBS charger. However, on MBP13,* and MBP14,* machines,
performing the smbus-read operation to get the charger's status triggers
the EC's GPE again. The result is an endless re-triggering and handling
of that GPE, consuming significant CPU resources (&gt; 50% in irq).

In the end this is quite similar to commit 3031cddea633 (ACPI / SBS:
Don't assume the existence of an SBS charger), except that on the above
machines a status of all 1's is returned. And like there, we just want
ignore the charger here.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=198169
Signed-off-by: Ronald TschalÃ¤r &lt;ronald@innovation.ch&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>HID: i2c-hid: override HID descriptors for certain devices</title>
<updated>2019-04-20T07:07:52Z</updated>
<author>
<name>Julian Sax</name>
<email>jsbc@gmx.de</email>
</author>
<published>2018-09-19T09:46:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f0c9eab15700f5bfaeb88ec3cd9f3f46d4a1b710'/>
<id>urn:sha1:f0c9eab15700f5bfaeb88ec3cd9f3f46d4a1b710</id>
<content type='text'>
[ Upstream commit 9ee3e06610fdb8a601cde59c92089fb6c1deb4aa ]

A particular touchpad (SIPODEV SP1064) refuses to supply the HID
descriptors. This patch provides the framework for overriding these
descriptors based on DMI data. It also includes the descriptors for
said touchpad, which were extracted by listening to the traffic of the
windows filter driver, as well as the DMI data for the laptops known
to use this device.

Relevant Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1526312

Cc: Hans de Goede &lt;hdegoede@redhat.com&gt;
Reported-and-tested-by: ahormann@gmx.net
Reported-and-tested-by: Bruno Jesus &lt;bruno.fl.jesus@gmail.com&gt;
Reported-and-tested-by: Dietrich &lt;enaut.w@googlemail.com&gt;
Reported-and-tested-by: kloxdami@yahoo.com
Signed-off-by: Julian Sax &lt;jsbc@gmx.de&gt;
Reviewed-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>serial: uartps: console_setup() can't be placed to init section</title>
<updated>2019-04-20T07:07:52Z</updated>
<author>
<name>Michal Simek</name>
<email>michal.simek@xilinx.com</email>
</author>
<published>2018-09-03T13:10:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c443251b65e26f396701e480c57e3c41f2afeae8'/>
<id>urn:sha1:c443251b65e26f396701e480c57e3c41f2afeae8</id>
<content type='text'>
[ Upstream commit 4bb1ce2350a598502b23088b169e16b43d4bc639 ]

When console device is rebinded, console_setup() is called again.
But marking it as __init means that function will be clear after boot is
complete. If console device is binded again console_setup() is not found
and error "Unable to handle kernel paging request at virtual address"
is reported.

Signed-off-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>rsi: improve kernel thread handling to fix kernel panic</title>
<updated>2019-04-20T07:07:51Z</updated>
<author>
<name>Siva Rebbagondla</name>
<email>siva.rebbagondla@redpinesignals.com</email>
</author>
<published>2018-08-27T11:35:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c8ed05b1d8520f40395916438da9b38ce937a896'/>
<id>urn:sha1:c8ed05b1d8520f40395916438da9b38ce937a896</id>
<content type='text'>
[ Upstream commit 4c62764d0fc21a34ffc44eec1210038c3a2e4473 ]

While running regressions, observed below kernel panic when sdio disconnect
called. This is because of, kthread_stop() is taking care of
wait_for_completion() by default. When wait_for_completion triggered
in kthread_stop and as it was done already, giving kernel panic.
Hence, removing redundant wait_for_completion() from rsi_kill_thread().

... skipping ...
BUG: unable to handle kernel NULL pointer dereference at           (null)
IP: [&lt;ffffffff810a63df&gt;] exit_creds+0x1f/0x50
PGD 0
Oops: 0002 [#1] SMP
CPU: 0 PID: 6502 Comm: rmmod Tainted: G  OE   4.15.9-Generic #154-Ubuntu
Hardware name: Dell Inc. Edge Gateway 3003/ , BIOS 01.00.00 04/17/2017
Stack:
ffff88007392e600 ffff880075847dc0 ffffffff8108160a 0000000000000000
ffff88007392e600 ffff880075847de8 ffffffff810a484b ffff880076127000
ffff88003cd3a800 ffff880074f12a00 ffff880075847e28 ffffffffc09bed15
Call Trace:
[&lt;ffffffff8108160a&gt;] __put_task_struct+0x5a/0x140
[&lt;ffffffff810a484b&gt;] kthread_stop+0x10b/0x110
[&lt;ffffffffc09bed15&gt;] rsi_disconnect+0x2f5/0x300 [ven_rsi_sdio]
[&lt;ffffffff81578bcb&gt;] ? __pm_runtime_resume+0x5b/0x80
[&lt;ffffffff816f0918&gt;] sdio_bus_remove+0x38/0x100
[&lt;ffffffff8156cc64&gt;] __device_release_driver+0xa4/0x150
[&lt;ffffffff8156d7a5&gt;] driver_detach+0xb5/0xc0
[&lt;ffffffff8156c6c5&gt;] bus_remove_driver+0x55/0xd0
[&lt;ffffffff8156dfbc&gt;] driver_unregister+0x2c/0x50
[&lt;ffffffff816f0b8a&gt;] sdio_unregister_driver+0x1a/0x20
[&lt;ffffffffc09bf0f5&gt;] rsi_module_exit+0x15/0x30 [ven_rsi_sdio]
[&lt;ffffffff8110cad8&gt;] SyS_delete_module+0x1b8/0x210
[&lt;ffffffff81851dc8&gt;] entry_SYSCALL_64_fastpath+0x1c/0xbb

Signed-off-by: Siva Rebbagondla &lt;siva.rebbagondla@redpinesignals.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>gpio: pxa: handle corner case of unprobed device</title>
<updated>2019-04-20T07:07:51Z</updated>
<author>
<name>Robert Jarzmik</name>
<email>robert.jarzmik@free.fr</email>
</author>
<published>2018-08-25T08:44:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e3f3cab9e10a0859bfa5374b40e2cdebc3b94cb7'/>
<id>urn:sha1:e3f3cab9e10a0859bfa5374b40e2cdebc3b94cb7</id>
<content type='text'>
[ Upstream commit 9ce3ebe973bf4073426f35f282c6b955ed802765 ]

In the corner case where the gpio driver probe fails, for whatever
reason, the suspend and resume handlers will still be called as they
have to be registered as syscore operations. This applies as well when
no probe was called while the driver has been built in the kernel.

Nicolas tracked this in :
https://bugzilla.kernel.org/show_bug.cgi?id=200905

Therefore, add a failsafe in these function, and test if a proper probe
succeeded and the driver is functional.

Signed-off-by: Robert Jarzmik &lt;robert.jarzmik@free.fr&gt;
Reported-by: Nicolas Chauvet &lt;kwizart@gmail.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
