Skip to contentSkip to conversation

linux-next: build failure after merge of the drm tree

DISCUSSION [email protected] 5 participants 6 messages Feb 25, 2022 – Mar 1, 2022

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Hi all,

After merging the drm tree, today's linux-next build (x86 allmodconfig) failed like this:

lib/strncpy_from_user.o: warning: objtool: strncpy_from_user()+0x10b: call to do_strncpy_from_user() with UACCESS enabled
lib/strnlen_user.o: warning: objtool: strnlen_user()+0xbb: call to do_strnlen_user() with UACCESS enabled /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c: In function 'receive_timing_debugfs_show':
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

cc1: all warnings being treated as errors

Caused by commit

b5c84a9edcd418 ("drm/bridge: add it6505 driver")

I have used the drm tree from yesterday instead.

#1 lore raw

Hi all,

Quoted 71 lines · On Fri, 25 Feb 2022 16:42:31 +0000 [email protected] wrote:

After merging the drm tree, today's linux-next build (x86 allmodconfig) failed like this:

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c: In function 'receive_timing_debugfs_show':
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~
Quoted 7 lines

cc1: all warnings being treated as errors

Caused by commit

b5c84a9edcd418 ("drm/bridge: add it6505 driver")

I have used the drm tree from yesterday instead.

I am still getting these errors and so used the drm tree from next-20220224 again.

Signature · 2 lines
Cheers,
Stephen Rothwell
#2 lore raw
In reply to [email protected]
Quoted 75 lines · On Sat, Feb 26, 2022 at 12:43 AM <[email protected]> wrote:

Hi all,

After merging the drm tree, today's linux-next build (x86 allmodconfig) failed like this:

lib/strncpy_from_user.o: warning: objtool: strncpy_from_user()+0x10b: call to do_strncpy_from_user() with UACCESS enabled
lib/strnlen_user.o: warning: objtool: strnlen_user()+0xbb: call to do_strnlen_user() with UACCESS enabled /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c: In function 'receive_timing_debugfs_show':
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~
Quoted 7 lines

cc1: all warnings being treated as errors

Caused by commit

b5c84a9edcd418 ("drm/bridge: add it6505 driver")

I have used the drm tree from yesterday instead.

hi all,

The following fix should be able to address the errors. Should it be squashed into b5c84a9edcd418 ("drm/bridge: add it6505 driver")?

(quoted diff) +0 -0

b/drivers/gpu/drm/bridge/ite-it6505.c
index fb16a176822d81..f2f101220ade94 100644

drivers/gpu/drm/bridge/ite-it6505.c +1 -1
@@ -289,7 +289,7 @@
 #define WORD_LENGTH_20BIT 2
 #define WORD_LENGTH_24BIT 3
 #define DEBUGFS_DIR_NAME "it6505-debugfs"
-#define READ_BUFFER_SIZE 200
+#define READ_BUFFER_SIZE 400
 
 /* Vendor option */
 #define HDCP_DESIRED 1
@@ -3074,7 +3074,7 @@ static ssize_t

receive_timing_debugfs_show(struct file *file, char __user *buf,

        struct it6505 *it6505 = file->private_data;
        struct drm_display_mode *vid = &it6505->video_info;
        u8 read_buf[READ_BUFFER_SIZE];
-       u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
+       u8 *str = read_buf, *end = read_buf + READ_BUFFER_SIZE;
        ssize_t ret, count;

        if (!it6505)
maintainer
#3 lore raw
Quoted 81 lines · Hsin-Yi Wang
Quoted 79 lines · On Sat, Feb 26, 2022 at 12:43 AM <[email protected]> wrote:

Hi all,

After merging the drm tree, today's linux-next build (x86 allmodconfig) failed like this:

lib/strncpy_from_user.o: warning: objtool: strncpy_from_user()+0x10b: call to do_strncpy_from_user() with UACCESS enabled
lib/strnlen_user.o: warning: objtool: strnlen_user()+0xbb: call to do_strnlen_user() with UACCESS enabled /tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c: In function 'receive_timing_debugfs_show':
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3077:23: error: array subscript 4096 is outside array bounds of 'u8[200]' {aka 'unsigned char[200]'} [-Werror=array-bounds]
3077 | u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
| ^~~
/tmp/next/build/drivers/gpu/drm/bridge/ite-it6505.c:3076:5: note: while referencing 'read_buf'

 3076 |  u8 read_buf[READ_BUFFER_SIZE];
      |     ^~~~~~~~

cc1: all warnings being treated as errors

Caused by commit

Quoted 8 lines
Quoted 3 lines

b5c84a9edcd418 ("drm/bridge: add it6505 driver")

I have used the drm tree from yesterday instead.

hi all,

The following fix should be able to address the errors. Should it be squashed into b5c84a9edcd418 ("drm/bridge: add it6505 driver")?

Can you send a patch with this to dri-devel? It's far too far down the tree to sqaush anything at this point.

Dave.

Quoted 25 lines
drivers/gpu/drm/bridge/ite-it6505.c +2 -2
index fb16a176822d81..f2f101220ade94 100644
@@ -289,7 +289,7 @@
 #define WORD_LENGTH_20BIT 2
 #define WORD_LENGTH_24BIT 3
 #define DEBUGFS_DIR_NAME "it6505-debugfs"
-#define READ_BUFFER_SIZE 200
+#define READ_BUFFER_SIZE 400
 
 /* Vendor option */
 #define HDCP_DESIRED 1
@@ -3074,7 +3074,7 @@ static ssize_t
 receive_timing_debugfs_show(struct file *file, char __user *buf,
        struct it6505 *it6505 = file->private_data;
        struct drm_display_mode *vid = &it6505->video_info;
        u8 read_buf[READ_BUFFER_SIZE];
-       u8 *str = read_buf, *end = read_buf + PAGE_SIZE;
+       u8 *str = read_buf, *end = read_buf + READ_BUFFER_SIZE;
        ssize_t ret, count;
 
        if (!it6505)
#4 lore raw
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines

Caused by commit

b5c84a9edcd418 ("drm/bridge: add it6505 driver")

I have used the drm tree from yesterday instead.

Quoted 8 lines
Quoted 4 lines

hi all,

The following fix should be able to address the errors. Should it be squashed into b5c84a9edcd418 ("drm/bridge: add it6505 driver")?

Can you send a patch with this to dri-devel? It's far too far down the tree to sqaush anything at this point.

Patch submitted & reviewed.

https://lore.kernel.org/all/[email protected]/

Should I apply it drm-misc-next?

maintainer
#5 lore raw

Yes, please do., sorry for HTML, stuck on tablet.

Quoted 22 lines · Robert Foss,
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines

Caused by commit

b5c84a9edcd418 ("drm/bridge: add it6505 driver")

I have used the drm tree from yesterday instead.

Quoted 8 lines
Quoted 4 lines

hi all,

The following fix should be able to address the errors. Should it be squashed into b5c84a9edcd418 ("drm/bridge: add it6505 driver")?

Can you send a patch with this to dri-devel? It's far too far down the tree to sqaush anything at this point.

Patch submitted & reviewed.

https://lore.kernel.org/all/[email protected]/

Should I apply it drm-misc-next?