aboutsummaryrefslogtreecommitdiffstats
path: root/tools/create-image.sh
Commit message (Collapse)AuthorAgeFilesLines
* tools/create-gce-image.sh: move sysctl's to executorDmitry Vyukov2020-11-211-9/+0
| | | | | | | | | Move the remaining sysctls from image creation scripts into executor. We have the rest in executor now, and these are captured in reproducers and are not duplicated. It seems that ping_group_range was accidentially lost along the way, re-add it.
* tools: add script to check shebang lines (#2234)Mark Johnston2020-11-021-1/+1
| | | | | | | | | | | * pkg/vcs: remove obsolete test script Per Dmitry, this should have been removed as part of 8f58e4b ("pkg/bisect: switch to kconfig.Minimize"). * all: convert shebang lines to use /usr/bin/env * Makefile: fix non-portable use of find(1)
* tools/create-image.sh: use the basename instead of hard-coded linux to point ↵Changming Liu2020-10-311-3/+4
| | | | | | | | | | to the $KERNEL src current script hard-coded the basename for the path of kernel source if the basename of the path for the kernel source code is not "linux", this script will just abort. Fix this by using the basename obtained by the basename utility.
* tools/create-image.sh: support building riscv64 imagesAndrew Donnellan2020-10-081-1/+6
| | | | | | | | riscv64 is not yet a released Debian port, so it's hosted by the debian-ports repository. Add a special case to use debian-ports if the architecture is riscv64. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
* tools/create-image.sh: fix building of i386 images on x86_64 hostAndrew Donnellan2020-10-081-4/+14
| | | | | | | | | | | | When building an i386 image on an x86_64 host, we don't need to use qemu or check for the presence of an appropriate qemu binfmt_misc configuration. i386 binaries can run natively, so we also don't need to do debootstrap in two stages. Skip qemu checks and run debootstrap in one stage when building i386 on an x86_64 host. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
* tools/create-image.sh: add architecture mapping x86_64 -> amd64Andrew Donnellan2020-10-081-12/+15
| | | | | | | | | Add a mapping from qemu architecture x86_64 to Debian architecture amd64 which I forgot to add earlier. (Also fix up the indentation to be consistent while we're here.) Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
* tools/create-image.sh: map qemu -> Debian architecture namesAndrew Donnellan2020-09-181-1/+17
| | | | | | | | | | | | create-image.sh assumes that the qemu name and the Debian name for the target architecture are the same. This is not always true. For comedy and/or historical reasons, Debian refers to 64-bit little endian PowerPC as ppc64el, whereas qemu and most other things use ppc64le. Debian refers to aarch64 as arm64, and 32-bit little endian arm as armel. Add special cases to handle this. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
* tools/create-image.sh: resolve mismatch between help message and opt parsingSeonghyun Park2020-09-141-1/+1
|
* tools/create-image.sh: support for foreign architecturesAlexander Egorenkov2020-09-131-1/+35
| | | | | | Also update sy-env to be able to build the root image inside. Signed-off-by: Alexander Egorenkov <Alexander.Egorenkov@ibm.com>
* tools: add custom udev rules to generated imagesRicardo Cañuelo2020-06-101-0/+4
| | | | | | | | Add a default udev rule file to the image creation process in create-gce-image.sh and create-image.sh. This change creates a default rule to make udev create a custom-named symlink for the specific vim2m device.
* tools/create-image.sh: make sure filesystem root has correct permissionsAndrey Konovalov2020-04-031-1/+2
|
* executor, sys/linux: add ath9k usb descriptionsAndrey Konovalov2020-03-131-2/+2
| | | | | | | Among other things this changes timeout for USB programs from 2 to 3 seconds. ath9k fuzzing also requires ath9k firmware to be present, so system images need to be regenerated with the updated script.
* tools/create-image.sh: install tcpdumpAndrey Konovalov2019-12-191-1/+1
| | | | It's quite useful for debugging network related stuff.
* tools/create-image.sh: add a new option seekZwb2019-10-151-1/+7
| | | | | | | | | | | | | | | | The usage of current create-image.sh: ``` ./create-image.sh -d=stretch -f=minimal --add-perf The options are in the following: -d, --distribution Set on which debian distribution to create -f, --feature Check what packages to install in the image, options are minimal, full -s, --seek Image size (MB), default 2048 (2G) -p, --add-perf Add perf support with this option enabled The default image size may too small (2G) in some debugging scenarios, so change it to configurable.
* tools/create-image.sh: fix two issuesDongliang Mu2019-03-121-4/+18
| | | | allow user to provide ADD_PACKAGE and double check if KERNEL is set when perf is enabled
* create-image.sh: Fix "full" package listKees Cook2019-03-061-3/+2
| | | | | The list of packages to install is comma-separated, not space. This fixes the "-f full" argument to actually install the expected packages.
* tweak create-image.sh script and modify document about its deployment (#1022)Dongliang Mu2019-03-011-2/+6
|
* tools/create-image.sh: make more flexibleDongliang Mu2019-02-151-2/+59
| | | | | | | | | | | | | | The usage of current create-image.sh: ``` ./create-image.sh -d=stretch -f=minimal --add-perf The options are in the following: -d, --distribution Set on which debian distribution to create -f, --feature Check what packages to install in the image, options are minimal, full -p, --add-perf Add perf support with this option enabled The default image is stretch with minimal feature, without perf.
* tools/create-gce-image.sh: mount securityfs and configfsDmitry Vyukov2018-09-261-0/+2
|
* tools: update to Debian stretchKees Cook2018-09-051-4/+5
| | | | | | | This updates the image creation tool to use Debian stretch (current stable) instead of wheezy, which is very out of date. The only change needed here was a hint to systemd to make the root filesystem read-write after booting. Documentation has also been updated.
* dashboard/config: re-enable selinuxDmitry Vyukov2018-09-051-1/+0
| | | | | | | Upstream "selinux: fix mounting of cgroup2 under older policies" commit fixes mounting of cgroup2 under wheezy selinux policy. So don't disable selinux on start. Create separate cmdline arguments that enable selinux and apparmor.
* bpf: disable hardening in favor of unwindingDaniel Borkmann2018-07-051-1/+1
| | | | | | | | | | | | | | | | | I had missed that once hardening is enabled, it automatically disables any exposure of JITed addresses, therefore when crashes or warnings are thrown we don't unwind beyond a helper function. For now disable hardening. After merge window I'll see if it's possible to detangle the case where kernel queries kallsyms internally to find function names whenever a WARN or BUG is thrown. If that's not possible easily, we can potentially add a harden mode 3 which does hardening but does not disable kallsyms exposure and then set this here for tools like syzkaller. Fixes: ac9b19d2e435 ("bpf: enable hardening mode 1 for jited images") Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> [dvyukov: also updated dashboard/config/upstream.sysctl]
* bpf: enable hardening mode 1 for jited imagesDaniel Borkmann2018-06-071-0/+1
| | | | | | | | This will harden non-root programs from kernel side, but not root-only ones. Helps also to increase coverage a bit since syzkaller generates programs for both cases. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
* bpf: enable full unwind and kallsym export support for jited imagesDaniel Borkmann2018-06-071-0/+1
| | | | | | | Helps syzkaller in particular for unwinding full stack in case of warnings or crashes. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
* tools/create-image.sh: fix watchdog_thresh valueDmitry Vyukov2018-05-191-1/+1
| | | watchdog_thresh is capped at 60, so 120 causes EINVAL.
* tools/create-image.sh: add few useful sysctl'sDmitry Vyukov2018-05-181-1/+3
|
* tools: fix create-image.sh againDmitry Vyukov2018-04-071-3/+3
|
* sys/linux: test various binfmt's in execveDmitry Vyukov2018-04-021-3/+4
|
* tools: remove stray comments in create-image.shDmitry Vyukov2018-03-291-3/+3
| | | | The comments were unintentionally committed in a previous commit.
* sys/linux: add cgroup descriptionsDmitry Vyukov2018-03-251-26/+27
|
* tools: fix create-image.shDmitry Vyukov2017-12-081-3/+3
| | | | Uncomment unintentionally commented out lines from a previous commit.
* tools: include selinux packages when building imagesDmitry Vyukov2017-12-081-3/+3
| | | | These packages are required to actually activate selinux during boot.
* tools/create-image.sh: create 2G imagesDmitry Vyukov2017-07-171-1/+1
| | | | | 1G does not seem to be enough. Create 2G images as we do in create-gce-image.sh.
* Added GCC and glibcraminfp2017-06-221-1/+1
|
* tools: sync create-image.sh and create-gce-image.shDmitry Vyukov2017-06-031-0/+3
| | | | Move few additional settings from create-gce-image.sh to create-image.sh.
* Add sudo for mkfs.ext4Oscar Salvador2017-03-301-1/+1
|
* prog, sys: add icmp descriptions and checksumAndrey Konovalov2017-02-061-0/+1
|
* tools/create-image.sh: add psmisc package for killallDmitry Vyukov2017-01-241-1/+2
| | | | + raise console output level, otherwise stack traces may be dropped
* tools/create-image.sh: simplify scriptDmitry Vyukov2017-01-161-5/+1
| | | | Checkout necessary packages during debootstrap instead of a separate step.
* tools/create-image.sh: install sudo into the imageDmitry Vyukov2016-12-071-1/+1
|
* tools/create-image.sh: use net.core.bpf_jit_enable = 1Dmitry Vyukov2016-12-071-1/+1
| | | | | bpf_jit_enable = 2 causes printing of all programs to console. Produces lots of output and is not very useful. Disable it.
* tools: enable bpg jit in create-image.shDmitry Vyukov2016-11-281-1/+3
| | | | JIT should be more interesting to fuzz.
* tools: fix getty configuration in create-image.shAlexander Popov2016-11-281-1/+1
| | | | | | | | | | | create-image.sh adds the string "V0:23:respawn:/sbin/getty 115200 hvc0" to inittab of a virtual machine, but a fresh debian-wheezy doesn't have a hvc0 device. So getty fails to start and respawns over and over again: INIT: Id "V0" respawning too fast: disabled for 5 minutes Let's fix create-image.sh to have a working VM terminal. Signed-off-by: Alexander Popov <alex.popov@linux.com>
* tools: fix multi-line string.Lorenzo Stoakes2016-03-081-2/+2
| | | | | An error in the multi-line string results in apt-get install not running in create-image.sh, this fixes that.
* tools: fix path on create-image.sh chroot.Lorenzo Stoakes2016-03-061-2/+2
| | | | | | | When chroot'ing into the generated debian rootfs PATH is inherited from the host and assumed to reference each of: /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin and /usr/local/sbin. Not all distros use all of these, so enforce these in the chroot command.
* tools: add script that creates a Linux image suitable for syzkallerDmitry Vyukov2016-01-071-0/+36