<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/misc, branch v5.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.3</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-08-28T20:57:07Z</updated>
<entry>
<title>vmw_balloon: Fix offline page marking with compaction</title>
<updated>2019-08-28T20:57:07Z</updated>
<author>
<name>Nadav Amit</name>
<email>namit@vmware.com</email>
</author>
<published>2019-08-20T16:01:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=468e0ffac803f5557a62a33b72ef8844d1bfdc08'/>
<id>urn:sha1:468e0ffac803f5557a62a33b72ef8844d1bfdc08</id>
<content type='text'>
The compaction code already marks pages as offline when it enqueues
pages in the ballooned page list, and removes the mapping when the pages
are removed from the list. VMware balloon also updates the flags,
instead of letting the balloon-compaction logic handle it, which causes
the assertion VM_BUG_ON_PAGE(!PageOffline(page)) to fire, when
__ClearPageOffline is called the second time. This causes the following
crash.

[  487.104520] kernel BUG at include/linux/page-flags.h:749!
[  487.106364] invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC PTI
[  487.107681] CPU: 7 PID: 1106 Comm: kworker/7:3 Not tainted 5.3.0-rc5balloon #227
[  487.109196] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 12/12/2018
[  487.111452] Workqueue: events_freezable vmballoon_work [vmw_balloon]
[  487.112779] RIP: 0010:vmballoon_release_page_list+0xaa/0x100 [vmw_balloon]
[  487.114200] Code: fe 48 c1 e7 06 4c 01 c7 8b 47 30 41 89 c1 41 81 e1 00 01 00 f0 41 81 f9 00 00 00 f0 74 d3 48 c7 c6 08 a1 a1 c0 e8 06 0d e7 ea &lt;0f&gt; 0b 44 89 f6 4c 89 c7 e8 49 9c e9 ea 49 8d 75 08 49 8b 45 08 4d
[  487.118033] RSP: 0018:ffffb82f012bbc98 EFLAGS: 00010246
[  487.119135] RAX: 0000000000000037 RBX: 0000000000000001 RCX: 0000000000000006
[  487.120601] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff9a85b6bd7620
[  487.122071] RBP: ffffb82f012bbcc0 R08: 0000000000000001 R09: 0000000000000000
[  487.123536] R10: 0000000000000000 R11: 0000000000000000 R12: ffffb82f012bbd00
[  487.125002] R13: ffffe97f4598d9c0 R14: 0000000000000000 R15: ffffb82f012bbd34
[  487.126463] FS:  0000000000000000(0000) GS:ffff9a85b6bc0000(0000) knlGS:0000000000000000
[  487.128110] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  487.129316] CR2: 00007ffe6e413ea0 CR3: 0000000230b18001 CR4: 00000000003606e0
[  487.130812] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  487.132283] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  487.133749] Call Trace:
[  487.134333]  vmballoon_deflate+0x22c/0x390 [vmw_balloon]
[  487.135468]  vmballoon_work+0x6e7/0x913 [vmw_balloon]
[  487.136711]  ? process_one_work+0x21a/0x5e0
[  487.138581]  process_one_work+0x298/0x5e0
[  487.139926]  ? vmballoon_migratepage+0x310/0x310 [vmw_balloon]
[  487.141610]  ? process_one_work+0x298/0x5e0
[  487.143053]  worker_thread+0x41/0x400
[  487.144389]  kthread+0x12b/0x150
[  487.145582]  ? process_one_work+0x5e0/0x5e0
[  487.146937]  ? kthread_create_on_node+0x60/0x60
[  487.148637]  ret_from_fork+0x3a/0x50

Fix it by updating the PageOffline indication only when a 2MB page is
enqueued and dequeued. The 4KB pages will be handled correctly by the
balloon compaction logic.

