TuxML / size-analysis

Analysis of 125+ Linux configurations (this time for predicting/understanding kernel sizes)
2 stars 1 forks source link

Difference between tinyconfig 4.13.3 and 4.15 #4

Open FAMILIAR-project opened 5 years ago

FAMILIAR-project commented 5 years ago

what options differ?

for version 4.13.3 and version 4.15:

compare the two .config and then hopefully explain this sudden increase in size: https://github.com/TuxML/evolution-showcase/blob/master/evo-kernel-linux.png

dekpro commented 5 years ago

Done part : Added the coresponding tiny .configs for the three versions and a report on their diffrences

FAMILIAR-project commented 5 years ago

https://gist.github.com/FAMILIAR-project/dbc0cca9667652cece975bc5b04e01ef

dekpro commented 5 years ago

https://gist.github.com/dekpro/9ee4e38d4e7f635e740fba0fb1179696 Updated diff of the tiny .configs for 4.13.3, 4.14.1, 4.15.1 in CONFIG_X86_64

FAMILIAR-project commented 5 years ago

Thanks Djamel!

vmacher:linux-4.13.3 macher1$ scripts/diffconfig ~/Downloads/compilations-config_file-4.13.3 ~/Downloads/compilations-config_file-4.14.1 
-ARCH_HAS_MMIO_FLUSH y
-ARCH_WANT_FRAME_POINTERS y
-FRAME_POINTER n
-INTEL_RDT_A n
+AMD_MEM_ENCRYPT n
+ARCH_HAS_ADD_PAGES y
+ARCH_HAS_MEM_ENCRYPT y
+FRAME_POINTER_UNWINDER n
+GUESS_UNWINDER y
+HAVE_MOD_ARCH_SPECIFIC y
+HAVE_RCU_TABLE_FREE y
+INTEL_RDT n
+ORC_UNWINDER n
+STRING_SELFTEST n
+X86_5LEVEL n
vmacher:linux-4.13.3 macher1$ scripts/diffconfig ~/Downloads/compilations-config_file-4.14.1 ~/Downloads/compilations-config_file-4.15.1 
-FRAME_POINTER_UNWINDER n
-GENERIC_IO y
-GUESS_UNWINDER y
-HAVE_ARCH_KMEMCHECK y
-ORC_UNWINDER n
 STACK_VALIDATION n -> y
+ARCH_HAS_REFCOUNT y
+ARM_GIC_V3_ITS n
+CHASH n
+GENERIC_CPU_VULNERABILITIES y
+GENERIC_IRQ_MATRIX_ALLOCATOR y
+GENERIC_IRQ_RESERVATION_MODE y
+GUP_BENCHMARK n
+HAVE_ARCH_KASAN y
+PAGE_TABLE_ISOLATION n
+PINCTRL n
+RETPOLINE n
+RPMSG_VIRTIO n
+TEST_FIND_BIT n
+UNWINDER_FRAME_POINTER n
+UNWINDER_GUESS y
+UNWINDER_ORC n
+X86_INTEL_UMIP n

https://github.com/torvalds/linux/blob/v4.13/scripts/diffconfig

Diffconfig is a simple utility for comparing two .config files.
Using standard diff to compare .config files often includes extraneous and
distracting information.  This utility produces sorted output with only the
changes in configuration values between the two files.
Added and removed items are shown with a leading plus or minus, respectively.
Changed items show the old and new values on a single line.

Same information but the rendering is different ;)

Now we have to qualitatively investigate...
intuitively I would start with:

STACK_VALIDATION n -> y
+GENERIC_CPU_VULNERABILITIES y
+GENERIC_IRQ_MATRIX_ALLOCATOR y
+GENERIC_IRQ_RESERVATION_MODE y
+UNWINDER_GUESS y

https://lkml.org/lkml/2018/1/7/234 https://cateee.net/lkddb/web-lkddb/UNWINDER_GUESS.html

but no clear explanation... however this one: +HAVE_ARCH_KASAN y can have dramatic effect!

https://github.com/torvalds/linux/blob/v4.15/lib/Kconfig.kasan however KASAN does not seem to be included

acherm commented 5 years ago

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fc72ae40e30327aa24eb88a24b9c7058f938bd36

https://elixir.bootlin.com/linux/v4.15/source/arch/x86/Kconfig.debug https://elixir.bootlin.com/linux/v4.15/source/arch/x86/Kconfig.debug#L382

UNWINDER_ORC has not the y value in tiny 4.15.1: https://gist.github.com/FAMILIAR-project/dbc0cca9667652cece975bc5b04e01ef#file-compilations-config_file-4-15-1 UNWINDER_GUESS y is used (not the default one, anyway)

can UNWINDER_GUESS be an explanation?

FAMILIAR-project commented 5 years ago

Short story: the options seem not the cause... we found the increase in size happens between linux-4.14.10 and linux-4.14.11. See also https://lwn.net/Articles/742622/ There is only one option that differs (CONFIG_TABLE_ISOLATION) for tinyconfig but no impact. So we need to investigate what makes the difference

here is the changelog/diff

