<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/udl, branch v6.18.21</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-04-17T08:21:40+00:00</updated>
<entry>
<title>drm/udl: Set error code in udl_init()</title>
<updated>2025-04-17T08:21:40+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@linaro.org</email>
</author>
<published>2025-04-16T11:09:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d6fe216caf15d196e1bf76591440f8f17d58e7ee'/>
<id>urn:sha1:d6fe216caf15d196e1bf76591440f8f17d58e7ee</id>
<content type='text'>
Return -ENOMEM if udl_alloc_urb_list() fails.  Don't return success.

Fixes: fb10144ba426 ("drm/udl: Support adapters without firmware descriptor")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Reviewed-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://lore.kernel.org/r/Z_-P4N4_U-xTC9-O@stanley.mountain
</content>
</entry>
<entry>
<title>drm/udl: Support adapters without firmware descriptor</title>
<updated>2025-04-14T08:19:21+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2025-04-10T10:59:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fb10144ba426b88080c6abcede5f1332bebc3c60'/>
<id>urn:sha1:fb10144ba426b88080c6abcede5f1332bebc3c60</id>
<content type='text'>
Set default limit on the number of pixels for adapters without
vendor firmware descriptor. The devices work as expected, they
just don't provide any description.

If parsing the vendor firmware descriptor fails, the device falls
back to the given default limits. Failing to allocate memory is
still an error.

v2:
- fix typo in constant (Patrik)

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Patrik Jakobsson &lt;patrik.r.jakobsson@gmail.com&gt;
Link: https://lore.kernel.org/r/20250410105948.25463-10-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/udl: Validate length in vendor-descriptor parser</title>
<updated>2025-04-14T08:19:20+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2025-04-10T10:59:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=df6dc12e5e6ddbf2a59d5283fcf6ccd0b3d0334d'/>
<id>urn:sha1:df6dc12e5e6ddbf2a59d5283fcf6ccd0b3d0334d</id>
<content type='text'>
Rewrite the parser for the vendor firmware descriptor with the
following improvements.

- Validate the key-value length given in a vendor descriptor
against the length of the descriptor. The current code fails
to do this and might read more bytes than available. This can
lead to out-of-bounds reads of the allocated buffer.

- Read raw data with helpers for unaligned data. This allows
the code to run on platforms that do now support unaligned memory
access by default.

- Validate the pixel limit against a default value. The default
comes from real-world devices. If the reported number of pixels
is significantly above the limit, it is likely invalid.

- Drop the obsolete print macros. There is still a warning about
invalid firmware descriptors. The rest of the output is bogus.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Patrik Jakobsson &lt;patrik.r.jakobsson@gmail.com&gt;
Link: https://lore.kernel.org/r/20250410105948.25463-9-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/udl: Treat vendor descriptor as u8</title>
<updated>2025-04-14T08:19:20+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2025-04-10T10:59:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f4fce9ea8473ab8f91c0aa0855b9d51313b8000e'/>
<id>urn:sha1:f4fce9ea8473ab8f91c0aa0855b9d51313b8000e</id>
<content type='text'>
The vendor descriptor is an array of unsigned bytes. It is raw data
that is not to be modified. Declare it as 'const u8'.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Patrik Jakobsson &lt;patrik.r.jakobsson@gmail.com&gt;
Link: https://lore.kernel.org/r/20250410105948.25463-8-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/udl: Return error if vendor descriptor is too short</title>
<updated>2025-04-14T08:19:19+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2025-04-10T10:59:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1fad33f04ed1fd14049cda6a35faa4abc0886201'/>
<id>urn:sha1:1fad33f04ed1fd14049cda6a35faa4abc0886201</id>
<content type='text'>
There need to be least 5 bytes in the vendor descriptor. Return
an error otherwise. Also change the branching to early-out on
the error. Adjust indention of the rest of the parser function.

The original length test expected more than 5 bytes in the vendor
descriptor. As a descriptor with no key-value pairs has exactly 5
bytes and is still valid, change the test to accept this case as
well.

v2
- clarify changes to length test in commit description (Patrik)

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Patrik Jakobsson &lt;patrik.r.jakobsson@gmail.com&gt;
Link: https://lore.kernel.org/r/20250410105948.25463-7-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/udl: Handle errors from usb_get_descriptor()</title>
<updated>2025-04-14T08:19:19+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2025-04-10T10:59:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=895452ae48c1e179df509b6184227a5ea40b4f38'/>
<id>urn:sha1:895452ae48c1e179df509b6184227a5ea40b4f38</id>
<content type='text'>
Reading the vendor descriptor from the udl device can fail with
an error, which the current code fails to capture. Store the return
value in an integer and test for the error. Abort parsing on errors
or treat the value as length on success.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Patrik Jakobsson &lt;patrik.r.jakobsson@gmail.com&gt;
Link: https://lore.kernel.org/r/20250410105948.25463-6-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/udl: The number of pixels is always positive</title>
<updated>2025-04-14T08:19:18+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2025-04-10T10:59:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=89323678d8280f4f8e5971124d3aef8a6dfece0a'/>
<id>urn:sha1:89323678d8280f4f8e5971124d3aef8a6dfece0a</id>
<content type='text'>
Store sku_pixel_limit as type unsigned long instead of int. The
number of pixels available is always positive.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Patrik Jakobsson &lt;patrik.r.jakobsson@gmail.com&gt;
Link: https://lore.kernel.org/r/20250410105948.25463-5-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/udl: Improve type safety when using struct udl_device</title>
<updated>2025-04-14T08:19:18+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2025-04-10T10:59:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0b4346d6898490d03b2d93070103db73ae864f86'/>
<id>urn:sha1:0b4346d6898490d03b2d93070103db73ae864f86</id>
<content type='text'>
Push upcasts from struct drm_device to struct udl_device outwards
in the call chain; cast earlier and call functions with the upcasted
value. Improves type safety.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Patrik Jakobsson &lt;patrik.r.jakobsson@gmail.com&gt;
Link: https://lore.kernel.org/r/20250410105948.25463-4-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/udl: Remove unused field gem_lock from struct udl_device</title>
<updated>2025-04-14T08:19:17+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2025-04-10T10:58:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=21c6b386f1eec5586f82b8659f4e0cbc85b03e88'/>
<id>urn:sha1:21c6b386f1eec5586f82b8659f4e0cbc85b03e88</id>
<content type='text'>
Reduce the size of struct udl_device by removing the unused
field gem_lock.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Patrik Jakobsson &lt;patrik.r.jakobsson@gmail.com&gt;
Link: https://lore.kernel.org/r/20250410105948.25463-3-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/udl: Remove unused field dev from struct udl_device</title>
<updated>2025-04-14T08:19:17+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2025-04-10T10:58:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6d0171c77d1a917cacbafe8a38ed486710d726fe'/>
<id>urn:sha1:6d0171c77d1a917cacbafe8a38ed486710d726fe</id>
<content type='text'>
Reduce the size of struct udl_device by removing the unused
field dev.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Patrik Jakobsson &lt;patrik.r.jakobsson@gmail.com&gt;
Link: https://lore.kernel.org/r/20250410105948.25463-2-tzimmermann@suse.de
</content>
</entry>
</feed>