Fixes: 83a8afa72e9c ("vmw_balloon: Compaction support")
Cc: David Hildenbrand &lt;david@redhat.com&gt;
Reported-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Signed-off-by: Nadav Amit &lt;namit@vmware.com&gt;
Link: https://lore.kernel.org/r/20190820160121.452-1-namit@vmware.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>VMCI: Release resource if the work is already queued</title>
<updated>2019-08-28T20:57:07Z</updated>
<author>
<name>Nadav Amit</name>
<email>namit@vmware.com</email>
</author>
<published>2019-08-20T20:26:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ba03a9bbd17b149c373c0ea44017f35fc2cd0f28'/>
<id>urn:sha1:ba03a9bbd17b149c373c0ea44017f35fc2cd0f28</id>
<content type='text'>
Francois reported that VMware balloon gets stuck after a balloon reset,
when the VMCI doorbell is removed. A similar error can occur when the
balloon driver is removed with the following splat:

[ 1088.622000] INFO: task modprobe:3565 blocked for more than 120 seconds.
[ 1088.622035]       Tainted: G        W         5.2.0 #4
[ 1088.622087] "echo 0 &gt; /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 1088.622205] modprobe        D    0  3565   1450 0x00000000
[ 1088.622210] Call Trace:
[ 1088.622246]  __schedule+0x2a8/0x690
[ 1088.622248]  schedule+0x2d/0x90
[ 1088.622250]  schedule_timeout+0x1d3/0x2f0
[ 1088.622252]  wait_for_completion+0xba/0x140
[ 1088.622320]  ? wake_up_q+0x80/0x80
[ 1088.622370]  vmci_resource_remove+0xb9/0xc0 [vmw_vmci]
[ 1088.622373]  vmci_doorbell_destroy+0x9e/0xd0 [vmw_vmci]
[ 1088.622379]  vmballoon_vmci_cleanup+0x6e/0xf0 [vmw_balloon]
[ 1088.622381]  vmballoon_exit+0x18/0xcc8 [vmw_balloon]
[ 1088.622394]  __x64_sys_delete_module+0x146/0x280
[ 1088.622408]  do_syscall_64+0x5a/0x130
[ 1088.622410]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1088.622415] RIP: 0033:0x7f54f62791b7
[ 1088.622421] Code: Bad RIP value.
[ 1088.622421] RSP: 002b:00007fff2a949008 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0
[ 1088.622426] RAX: ffffffffffffffda RBX: 000055dff8b55d00 RCX: 00007f54f62791b7
[ 1088.622426] RDX: 0000000000000000 RSI: 0000000000000800 RDI: 000055dff8b55d68
[ 1088.622427] RBP: 000055dff8b55d00 R08: 00007fff2a947fb1 R09: 0000000000000000
[ 1088.622427] R10: 00007f54f62f5cc0 R11: 0000000000000206 R12: 000055dff8b55d68
[ 1088.622428] R13: 0000000000000001 R14: 000055dff8b55d68 R15: 00007fff2a94a3f0

The cause for the bug is that when the "delayed" doorbell is invoked, it
takes a reference on the doorbell entry and schedules work that is
supposed to run the appropriate code and drop the doorbell entry
reference. The code ignores the fact that if the work is already queued,
it will not be scheduled to run one more time. As a result one of the
references would not be dropped. When the code waits for the reference
to get to zero, during balloon reset or module removal, it gets stuck.

Fix it. Drop the reference if schedule_work() indicates that the work is
already queued.

Note that this bug got more apparent (or apparent at all) due to
commit ce664331b248 ("vmw_balloon: VMCI_DOORBELL_SET does not check status").