root@49aae8417c48:/TuxML# diff -arq linux-4.14.10 linux-4.14.11
Files linux-4.14.10/Documentation/admin-guide/kernel-parameters.txt and linux-4.14.11/Documentation/admin-guide/kernel-parameters.txt differ
Files linux-4.14.10/Documentation/x86/x86_64/mm.txt and linux-4.14.11/Documentation/x86/x86_64/mm.txt differ
Files linux-4.14.10/Makefile and linux-4.14.11/Makefile differ
Files linux-4.14.10/arch/sparc/lib/hweight.S and linux-4.14.11/arch/sparc/lib/hweight.S differ
Files linux-4.14.10/arch/x86/boot/compressed/pagetable.c and linux-4.14.11/arch/x86/boot/compressed/pagetable.c differ
Files linux-4.14.10/arch/x86/entry/calling.h and linux-4.14.11/arch/x86/entry/calling.h differ
Files linux-4.14.10/arch/x86/entry/entry_64.S and linux-4.14.11/arch/x86/entry/entry_64.S differ
Files linux-4.14.10/arch/x86/entry/entry_64_compat.S and linux-4.14.11/arch/x86/entry/entry_64_compat.S differ
Files linux-4.14.10/arch/x86/entry/vsyscall/vsyscall_64.c and linux-4.14.11/arch/x86/entry/vsyscall/vsyscall_64.c differ
Files linux-4.14.10/arch/x86/events/intel/ds.c and linux-4.14.11/arch/x86/events/intel/ds.c differ
Files linux-4.14.10/arch/x86/events/perf_event.h and linux-4.14.11/arch/x86/events/perf_event.h differ
Files linux-4.14.10/arch/x86/include/asm/cpu_entry_area.h and linux-4.14.11/arch/x86/include/asm/cpu_entry_area.h differ
Files linux-4.14.10/arch/x86/include/asm/cpufeatures.h and linux-4.14.11/arch/x86/include/asm/cpufeatures.h differ
Files linux-4.14.10/arch/x86/include/asm/desc.h and linux-4.14.11/arch/x86/include/asm/desc.h differ
Files linux-4.14.10/arch/x86/include/asm/disabled-features.h and linux-4.14.11/arch/x86/include/asm/disabled-features.h differ
Only in linux-4.14.11/arch/x86/include/asm: intel_ds.h
Files linux-4.14.10/arch/x86/include/asm/mmu_context.h and linux-4.14.11/arch/x86/include/asm/mmu_context.h differ
Files linux-4.14.10/arch/x86/include/asm/pgalloc.h and linux-4.14.11/arch/x86/include/asm/pgalloc.h differ
Files linux-4.14.10/arch/x86/include/asm/pgtable.h and linux-4.14.11/arch/x86/include/asm/pgtable.h differ
Files linux-4.14.10/arch/x86/include/asm/pgtable_64.h and linux-4.14.11/arch/x86/include/asm/pgtable_64.h differ
Files linux-4.14.10/arch/x86/include/asm/pgtable_64_types.h and linux-4.14.11/arch/x86/include/asm/pgtable_64_types.h differ
Files linux-4.14.10/arch/x86/include/asm/processor-flags.h and linux-4.14.11/arch/x86/include/asm/processor-flags.h differ
Files linux-4.14.10/arch/x86/include/asm/processor.h and linux-4.14.11/arch/x86/include/asm/processor.h differ
Only in linux-4.14.11/arch/x86/include/asm: pti.h
Files linux-4.14.10/arch/x86/include/asm/tlbflush.h and linux-4.14.11/arch/x86/include/asm/tlbflush.h differ
Files linux-4.14.10/arch/x86/include/asm/vsyscall.h and linux-4.14.11/arch/x86/include/asm/vsyscall.h differ
Files linux-4.14.10/arch/x86/include/uapi/asm/processor-flags.h and linux-4.14.11/arch/x86/include/uapi/asm/processor-flags.h differ
Files linux-4.14.10/arch/x86/kernel/asm-offsets.c and linux-4.14.11/arch/x86/kernel/asm-offsets.c differ
Files linux-4.14.10/arch/x86/kernel/cpu/common.c and linux-4.14.11/arch/x86/kernel/cpu/common.c differ
Files linux-4.14.10/arch/x86/kernel/dumpstack.c and linux-4.14.11/arch/x86/kernel/dumpstack.c differ
Files linux-4.14.10/arch/x86/kernel/head_64.S and linux-4.14.11/arch/x86/kernel/head_64.S differ
Files linux-4.14.10/arch/x86/kernel/ldt.c and linux-4.14.11/arch/x86/kernel/ldt.c differ
Files linux-4.14.10/arch/x86/kernel/machine_kexec_32.c and linux-4.14.11/arch/x86/kernel/machine_kexec_32.c differ
Files linux-4.14.10/arch/x86/kernel/smpboot.c and linux-4.14.11/arch/x86/kernel/smpboot.c differ
Files linux-4.14.10/arch/x86/kernel/tls.c and linux-4.14.11/arch/x86/kernel/tls.c differ
Files linux-4.14.10/arch/x86/kernel/traps.c and linux-4.14.11/arch/x86/kernel/traps.c differ
Files linux-4.14.10/arch/x86/kernel/vmlinux.lds.S and linux-4.14.11/arch/x86/kernel/vmlinux.lds.S differ
Files linux-4.14.10/arch/x86/mm/Makefile and linux-4.14.11/arch/x86/mm/Makefile differ
Files linux-4.14.10/arch/x86/mm/cpu_entry_area.c and linux-4.14.11/arch/x86/mm/cpu_entry_area.c differ
Files linux-4.14.10/arch/x86/mm/debug_pagetables.c and linux-4.14.11/arch/x86/mm/debug_pagetables.c differ
Files linux-4.14.10/arch/x86/mm/dump_pagetables.c and linux-4.14.11/arch/x86/mm/dump_pagetables.c differ
Files linux-4.14.10/arch/x86/mm/init.c and linux-4.14.11/arch/x86/mm/init.c differ
Files linux-4.14.10/arch/x86/mm/pgtable.c and linux-4.14.11/arch/x86/mm/pgtable.c differ
Only in linux-4.14.11/arch/x86/mm: pti.c
Files linux-4.14.10/arch/x86/mm/tlb.c and linux-4.14.11/arch/x86/mm/tlb.c differ
Files linux-4.14.10/arch/x86/platform/efi/efi_64.c and linux-4.14.11/arch/x86/platform/efi/efi_64.c differ
Files linux-4.14.10/block/blk-map.c and linux-4.14.11/block/blk-map.c differ
Files linux-4.14.10/block/bounce.c and linux-4.14.11/block/bounce.c differ
Files linux-4.14.10/drivers/android/binder.c and linux-4.14.11/drivers/android/binder.c differ
Files linux-4.14.10/drivers/base/cacheinfo.c and linux-4.14.11/drivers/base/cacheinfo.c differ
Files linux-4.14.10/drivers/gpio/gpiolib-acpi.c and linux-4.14.11/drivers/gpio/gpiolib-acpi.c differ
Files linux-4.14.10/drivers/gpio/gpiolib-devprop.c and linux-4.14.11/drivers/gpio/gpiolib-devprop.c differ
Files linux-4.14.10/drivers/gpio/gpiolib-of.c and linux-4.14.11/drivers/gpio/gpiolib-of.c differ
Files linux-4.14.10/drivers/gpio/gpiolib.h and linux-4.14.11/drivers/gpio/gpiolib.h differ
Files linux-4.14.10/drivers/infiniband/core/security.c and linux-4.14.11/drivers/infiniband/core/security.c differ
Files linux-4.14.10/drivers/infiniband/core/uverbs_cmd.c and linux-4.14.11/drivers/infiniband/core/uverbs_cmd.c differ
Files linux-4.14.10/drivers/infiniband/core/verbs.c and linux-4.14.11/drivers/infiniband/core/verbs.c differ
Files linux-4.14.10/drivers/infiniband/hw/cxgb4/cq.c and linux-4.14.11/drivers/infiniband/hw/cxgb4/cq.c differ
Files linux-4.14.10/drivers/infiniband/hw/hfi1/hfi.h and linux-4.14.11/drivers/infiniband/hw/hfi1/hfi.h differ
Files linux-4.14.10/drivers/infiniband/hw/hfi1/pcie.c and linux-4.14.11/drivers/infiniband/hw/hfi1/pcie.c differ
Files linux-4.14.10/drivers/infiniband/hw/mlx5/main.c and linux-4.14.11/drivers/infiniband/hw/mlx5/main.c differ
Files linux-4.14.10/drivers/infiniband/hw/mlx5/mlx5_ib.h and linux-4.14.11/drivers/infiniband/hw/mlx5/mlx5_ib.h differ
Files linux-4.14.10/drivers/net/dsa/bcm_sf2.c and linux-4.14.11/drivers/net/dsa/bcm_sf2.c differ
Files linux-4.14.10/drivers/net/ethernet/broadcom/bnxt/bnxt.c and linux-4.14.11/drivers/net/ethernet/broadcom/bnxt/bnxt.c differ
Files linux-4.14.10/drivers/net/ethernet/broadcom/tg3.c and linux-4.14.11/drivers/net/ethernet/broadcom/tg3.c differ
Files linux-4.14.10/drivers/net/ethernet/freescale/fec_main.c and linux-4.14.11/drivers/net/ethernet/freescale/fec_main.c differ
Files linux-4.14.10/drivers/net/ethernet/marvell/mvmdio.c and linux-4.14.11/drivers/net/ethernet/marvell/mvmdio.c differ
Files linux-4.14.10/drivers/net/ethernet/mellanox/mlx5/core/cmd.c and linux-4.14.11/drivers/net/ethernet/mellanox/mlx5/core/cmd.c differ
Files linux-4.14.10/drivers/net/ethernet/mellanox/mlx5/core/en.h and linux-4.14.11/drivers/net/ethernet/mellanox/mlx5/core/en.h differ
Files linux-4.14.10/drivers/net/ethernet/mellanox/mlx5/core/en_main.c and linux-4.14.11/drivers/net/ethernet/mellanox/mlx5/core/en_main.c differ
Files linux-4.14.10/drivers/net/ethernet/mellanox/mlx5/core/fpga/sdk.c and linux-4.14.11/drivers/net/ethernet/mellanox/mlx5/core/fpga/sdk.c differ
Files linux-4.14.10/drivers/net/ethernet/mellanox/mlx5/core/main.c and linux-4.14.11/drivers/net/ethernet/mellanox/mlx5/core/main.c differ
Files linux-4.14.10/drivers/net/ethernet/mellanox/mlx5/core/qp.c and linux-4.14.11/drivers/net/ethernet/mellanox/mlx5/core/qp.c differ
Files linux-4.14.10/drivers/net/ethernet/mellanox/mlx5/core/rl.c and linux-4.14.11/drivers/net/ethernet/mellanox/mlx5/core/rl.c differ
Files linux-4.14.10/drivers/net/ethernet/mellanox/mlx5/core/vxlan.c and linux-4.14.11/drivers/net/ethernet/mellanox/mlx5/core/vxlan.c differ
Files linux-4.14.10/drivers/net/ethernet/mellanox/mlx5/core/vxlan.h and linux-4.14.11/drivers/net/ethernet/mellanox/mlx5/core/vxlan.h differ
Files linux-4.14.10/drivers/net/ethernet/mellanox/mlxsw/spectrum.c and linux-4.14.11/drivers/net/ethernet/mellanox/mlxsw/spectrum.c differ
Files linux-4.14.10/drivers/net/ethernet/sfc/tx.c and linux-4.14.11/drivers/net/ethernet/sfc/tx.c differ
Files linux-4.14.10/drivers/net/phy/marvell.c and linux-4.14.11/drivers/net/phy/marvell.c differ
Files linux-4.14.10/drivers/net/phy/micrel.c and linux-4.14.11/drivers/net/phy/micrel.c differ
Files linux-4.14.10/drivers/net/phy/phylink.c and linux-4.14.11/drivers/net/phy/phylink.c differ
Files linux-4.14.10/drivers/net/usb/qmi_wwan.c and linux-4.14.11/drivers/net/usb/qmi_wwan.c differ
Files linux-4.14.10/drivers/net/vxlan.c and linux-4.14.11/drivers/net/vxlan.c differ
Files linux-4.14.10/drivers/phy/tegra/xusb.c and linux-4.14.11/drivers/phy/tegra/xusb.c differ
Files linux-4.14.10/drivers/s390/net/qeth_core.h and linux-4.14.11/drivers/s390/net/qeth_core.h differ
Files linux-4.14.10/drivers/s390/net/qeth_core_main.c and linux-4.14.11/drivers/s390/net/qeth_core_main.c differ
Files linux-4.14.10/drivers/s390/net/qeth_l3.h and linux-4.14.11/drivers/s390/net/qeth_l3.h differ
Files linux-4.14.10/drivers/s390/net/qeth_l3_main.c and linux-4.14.11/drivers/s390/net/qeth_l3_main.c differ
Files linux-4.14.10/drivers/s390/net/qeth_l3_sys.c and linux-4.14.11/drivers/s390/net/qeth_l3_sys.c differ
Files linux-4.14.10/drivers/scsi/osd/osd_initiator.c and linux-4.14.11/drivers/scsi/osd/osd_initiator.c differ
Files linux-4.14.10/drivers/staging/android/ion/ion.c and linux-4.14.11/drivers/staging/android/ion/ion.c differ
Files linux-4.14.10/drivers/target/target_core_pscsi.c and linux-4.14.11/drivers/target/target_core_pscsi.c differ
Files linux-4.14.10/drivers/tty/n_tty.c and linux-4.14.11/drivers/tty/n_tty.c differ
Files linux-4.14.10/drivers/tty/tty_buffer.c and linux-4.14.11/drivers/tty/tty_buffer.c differ
Files linux-4.14.10/drivers/usb/chipidea/ci_hdrc_msm.c and linux-4.14.11/drivers/usb/chipidea/ci_hdrc_msm.c differ
Files linux-4.14.10/drivers/usb/core/config.c and linux-4.14.11/drivers/usb/core/config.c differ
Files linux-4.14.10/drivers/usb/core/quirks.c and linux-4.14.11/drivers/usb/core/quirks.c differ
Files linux-4.14.10/drivers/usb/host/xhci-pci.c and linux-4.14.11/drivers/usb/host/xhci-pci.c differ
Files linux-4.14.10/drivers/usb/serial/ftdi_sio.c and linux-4.14.11/drivers/usb/serial/ftdi_sio.c differ
Files linux-4.14.10/drivers/usb/serial/ftdi_sio_ids.h and linux-4.14.11/drivers/usb/serial/ftdi_sio_ids.h differ
Files linux-4.14.10/drivers/usb/serial/option.c and linux-4.14.11/drivers/usb/serial/option.c differ
Files linux-4.14.10/drivers/usb/serial/qcserial.c and linux-4.14.11/drivers/usb/serial/qcserial.c differ
Files linux-4.14.10/drivers/usb/usbip/stub_dev.c and linux-4.14.11/drivers/usb/usbip/stub_dev.c differ
Files linux-4.14.10/drivers/usb/usbip/stub_main.c and linux-4.14.11/drivers/usb/usbip/stub_main.c differ
Files linux-4.14.10/drivers/usb/usbip/stub_rx.c and linux-4.14.11/drivers/usb/usbip/stub_rx.c differ
Files linux-4.14.10/drivers/usb/usbip/stub_tx.c and linux-4.14.11/drivers/usb/usbip/stub_tx.c differ
Files linux-4.14.10/drivers/usb/usbip/usbip_common.c and linux-4.14.11/drivers/usb/usbip/usbip_common.c differ
Files linux-4.14.10/drivers/usb/usbip/vhci_hcd.c and linux-4.14.11/drivers/usb/usbip/vhci_hcd.c differ
Files linux-4.14.10/drivers/usb/usbip/vhci_rx.c and linux-4.14.11/drivers/usb/usbip/vhci_rx.c differ
Files linux-4.14.10/drivers/usb/usbip/vhci_tx.c and linux-4.14.11/drivers/usb/usbip/vhci_tx.c differ
Files linux-4.14.10/include/linux/blkdev.h and linux-4.14.11/include/linux/blkdev.h differ
Files linux-4.14.10/include/linux/cpuhotplug.h and linux-4.14.11/include/linux/cpuhotplug.h differ
Files linux-4.14.10/include/linux/ipv6.h and linux-4.14.11/include/linux/ipv6.h differ
Files linux-4.14.10/include/linux/mlx5/driver.h and linux-4.14.11/include/linux/mlx5/driver.h differ
Files linux-4.14.10/include/linux/mlx5/mlx5_ifc.h and linux-4.14.11/include/linux/mlx5/mlx5_ifc.h differ
Only in linux-4.14.11/include/linux: pti.h
Files linux-4.14.10/include/linux/ptr_ring.h and linux-4.14.11/include/linux/ptr_ring.h differ
Files linux-4.14.10/include/linux/tcp.h and linux-4.14.11/include/linux/tcp.h differ
Files linux-4.14.10/include/linux/tick.h and linux-4.14.11/include/linux/tick.h differ
Files linux-4.14.10/include/linux/timer.h and linux-4.14.11/include/linux/timer.h differ
Files linux-4.14.10/include/net/ip.h and linux-4.14.11/include/net/ip.h differ
Files linux-4.14.10/include/net/tcp.h and linux-4.14.11/include/net/tcp.h differ
Files linux-4.14.10/init/main.c and linux-4.14.11/init/main.c differ
Files linux-4.14.10/kernel/cpu.c and linux-4.14.11/kernel/cpu.c differ
Files linux-4.14.10/kernel/sched/cpufreq_schedutil.c and linux-4.14.11/kernel/sched/cpufreq_schedutil.c differ
Files linux-4.14.10/kernel/time/tick-sched.c and linux-4.14.11/kernel/time/tick-sched.c differ
Files linux-4.14.10/kernel/time/timer.c and linux-4.14.11/kernel/time/timer.c differ
Files linux-4.14.10/kernel/trace/ring_buffer.c and linux-4.14.11/kernel/trace/ring_buffer.c differ
Files linux-4.14.10/kernel/trace/trace.c and linux-4.14.11/kernel/trace/trace.c differ
Files linux-4.14.10/net/bridge/br_netlink.c and linux-4.14.11/net/bridge/br_netlink.c differ
Files linux-4.14.10/net/core/net_namespace.c and linux-4.14.11/net/core/net_namespace.c differ
Files linux-4.14.10/net/core/skbuff.c and linux-4.14.11/net/core/skbuff.c differ
Files linux-4.14.10/net/ipv4/devinet.c and linux-4.14.11/net/ipv4/devinet.c differ
Files linux-4.14.10/net/ipv4/fib_frontend.c and linux-4.14.11/net/ipv4/fib_frontend.c differ
Files linux-4.14.10/net/ipv4/fib_semantics.c and linux-4.14.11/net/ipv4/fib_semantics.c differ
Files linux-4.14.10/net/ipv4/igmp.c and linux-4.14.11/net/ipv4/igmp.c differ
Files linux-4.14.10/net/ipv4/ip_tunnel.c and linux-4.14.11/net/ipv4/ip_tunnel.c differ
Files linux-4.14.10/net/ipv4/raw.c and linux-4.14.11/net/ipv4/raw.c differ
Files linux-4.14.10/net/ipv4/tcp.c and linux-4.14.11/net/ipv4/tcp.c differ
Files linux-4.14.10/net/ipv4/tcp_bbr.c and linux-4.14.11/net/ipv4/tcp_bbr.c differ
Files linux-4.14.10/net/ipv4/tcp_input.c and linux-4.14.11/net/ipv4/tcp_input.c differ
Files linux-4.14.10/net/ipv4/tcp_ipv4.c and linux-4.14.11/net/ipv4/tcp_ipv4.c differ
Files linux-4.14.10/net/ipv4/tcp_rate.c and linux-4.14.11/net/ipv4/tcp_rate.c differ
Files linux-4.14.10/net/ipv4/tcp_timer.c and linux-4.14.11/net/ipv4/tcp_timer.c differ
Files linux-4.14.10/net/ipv6/addrconf.c and linux-4.14.11/net/ipv6/addrconf.c differ
Files linux-4.14.10/net/ipv6/af_inet6.c and linux-4.14.11/net/ipv6/af_inet6.c differ
Files linux-4.14.10/net/ipv6/ip6_gre.c and linux-4.14.11/net/ipv6/ip6_gre.c differ
Files linux-4.14.10/net/ipv6/ip6_output.c and linux-4.14.11/net/ipv6/ip6_output.c differ
Files linux-4.14.10/net/ipv6/ip6_tunnel.c and linux-4.14.11/net/ipv6/ip6_tunnel.c differ
Files linux-4.14.10/net/ipv6/ipv6_sockglue.c and linux-4.14.11/net/ipv6/ipv6_sockglue.c differ
Files linux-4.14.10/net/ipv6/mcast.c and linux-4.14.11/net/ipv6/mcast.c differ
Files linux-4.14.10/net/ipv6/route.c and linux-4.14.11/net/ipv6/route.c differ
Files linux-4.14.10/net/ipv6/tcp_ipv6.c and linux-4.14.11/net/ipv6/tcp_ipv6.c differ
Files linux-4.14.10/net/netlink/af_netlink.c and linux-4.14.11/net/netlink/af_netlink.c differ
Files linux-4.14.10/net/openvswitch/flow.c and linux-4.14.11/net/openvswitch/flow.c differ
Files linux-4.14.10/net/rds/send.c and linux-4.14.11/net/rds/send.c differ
Files linux-4.14.10/net/sched/sch_ingress.c and linux-4.14.11/net/sched/sch_ingress.c differ
Files linux-4.14.10/net/sctp/socket.c and linux-4.14.11/net/sctp/socket.c differ
Files linux-4.14.10/net/tipc/socket.c and linux-4.14.11/net/tipc/socket.c differ
Files linux-4.14.10/security/Kconfig and linux-4.14.11/security/Kconfig differ
Files linux-4.14.10/sound/hda/hdac_i915.c and linux-4.14.11/sound/hda/hdac_i915.c differ
Files linux-4.14.10/sound/pci/hda/patch_conexant.c and linux-4.14.11/sound/pci/hda/patch_conexant.c differ
Files linux-4.14.10/sound/pci/hda/patch_realtek.c and linux-4.14.11/sound/pci/hda/patch_realtek.c differ
Files linux-4.14.10/sound/soc/codecs/da7218.c and linux-4.14.11/sound/soc/codecs/da7218.c differ
Files linux-4.14.10/sound/soc/codecs/msm8916-wcd-analog.c and linux-4.14.11/sound/soc/codecs/msm8916-wcd-analog.c differ
Files linux-4.14.10/sound/soc/codecs/msm8916-wcd-digital.c and linux-4.14.11/sound/soc/codecs/msm8916-wcd-digital.c differ
Files linux-4.14.10/sound/soc/codecs/tlv320aic31xx.h and linux-4.14.11/sound/soc/codecs/tlv320aic31xx.h differ
Files linux-4.14.10/sound/soc/codecs/twl4030.c and linux-4.14.11/sound/soc/codecs/twl4030.c differ
Files linux-4.14.10/sound/soc/codecs/wm_adsp.c and linux-4.14.11/sound/soc/codecs/wm_adsp.c differ
Files linux-4.14.10/sound/soc/fsl/fsl_ssi.c and linux-4.14.11/sound/soc/fsl/fsl_ssi.c differ
Files linux-4.14.10/tools/testing/selftests/x86/ldt_gdt.c and linux-4.14.11/tools/testing/selftests/x86/ldt_gdt.c differ
Files linux-4.14.10/tools/usb/usbip/src/utils.c and linux-4.14.11/tools/usb/usbip/src/utils.c differ

the challenge now is to find what causes the increase... so far, zero success.

Using Bloat-O-Meter (*Linux includes a tool that allows you to view the size of the kernel and compare it against prior builds, showing the size different between the two.), we can compare the kernel binaries of tinyconfig (version 4.14.10 and version 4.14.11)

and no apparent difference

root@3ecbc989d01f:/TuxML/linux-4.14.11# scripts/bloat-o-meter vmlinux ../linux-4.14.10/vmlinux
add/remove: 4/10 grow/shrink: 2/13 up/down: 177/-17529 (-17352)
function old new delta
release_pebs_buffer.isra - 64 +64
release_bts_buffer.isra - 39 +39
release_ds_buffer.isra - 29 +29
set_pte_vaddr_pud 20 48 +28
set_pte_vaddr_p4d 31 44 +13
Version_265738 - 4 +4
arch_tlbbatch_flush 58 57 -1
Version_265739 4 - -4
flush_tlb_func_common.constprop 154 148 -6
release_ds_buffers 42 32 -10
early_cpu_init 267 253 -14
switch_mm_irqs_off 387 372 -15
cpu_hw_events 4816 4800 -16
syscall_init 152 129 -23
dsfree_pages 28 - -28
do_kernel_range_flush 60 22 -38
init_mem_mapping 701 649 -52
clear_asid_other 63 - -63
ds_update_cea.constprop 89 - -89
__native_flush_tlb_single 97 - -97
setup_cpu_entry_areas 286 185 -101
release_bts_buffer 112 - -112
__early_set_fixmap 205 91 -114
reserve_ds_buffers 543 427 -116
dsalloc_pages.isra 137 - -137
__set_pte_vaddr 149 - -149
release_pebs_buffer 152 - -152
cpu_debug_store 4096 - -4096
bts_ctx 12288 192 -12096
Total: Before=1159922, After=1142570, chg -1.50%

