<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/nfc, branch v6.4</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=v6.4</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-06-18T10:19:52Z</updated>
<entry>
<title>nfc: fdp: Add MODULE_FIRMWARE macros</title>
<updated>2023-06-18T10:19:52Z</updated>
<author>
<name>Juerg Haefliger</name>
<email>juerg.haefliger@canonical.com</email>
</author>
<published>2023-06-16T12:22:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=eb09fc2d14163c0c217846cfabec3d0cce7c8f8c'/>
<id>urn:sha1:eb09fc2d14163c0c217846cfabec3d0cce7c8f8c</id>
<content type='text'>
The module loads firmware so add MODULE_FIRMWARE macros to provide that
information via modinfo.

Signed-off-by: Juerg Haefliger &lt;juerg.haefliger@canonical.com&gt;
Reviewed-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>nfcsim.c: Fix error checking for debugfs_create_dir</title>
<updated>2023-05-26T11:18:35Z</updated>
<author>
<name>Osama Muhammad</name>
<email>osmtendev@gmail.com</email>
</author>
<published>2023-05-25T17:27:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9b9e46aa07273ceb96866b2e812b46f1ee0b8d2f'/>
<id>urn:sha1:9b9e46aa07273ceb96866b2e812b46f1ee0b8d2f</id>
<content type='text'>
This patch fixes the error checking in nfcsim.c.
The DebugFS kernel API is developed in
a way that the caller can safely ignore the errors that
occur during the creation of DebugFS nodes.

Signed-off-by: Osama Muhammad &lt;osmtendev@gmail.com&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>drivers: nfc: nfcsim: remove return value check of `dev_dir`</title>
<updated>2023-04-25T01:12:42Z</updated>
<author>
<name>Jianuo Kuang</name>
<email>u202110722@hust.edu.cn</email>
</author>
<published>2023-04-24T02:41:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e515c330d7e22692d03475740fa45d179281cdf7'/>
<id>urn:sha1:e515c330d7e22692d03475740fa45d179281cdf7</id>
<content type='text'>
Smatch complains that:
nfcsim_debugfs_init_dev() warn: 'dev_dir' is an error pointer or valid

According to the documentation of the debugfs_create_dir() function,
there is no need to check the return value of this function.
Just delete the dead code.

Signed-off-by: Jianuo Kuang &lt;u202110722@hust.edu.cn&gt;
Reviewed-by: Dongliang Mu &lt;dzm91@hust.edu.cn&gt;
Reviewed-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Link: https://lore.kernel.org/r/20230424024140.34607-1-u202110722@hust.edu.cn
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net</title>
<updated>2023-03-17T23:29:25Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2023-03-17T23:29:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1118aa4c70a6978afb0c4391ad29826c14b842b3'/>
<id>urn:sha1:1118aa4c70a6978afb0c4391ad29826c14b842b3</id>
<content type='text'>
net/wireless/nl80211.c
  b27f07c50a73 ("wifi: nl80211: fix puncturing bitmap policy")
  cbbaf2bb829b ("wifi: nl80211: add a command to enable/disable HW timestamping")
https://lore.kernel.org/all/20230314105421.3608efae@canb.auug.org.au

tools/testing/selftests/net/Makefile
  62199e3f1658 ("selftests: net: Add VXLAN MDB test")
  13715acf8ab5 ("selftest: Add test for bind() conflicts.")

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>nfc: mrvl: Use of_property_read_bool() for boolean properties</title>
<updated>2023-03-16T17:43:14Z</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2023-03-14T20:13:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cc6d85c1cb5ccc04c594392339c81227abd1667d'/>
<id>urn:sha1:cc6d85c1cb5ccc04c594392339c81227abd1667d</id>
<content type='text'>
It is preferred to use typed property access functions (i.e.
of_property_read_&lt;type&gt; functions) rather than low-level
of_get_property/of_find_property functions for reading properties.
Convert reading boolean properties to of_property_read_bool().

Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Reviewed-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>nfc: mrvl: Move platform_data struct into driver</title>
<updated>2023-03-16T17:43:14Z</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2023-03-14T20:13:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=053fdaa841bd1af9fe9c2c30bba81119059aac95'/>
<id>urn:sha1:053fdaa841bd1af9fe9c2c30bba81119059aac95</id>
<content type='text'>
There are no users of nfcmrvl platform_data struct outside of the
driver and none will be added, so move it into the driver.

Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>nfc: trf7970a: mark OF related data as maybe unused</title>
<updated>2023-03-15T08:03:54Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzysztof.kozlowski@linaro.org</email>
</author>
<published>2023-03-11T11:13:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a52ed50a04de179cc866c18bdd1b9a2f59d6bdfc'/>
<id>urn:sha1:a52ed50a04de179cc866c18bdd1b9a2f59d6bdfc</id>
<content type='text'>
The driver can be compile tested with !CONFIG_OF making certain data
unused:

  drivers/nfc/trf7970a.c:2232:34: error: ‘trf7970a_of_match’ defined but not used [-Werror=unused-const-variable=]

Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Reviewed-by: Mark Greer &lt;mgreer@animalcreek.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>nfc: st-nci: Fix use after free bug in ndlc_remove due to race condition</title>
<updated>2023-03-15T07:28:23Z</updated>
<author>
<name>Zheng Wang</name>
<email>zyytlz.wz@163.com</email>
</author>
<published>2023-03-12T16:08:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5000fe6c27827a61d8250a7e4a1d26c3298ef4f6'/>
<id>urn:sha1:5000fe6c27827a61d8250a7e4a1d26c3298ef4f6</id>
<content type='text'>
This bug influences both st_nci_i2c_remove and st_nci_spi_remove.
Take st_nci_i2c_remove as an example.

In st_nci_i2c_probe, it called ndlc_probe and bound &amp;ndlc-&gt;sm_work
with llt_ndlc_sm_work.

When it calls ndlc_recv or timeout handler, it will finally call
schedule_work to start the work.

When we call st_nci_i2c_remove to remove the driver, there
may be a sequence as follows:

Fix it by finishing the work before cleanup in ndlc_remove

CPU0                  CPU1

                    |llt_ndlc_sm_work
st_nci_i2c_remove   |
  ndlc_remove       |
     st_nci_remove  |
     nci_free_device|
     kfree(ndev)    |
//free ndlc-&gt;ndev   |
                    |llt_ndlc_rcv_queue
                    |nci_recv_frame
                    |//use ndlc-&gt;ndev

Fixes: 35630df68d60 ("NFC: st21nfcb: Add driver for STMicroelectronics ST21NFCB NFC chip")
Signed-off-by: Zheng Wang &lt;zyytlz.wz@163.com&gt;
Reviewed-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Link: https://lore.kernel.org/r/20230312160837.2040857-1-zyytlz.wz@163.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>nfc: pn533: initialize struct pn533_out_arg properly</title>
<updated>2023-03-10T23:52:25Z</updated>
<author>
<name>Fedor Pchelkin</name>
<email>pchelkin@ispras.ru</email>
</author>
<published>2023-03-09T16:50:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=484b7059796e3bc1cb527caa61dfc60da649b4f6'/>
<id>urn:sha1:484b7059796e3bc1cb527caa61dfc60da649b4f6</id>
<content type='text'>
struct pn533_out_arg used as a temporary context for out_urb is not
initialized properly. Its uninitialized 'phy' field can be dereferenced in
error cases inside pn533_out_complete() callback function. It causes the
following failure:

general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 6.2.0-rc3-next-20230110-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:pn533_out_complete.cold+0x15/0x44 drivers/nfc/pn533/usb.c:441
Call Trace:
 &lt;IRQ&gt;
 __usb_hcd_giveback_urb+0x2b6/0x5c0 drivers/usb/core/hcd.c:1671
 usb_hcd_giveback_urb+0x384/0x430 drivers/usb/core/hcd.c:1754
 dummy_timer+0x1203/0x32d0 drivers/usb/gadget/udc/dummy_hcd.c:1988
 call_timer_fn+0x1da/0x800 kernel/time/timer.c:1700
 expire_timers+0x234/0x330 kernel/time/timer.c:1751
 __run_timers kernel/time/timer.c:2022 [inline]
 __run_timers kernel/time/timer.c:1995 [inline]
 run_timer_softirq+0x326/0x910 kernel/time/timer.c:2035
 __do_softirq+0x1fb/0xaf6 kernel/softirq.c:571
 invoke_softirq kernel/softirq.c:445 [inline]
 __irq_exit_rcu+0x123/0x180 kernel/softirq.c:650
 irq_exit_rcu+0x9/0x20 kernel/softirq.c:662
 sysvec_apic_timer_interrupt+0x97/0xc0 arch/x86/kernel/apic/apic.c:1107

Initialize the field with the pn533_usb_phy currently used.

Found by Linux Verification Center (linuxtesting.org) with Syzkaller.

Fixes: 9dab880d675b ("nfc: pn533: Wait for out_urb's completion in pn533_usb_send_frame()")
Reported-by: syzbot+1e608ba4217c96d1952f@syzkaller.appspotmail.com
Signed-off-by: Fedor Pchelkin &lt;pchelkin@ispras.ru&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Link: https://lore.kernel.org/r/20230309165050.207390-1-pchelkin@ispras.ru
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>nfc: fdp: add null check of devm_kmalloc_array in fdp_nci_i2c_read_device_properties</title>
<updated>2023-02-28T10:48:28Z</updated>
<author>
<name>Kang Chen</name>
<email>void0red@gmail.com</email>
</author>
<published>2023-02-27T09:30:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=11f180a5d62a51b484e9648f9b310e1bd50b1a57'/>
<id>urn:sha1:11f180a5d62a51b484e9648f9b310e1bd50b1a57</id>
<content type='text'>
devm_kmalloc_array may fails, *fw_vsc_cfg might be null and cause
out-of-bounds write in device_property_read_u8_array later.

Fixes: a06347c04c13 ("NFC: Add Intel Fields Peak NFC solution driver")
Signed-off-by: Kang Chen &lt;void0red@gmail.com&gt;
Reviewed-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Link: https://lore.kernel.org/r/20230227093037.907654-1-void0red@gmail.com
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
</feed>
