From bebca8b73c0c4bc5151de9575a4a8a1ea609eb19 Mon Sep 17 00:00:00 2001 From: Space Meyer Date: Tue, 8 Nov 2022 18:03:50 +0000 Subject: syz-kconf: execute shell snippets in reverse loading order Background: - syz-kconf loads and overlays config fragments to form a final kernel config. Fragments are loaded top to bottom as defined in the includes section of main.yml or your downstream syz-kconf config. - A config fragment loaded later can override kconf options set by an earlier loaded fragment. However the override keyword can only be used if an earlier fragment really did set the same option. Otherweise an error is raised. - With this in mind it makes sense to load fragments from broadest scope to most specific e.g. base -> x86_64 -> chromeos, so that chromeos can override a setting usually enabled on x86_64 machines. The Problem: - Before this change shell snippets were executed in order they were loaded from the fragments. - This is unfortunate as the broad fragments like x86_64.yml expect to operate on an existing .config with their shell snippets. Meanwhile some downstream distros like icebreaker generate their config using such a shell snippet. - Hence ordering the fragments like base -> x86_64 -> icebreaker results in an error about the x86_64 not finding a .config without this change. Meanwhile ordering icebreaker -> base -> x86_64 works, but means the icebreaker fragment can't override x86_64 kconf options. The Solution: - This change resolves the problem outlined above by reversing the order shell snippets are executed. Now shell snippets will be executed starting with the most recently loaded fragment. This way the proposed fragment order base -> x86_64 -> icebreaker becomes viable. - Luckily the shell section isn't heavily used, so this change didn't result in meaningfull final config changes. --- dashboard/config/linux/android-5.15.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dashboard/config/linux/android-5.15.config') diff --git a/dashboard/config/linux/android-5.15.config b/dashboard/config/linux/android-5.15.config index 41bde7dd5..7bd322909 100644 --- a/dashboard/config/linux/android-5.15.config +++ b/dashboard/config/linux/android-5.15.config @@ -475,7 +475,7 @@ CONFIG_LEGACY_VSYSCALL_EMULATE=y # CONFIG_LEGACY_VSYSCALL_XONLY is not set # CONFIG_LEGACY_VSYSCALL_NONE is not set CONFIG_CMDLINE_BOOL=y -CONFIG_CMDLINE="earlyprintk=serial net.ifnames=0 sysctl.kernel.hung_task_all_cpu_backtrace=1 ima_policy=tcb nf-conntrack-ftp.ports=20000 nf-conntrack-tftp.ports=20000 nf-conntrack-sip.ports=20000 nf-conntrack-irc.ports=20000 nf-conntrack-sane.ports=20000 binder.debug_mask=0 rcupdate.rcu_expedited=1 no_hash_pointers page_owner=on sysctl.vm.nr_hugepages=4 sysctl.vm.nr_overcommit_hugepages=4 secretmem.enable=1 sysctl.max_rcu_stall_to_panic=1 msr.allow_writes=off root=/dev/sda console=ttyS0 vsyscall=native numa=fake=2 kvm-intel.nested=1 spec_store_bypass_disable=prctl nopcid vivid.n_devs=16 vivid.multiplanar=1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2 netrom.nr_ndevs=16 rose.rose_ndevs=16 smp.csd_lock_timeout=100000 watchdog_thresh=55 workqueue.watchdog_thresh=140 sysctl.net.core.netdev_unregister_timeout_secs=140 dummy_hcd.num=8 cgroup_disable=pressure cgroup.memory=nokmem" +CONFIG_CMDLINE="earlyprintk=serial net.ifnames=0 sysctl.kernel.hung_task_all_cpu_backtrace=1 ima_policy=tcb nf-conntrack-ftp.ports=20000 nf-conntrack-tftp.ports=20000 nf-conntrack-sip.ports=20000 nf-conntrack-irc.ports=20000 nf-conntrack-sane.ports=20000 binder.debug_mask=0 rcupdate.rcu_expedited=1 no_hash_pointers page_owner=on sysctl.vm.nr_hugepages=4 sysctl.vm.nr_overcommit_hugepages=4 secretmem.enable=1 sysctl.max_rcu_stall_to_panic=1 msr.allow_writes=off coredump_filter=0xffff root=/dev/sda console=ttyS0 vsyscall=native numa=fake=2 kvm-intel.nested=1 spec_store_bypass_disable=prctl nopcid vivid.n_devs=16 vivid.multiplanar=1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2 netrom.nr_ndevs=16 rose.rose_ndevs=16 smp.csd_lock_timeout=100000 watchdog_thresh=55 workqueue.watchdog_thresh=140 sysctl.net.core.netdev_unregister_timeout_secs=140 dummy_hcd.num=8 cgroup_disable=pressure cgroup.memory=nokmem" # CONFIG_CMDLINE_OVERRIDE is not set CONFIG_MODIFY_LDT_SYSCALL=y CONFIG_HAVE_LIVEPATCH=y -- cgit mrf-deployment