* amdgpu fails compilation with CONFIG_FORTIFY_SOURCE
@ 2018-09-05 18:43 Ján Kosterec
[not found] ` <CANFv0+2=yn983rcLizDEiuDSND9rE4BZuGBeHwZ6J39CC_kgkw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Ján Kosterec @ 2018-09-05 18:43 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1.1: Type: text/plain, Size: 631 bytes --]
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
[-- Attachment #1.2: Type: text/html, Size: 804 bytes --]
[-- Attachment #2: amdgpu.patch --]
[-- Type: text/x-patch, Size: 525 bytes --]
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);
}
}
}
[-- Attachment #3: Type: text/plain, Size: 154 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: amdgpu fails compilation with CONFIG_FORTIFY_SOURCE
[not found] ` <CANFv0+2=yn983rcLizDEiuDSND9rE4BZuGBeHwZ6J39CC_kgkw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2018-09-20 14:59 ` Harry Wentland
0 siblings, 0 replies; 2+ messages in thread
From: Harry Wentland @ 2018-09-20 14:59 UTC (permalink / raw)
To: Ján Kosterec, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1.1: Type: text/plain, Size: 1017 bytes --]
Thanks for the fix.
We've moved to logging functionality more closely aligned with the rest of DRM and dropped logger.c a while back.
Harry
On 2018-09-05 02:43 PM, Ján Kosterec wrote:
> 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
>
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[-- Attachment #1.2: Type: text/html, Size: 2107 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-20 14:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-05 18:43 amdgpu fails compilation with CONFIG_FORTIFY_SOURCE Ján Kosterec
[not found] ` <CANFv0+2=yn983rcLizDEiuDSND9rE4BZuGBeHwZ6J39CC_kgkw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-09-20 14:59 ` Harry Wentland
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.