* [devel] -fno-stack-protector?
@ 2010-06-20 10:54 Valery V. Inozemtsev
2010-06-20 11:34 ` Damir Shayhutdinov
0 siblings, 1 reply; 6+ messages in thread
From: Valery V. Inozemtsev @ 2010-06-20 10:54 UTC (permalink / raw)
To: devel
[-- Attachment #1: Type: text/plain, Size: 1117 bytes --]
Hi
есть код
http://git.altlinux.org/people/shrek/packages/?p=xorg-server.git;a=blob;f=hw/xfree86/vbe/vbe.c;h=0b34648e1ae27e8b8be394fdf32f5efd7e86bba3;hb=refs/heads/xorg-x11-server-1.9
на который наш gcc ругается так:
Making all in vbe
make[4]: Entering directory
`/usr/src/RPM/BUILD/xorg-server-1.8.99.901/hw/xfree86/vbe'
CC vbe.lo
CC vbeModes.lo
CC vbe_module.lo
In file included from /usr/include/string.h:658,
from vbe.c:16:
In function 'memcpy',
inlined from 'VBEGetModeInfo' at vbe.c:589:
/usr/include/bits/string3.h:52: error: call to __builtin___memcpy_chk
will always overflow destination buffer
In function 'memcpy',
inlined from 'VBEGetModeInfo' at vbe.c:592:
/usr/include/bits/string3.h:52: error: call to __builtin___memcpy_chk
will always overflow destination buffer
make[4]: *** [vbe.lo] Error 1
сам код трогать не хотелось бы...
внимание вопрос - как объехать эту проверку на overflow destination
buffer?
--
Valery V. Inozemtsev
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [devel] -fno-stack-protector?
2010-06-20 10:54 [devel] -fno-stack-protector? Valery V. Inozemtsev
@ 2010-06-20 11:34 ` Damir Shayhutdinov
2010-06-20 12:40 ` Dmitry V. Levin
0 siblings, 1 reply; 6+ messages in thread
From: Damir Shayhutdinov @ 2010-06-20 11:34 UTC (permalink / raw)
To: ALT Linux Team development discussions
20 июня 2010 г. 14:54 пользователь Valery V. Inozemtsev написал:
> есть код
> http://git.altlinux.org/people/shrek/packages/?p=xorg-server.git;a=blob;f=hw/xfree86/vbe/vbe.c;h=0b34648e1ae27e8b8be394fdf32f5efd7e86bba3;hb=refs/heads/xorg-x11-server-1.9
> сам код трогать не хотелось бы...
> внимание вопрос - как объехать эту проверку на overflow destination
> buffer?
-U__FORTIFY_SOURCE в CPPFLAGS.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [devel] -fno-stack-protector?
2010-06-20 11:34 ` Damir Shayhutdinov
@ 2010-06-20 12:40 ` Dmitry V. Levin
2010-06-20 12:52 ` Dmitry V. Levin
0 siblings, 1 reply; 6+ messages in thread
From: Dmitry V. Levin @ 2010-06-20 12:40 UTC (permalink / raw)
To: ALT Linux Team development discussions
[-- Attachment #1: Type: text/plain, Size: 681 bytes --]
On Sun, Jun 20, 2010 at 03:34:09PM +0400, Damir Shayhutdinov wrote:
> 20 июня 2010 г. 14:54 пользователь Valery V. Inozemtsev написал:
> > есть код
> > http://git.altlinux.org/people/shrek/packages/?p=xorg-server.git;a=blob;f=hw/xfree86/vbe/vbe.c;h=0b34648e1ae27e8b8be394fdf32f5efd7e86bba3;hb=refs/heads/xorg-x11-server-1.9
> > сам код трогать не хотелось бы...
> > внимание вопрос - как объехать эту проверку на overflow destination
> > buffer?
>
> -U__FORTIFY_SOURCE в CPPFLAGS.
-U_FORTIFY_SOURCE, но это _очень_ плохая идея -- отключать защиту во всём
xorg-server только ради одного файла. Я считаю необходимым найти менее
опасное решение вопроса.
--
ldv
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [devel] -fno-stack-protector?
2010-06-20 12:40 ` Dmitry V. Levin
@ 2010-06-20 12:52 ` Dmitry V. Levin
2010-06-20 15:33 ` Valery V. Inozemtsev
0 siblings, 1 reply; 6+ messages in thread
From: Dmitry V. Levin @ 2010-06-20 12:52 UTC (permalink / raw)
To: ALT Linux Team development discussions
[-- Attachment #1: Type: text/plain, Size: 1071 bytes --]
On Sun, Jun 20, 2010 at 04:40:20PM +0400, Dmitry V. Levin wrote:
> On Sun, Jun 20, 2010 at 03:34:09PM +0400, Damir Shayhutdinov wrote:
> > 20 июня 2010 г. 14:54 пользователь Valery V. Inozemtsev написал:
> > > есть код
> > > http://git.altlinux.org/people/shrek/packages/?p=xorg-server.git;a=blob;f=hw/xfree86/vbe/vbe.c;h=0b34648e1ae27e8b8be394fdf32f5efd7e86bba3;hb=refs/heads/xorg-x11-server-1.9
> > > сам код трогать не хотелось бы...
> > > внимание вопрос - как объехать эту проверку на overflow destination
> > > buffer?
> >
> > -U__FORTIFY_SOURCE в CPPFLAGS.
>
> -U_FORTIFY_SOURCE, но это _очень_ плохая идея -- отключать защиту во всём
> xorg-server только ради одного файла. Я считаю необходимым найти менее
> опасное решение вопроса.
В качестве первого приближения можно попробовать добавить
AM_CPPFLAGS = -U_FORTIFY_SOURCE
в файл hw/xfree86/vbe/Makefile.am
Ну а вообще, код вида
memcpy(&block->LinBytesPerScanLine, ((char*)pVbe->memory) + 50, 206);
внушает всяческие подозрения. Интересно, как он раньше компилировался?
--
ldv
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [devel] -fno-stack-protector?
2010-06-20 12:52 ` Dmitry V. Levin
@ 2010-06-20 15:33 ` Valery V. Inozemtsev
2010-06-20 18:52 ` Alexey I. Froloff
0 siblings, 1 reply; 6+ messages in thread
From: Valery V. Inozemtsev @ 2010-06-20 15:33 UTC (permalink / raw)
To: ALT Linux Team development discussions
[-- Attachment #1: Type: text/plain, Size: 1704 bytes --]
В Вск, 20/06/2010 в 16:52 +0400, Dmitry V. Levin пишет:
> On Sun, Jun 20, 2010 at 04:40:20PM +0400, Dmitry V. Levin wrote:
> > On Sun, Jun 20, 2010 at 03:34:09PM +0400, Damir Shayhutdinov wrote:
> > > 20 июня 2010 г. 14:54 пользователь Valery V. Inozemtsev написал:
> > > > есть код
> > > > http://git.altlinux.org/people/shrek/packages/?p=xorg-server.git;a=blob;f=hw/xfree86/vbe/vbe.c;h=0b34648e1ae27e8b8be394fdf32f5efd7e86bba3;hb=refs/heads/xorg-x11-server-1.9
> > > > сам код трогать не хотелось бы...
> > > > внимание вопрос - как объехать эту проверку на overflow destination
> > > > buffer?
> > >
> > > -U__FORTIFY_SOURCE в CPPFLAGS.
> >
> > -U_FORTIFY_SOURCE, но это _очень_ плохая идея -- отключать защиту во всём
> > xorg-server только ради одного файла. Я считаю необходимым найти менее
> > опасное решение вопроса.
>
> В качестве первого приближения можно попробовать добавить
> AM_CPPFLAGS = -U_FORTIFY_SOURCE
> в файл hw/xfree86/vbe/Makefile.am
да, это много лучше
> Ну а вообще, код вида
> memcpy(&block->LinBytesPerScanLine, ((char*)pVbe->memory) + 50, 206);
> внушает всяческие подозрения. Интересно, как он раньше компилировался?
хз. в апстриме мне сказали что у меня слишком разборчивый компилятор :-)
--
Valery V. Inozemtsev
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-06-20 18:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-20 10:54 [devel] -fno-stack-protector? Valery V. Inozemtsev
2010-06-20 11:34 ` Damir Shayhutdinov
2010-06-20 12:40 ` Dmitry V. Levin
2010-06-20 12:52 ` Dmitry V. Levin
2010-06-20 15:33 ` Valery V. Inozemtsev
2010-06-20 18:52 ` Alexey I. Froloff
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git