despite the fact the difference is still 5Mb (7Mb for 4.14.10 and 12Mb for 4.14.11)

FAMILIAR-project commented 5 years ago

My general setup is to try tinyconfig on the two Linux versions with the following line:

KCONFIG_ALLCONFIG=/TuxML/compilation/x64.config make tinyconfig where x64.config is a file containing the content CONFIG_64BIT=y then ls -l vmlinux

The process is to modify some files of version 4.14.11 (eg linux-4.14.11/Makefile) based on the diff with 4.14.10, and then recompile until obtaining a 7Mb.

FAMILIAR-project commented 5 years ago
root@49aae8417c48:/TuxML/linux-4.14.11# diff .config ../linux-4.14.10/.config
3c3
< # Linux/x86 4.14.11 Kernel Configuration
---
> # Linux/x86 4.14.10 Kernel Configuration
966d965
< # CONFIG_PAGE_TABLE_ISOLATION is not set
root@49aae8417c48:/TuxML/linux-4.14.11# ls -l vmlinux
-rwxr-xr-x 1 root root 11546616 Jul  9 10:36 vmlinux
root@49aae8417c48:/TuxML/linux-4.14.11# ls -l ../linux-4.14.10/vmlinux
-rwxr-xr-x 1 root root 7331600 Jul  9 10:32 ../linux-4.14.10/vmlinux
FAMILIAR-project commented 5 years ago

