<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/misc, branch rpi-mipi</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/misc?h=rpi-mipi</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/misc?h=rpi-mipi'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2025-06-23T13:52:25Z</updated>
<entry>
<title>misc: rp1-pio: Don't just reuse the same DMA buf</title>
<updated>2025-06-23T13:52:25Z</updated>
<author>
<name>Phil Elwell</name>
<email>phil@raspberrypi.com</email>
</author>
<published>2025-06-23T13:38:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f91b0c8098605e4bfbfed8e407766ce4b730fba6'/>
<id>urn:sha1:f91b0c8098605e4bfbfed8e407766ce4b730fba6</id>
<content type='text'>
A missing pointer increment meant that not only was the same buffer
being reused again and again, there was also no protection against
using it simultaneously for multiple transfers. Fix that basic bug, and
also move a similar increment to before the transfer is started, which
feels less racy.

See: https://github.com/raspberrypi/linux/issues/6919

Signed-off-by: Phil Elwell &lt;phil@raspberrypi.com&gt;
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'stable/linux-6.12.y' into rpi-6.12.y</title>
<updated>2025-06-23T09:56:26Z</updated>
<author>
<name>Dom Cobley</name>
<email>popcornmix@gmail.com</email>
</author>
<published>2025-06-23T09:56:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d15beabc10d96912464f4b8d0717ff95dc53b01e'/>
<id>urn:sha1:d15beabc10d96912464f4b8d0717ff95dc53b01e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>VMCI: fix race between vmci_host_setup_notify and vmci_ctx_unset_notify</title>
<updated>2025-06-19T13:32:34Z</updated>
<author>
<name>Wupeng Ma</name>
<email>mawupeng1@huawei.com</email>
</author>
<published>2025-05-10T03:30:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=00ddc7dad55b7bbb78df80d6e174d0c4764dea0c'/>
<id>urn:sha1:00ddc7dad55b7bbb78df80d6e174d0c4764dea0c</id>
<content type='text'>
commit 1bd6406fb5f36c2bb1e96e27d4c3e9f4d09edde4 upstream.

During our test, it is found that a warning can be trigger in try_grab_folio
as follow:

  ------------[ cut here ]------------
  WARNING: CPU: 0 PID: 1678 at mm/gup.c:147 try_grab_folio+0x106/0x130
  Modules linked in:
  CPU: 0 UID: 0 PID: 1678 Comm: syz.3.31 Not tainted 6.15.0-rc5 #163 PREEMPT(undef)
  RIP: 0010:try_grab_folio+0x106/0x130
  Call Trace:
   &lt;TASK&gt;
   follow_huge_pmd+0x240/0x8e0
   follow_pmd_mask.constprop.0.isra.0+0x40b/0x5c0
   follow_pud_mask.constprop.0.isra.0+0x14a/0x170
   follow_page_mask+0x1c2/0x1f0
   __get_user_pages+0x176/0x950
   __gup_longterm_locked+0x15b/0x1060
   ? gup_fast+0x120/0x1f0
   gup_fast_fallback+0x17e/0x230
   get_user_pages_fast+0x5f/0x80
   vmci_host_unlocked_ioctl+0x21c/0xf80
  RIP: 0033:0x54d2cd
  ---[ end trace 0000000000000000 ]---

Digging into the source, context-&gt;notify_page may init by get_user_pages_fast
and can be seen in vmci_ctx_unset_notify which will try to put_page. However
get_user_pages_fast is not finished here and lead to following
try_grab_folio warning. The race condition is shown as follow:

cpu0			cpu1
vmci_host_do_set_notify
vmci_host_setup_notify
get_user_pages_fast(uva, 1, FOLL_WRITE, &amp;context-&gt;notify_page);
lockless_pages_from_mm
gup_pgd_range
gup_huge_pmd  // update &amp;context-&gt;notify_page
			vmci_host_do_set_notify
			vmci_ctx_unset_notify
			notify_page = context-&gt;notify_page;
			if (notify_page)
			put_page(notify_page);	// page is freed
__gup_longterm_locked
__get_user_pages
follow_trans_huge_pmd
try_grab_folio // warn here

To slove this, use local variable page to make notify_page can be seen
after finish get_user_pages_fast.

