<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/rpmsg/virtio_rpmsg_bus.c, branch linux-5.10.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.10.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.10.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-02-23T07:41:53Z</updated>
<entry>
<title>rpmsg: virtio: Free driver_override when rpmsg_remove()</title>
<updated>2024-02-23T07:41:53Z</updated>
<author>
<name>Xiaolei Wang</name>
</author>
<published>2023-12-15T02:00:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=69ca89d80f2c8a1f5af429b955637beea7eead30'/>
<id>urn:sha1:69ca89d80f2c8a1f5af429b955637beea7eead30</id>
<content type='text'>
commit d5362c37e1f8a40096452fc201c30e705750e687 upstream.

Free driver_override when rpmsg_remove(), otherwise
the following memory leak will occur:

unreferenced object 0xffff0000d55d7080 (size 128):
  comm "kworker/u8:2", pid 56, jiffies 4294893188 (age 214.272s)
  hex dump (first 32 bytes):
    72 70 6d 73 67 5f 6e 73 00 00 00 00 00 00 00 00  rpmsg_ns........
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;000000009c94c9c1&gt;] __kmem_cache_alloc_node+0x1f8/0x320
    [&lt;000000002300d89b&gt;] __kmalloc_node_track_caller+0x44/0x70
    [&lt;00000000228a60c3&gt;] kstrndup+0x4c/0x90
    [&lt;0000000077158695&gt;] driver_set_override+0xd0/0x164
    [&lt;000000003e9c4ea5&gt;] rpmsg_register_device_override+0x98/0x170
    [&lt;000000001c0c89a8&gt;] rpmsg_ns_register_device+0x24/0x30
    [&lt;000000008bbf8fa2&gt;] rpmsg_probe+0x2e0/0x3ec
    [&lt;00000000e65a68df&gt;] virtio_dev_probe+0x1c0/0x280
    [&lt;00000000443331cc&gt;] really_probe+0xbc/0x2dc
    [&lt;00000000391064b1&gt;] __driver_probe_device+0x78/0xe0
    [&lt;00000000a41c9a5b&gt;] driver_probe_device+0xd8/0x160
    [&lt;000000009c3bd5df&gt;] __device_attach_driver+0xb8/0x140
    [&lt;0000000043cd7614&gt;] bus_for_each_drv+0x7c/0xd4
    [&lt;000000003b929a36&gt;] __device_attach+0x9c/0x19c
    [&lt;00000000a94e0ba8&gt;] device_initial_probe+0x14/0x20
    [&lt;000000003c999637&gt;] bus_probe_device+0xa0/0xac

Signed-off-by: Xiaolei Wang &lt;xiaolei.wang@windriver.com&gt;
Fixes: b0b03b811963 ("rpmsg: Release rpmsg devices in backends")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20231215020049.78750-1-xiaolei.wang@windriver.com
Signed-off-by: Mathieu Poirier &lt;mathieu.poirier@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rpmsg: virtio: fix compilation warning for virtio_rpmsg_channel description</title>
<updated>2020-09-15T03:48:12Z</updated>
<author>
<name>Arnaud Pouliquen</name>
</author>
<published>2020-07-31T07:48:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6c09ea0b0aefda20d49e8d771f77a3e92f46b7d2'/>
<id>urn:sha1:6c09ea0b0aefda20d49e8d771f77a3e92f46b7d2</id>
<content type='text'>
Complete the virtio_rpmsg_channel structure description to fix a
compilation warning with W=1 option:

drivers/rpmsg/virtio_rpmsg_bus.c:95: warning: Cannot understand
 * @vrp: the remote processor this channel belongs to

Reviewed-by: Mathieu Poirier &lt;mathieu.poirier@linaro.org&gt;
Signed-off-by: Arnaud Pouliquen &lt;arnaud.pouliquen@st.com&gt;
Link: https://lore.kernel.org/r/20200731074850.3262-1-arnaud.pouliquen@st.com
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>rpmsg: virtio: add endianness conversions</title>
<updated>2020-07-22T03:37:16Z</updated>
<author>
<name>Guennadi Liakhovetski</name>
</author>
<published>2020-07-21T08:56:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=111d1089700cdb752681ef44f54ab6137736f5c2'/>
<id>urn:sha1:111d1089700cdb752681ef44f54ab6137736f5c2</id>
<content type='text'>
According to the VirtIO 1.0 spec data, sent over virtual queues must
be in little-endian format. Update the RPMsg VirtIO implementation
to enforce that but let legacy configurations continue use native
endianness.

Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Guennadi Liakhovetski &lt;guennadi.liakhovetski@linux.intel.com&gt;
Reviewed-by: Mathieu Poirier &lt;mathieu.poirier@linaro.org&gt;
Tested-by: Arnaud Pouliquen &lt;arnaud.pouliquen@st.com&gt;
Link: https://lore.kernel.org/r/20200721085638.GA3815@ubuntu
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>rpmsg: Replace zero-length array with flexible-array</title>
<updated>2020-05-12T22:00:48Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
</author>
<published>2020-05-07T19:19:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4f05fc33bebdc7d69259c412dd21d09751827dbd'/>
<id>urn:sha1:4f05fc33bebdc7d69259c412dd21d09751827dbd</id>
<content type='text'>
The current codebase makes use of the zero-length array language
extension to the C90 standard, but the preferred mechanism to declare
variable-length types such as these ones is a flexible array member[1][2],
introduced in C99:

struct foo {
        int stuff;
        struct boo array[];
};

By making use of the mechanism above, we will get a compiler warning
in case the flexible array does not occur last in the structure, which
will help us prevent some kind of undefined behavior bugs from being
inadvertently introduced[3] to the codebase from now on.

Also, notice that, dynamic memory allocations won't be affected by
this change:

"Flexible array members have incomplete type, and so the sizeof operator
may not be applied. As a quirk of the original implementation of
zero-length arrays, sizeof evaluates to zero."[1]

sizeof(flexible-array-member) triggers a warning because flexible array
members have incomplete type[1]. There are some instances of code in
which the sizeof operator is being incorrectly/erroneously applied to
zero-length arrays and the result is zero. Such instances may be hiding
some bugs. So, this work (flexible-array member conversions) will also
help to get completely rid of those sorts of issues.

This issue was found with the help of Coccinelle.

[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
[2] https://github.com/KSPP/linux/issues/21
[3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour")

Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Link: https://lore.kernel.org/r/20200507191948.GA16053@embeddedor
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>rpmsg: virtio_rpmsg_bus: replace "%p" with "%pK"</title>
<updated>2019-08-27T22:21:05Z</updated>
<author>
<name>Suman Anna</name>
</author>
<published>2018-10-24T01:19:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=de4064af76537f13d74a814a962f4524e81436ac'/>
<id>urn:sha1:de4064af76537f13d74a814a962f4524e81436ac</id>
<content type='text'>
The virtio_rpmsg_bus driver uses the "%p" format-specifier for
printing the vring buffer address. This prints only a hashed
pointer even for previliged users. Use "%pK" instead so that
the address can be printed during debug using kptr_restrict
sysctl.

Signed-off-by: Suman Anna &lt;s-anna@ti.com&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>rpmsg: virtio: change header file sort style</title>
<updated>2019-02-21T05:15:54Z</updated>
<author>
<name>Loic Pallardy</name>
</author>
<published>2019-01-11T09:33:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6de1c933246f4acd17c692e33b02e96abd6037e1'/>
<id>urn:sha1:6de1c933246f4acd17c692e33b02e96abd6037e1</id>
<content type='text'>
Make header files alphabetical order.

Signed-off-by: Loic Pallardy &lt;loic.pallardy@st.com&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>rpmsg: virtio: allocate buffer from parent</title>
<updated>2019-02-21T05:15:49Z</updated>
<author>
<name>Loic Pallardy</name>
</author>
<published>2019-01-10T13:50:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d999b622fcfb392aa549e7e56f6f777b09748ea1'/>
<id>urn:sha1:d999b622fcfb392aa549e7e56f6f777b09748ea1</id>
<content type='text'>
Remoteproc is now capable to create one specific sub-device per
virtio link to associate a dedicated memory pool.
This implies to change device used by virtio_rpmsg for
buffer allocation from grand-parent to parent.

Signed-off-by: Loic Pallardy &lt;loic.pallardy@st.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Tested-by: Anup Patel &lt;anup@brainfault.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>rpmsg: virtio_rpmsg_bus: Switch to SPDX license identifier</title>
<updated>2018-06-04T00:37:13Z</updated>
<author>
<name>Suman Anna</name>
</author>
<published>2018-05-31T17:11:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c3bab82466b6c710802625193c5e832b237be047'/>
<id>urn:sha1:c3bab82466b6c710802625193c5e832b237be047</id>
<content type='text'>
Use the appropriate SPDX license identifier in the virtio rpmsg
bus driver source file and drop the previous boilerplate license
text.

Signed-off-by: Suman Anna &lt;s-anna@ti.com&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>rpmsg: virtio_rpmsg_bus: fix sg_set_buf() when addr is not a valid kernel address</title>
<updated>2017-08-24T22:37:28Z</updated>
<author>
<name>Loic Pallardy</name>
</author>
<published>2017-03-28T11:49:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9dd87c2af651b09e34eed09e60228a1fd2edf969'/>
<id>urn:sha1:9dd87c2af651b09e34eed09e60228a1fd2edf969</id>
<content type='text'>
To specify memory for remoteproc, we declare (dma_declare_coherent_memory())
an area which is ioremap'ed to the vmalloc area.  However, this address is
not a kernel address so virt_addr_valid(buf) fails.

Signed-off-by: Ludovic Barre &lt;ludovic.barre@st.com&gt;
Signed-off-by: Loic Pallardy &lt;loic.pallardy@st.com&gt;
Acked-by: Patrice Chotard &lt;patrice.chotard@st.com&gt;
Tested-by: Suman Anna &lt;s-anna@ti.com&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>rpmsg: virtio_rpmsg: set rpmsg_buf_size customizable</title>
<updated>2017-08-24T22:37:10Z</updated>
<author>
<name>Loic Pallardy</name>
</author>
<published>2017-03-28T11:49:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f93848f9eeb0f87874b8ba8798570bf391eff17f'/>
<id>urn:sha1:f93848f9eeb0f87874b8ba8798570bf391eff17f</id>
<content type='text'>
Rpmsg buffer size is currently fixed to 512 bytes.
This patch introduces a new capability in struct virtproc_info
to tune shared buffer size between host and coprocessor
according to the needs.

Acked-by: Suman Anna &lt;s-anna@ti.com&gt;
Signed-off-by: Loic Pallardy &lt;loic.pallardy@st.com&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
</feed>