complete diff: https://gist.github.com/FAMILIAR-project/696ebd8609cec9eaaaefd3964322b00c

FAMILIAR-project commented 5 years ago

Good news I "align" v4.14.10 and v4.14.11 only considering linux-4.14.10/arch/x86/ diff -aqr linux-4.14.10/arch/x86/ linux-4.14.11/arch/x86/ (no difference)

and I get 7Mb! So we "only" have to focus on the original diff of linux-4.14.10/arch/x86/

FAMILIAR-project commented 5 years ago

After some alignments eg cp -R linux-4.14.10/arch/x86/include/ linux-4.14.11/arch/x86/ I get a 12Mb...

It means I did not align everything... what's still missing:

root@794047bb3d7f:/TuxML# diff -aqr linux-4.14.10/arch/x86/ linux-4.14.11/arch/x86/
Files linux-4.14.10/arch/x86/boot/compressed/pagetable.c and linux-4.14.11/arch/x86/boot/compressed/pagetable.c differ
Files linux-4.14.10/arch/x86/entry/calling.h and linux-4.14.11/arch/x86/entry/calling.h differ
Files linux-4.14.10/arch/x86/entry/entry_64.S and linux-4.14.11/arch/x86/entry/entry_64.S differ
Files linux-4.14.10/arch/x86/entry/entry_64_compat.S and linux-4.14.11/arch/x86/entry/entry_64_compat.S differ
Files linux-4.14.10/arch/x86/entry/vsyscall/vsyscall_64.c and linux-4.14.11/arch/x86/entry/vsyscall/vsyscall_64.c differ
Files linux-4.14.10/arch/x86/events/perf_event.h and linux-4.14.11/arch/x86/events/perf_event.h differ
Only in linux-4.14.11/arch/x86/include/asm: intel_ds.h
Only in linux-4.14.11/arch/x86/include/asm: pti.h
Files linux-4.14.10/arch/x86/kernel/head_64.S and linux-4.14.11/arch/x86/kernel/head_64.S differ
Files linux-4.14.10/arch/x86/kernel/ldt.c and linux-4.14.11/arch/x86/kernel/ldt.c differ
Files linux-4.14.10/arch/x86/kernel/machine_kexec_32.c and linux-4.14.11/arch/x86/kernel/machine_kexec_32.c differ
Files linux-4.14.10/arch/x86/kernel/smpboot.c and linux-4.14.11/arch/x86/kernel/smpboot.c differ
Files linux-4.14.10/arch/x86/kernel/tls.c and linux-4.14.11/arch/x86/kernel/tls.c differ
Files linux-4.14.10/arch/x86/kernel/traps.c and linux-4.14.11/arch/x86/kernel/traps.c differ
Files linux-4.14.10/arch/x86/kernel/vmlinux.lds.S and linux-4.14.11/arch/x86/kernel/vmlinux.lds.S differ
Files linux-4.14.10/arch/x86/mm/Makefile and linux-4.14.11/arch/x86/mm/Makefile differ
Files linux-4.14.10/arch/x86/mm/debug_pagetables.c and linux-4.14.11/arch/x86/mm/debug_pagetables.c differ
Files linux-4.14.10/arch/x86/mm/dump_pagetables.c and linux-4.14.11/arch/x86/mm/dump_pagetables.c differ
Only in linux-4.14.11/arch/x86/mm: pti.c
Files linux-4.14.10/arch/x86/platform/efi/efi_64.c and linux-4.14.11/arch/x86/platform/efi/efi_64.c differ

