Comments (10)
Hi @rnsastry,
numbers are defined in sys/sys_amd64.go and sys/sys_arm64.go for the respective architectures.
What architecture are you compiling it for? If it's 386, then I would suggest to switch to amd64. Of you want to test specifically 386?
p.s. target architecture is controlled with GOARCH env var. i.e. GOARCH=amd64 make
from syzkaller.
Hi Dmitry, I am compiling for ppc64le (power architecture little endian).
GOARCH="ppc64le"
GOHOSTARCH="ppc64le"
Do you have any plans for supporting this architecture? Or can I create it in any way?
Thanks for your time.
from syzkaller.
From "go env"
go env
GOARCH="ppc64le"
GOBIN=""
GOEXE=""
GOHOSTARCH="ppc64le"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/usr/lib/golang"
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_ppc64le"
GO15VENDOREXPERIMENT=""
CC="gcc"
GOGCCFLAGS="-fPIC -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
from syzkaller.
To overcome this compilation error you need to extend this table:
https://github.com/google/syzkaller/blob/master/sysgen/syscallnr.go#L23
the first value is GOARCH, so it should be ppc64le
the second - if a C define for this arch, not sure what it is
the third - is location of file with syscall numbers for this arch in linux kernel tree
when you do this, run
make generate LINUX=path_to_tip_linux_kernel_checkout
this should generate sys/sys_ppc64le.go file and update executor/syscalls.h
if it works for you, I will be happy to accept a pull request
from syzkaller.
Sure, Thanks a lot for the information. I will try to do this and will let you know.
from syzkaller.
Added the following in sysgen/syscallnr.go#L23
var archs = []*Arch{
{"amd64", "x86_64", "arch/x86/include/generated/uapi/asm/unistd_64.h", nil},
{"arm64", "aarch64", "arch/arm64/include/uapi/asm/unistd.h", nil},
{"ppc64le", "ppc64", "arch/powerpc/include/uapi/asm/unistd.h", nil},
Got the kernel git clone to '/root/linux'
And ran with 'make'
#make generate LINUX=/root/linux
go run sysgen/*.go -linux=/root/linux sys/sys.txt sys/socket.txt sys/tty.txt sys/perf.txt
sys/key.txt sys/bpf.txt sys/fuse.txt sys/dri.txt sys/kdbus.txt sys/sctp.txt
sys/kvm.txt sys/sndseq.txt sys/sndtimer.txt sys/sndcontrol.txt sys/input.txt
failed to run gcc: exit status 1
:48:23: fatal error: asm/prctl.h: No such file or directory
compilation terminated.
exit status 1
make: *** [generate] Error 1
find / -name prctl.h
/usr/include/sys/prctl.h
/usr/include/linux/prctl.h
/root/linux/include/uapi/linux/prctl.h
/root/linux/arch/x86/include/uapi/asm/prctl.h
seems some thing more needs to be done. And I don't know what is that.
from syzkaller.
Try to remove include <asm/prctl.h> line in sys/sys.txt.
If that does not help, I will try to generate with {"ppc64le", "ppc64", "arch/powerpc/include/uapi/asm/unistd.h", nil},
The problem is that I use host headers to extract values of various constants. And host headers are different across different distributions and versions of distributions, and also depend on set of installed packages. E.g. on Ubuntu I had to do "sudo apt-get install libnuma-dev" to install a necessary header.
I should switch to usage of only kernel headers, they are more stable and always up-to-date. However, the last time I tried I got lots of various conflicts...
from syzkaller.
Installed numactl-devel.ppc64le for error "fatal error: numaif.h: No such file or directory" after that seeing the following errors.
make generate LINUX=/root/linux
go run sysgen/*.go -linux=/root/linux sys/sys.txt sys/socket.txt sys/tty.txt sys/perf.txt
sys/key.txt sys/bpf.txt sys/fuse.txt sys/dri.txt sys/kdbus.txt sys/sctp.txt
sys/kvm.txt sys/sndseq.txt sys/sndtimer.txt sys/sndcontrol.txt sys/input.txt
failed to run gcc: exit status 1
: In function ‘main’:
:1307:978: error: ‘ARCH_GET_GS’ undeclared (first use in this function)
:1307:978: note: each undeclared identifier is reported only once for each function it appears in
In file included from /usr/include/asm/ioctl.h:11:0,
from /usr/include/asm/ioctls.h:4,
from /usr/include/bits/ioctls.h:23,
from /usr/include/sys/ioctl.h:26,
from /usr/include/sys/mount.h:25,
from :20:
:1307:1281: error: invalid application of ‘sizeof’ to incomplete type ‘struct kvm_msrs’
:1307:2289: error: ‘FALLOC_FL_PUNCH_HOLE’ undeclared (first use in this function)
:1307:2748: error: ‘MAP_32BIT’ undeclared (first use in this function)
:1307:4917: error: ‘PTRACE_O_EXITKILL’ undeclared (first use in this function)
In file included from /usr/include/asm/ioctl.h:11:0,
from /usr/include/asm/ioctls.h:4,
from /usr/include/bits/ioctls.h:23,
from /usr/include/sys/ioctl.h:26,
from /usr/include/sys/mount.h:25,
from :20:
:1307:8417: error: invalid application of ‘sizeof’ to incomplete type ‘struct kvm_xcrs’
:1307:8848: error: ‘FALLOC_FL_KEEP_SIZE’ undeclared (first use in this function)
:1307:9596: error: ‘ARCH_SET_GS’ undeclared (first use in this function)
In file included from /usr/include/asm/ioctl.h:11:0,
from /usr/include/asm/ioctls.h:4,
from /usr/include/bits/ioctls.h:23,
from /usr/include/sys/ioctl.h:26,
from /usr/include/sys/mount.h:25,
from :20:
:1307:10387: error: invalid application of ‘sizeof’ to incomplete type ‘struct kvm_msrs’
:1307:10723: error: invalid application of ‘sizeof’ to incomplete type ‘struct kvm_vcpu_events’
:1307:11766: error: invalid application of ‘sizeof’ to incomplete type ‘struct kvm_msr_list’
:1307:12233: error: invalid application of ‘sizeof’ to incomplete type ‘struct kvm_xen_hvm_config’
:1307:13191: error: ‘KVM_GUESTDBG_INJECT_DB’ undeclared (first use in this function)
In file included from /usr/include/asm/ioctl.h:11:0,
from /usr/include/asm/ioctls.h:4,
from /usr/include/bits/ioctls.h:23,
from /usr/include/sys/ioctl.h:26,
from /usr/include/sys/mount.h:25,
from :20:
:1307:14305: error: invalid application of ‘sizeof’ to incomplete type ‘struct kvm_cpuid2’
:1307:14886: error: invalid application of ‘sizeof’ to incomplete type ‘struct kvm_cpuid2’
:1307:15320: error: invalid application of ‘sizeof’ to incomplete type ‘struct kvm_pit_state2’
:1307:15694: error: invalid application of ‘sizeof’ to incomplete type ‘struct kvm_vcpu_events’
:1307:17548: error: invalid application of ‘sizeof’ to incomplete type ‘struct kvm_lapic_state’
:1307:17581: error: ‘ARCH_GET_FS’ undeclared (first use in this function)
In file included from /usr/include/asm/ioctl.h:11:0,
from /usr/include/asm/ioctls.h:4,
from /usr/include/bits/ioctls.h:23,
from /usr/include/sys/ioctl.h:26,
from /usr/include/sys/mount.h:25,
from :20:
:1307:17690: error: invalid application of ‘sizeof’ to incomplete type ‘struct kvm_debugregs’
:1307:19168: error: invalid application of ‘sizeof’ to incomplete type ‘struct kvm_debugregs’
:1307:19916: error: ‘ARCH_SET_FS’ undeclared (first use in this function)
In file included from /usr/include/asm/ioctl.h:11:0,
from /usr/include/asm/ioctls.h:4,
from /usr/include/bits/ioctls.h:23,
from /usr/include/sys/ioctl.h:26,
from /usr/include/sys/mount.h:25,
from :20:
:1307:21149: error: invalid application of ‘sizeof’ to incomplete type ‘struct kvm_lapic_state’
:1307:21206: error: ‘KVM_GUESTDBG_INJECT_BP’ undeclared (first use in this function)
In file included from /usr/include/asm/ioctl.h:11:0,
from /usr/include/asm/ioctls.h:4,
from /usr/include/bits/ioctls.h:23,
from /usr/include/sys/ioctl.h:26,
from /usr/include/sys/mount.h:25,
from :20:
:1307:21897: error: invalid application of ‘sizeof’ to incomplete type ‘struct kvm_cpuid’
:1307:24215: error: invalid application of ‘sizeof’ to incomplete type ‘struct kvm_pit_state2’
:1307:24526: error: invalid application of ‘sizeof’ to incomplete type ‘struct kvm_xsave’
:1307:25712: error: invalid application of ‘sizeof’ to incomplete type ‘struct kvm_xcrs’
:1307:26663: error: invalid application of ‘sizeof’ to incomplete type ‘struct kvm_xsave’
exit status 1
make: *** [generate] Error 1
from syzkaller.
forgot to mention removed '#include <asm/prctl.h>' from sys/sys.txt
and then tried the above.
from syzkaller.
@rnsastry should be fixed by 81438c4
I've tried to build with GOARCH=ppc64le and build succeeded.
Feel free to file more issues or contact syzkaller googlegroups mailing list if you have other issues.
from syzkaller.
Related Issues (20)
- 2023/11/09 00:27:34 SYZFATAL: executor 1 failed 11 times: executor 1: exit status 67 SYZFAIL: setns(netns) failed (errno 22: Invalid argument) SYZFAIL: child failed (errno 0: Success) loop exited with status 67<EDIT ME> (try to follow "pkg/name: short description" format)
- dashboard, syz-ci: unable to update `PatchedOn` for older commits
- sys,vm: build and fuzz FreeBSD under Linux
- dashboard: Cc bug stakeholders in monthly reports
- syzkaller/syzbot: highlight bugs that can be triggered without privileges
- pkg/bisect: rollback the guilty commit and test HOT 6
- Feature: dev dashboard HOT 1
- syz-prog2c is not working properly. HOT 2
- Hi, I have a question about the shared memory between syz-fuzzer and syz-executor. HOT 3
- dashboard: fix the reporting of bugs with ReproLevel != HeadReproLevel
- pkg/repro: consider jobs in the repro queue when fuzzing HOT 3
- vm/gce: serial port connections under os login mode
- dashboard: periodically update/retest missed backports HOT 2
- pkg/compiler: debug and fix a hang HOT 1
- go: Permission denied HOT 2
- pkg/cover: not all coverage points have matching kcov callbacks HOT 1
- Compiling syzkaller on windows reports error HOT 2
- visualizing the coverage, paint the basic blocks instead of instrumented lines HOT 2
- executor: slow network device initialization
- ssh to syzkaller problem. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from syzkaller.