Re: Compilation without linux-vdso

Nafisa Mandliwala <[email protected]>
Newsgroups gmane.comp.security.detection.bro
Message-ID <CAFhuFEd0TwmG=P0VRjnM_dhSrRQnN0OXLGc8_Oz=0ah590QyEw@mail.gmail.com>
Thanks a lot for the response.

I did a little bit of debugging myself and the problem is now reduced to
using a custom (with some modifications for the platform) version of gcc.

To make this happen-
I tried set(CMAKE_C_COMPILER) but ./configure goes into an infinite loop
which I think is bug -
https://public.kitware.com/pipermail/cmake/2009-November/033133.html

I then tried to run configure like this-
CC=<path to gcc> CXX=<path to g++> CFLAGS=<path to glibc> CXXFLAGS=<path to
glibc> ./configure

This picks the right compiler but runs into issues with openssl (header not
found). I tried adding root and include paths for openssl by calling
append_cache_entry() but it doesn't work.

Was just wondering if I'm missing something here? Are there more changes
required to safely replace the default compiler?

Thanks,
Nafisa


On Fri, Feb 15, 2019 at 9:17 AM Jon Siwek <[email protected]> wrote:

> On Thu, Feb 14, 2019 at 7:13 PM Nafisa Mandliwala
> <[email protected]> wrote:
>
> > I've been trying the get Zeek to work on a platform that does not
> support linux-vdso.
> >
> > I see that vdso has 4 syscalls out of which the first 3 are used in the
> code-
> > 1. gettimeofday
> > 2. clock_gettime
> > 3. time
> > 4. getcpu
> >
> > A few things that I already tried doing-
> > 1. For the time being, removing all usages of "gettimeofday" and
> "clock_gettime"
> > 2. Commenting out the following from cmake files and bro-config-
> > check_include_files(HAV_SYS_TIME_H)
> > check_include_files("time.h;sys/time.h", TIME_WITH_SYS_TIME)
> >
> > I'm not sure I'm doing everything to replace/remove the occurrences of
> the syscalls because ldd still shows that the bro execuatble is linking to
> linux-vdso.so and the LD logs show that symbols for those syscalls are
> being fetched (segfaults at this point)
>
> Bro shouldn't depend on vDSO directly, it's libc that optionally
> depends on vDSO, so I don't think you want to patch the Bro source
> code to remove those syscalls -- it's just using standard library
> functionality.
>
> I haven't looked much into how to disable vDSO, you can maybe search
> that out more on your own if that's really what you need, but I'd
> guess there's some kernel/boot option for it.  It also was not clear
> why you say the platform doesn't support vDSO, but the kernel goes
> ahead and maps/links linux-vdso.so anyway -- seems weird, so you may
> have to give more specifics on the particular platform.
>
> - Jon
>

_______________________________________________
Zeek mailing list
[email protected]
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/zeek
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.