Fixes: a1d88436d53a ("VMCI: Fix two UVA mapping bugs")
Cc: stable &lt;stable@kernel.org&gt;
Closes: https://lore.kernel.org/all/e91da589-ad57-3969-d979-879bbd10dddd@huawei.com/
Signed-off-by: Wupeng Ma &lt;mawupeng1@huawei.com&gt;
Link: https://lore.kernel.org/r/20250510033040.901582-1-mawupeng1@huawei.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mei: vsc: Cast tx_buf to (__be32 *) when passed to cpu_to_be32_array()</title>
<updated>2025-06-19T13:32:13Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2025-05-07T09:07:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=03eb28352302960fbbd57a0d31df6e33f8ee0443'/>
<id>urn:sha1:03eb28352302960fbbd57a0d31df6e33f8ee0443</id>
<content type='text'>
[ Upstream commit 97ce0fe2b7240d47d9124daa92217e478c21a3ba ]

Commit f88c0c72ffb0 ("mei: vsc: Use struct vsc_tp_packet as vsc-tp tx_buf
and rx_buf type") changed the type of tx_buf from "void *" to "struct
vsc_tp_packet *" and added a cast to (u32 *) when passing it to
cpu_to_be32_array() and the same change was made for rx_buf.

This triggers the type-check warning in sparse:

vsc-tp.c:327:28: sparse: expected restricted __be32 [usertype] *dst
vsc-tp.c:327:28: sparse: got unsigned int [usertype] *

vsc-tp.c:343:42: sparse: expected restricted __be32 const [usertype] *src
vsc-tp.c:343:42: sparse: got unsigned int [usertype] *

Fix this by casting to (__be32 *) instead.

Note actually changing the type of the buffers to "be32 *" is not an option
this buffer does actually contain a "struct vsc_tp_packet" and is used
as such most of the time. vsc_tp_rom_xfer() re-uses the buffers as just
dumb arrays of 32 bit words to talk to the device before the firmware has
booted, to avoid needing to allocate a separate buffer.

Fixes: f88c0c72ffb0 ("mei: vsc: Use struct vsc_tp_packet as vsc-tp tx_buf and rx_buf type")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Closes: https://lore.kernel.org/oe-kbuild-all/202505071634.kZ0I7Va6-lkp@intel.com/
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Reviewed-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20250507090728.115910-1-hdegoede@redhat.com
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>Merge remote-tracking branch 'stable/linux-6.12.y' into rpi-6.12.y</title>
<updated>2025-06-03T14:15:42Z</updated>
<author>
<name>Dom Cobley</name>
<email>popcornmix@gmail.com</email>
</author>
<published>2025-06-03T14:15:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=382ab4d59293bbb22c23861a4ea91f1c3e87b599'/>
<id>urn:sha1:382ab4d59293bbb22c23861a4ea91f1c3e87b599</id>
<content type='text'>
</content>
</entry>
<entry>
<title>eeprom: ee1004: Check chip before probing</title>
<updated>2025-05-29T09:02:43Z</updated>
<author>
<name>Eddie James</name>
<email>eajames@linux.ibm.com</email>
</author>
<published>2025-02-18T22:09:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d85004266a32c69fb72243983bac9818c7998b01'/>
<id>urn:sha1:d85004266a32c69fb72243983bac9818c7998b01</id>
<content type='text'>
[ Upstream commit d9406677428e9234ea62bb2d2f5e996d1b777760 ]

Like other eeprom drivers, check if the device is really there and
functional before probing.

Signed-off-by: Eddie James &lt;eajames@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/20250218220959.721698-1-eajames@linux.ibm.com
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>misc: pci_endpoint_test: Give disabled BARs a distinct error code</title>
<updated>2025-05-29T09:02:25Z</updated>
<author>
<name>Niklas Cassel</name>
<email>cassel@kernel.org</email>
</author>
<published>2025-01-23T12:01:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f615e8d2dec6746127d4667c3cae81bfd6a1ed3a'/>
<id>urn:sha1:f615e8d2dec6746127d4667c3cae81bfd6a1ed3a</id>
<content type='text'>
[ Upstream commit 7e80bbef1d697dbce7a39cfad0df770880fe3f29 ]

The current code returns -ENOMEM if test-&gt;bar[barno] is NULL.

There can be two reasons why test-&gt;bar[barno] is NULL:

  1) The pci_ioremap_bar() call in pci_endpoint_test_probe() failed.
  2) The BAR was skipped, because it is disabled by the endpoint.

