drm/dp: Make space for null terminator in the DP device ID char array
Subsystems (2)
PATCH 1/1 drm/dp: Make space for null terminator in the DP device ID char array
The DP device identification string read from the DPCD registers is 6 characters long at max. and we store it in a char array of the same length without space for the NULL terminator. Fix this by increasing the array size to 7 and initialize it to an empty string.
--- drivers/gpu/drm/drm_dp_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_dp_helper.c +1 -1
@@ -544,7 +544,7 @@ void drm_dp_downstream_debug(struct seq_file *m,DP_DETAILED_CAP_INFO_AVAILABLE ;int clk;int bpc; -char id[6 ]; +char id[7 ] ="" ;int len;uint8_t rev[2 ];int type = port_cap[0 ] &DP_DS_PORT_TYPE_MASK ;
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for drm/dp: Make space for null terminator in the DP device ID char array
== Series Details ==
== Series Details ==
Series: drm/dp: Make space for null terminator in the DP device ID char array
URL : https://patchwork.freedesktop.org/series/14865/
State : failure
== Summary ==
Series 14865v1 drm/dp: Make space for null terminator in the DP device ID char array
https://patchwork.freedesktop.org/api/1.0/series/14865/revisions/1/mbox/
Test gem_ringfill:
Subgroup basic-default-hang:
pass -> INCOMPLETE (fi-hsw-4770)
Test gem_sync:
Subgroup basic-store-all:
fail -> PASS (fi-hsw-4770r)fi-bdw-5557u total:241 pass:226 dwarn:0 dfail:0 fail:0 skip:15 fi-bsw-n3050 total:241 pass:201 dwarn:0 dfail:0 fail:0 skip:40 fi-bxt-t5700 total:241 pass:213 dwarn:0 dfail:0 fail:0 skip:28 fi-byt-j1900 total:241 pass:213 dwarn:0 dfail:0 fail:0 skip:28 fi-byt-n2820 total:241 pass:209 dwarn:0 dfail:0 fail:0 skip:32 fi-hsw-4770 total:112 pass:102 dwarn:0 dfail:0 fail:0 skip:9 fi-hsw-4770r total:241 pass:221 dwarn:0 dfail:0 fail:0 skip:20 fi-ilk-650 total:241 pass:188 dwarn:0 dfail:0 fail:0 skip:53 fi-ivb-3520m total:241 pass:219 dwarn:0 dfail:0 fail:0 skip:22 fi-ivb-3770 total:241 pass:219 dwarn:0 dfail:0 fail:0 skip:22 fi-kbl-7200u total:241 pass:219 dwarn:0 dfail:0 fail:0 skip:22 fi-skl-6260u total:241 pass:227 dwarn:0 dfail:0 fail:0 skip:14 fi-skl-6700hq total:241 pass:220 dwarn:0 dfail:0 fail:0 skip:21 fi-skl-6700k total:241 pass:219 dwarn:1 dfail:0 fail:0 skip:21 fi-skl-6770hq total:241 pass:227 dwarn:0 dfail:0 fail:0 skip:14 fi-snb-2520m total:241 pass:209 dwarn:0 dfail:0 fail:0 skip:32 fi-snb-2600 total:241 pass:208 dwarn:0 dfail:0 fail:0 skip:33
49a651a2e66ef603995f88a470d0986c2ef8b5b8 drm-intel-nightly: 2016y-11m-04d-18h-04m-36s UTC integration manifest 08543dd drm/dp: Make space for null terminator in the DP device ID char array
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_2911/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Mika,
Can you take a look at this?
-DK
Quoted 15 lines · Dhinakaran Pandiyan
The DP device identification string read from the DPCD registers is 6 characters long at max. and we store it in a char array of the same length without space for the NULL terminator. Fix this by increasing the array size to 7 and initialize it to an empty string.
Signed-off-by Dhinakaran Pandiyan <[email protected]>--- drivers/gpu/drm/drm_dp_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/drm_dp_helper.c +0
-0
drivers/gpu/drm/drm_dp_helper.c void drm_dp_downstream_debug(struct seq_file *m, · line 550
Quoted 8 lines
drivers/gpu/drm/drm_dp_helper.c +1
-1@@ -544,7 +544,7 @@ void drm_dp_downstream_debug(struct seq_file *m,DP_DETAILED_CAP_INFO_AVAILABLE ;int clk;int bpc; -char id[6 ]; +char id[7 ] ="" ;int len;uint8_t rev[2 ];int type = port_cap[0 ] &DP_DS_PORT_TYPE_MASK ;
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 15 lines · Dhinakaran Pandiyan
The DP device identification string read from the DPCD registers is 6 characters long at max. and we store it in a char array of the same length without space for the NULL terminator. Fix this by increasing the array size to 7 and initialize it to an empty string.
Signed-off-by Dhinakaran Pandiyan <[email protected]>--- drivers/gpu/drm/drm_dp_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/drm_dp_helper.c +0
-0
drivers/gpu/drm/drm_dp_helper.c void drm_dp_downstream_debug(struct seq_file *m, · line 547
Quoted 5 lines
drivers/gpu/drm/drm_dp_helper.c +1
-1@@ -544,7 +544,7 @@ void drm_dp_downstream_debug(struct seq_file *m,DP_DETAILED_CAP_INFO_AVAILABLE ;int clk;int bpc; -char id[6 ]; +char id[7 ] ="" ;
Or use %*pE in the format string and provide the length.
BR,
Jani.
Quoted 3 lines
drivers/gpu/drm/drm_dp_helper.c +0
-0int len;uint8_t rev[2 ];int type = port_cap[0 ] &DP_DS_PORT_TYPE_MASK ;
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 1/1 drm/dp: Make space for null terminator in the DP device ID char array
The DP device identification string read from the DPCD registers is 6 characters long at max. and we store it in a char array of the same length without space for the NULL terminator. Fix this by increasing the array size to 7 and initialize it to an empty string.
v2: Use %*pE format specifier (Jani)
--- drivers/gpu/drm/drm_dp_helper.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_dp_helper.c +3 -2
@@ -544,7 +544,7 @@ void drm_dp_downstream_debug(struct seq_file *m,DP_DETAILED_CAP_INFO_AVAILABLE ;int clk;int bpc; -char id[6 ]; +char id[6 ] ="" ;int len;uint8_t rev[2 ];int type = port_cap[0 ] &DP_DS_PORT_TYPE_MASK ;
@@ -584,7 +584,8 @@ void drm_dp_downstream_debug(struct seq_file *m, }drm_dp_downstream_id (aux, id); -seq_printf (m,"\t\tID: %s\n" , id); + len =strnlen (id,6 ); +seq_printf (m,"\t\tID: %*pE\n" , len, id); len =drm_dp_dpcd_read (aux,DP_BRANCH_HW_REV , &rev[0 ],1 );if (len >0 )
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Adding Cc's.
Quoted 26 lines · Dhinakaran Pandiyan
The DP device identification string read from the DPCD registers is 6 characters long at max. and we store it in a char array of the same length without space for the NULL terminator. Fix this by increasing the array size to 7 and initialize it to an empty string.
v2: Use %*pE format specifier (Jani)
Signed-off-by Dhinakaran Pandiyan <[email protected]>--- drivers/gpu/drm/drm_dp_helper.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/drm_dp_helper.c +1
-1@@ -544,7 +544,7 @@ void drm_dp_downstream_debug(struct seq_file *m,DP_DETAILED_CAP_INFO_AVAILABLE ;int clk;int bpc; -char id[6 ]; +char id[6 ] ="" ;int len;uint8_t rev[2 ];int type = port_cap[0 ] &DP_DS_PORT_TYPE_MASK ;
drivers/gpu/drm/drm_dp_helper.c void drm_dp_downstream_debug(struct seq_file *m, · line 591
Quoted 9 lines
drivers/gpu/drm/drm_dp_helper.c +2
-1@@ -584,7 +584,8 @@ void drm_dp_downstream_debug(struct seq_file *m, }drm_dp_downstream_id (aux, id); -seq_printf (m,"\t\tID: %s\n" , id); + len =strnlen (id,6 ); +seq_printf (m,"\t\tID: %*pE\n" , len, id); len =drm_dp_dpcd_read (aux,DP_BRANCH_HW_REV , &rev[0 ],1 );if (len >0 )
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/dp: Make space for null terminator in the DP device ID char array (rev2)
In reply to Dhinakaran Pandiyan== Series Details ==
== Series Details ==
Series: drm/dp: Make space for null terminator in the DP device ID char array (rev2)
URL : https://patchwork.freedesktop.org/series/14865/
State : success
== Summary ==
Series 14865v2 drm/dp: Make space for null terminator in the DP device ID char array
https://patchwork.freedesktop.org/api/1.0/series/14865/revisions/2/mbox/
fi-bdw-5557u total:241 pass:226 dwarn:0 dfail:0 fail:0 skip:15 fi-bsw-n3050 total:241 pass:201 dwarn:0 dfail:0 fail:0 skip:40 fi-byt-j1900 total:241 pass:213 dwarn:0 dfail:0 fail:0 skip:28 fi-byt-n2820 total:241 pass:209 dwarn:0 dfail:0 fail:0 skip:32 fi-hsw-4770 total:241 pass:221 dwarn:0 dfail:0 fail:0 skip:20 fi-hsw-4770r total:241 pass:221 dwarn:0 dfail:0 fail:0 skip:20 fi-ilk-650 total:241 pass:188 dwarn:0 dfail:0 fail:0 skip:53 fi-ivb-3520m total:241 pass:219 dwarn:0 dfail:0 fail:0 skip:22 fi-ivb-3770 total:241 pass:219 dwarn:0 dfail:0 fail:0 skip:22 fi-skl-6260u total:241 pass:227 dwarn:0 dfail:0 fail:0 skip:14 fi-skl-6700hq total:241 pass:220 dwarn:0 dfail:0 fail:0 skip:21 fi-skl-6700k total:241 pass:219 dwarn:1 dfail:0 fail:0 skip:21 fi-skl-6770hq total:241 pass:227 dwarn:0 dfail:0 fail:0 skip:14 fi-snb-2520m total:241 pass:209 dwarn:0 dfail:0 fail:0 skip:32 fi-snb-2600 total:241 pass:208 dwarn:0 dfail:0 fail:0 skip:33
0cb521ab1e777031c1fbb5fb2b0a5b13ccb9c461 drm-intel-nightly: 2016y-11m-07d-20h-58m-10s UTC integration manifest c3f76a9 drm/dp: Make space for null terminator in the DP device ID char array
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_2927/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx