From 67c81d8fef2b01023fadc32eb2b36ab614f27221 Mon Sep 17 00:00:00 2001
From: Anders Roxell <anders.roxell@linaro.org>
Date: Mon, 27 Aug 2018 13:21:49 +0200
Subject: [RFC PATCH] config: add all_abi config fragments

Collect all fragment needed for testing kselftest, libhugetlbfs and ltp
into all_abi.config.  The idea is to enable as much as possible and
preferably as modules. The idea is to be able to run 'make defconfig
all_abi.config' and that should enable the base fragments for whats
needed when running tests.

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
Hi,

I've done this work against a next tag: next-20180827.

I've created this patch to align the testing effort. With this fragment
in upstream the goal would be to enable kernelci to do 'make defconfig
all_abi.config' to enable all tests at once. To enable the same today
something like this would be necessary to do
'wget (LTP [1] libhugetlbfs [2]) && make defconfig && 
./scripts/kconfig/merge_config.sh .config LTP libhugetlbfs &&
make kselftest-merge'

And even then it wont be ok since the LTP file [1] is out of date
regards to the fragments there.

In this RFC I added where I took the fragments from (for kselftest
tools/testing/selftests/*/config, LTP [1], libhugetlbfs [2]), thats why
its a lot of comments in the file, that will be removed and I will order
them in alphabetic order.

Should we enable these fragments in all_abi.config:
- CONFIG_SLUB is enabled on both arm64 and x86.
- CONFIG_SECURITY_SELINUX are default on x86 and CONFIG_SECURITY_DAC on
arm64 any idea what should be the default?
- CONFIG_DRM 'y' on x86, 'm' on arm64 its the same with CONFIG_IPV6.

Maybe I should remove the CONFIG_EXT4_FS from all_abi.config also, since
its in the default config ?

To be sure or should we go with what is in the defconfig and then just
add as much as possible as modules ? And add try to upstream this patch
at the same time maybe [3] so we don't "break" whats in the "first"
config if someone does 'make my-own-config all-abi.config' ?

Can you see if I need to add any other fragments, update changelog, or anything else before I redo it to an alphabetic order ?

Cheers,
Anders
[1] https://github.com/linux-test-project/ltp/blob/master/README.kernel_config
[2] https://github.com/96boards/meta-96boards/blob/master/recipes-kernel/linux/linux-hikey-aosp/multi_v7_hugepage.config
[3] https://git.linaro.org/people/anders.roxell/linux.git/commit/?h=merge_config&id=13db3f8cf0db88fb5223f3e5eff29ae46f11c697

 kernel/configs/all_abi.config | 149 ++++++++++++++++++++++++++++++++++
 1 file changed, 149 insertions(+)
 create mode 100644 kernel/configs/all_abi.config

diff --git a/kernel/configs/all_abi.config b/kernel/configs/all_abi.config
new file mode 100644
index 000000000000..46f86b6fa4e0
--- /dev/null
+++ b/kernel/configs/all_abi.config
@@ -0,0 +1,149 @@
+## Kselftests
+# android
+CONFIG_ANDROID=y
+CONFIG_STAGING=y
+CONFIG_ION=y
+CONFIG_ION_SYSTEM_HEAP=y
+CONFIG_DRM_VGEM=m (changed)
+# bpf
+CONFIG_BPF=y
+CONFIG_BPF_SYSCALL=y
+CONFIG_NET_CLS_BPF=m
+CONFIG_BPF_EVENTS=y
+CONFIG_TEST_BPF=m
+CONFIG_CGROUP_BPF=y
+CONFIG_NETDEVSIM=m
+CONFIG_NET_SCHED=y
+CONFIG_NET_CLS_ACT=y
+CONFIG_NET_SCH_INGRESS=m
+CONFIG_NET_IPIP=m (changed)
+CONFIG_IPV6=m (changed)
+CONFIG_NET_IPGRE_DEMUX=m (changed)
+CONFIG_NET_IPGRE=m (changed)
+CONFIG_IPV6_GRE=m (changed)
+CONFIG_CRYPTO_USER_API_HASH=m
+CONFIG_CRYPTO_HMAC=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_VXLAN=m (changed)
+CONFIG_GENEVE=m (changed)
+# cpu-hotplug
+CONFIG_NOTIFIER_ERROR_INJECTION=m (changed)
+# cpufreq
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m (changed)
+CONFIG_CPU_FREQ_GOV_USERSPACE=m (changed)
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m (changed)
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m (changed)
+CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
+# firmware
+CONFIG_FW_LOADER=y
+CONFIG_TEST_FIRMWARE=y
+CONFIG_IKCONFIG=m (changed)
+CONFIG_IKCONFIG_PROC=y
+# ftrace
+CONFIG_KPROBES=y
+CONFIG_FTRACE=y
+CONFIG_FUNCTION_PROFILER=y
+CONFIG_TRACER_SNAPSHOT=y
+CONFIG_STACK_TRACER=y
+CONFIG_HIST_TRIGGERS=y
+CONFIG_PREEMPT_TRACER=y
+CONFIG_IRQSOFF_TRACER=y
+CONFIG_PREEMPTIRQ_DELAY_TEST=m
+# gpio
+CONFIG_GPIOLIB=y
+CONFIG_GPIO_MOCKUP=m
+# ipc
+CONFIG_EXPERT=y
+CONFIG_CHECKPOINT_RESTORE=y
+# kmod
+CONFIG_TEST_KMOD=m
+CONFIG_TEST_LKM=m
+CONFIG_XFS_FS=m
+# For the module parameter force_init_test is used
+CONFIG_TUN=m
+CONFIG_BTRFS_FS=m
+
+## libhugetlbfs
+# On ARMv7 processor supporting the LPAE page table format and you would like
+# to access memory beyond the 4GB limit. If enabled, only HWs with LPAE can run
+# the resulting krnel image.
+CONFIG_ARM_LPAE=y
+CONFIG_TRANSPARENT_HUGEPAGE=y
+CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y
+CONFIG_HUGETLBFS=y
+
+## LTP
+CONFIG_GCOV_PROFILE=y
+# Enabling Kernel Configuration to test Containers/Namespaces
+CONFIG_NAMESPACES=y
+CONFIG_UTS_NS=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_IPC_NS=y
+CONFIG_USER_NS=y
+CONFIG_PID_NS=y
+CONFIG_NET_NS=y
+CONFIG_VETH=y
+CONFIG_MACVLAN=y
+# Enabling Kernel Configuration to test Controllers
+CONFIG_DEBUG_KERNEL=y
+CONFIG_CGROUP_DEBUG=y
+CONFIG_GROUP_SCHED=y
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_RT_GROUP_SCHED=y
+CONFIG_CGROUP_SCHED=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_LOCKDEP=y
+# Enabling Kernel Configuration to test Power Management features
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_IDLE_GOV_MENU=y
+CONFIG_SCHED_MC=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE=y
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=m (changed)
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m (changed)
+CONFIG_CPU_FREQ_GOV_USERSPACE=m (changed)
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m (changed)
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m (changed)
+# Enabling Kernel Configuration to test filecaps security feature
+# NOTHING ?
+
+# Enabling Kernel Configuration to test SELinux security feature
+CONFIG_SYSFS=y
+CONFIG_MULTIUSER=y
+CONFIG_SECURITY=y
+CONFIG_SECURITY_NETWORK=y
+CONFIG_XFRM=y
+CONFIG_SECURITY_NETWORK_XFRM=y
+# This has to be set to a positive value if you want to test this check.
+# Fedora kernels set it to 65536.
+CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0
+
+# Native language support (nls) testsuite requirements
+CONFIG_NLS=m
+CONFIG_BLOCK=y
+# Enabling Fault Injection Support
+CONFIG_FAULT_INJECTION=y
+CONFIG_SLUB=y
+CONFIG_FAILSLAB=y
+CONFIG_FAIL_PAGE_ALLOC=y
+CONFIG_FAIL_MAKE_REQUEST=y
+CONFIG_FAIL_IO_TIMEOUT=y
+CONFIG_FAULT_INJECTION_DEBUG_FS=y
+CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y
+# Enabling Kernel Configuration to test ext4 new features
+CONFIG_EXT4_FS=y
+CONFIG_EXT4DEV_COMPAT=y
+CONFIG_EXT4_FS_XATTR=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_EXT4_FS_SECURITY=y
-- 
2.18.0

