Skip to contentSkip to conversation

drm/doc: Fix title underline length

PATCH Applied Maxime Ripard 4 participants 8 messages Nov 28, 2022 – Dec 1, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 drm/doc: Fix title underline length

The underline length for the new Analog TV properties section doesn't match the title length, resulting in a warning.

Fixes 7d63cd8526f1 ("drm/connector: Add TV standard property")
---
 Documentation/gpu/drm-kms.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/gpu/drm-kms.rst +1 -1
index 321f2f582c64..c92d425cb2dd 100644
@@ -521,7 +521,7 @@ HDMI Specific Connector Properties
    :doc: HDMI connector properties
 
 Analog TV Specific Connector Properties
-----------------------------------
+---------------------------------------
 
 .. kernel-doc:: drivers/gpu/drm/drm_connector.c
    :doc: Analog TV Connector Properties
Signature · 1 line
2.38.1
#1 lore raw

PATCH 2/3 drm/modes: Use strscpy() to copy command-line mode name

The mode name in struct drm_cmdline_mode can hold 32 characters at most, which can easily get overrun. Switch to strscpy() to prevent such a thing.

Addresses-Coverity-ID: 1527354 ("Security best practices violations")

Fixes a7ab155397dd ("drm/modes: Switch to named mode descriptors")
---
 drivers/gpu/drm/drm_modes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_modes.c +1 -1
index 699c66e54668..be030f4a5311 100644
@@ -2316,7 +2316,7 @@ static int drm_mode_parse_cmdline_named_mode(const char *name,
 		if (ret != name_end)
 			continue;
 
-		strcpy(cmdline_mode->name, mode->name);
+		strscpy(cmdline_mode->name, mode->name, sizeof(cmdline_mode->name));
 		cmdline_mode->pixel_clock = mode->pixel_clock_khz;
 		cmdline_mode->xres = mode->xres;
 		cmdline_mode->yres = mode->yres;
Signature · 1 line
2.38.1
Reviewed-by on v1 2/3
#2 lore raw

Re: [PATCH 2/3] drm/modes: Use strscpy() to copy command-line mode name

Quoted 9 lines · Maxime Ripard

The mode name in struct drm_cmdline_mode can hold 32 characters at most, which can easily get overrun. Switch to strscpy() to prevent such a thing.

Addresses-Coverity-ID: 1527354 ("Security best practices violations")

Fixes a7ab155397dd ("drm/modes: Switch to named mode descriptors")

---

Signature · 5 lines
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat
Reviewed-by on v1 2/3
#3 lore raw

Re: [PATCH 2/3] drm/modes: Use strscpy() to copy command-line mode name

In reply to Maxime Ripard
Quoted 8 lines · Maxime Ripard

The mode name in struct drm_cmdline_mode can hold 32 characters at most, which can easily get overrun. Switch to strscpy() to prevent such a thing.

Addresses-Coverity-ID: 1527354 ("Security best practices violations")

Fixes a7ab155397dd ("drm/modes: Switch to named mode descriptors")
Signature · 1 line
Kees Cook
#4 lore raw

PATCH 3/3 drm/tests: helpers: Add missing export

In reply to Maxime Ripard

drm_kunit_device_init() is a public function meant to be used by other tests, but isn't exported. This leads to modpost errors when the other tests are compiled as module.

---
 drivers/gpu/drm/tests/drm_kunit_helpers.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/tests/drm_kunit_helpers.c +1 -0
index f1662091f250..8c738384a992 100644
@@ -66,6 +66,7 @@ struct drm_device *drm_kunit_device_init(struct kunit *test, u32 features, char
 
 	return drm;
 }
+EXPORT_SYMBOL(drm_kunit_device_init);
 
 MODULE_AUTHOR("Maxime Ripard <[email protected]>");
 MODULE_LICENSE("GPL");
Signature · 1 line
2.38.1
Reviewed-by on v1 3/3
#5 lore raw

Re: [PATCH 3/3] drm/tests: helpers: Add missing export

Quoted 6 lines · Maxime Ripard

drm_kunit_device_init() is a public function meant to be used by other tests, but isn't exported. This leads to modpost errors when the other tests are compiled as module.

Best Regards,
- Maíra Canal

Quoted 16 lines
---
 drivers/gpu/drm/tests/drm_kunit_helpers.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/tests/drm_kunit_helpers.c +1 -0
index f1662091f250..8c738384a992 100644
@@ -66,6 +66,7 @@ struct drm_device *drm_kunit_device_init(struct kunit *test, u32 features, char
 
 	return drm;
 }
+EXPORT_SYMBOL(drm_kunit_device_init);
 
 MODULE_AUTHOR("Maxime Ripard <[email protected]>");
 MODULE_LICENSE("GPL");
Reviewed-by on v1 1/3
#6 lore raw
In reply to Maxime Ripard
Quoted 7 lines · Maxime Ripard

The underline length for the new Analog TV properties section doesn't match the title length, resulting in a warning.

Fixes 7d63cd8526f1 ("drm/connector: Add TV standard property")

---

Ah, I wasn't aware that this would lead to a kernel-doc warning.

Signature · 5 lines
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat
author Applied
#7 lore raw
In reply to Maxime Ripard
Quoted 4 lines · Maxime Ripard

The underline length for the new Analog TV properties section doesn't match the title length, resulting in a warning.

Applied to drm/drm-misc (drm-misc-next).

Thanks!
Maxime