these files are candidates

FAMILIAR-project commented 5 years ago

Still 12Mb with

diff -aqr linux-4.14.10/arch/x86/ linux-4.14.11/arch/x86/
Files linux-4.14.10/arch/x86/boot/compressed/pagetable.c and linux-4.14.11/arch/x86/boot/compressed/pagetable.c differ
Files linux-4.14.10/arch/x86/entry/vsyscall/vsyscall_64.c and linux-4.14.11/arch/x86/entry/vsyscall/vsyscall_64.c differ
Files linux-4.14.10/arch/x86/events/perf_event.h and linux-4.14.11/arch/x86/events/perf_event.h differ
Only in linux-4.14.11/arch/x86/include/asm: intel_ds.h
Only in linux-4.14.11/arch/x86/include/asm: pti.h
Files linux-4.14.10/arch/x86/kernel/ldt.c and linux-4.14.11/arch/x86/kernel/ldt.c differ
Files linux-4.14.10/arch/x86/kernel/machine_kexec_32.c and linux-4.14.11/arch/x86/kernel/machine_kexec_32.c differ
Files linux-4.14.10/arch/x86/kernel/smpboot.c and linux-4.14.11/arch/x86/kernel/smpboot.c differ
Files linux-4.14.10/arch/x86/kernel/tls.c and linux-4.14.11/arch/x86/kernel/tls.c differ
Files linux-4.14.10/arch/x86/kernel/traps.c and linux-4.14.11/arch/x86/kernel/traps.c differ
Files linux-4.14.10/arch/x86/kernel/vmlinux.lds.S and linux-4.14.11/arch/x86/kernel/vmlinux.lds.S differ
Files linux-4.14.10/arch/x86/mm/debug_pagetables.c and linux-4.14.11/arch/x86/mm/debug_pagetables.c differ
Files linux-4.14.10/arch/x86/mm/dump_pagetables.c and linux-4.14.11/arch/x86/mm/dump_pagetables.c differ
Only in linux-4.14.11/arch/x86/mm: pti.c

