amdgpu driver fails compilation when compiling with CONFIG_FORTIFY_SOURCE kernel option:
In function ‘memmove’, inlined from ‘append_entry’ at drivers/gpu/drm/amd/amdgpu/../display/dc/basics/logger.c:258:2, inlined from ‘dm_logger_append_va.part.5’ at drivers/gpu/drm/amd/amdgpu/../display/dc/basics/logger.c:349:4: ./include/linux/string.h:356:4: error: call to ‘__read_overflow2’ declared with attribute error: detected read beyond size of object passed as 2nd parameter __read_overflow2(); ^~~~~~~~~~~~~~~~~~ I have attached a patch which resolves this problem. Regards, Jan
diff -ur a/drivers/gpu/drm/amd/display/dc/basics/logger.c b/drivers/gpu/drm/amd/display/dc/basics/logger.c --- a/drivers/gpu/drm/amd/display/dc/basics/logger.c 2018-09-05 12:37:10.829547720 +0200 +++ b/drivers/gpu/drm/amd/display/dc/basics/logger.c 2018-09-05 12:36:52.612682259 +0200 @@ -346,7 +346,7 @@ if (size < LOG_MAX_LINE_SIZE - 1) { append_entry(entry, buffer, size); } else { - append_entry(entry, "LOG_ERROR, line too long\n", 27); + append_entry(entry, "LOG_ERROR, line too long\n", 25); } } }
_______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx