[LTP] [PATCH v2] Add test for CVE 2017-10661

Cyril Hrubis chrubis@suse.cz
Tue Mar 3 12:27:25 CET 2020


Hi!
> > > +++ b/testcases/kernel/syscalls/timerfd/Makefile
> > > @@ -20,6 +20,7 @@ top_srcdir		?= ../../../..
> 
> > >  include $(top_srcdir)/include/mk/testcases.mk
> 
> > > -LDLIBS			+= -lpthread -lrt
> > > +timerfd_settime02:	CFLAGS	+= -pthread
> > > +timerfd_settime02:	LDLIBS	+= -pthread -lrt
> > Interesting, I thought -pthread wouldn't be needed to be in LDLIBS
> > (enough to have it in CFLAGS), but old distros (CentOS 6 in our travis: gcc
> > 4.4.7, glibc 2.12).
> 
> OK: it can be just this:
> timerfd_settime02:	CFLAGS	+= -pthread
> timerfd_settime02:	LDLIBS	+= -lrt
> 
> because failure in CentOS 6 is different:
> timerfd01.c:36: undefined reference to `clock_gettime'
> https://api.travis-ci.org/v3/job/657694167/log.txt
>
> Obviously we need autotools check for it (trivial, I can do it before merge).

-lrt is required in LDLIBS for older libc that had all the posix
realtime outside of the glibc.so, and it's harmless on newer glibc so
for the time being we just need -lrt in LDLIBS for quite a lot of
testcases...

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list