vm/qemu: remove debug, add rodata=n to kernel cmd line

Debug leads to too verbose output in some cases.
Rodata is very slow with KASAN.
This commit is contained in:
Dmitry Vyukov 2016-10-14 16:29:02 +02:00
parent be566e352b
commit 6f057a2c04
2 changed files with 7 additions and 2 deletions

View File

@ -80,6 +80,10 @@ cat << EOF | sudo tee disk.mnt/boot/grub/grub.cfg
terminal_input console
terminal_output console
set timeout=0
# vsyscall=native: required to run x86_64 executables on android kernels (for some reason they disable VDSO by default)
# rodata=n: mark_rodata_ro becomes very slow with KASAN (lots of PGDs)
# panic=86400: prevents kernel from rebooting so that we don't get reboot output in all crash reports
# debug is not set as it produces too much output
menuentry 'linux' --class gnu-linux --class gnu --class os {
insmod vbe
insmod vga
@ -89,7 +93,7 @@ menuentry 'linux' --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd0,1)'
linux /vmlinuz root=/dev/sda1 debug console=ttyS0 earlyprintk=serial vsyscall=native ftrace_dump_on_oops=orig_cpu oops=panic panic_on_warn=1 panic=86400
linux /vmlinuz root=/dev/sda1 console=ttyS0 earlyprintk=serial vsyscall=native rodata=n ftrace_dump_on_oops=orig_cpu oops=panic panic_on_warn=1 panic=86400
}
EOF
sudo grub-install --boot-directory=disk.mnt/boot --no-floppy /dev/nbd0

View File

@ -181,7 +181,8 @@ func (inst *instance) Boot() error {
)
}
if inst.cfg.Kernel != "" {
cmdline := "console=ttyS0 oops=panic panic_on_warn=1 panic=-1 ftrace_dump_on_oops=orig_cpu debug earlyprintk=serial slub_debug=UZ "
cmdline := "console=ttyS0 vsyscall=native rodata=n oops=panic panic_on_warn=1 panic=-1" +
" ftrace_dump_on_oops=orig_cpu earlyprintk=serial slub_debug=UZ "
if inst.cfg.Image == "9p" {
cmdline += "root=/dev/root rootfstype=9p rootflags=trans=virtio,version=9p2000.L,cache=loose "
cmdline += "init=" + filepath.Join(inst.cfg.Workdir, "init.sh") + " "