Fixes: 83e2ec765be03 ("VMCI: doorbell implementation.")
Reported-by: Francois Rigault &lt;rigault.francois@gmail.com&gt;
Cc: Jorgen Hansen &lt;jhansen@vmware.com&gt;
Cc: Adit Ranadive &lt;aditr@vmware.com&gt;
Cc: Alexios Zavras &lt;alexios.zavras@intel.com&gt;
Cc: Vishnu DASA &lt;vdasa@vmware.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Nadav Amit &lt;namit@vmware.com&gt;
Reviewed-by: Vishnu Dasa &lt;vdasa@vmware.com&gt;
Link: https://lore.kernel.org/r/20190820202638.49003-1-namit@vmware.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>lkdtm/bugs: fix build error in lkdtm_EXHAUST_STACK</title>
<updated>2019-08-28T20:33:44Z</updated>
<author>
<name>Raul E Rangel</name>
<email>rrangel@chromium.org</email>
</author>
<published>2019-08-27T17:36:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b9bc7b8b1e9e815b231c1ca0b566ee723f480987'/>
<id>urn:sha1:b9bc7b8b1e9e815b231c1ca0b566ee723f480987</id>
<content type='text'>
lkdtm/bugs.c:94:2: error: format '%d' expects argument of type 'int', but argument 2 has type 'long unsigned int' [-Werror=format=]
  pr_info("Calling function with %d frame size to depth %d ...\n",
  ^
THREAD_SIZE is defined as a unsigned long, cast CONFIG_FRAME_WARN to
unsigned long as well.

Fixes: 24cccab42c419 ("lkdtm/bugs: Adjust recursion test to avoid elision")
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Raul E Rangel &lt;rrangel@chromium.org&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Link: https://lore.kernel.org/r/20190827173619.170065-1-rrangel@chromium.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mei: me: add Tiger Lake point LP device ID</title>
<updated>2019-08-28T20:30:15Z</updated>
<author>
<name>Tomas Winkler</name>
<email>tomas.winkler@intel.com</email>
</author>
<published>2019-08-19T10:32:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=587f17407741a5be07f8a2d1809ec946c8120962'/>
<id>urn:sha1:587f17407741a5be07f8a2d1809ec946c8120962</id>
<content type='text'>
Add Tiger Lake Point device ID for TGP LP.

Signed-off-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20190819103210.32748-1-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: xilinx-sdfec: fix dependency and build error</title>
<updated>2019-08-15T16:10:25Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2019-08-13T23:01:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=01fd150f4aff5bee03db5bda3b94c1bdbe9c6375'/>
<id>urn:sha1:01fd150f4aff5bee03db5bda3b94c1bdbe9c6375</id>
<content type='text'>
lib/devres.c, which implements devm_ioremap_resource(), is only built
when CONFIG_HAS_IOMEM is set/enabled, so XILINX_SDFEC should depend
on HAS_IOMEM.  Fixes this build error (as seen on UML builds):

ERROR: "devm_ioremap_resource" [drivers/misc/xilinx_sdfec.ko] undefined!

Fixes: 76d83e1c3233 ("misc: xilinx-sdfec: add core driver")
Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Derek Kiernan &lt;derek.kiernan@xilinx.com&gt;
Cc: Dragan Cvetic &lt;dragan.cvetic@xilinx.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Link: https://lore.kernel.org/r/f9004be5-9925-327b-3ec2-6506e46fe565@infradead.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>habanalabs: fix device IRQ unmasking for BE host</title>
<updated>2019-08-12T06:01:10Z</updated>
<author>
<name>Ben Segal</name>
<email>bpsegal20@gmail.com</email>
</author>
<published>2019-08-07T13:54:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b421d83a3947369fd5718824aecfaebe1efbf7ed'/>
<id>urn:sha1:b421d83a3947369fd5718824aecfaebe1efbf7ed</id>
<content type='text'>
When unmasking IRQs inside the ASIC, the driver passes an array of all the
IRQ to unmask. The ASIC's CPU is working in LE so when running in a BE
host, the driver needs to do the proper endianness swapping when preparing
this array.

In addition, this patch also fixes the endianness of a couple of kernel log
debug messages that print values of packets

Signed-off-by: Ben Segal &lt;bpsegal20@gmail.com&gt;
Reviewed-by: Oded Gabbay &lt;oded.gabbay@gmail.com&gt;
Signed-off-by: Oded Gabbay &lt;oded.gabbay@gmail.com&gt;
</content>
</entry>
<entry>
<title>habanalabs: fix endianness handling for internal QMAN submission</title>
<updated>2019-08-12T06:01:10Z</updated>
<author>
<name>Oded Gabbay</name>
<email>oded.gabbay@gmail.com</email>
</author>
<published>2019-08-08T12:45:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b9040c99414ba5b85090595a61abc686a5dbb388'/>
<id>urn:sha1:b9040c99414ba5b85090595a61abc686a5dbb388</id>
<content type='text'>
The PQs of internal H/W queues (QMANs) can be located in different memory
areas for different ASICs. Therefore, when writing PQEs, we need to use
the correct function according to the location of the PQ. e.g. if the PQ
is located in the device's memory (SRAM or DRAM), we need to use
memcpy_toio() so it would work in architectures that have separate
address ranges for IO memory.

This patch makes the code that writes the PQE to be ASIC-specific so we
can handle this properly per ASIC.

Signed-off-by: Oded Gabbay &lt;oded.gabbay@gmail.com&gt;
Tested-by: Ben Segal &lt;bpsegal20@gmail.com&gt;
</content>
</entry>
<entry>
<title>habanalabs: fix completion queue handling when host is BE</title>
<updated>2019-08-12T06:01:10Z</updated>
<author>
<name>Ben Segal</name>
<email>bpsegal20@gmail.com</email>
</author>
<published>2019-08-01T23:22:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4e87334a0ef43663019dbaf3638ad10fd8c3320c'/>
<id>urn:sha1:4e87334a0ef43663019dbaf3638ad10fd8c3320c</id>
<content type='text'>
This patch fix the CQ irq handler to work in hosts with BE architecture.
It adds the correct endian-swapping macros around the relevant memory
accesses.

Signed-off-by: Ben Segal &lt;bpsegal20@gmail.com&gt;
Reviewed-by: Oded Gabbay &lt;oded.gabbay@gmail.com&gt;
Signed-off-by: Oded Gabbay &lt;oded.gabbay@gmail.com&gt;
</content>
</entry>
<entry>
<title>habanalabs: fix endianness handling for packets from user</title>
<updated>2019-08-12T06:01:10Z</updated>
<author>
<name>Ben Segal</name>
<email>bpsegal20@gmail.com</email>
</author>
<published>2019-08-01T23:20:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=213ad5ad016a0da975b35f54e8cd236c3b04724b'/>
<id>urn:sha1:213ad5ad016a0da975b35f54e8cd236c3b04724b</id>
<content type='text'>
Packets that arrive from the user and need to be parsed by the driver are
assumed to be in LE format.

This patch fix all the places where the code handles these packets and use
the correct endianness macros to handle them, as the driver handles the
packets in CPU format (LE or BE depending on the arch).

Signed-off-by: Ben Segal &lt;bpsegal20@gmail.com&gt;
Reviewed-by: Oded Gabbay &lt;oded.gabbay@gmail.com&gt;
Signed-off-by: Oded Gabbay &lt;oded.gabbay@gmail.com&gt;
</content>
</entry>
<entry>
<title>habanalabs: fix DRAM usage accounting on context tear down</title>
<updated>2019-08-12T06:01:10Z</updated>
<author>
<name>Tomer Tayar</name>
<email>ttayar@habana.ai</email>
</author>
<published>2019-08-04T07:03:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c8113756ba27298d6e95403c087dc5881b419a99'/>
<id>urn:sha1:c8113756ba27298d6e95403c087dc5881b419a99</id>
<content type='text'>
The patch fix the DRAM usage accounting by adding a missing update of
the DRAM memory consumption, when a context is being torn down without an
organized release of the allocated memory.

Signed-off-by: Tomer Tayar &lt;ttayar@habana.ai&gt;
Reviewed-by: Oded Gabbay &lt;oded.gabbay@gmail.com&gt;
Signed-off-by: Oded Gabbay &lt;oded.gabbay@gmail.com&gt;
</content>
</entry>
</feed>