but 7Mb with

diff -aqr linux-4.14.10/arch/x86/ linux-4.14.11/arch/x86/
Files linux-4.14.10/arch/x86/boot/compressed/pagetable.c and linux-4.14.11/arch/x86/boot/compressed/pagetable.c differ
Files linux-4.14.10/arch/x86/entry/vsyscall/vsyscall_64.c and linux-4.14.11/arch/x86/entry/vsyscall/vsyscall_64.c differ
Files linux-4.14.10/arch/x86/events/perf_event.h and linux-4.14.11/arch/x86/events/perf_event.h differ
Only in linux-4.14.11/arch/x86/include/asm: intel_ds.h
Only in linux-4.14.11/arch/x86/include/asm: pti.h
Files linux-4.14.10/arch/x86/mm/debug_pagetables.c and linux-4.14.11/arch/x86/mm/debug_pagetables.c differ
Files linux-4.14.10/arch/x86/mm/dump_pagetables.c and linux-4.14.11/arch/x86/mm/dump_pagetables.c differ
Only in linux-4.14.11/arch/x86/mm: pti.c

so it seems the reason is now here ;-)

Files linux-4.14.10/arch/x86/kernel/ldt.c and linux-4.14.11/arch/x86/kernel/ldt.c differ
Files linux-4.14.10/arch/x86/kernel/machine_kexec_32.c and linux-4.14.11/arch/x86/kernel/machine_kexec_32.c differ
Files linux-4.14.10/arch/x86/kernel/smpboot.c and linux-4.14.11/arch/x86/kernel/smpboot.c differ
Files linux-4.14.10/arch/x86/kernel/tls.c and linux-4.14.11/arch/x86/kernel/tls.c differ
Files linux-4.14.10/arch/x86/kernel/traps.c and linux-4.14.11/arch/x86/kernel/traps.c differ
Files linux-4.14.10/arch/x86/kernel/vmlinux.lds.S and linux-4.14.11/arch/x86/kernel/vmlinux.lds.S differ
FAMILIAR-project commented 5 years ago

This stuff seems to be the only cause !!

root@794047bb3d7f:/TuxML# diff linux-4.14.10/arch/x86/kernel/vmlinux.lds.S linux-4.14.11/arch/x86/kernel/vmlinux.lds.S
63a64,66
> #define ALIGN_ENTRY_TEXT_BEGIN    . = ALIGN(PMD_SIZE);
> #define ALIGN_ENTRY_TEXT_END  . = ALIGN(PMD_SIZE);
>
68a72,74
> #define ALIGN_ENTRY_TEXT_BEGIN
> #define ALIGN_ENTRY_TEXT_END
>
104a111
>       ALIGN_ENTRY_TEXT_BEGIN
106a114
>       ALIGN_ENTRY_TEXT_END

confirmed: the sole modification of vmlinux.lds.S causes the 5Mb increase this commit seems to have introduced the change https://github.com/torvalds/linux/commit/2f7412ba9c6af5ab16bdbb4a3fdb1dcd2b4fd3c2#diff-b6d9692f45f05b8d6848913b49604887