Git Product home page Git Product logo

Comments (12)

dvyukov avatar dvyukov commented on April 28, 2024

Is __ppc64__ the macro that gcc defines on ppc64le?
If not, then fix sysgen/syscallnr.go

from syzkaller.

dvyukov avatar dvyukov commented on April 28, 2024

Try to change it to __powerpc64__.

from syzkaller.

rnsastry avatar rnsastry commented on April 28, 2024

gcc -c -E -dM empty.c| grep -i ppc64

#define PPC64 1
#define _ARCH_PPC64 1

from syzkaller.

rnsastry avatar rnsastry commented on April 28, 2024

gcc -c -E -dM empty.c| grep -i power

#define powerpc64 1
#define powerpc 1

from syzkaller.

rnsastry avatar rnsastry commented on April 28, 2024

I can see 'ppc64' in small characters at 'sysgen/syscallnr.go' and 'PPC64' from gcc. The case sensitivity matters here?

from syzkaller.

dvyukov avatar dvyukov commented on April 28, 2024

Yes, this string is emitted into executor/syscall.h as #ifdef __ppc64__. I think the right one is __powerpc64__, at least that's what we use in clang sanitizers.
Does __powerpc64__ help?

from syzkaller.

rnsastry avatar rnsastry commented on April 28, 2024

Changing 'executor/syscalls.h' ifdef to PPC64 worked.
Seems I have some more libs missing
cc -o ./bin/syz-executor executor/executor.cc -lpthread -static -Wall -O1 -g
/bin/ld: cannot find -lpthread
/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status

I will install related ones.

from syzkaller.

dvyukov avatar dvyukov commented on April 28, 2024

Try to remove -lpthread and/or -static from Makefile

from syzkaller.

rnsastry avatar rnsastry commented on April 28, 2024

seems pthread is required
#make
...
cc -o ./bin/syz-executor executor/executor.cc -Wall -O1 -g
/tmp/ccSwfl7O.o: In function thread_create(thread_t*, int)': /root/golang/src/github.com/google/syzkaller/executor/executor.cc:536: undefined reference topthread_attr_setstacksize'
/root/golang/src/github.com/google/syzkaller/executor/executor.cc:537: undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
make: *** [executor] Error 1

from syzkaller.

rnsastry avatar rnsastry commented on April 28, 2024

Removing just '-static' worked.
[root@localhost syzkaller]# make
go build -o ./bin/syz-manager github.com/google/syzkaller/syz-manager
go build -o ./bin/syz-fuzzer github.com/google/syzkaller/syz-fuzzer
cc -o ./bin/syz-executor executor/executor.cc -Wall -O1 -g -lpthread
[root@localhost syzkaller]# echo $?
0

[root@localhost syzkaller]# file ./bin/syz-manager ./bin/syz-fuzzer ./bin/syz-executor
./bin/syz-manager: ELF 64-bit LSB executable, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
./bin/syz-fuzzer: ELF 64-bit LSB executable, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
./bin/syz-executor: ELF 64-bit LSB executable, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=0x1e61f68fcf1816203a0069a1ac958d2f0e5baf69, not stripped

Thanks a lot.

from syzkaller.

rnsastry avatar rnsastry commented on April 28, 2024

Can you please fix "ppc64" to "PPC64".

from syzkaller.

dvyukov avatar dvyukov commented on April 28, 2024

Done:
b5f1cae

Also you can now omit -static with make executor NOSTATIC=1:
1000609

from syzkaller.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.