Many PCI endpoint controller drivers will disable all BARs in their
init function. A disabled BAR will have a size of 0.

A PCI endpoint function driver will be able to enable any BAR that
is not marked as BAR_RESERVED (which means that the BAR should not
be touched by the EPF driver).

Thus, perform check if the size is 0, before checking if
test-&gt;bar[barno] is NULL, such that we can return different errors.

This will allow the selftests to return SKIP instead of FAIL for
disabled BARs.

Signed-off-by: Niklas Cassel &lt;cassel@kernel.org&gt;
Reviewed-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
Link: https://lore.kernel.org/r/20250123120147.3603409-3-cassel@kernel.org
Signed-off-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
[kwilczynski: commit log]
Signed-off-by: Krzysztof Wilczyński &lt;kwilczynski@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>mei: vsc: Use struct vsc_tp_packet as vsc-tp tx_buf and rx_buf type</title>
<updated>2025-05-29T09:01:58Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2025-03-18T14:12:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a8dd6b7b391d9b33ea42b06b0621381ae9e320d3'/>
<id>urn:sha1:a8dd6b7b391d9b33ea42b06b0621381ae9e320d3</id>
<content type='text'>
[ Upstream commit f88c0c72ffb014e5eba676ee337c4eb3b1d6a119 ]

vsc_tp.tx_buf and vsc_tp.rx_buf point to a struct vsc_tp_packet, use
the correct type instead of "void *" and use sizeof(*ptr) when allocating
memory for these buffers.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Reviewed-by: Alexander Usyskin &lt;alexander.usyskin@intel.com&gt;
Reviewed-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20250318141203.94342-3-hdegoede@redhat.com
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>Merge remote-tracking branch 'stable/linux-6.12.y' into rpi-6.12.y</title>
<updated>2025-05-06T13:14:05Z</updated>
<author>
<name>Dom Cobley</name>
<email>popcornmix@gmail.com</email>
</author>
<published>2025-05-06T13:14:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3bcb24f746a219b16827228cc9f801fcf5751a0e'/>
<id>urn:sha1:3bcb24f746a219b16827228cc9f801fcf5751a0e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>objtool, lkdtm: Obfuscate the do_nothing() pointer</title>
<updated>2025-05-02T05:59:20Z</updated>
<author>
<name>Josh Poimboeuf</name>
<email>jpoimboe@kernel.org</email>
</author>
<published>2025-03-24T21:56:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=69578c7d02a9160f56a45b01bd6f8c65f81634f9'/>
<id>urn:sha1:69578c7d02a9160f56a45b01bd6f8c65f81634f9</id>
<content type='text'>
[ Upstream commit 05026ea01e95ffdeb0e5ac8fb7fb1b551e3a8726 ]

If execute_location()'s memcpy of do_nothing() gets inlined and unrolled
by the compiler, it copies one word at a time:

    mov    0x0(%rip),%rax    R_X86_64_PC32    .text+0x1374
    mov    %rax,0x38(%rbx)
    mov    0x0(%rip),%rax    R_X86_64_PC32    .text+0x136c
    mov    %rax,0x30(%rbx)
    ...

Those .text references point to the middle of the function, causing
objtool to complain about their lack of ENDBR.

Prevent that by resolving the function pointer at runtime rather than
build time.  This fixes the following warning:

  drivers/misc/lkdtm/lkdtm.o: warning: objtool: execute_location+0x23: relocation to !ENDBR: .text+0x1378

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Josh Poimboeuf &lt;jpoimboe@kernel.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Reviewed-by: Kees Cook &lt;kees@kernel.org&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Link: https://lore.kernel.org/r/30b9abffbddeb43c4f6320b1270fa9b4d74c54ed.1742852847.git.jpoimboe@kernel.org
Closes: https://lore.kernel.org/oe-kbuild-all/202503191453.uFfxQy5R-lkp@intel.com/
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
