21 Aug, 2018

1 commit

  • Pull tracing updates from Steven Rostedt:

    - Restructure of lockdep and latency tracers

    This is the biggest change. Joel Fernandes restructured the hooks
    from irqs and preemption disabling and enabling. He got rid of a lot
    of the preprocessor #ifdef mess that they caused.

    He turned both lockdep and the latency tracers to use trace events
    inserted in the preempt/irqs disabling paths. But unfortunately,
    these started to cause issues in corner cases. Thus, parts of the
    code was reverted back to where lockdep and the latency tracers just
    get called directly (without using the trace events). But because the
    original change cleaned up the code very nicely we kept that, as well
    as the trace events for preempt and irqs disabling, but they are
    limited to not being called in NMIs.

    - Have trace events use SRCU for "rcu idle" calls. This was required
    for the preempt/irqs off trace events. But it also had to not allow
    them to be called in NMI context. Waiting till Paul makes an NMI safe
    SRCU API.

    - New notrace SRCU API to allow trace events to use SRCU.

    - Addition of mcount-nop option support

    - SPDX headers replacing GPL templates.

    - Various other fixes and clean ups.

    - Some fixes are marked for stable, but were not fully tested before
    the merge window opened.

    * tag 'trace-v4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (44 commits)
    tracing: Fix SPDX format headers to use C++ style comments
    tracing: Add SPDX License format tags to tracing files
    tracing: Add SPDX License format to bpf_trace.c
    blktrace: Add SPDX License format header
    s390/ftrace: Add -mfentry and -mnop-mcount support
    tracing: Add -mcount-nop option support
    tracing: Avoid calling cc-option -mrecord-mcount for every Makefile
    tracing: Handle CC_FLAGS_FTRACE more accurately
    Uprobe: Additional argument arch_uprobe to uprobe_write_opcode()
    Uprobes: Simplify uprobe_register() body
    tracepoints: Free early tracepoints after RCU is initialized
    uprobes: Use synchronize_rcu() not synchronize_sched()
    tracing: Fix synchronizing to event changes with tracepoint_synchronize_unregister()
    ftrace: Remove unused pointer ftrace_swapper_pid
    tracing: More reverting of "tracing: Centralize preemptirq tracepoints and unify their usage"
    tracing/irqsoff: Handle preempt_count for different configs
    tracing: Partial revert of "tracing: Centralize preemptirq tracepoints and unify their usage"
    tracing: irqsoff: Account for additional preempt_disable
    trace: Use rcu_dereference_raw for hooks from trace-event subsystem
    tracing/kprobes: Fix within_notrace_func() to check only notrace functions
    ...

    Linus Torvalds
     

18 Aug, 2018

1 commit

  • Introduce new config option, which is used to replace repeating
    CONFIG_MEMCG && !CONFIG_SLOB pattern. Next patches add a little more
    memcg+kmem related code, so let's keep the defines more clearly.

    Link: http://lkml.kernel.org/r/153063053670.1818.15013136946600481138.stgit@localhost.localdomain
    Signed-off-by: Kirill Tkhai
    Acked-by: Vladimir Davydov
    Tested-by: Shakeel Butt
    Cc: Al Viro
    Cc: Andrey Ryabinin
    Cc: Chris Wilson
    Cc: Greg Kroah-Hartman
    Cc: Guenter Roeck
    Cc: "Huang, Ying"
    Cc: Johannes Weiner
    Cc: Josef Bacik
    Cc: Li RongQing
    Cc: Matthew Wilcox
    Cc: Matthias Kaehlcke
    Cc: Mel Gorman
    Cc: Michal Hocko
    Cc: Minchan Kim
    Cc: Philippe Ombredanne
    Cc: Roman Gushchin
    Cc: Sahitya Tummala
    Cc: Stephen Rothwell
    Cc: Tetsuo Handa
    Cc: Thomas Gleixner
    Cc: Waiman Long
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kirill Tkhai
     

16 Aug, 2018

3 commits

  • Pull Kconfig consolidation from Masahiro Yamada:
    "Consolidation of Kconfig files by Christoph Hellwig.

    Move the source statements of arch-independent Kconfig files instead
    of duplicating the includes in every arch/$(SRCARCH)/Kconfig"

    * tag 'kconfig-v4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kconfig: add a Memory Management options" menu
    kconfig: move the "Executable file formats" menu to fs/Kconfig.binfmt
    kconfig: use a menu in arch/Kconfig to reduce clutter
    kconfig: include kernel/Kconfig.preempt from init/Kconfig
    Kconfig: consolidate the "Kernel hacking" menu
    kconfig: include common Kconfig files from top-level Kconfig
    kconfig: remove duplicate SWAP symbol defintions
    um: create a proper drivers Kconfig
    um: cleanup Kconfig files
    um: stop abusing KBUILD_KCONFIG

    Linus Torvalds
     
  • Pull Kconfig updates from Masahiro Yamada:

    - show clearer error messages where pkg-config is needed, but not
    installed

    - rename SYMBOL_AUTO to SYMBOL_NO_WRITE to reflect its semantics

    - create all necessary directories by Kconfig tool itself instead of
    Makefile

    - update the .config unconditionally when syncconfig is invoked

    - use 'include' directive instead of '-include' where
    include/config/{auto,tristate}.conf is mandatory

    - do not try to update the .config when running install targets

    - add .DELETE_ON_ERROR to delete partially updated files

    - misc cleanups and fixes

    * tag 'kconfig-v4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kconfig: remove P_ENV property type
    kconfig: remove unused sym_get_env_prop() function
    kconfig: fix the rule of mainmenu_stmt symbol
    init/Kconfig: Use short unix-style option instead of --longname
    Kbuild: Makefile.modbuiltin: include auto.conf and tristate.conf mandatory
    kbuild: remove auto.conf from prerequisite of phony targets
    kbuild: do not update config for 'make kernelrelease'
    kbuild: do not update config when running install targets
    kbuild: add .DELETE_ON_ERROR special target
    kbuild: use 'include' directive to load auto.conf from top Makefile
    kconfig: allow all config targets to write auto.conf if missing
    kconfig: make syncconfig update .config regardless of sym_change_count
    kconfig: create directories needed for syncconfig by itself
    kconfig: remove unneeded directory generation from local*config
    kconfig: split out useful helpers in confdata.c
    kconfig: rename file_write_dep and move it to confdata.c
    kconfig: fix typos in description of "choice" in kconfig-language.txt
    kconfig: handle format string before calling conf_message_callback()
    kconfig: rename SYMBOL_AUTO to SYMBOL_NO_WRITE
    kconfig: check for pkg-config on make {menu,n,g,x}config

    Linus Torvalds
     
  • Pull Kbuild updates from Masahiro Yamada:

    - verify depmod is installed before modules_install

    - support build salt in case build ids must be unique between builds

    - allow users to specify additional host compiler flags via HOST*FLAGS,
    and rename internal variables to KBUILD_HOST*FLAGS

    - update buildtar script to drop vax support, add arm64 support

    - update builddeb script for better debarch support

    - document the pit-fall of if_changed usage

    - fix parallel build of UML with O= option

    - make 'samples' target depend on headers_install to fix build errors

    - remove deprecated host-progs variable

    - add a new coccinelle script for refcount_t vs atomic_t check

    - improve double-test coccinelle script

    - misc cleanups and fixes

    * tag 'kbuild-v4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (41 commits)
    coccicheck: return proper error code on fail
    Coccinelle: doubletest: reduce side effect false positives
    kbuild: remove deprecated host-progs variable
    kbuild: make samples really depend on headers_install
    um: clean up archheaders recipe
    kbuild: add %asm-generic to no-dot-config-targets
    um: fix parallel building with O= option
    scripts: Add Python 3 support to tracing/draw_functrace.py
    builddeb: Add automatic support for sh{3,4}{,eb} architectures
    builddeb: Add automatic support for riscv* architectures
    builddeb: Add automatic support for m68k architecture
    builddeb: Add automatic support for or1k architecture
    builddeb: Add automatic support for sparc64 architecture
    builddeb: Add automatic support for mips{,64}r6{,el} architectures
    builddeb: Add automatic support for mips64el architecture
    builddeb: Add automatic support for ppc64 and powerpcspe architectures
    builddeb: Introduce functions to simplify kconfig tests in set_debarch
    builddeb: Drop check for 32-bit s390
    builddeb: Change architecture detection fallback to use dpkg-architecture
    builddeb: Skip architecture detection when KBUILD_DEBARCH is set
    ...

    Linus Torvalds
     

14 Aug, 2018

3 commits

  • Pull s390 updates from Heiko Carstens:
    "Since Martin is on vacation you get the s390 pull request from me:

    - Host large page support for KVM guests. As the patches have large
    impact on arch/s390/mm/ this series goes out via both the KVM and
    the s390 tree.

    - Add an option for no compression to the "Kernel compression mode"
    menu, this will come in handy with the rework of the early boot
    code.

    - A large rework of the early boot code that will make life easier
    for KASAN and KASLR. With the rework the bootable uncompressed
    image is not generated anymore, only the bzImage is available. For
    debuggung purposes the new "no compression" option is used.

    - Re-enable the gcc plugins as the issue with the latent entropy
    plugin is solved with the early boot code rework.

    - More spectre relates changes:
    + Detect the etoken facility and remove expolines automatically.
    + Add expolines to a few more indirect branches.

    - A rewrite of the common I/O layer trace points to make them
    consumable by 'perf stat'.

    - Add support for format-3 PCI function measurement blocks.

    - Changes for the zcrypt driver:
    + Add attributes to indicate the load of cards and queues.
    + Restructure some code for the upcoming AP device support in KVM.

    - Build flags improvements in various Makefiles.

    - A few fixes for the kdump support.

    - A couple of patches for gcc 8 compile warning cleanup.

    - Cleanup s390 specific proc handlers.

    - Add s390 support to the restartable sequence self tests.

    - Some PTR_RET vs PTR_ERR_OR_ZERO cleanup.

    - Lots of bug fixes"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (107 commits)
    s390/dasd: fix hanging offline processing due to canceled worker
    s390/dasd: fix panic for failed online processing
    s390/mm: fix addressing exception after suspend/resume
    rseq/selftests: add s390 support
    s390: fix br_r1_trampoline for machines without exrl
    s390/lib: use expoline for all bcr instructions
    s390/numa: move initial setup of node_to_cpumask_map
    s390/kdump: Fix elfcorehdr size calculation
    s390/cpum_sf: save TOD clock base in SDBs for time conversion
    KVM: s390: Add huge page enablement control
    s390/mm: Add huge page gmap linking support
    s390/mm: hugetlb pages within a gmap can not be freed
    KVM: s390: Add skey emulation fault handling
    s390/mm: Add huge pmd storage key handling
    s390/mm: Clear skeys for newly mapped huge guest pmds
    s390/mm: Clear huge page storage keys on enable_skey
    s390/mm: Add huge page dirty sync support
    s390/mm: Add gmap pmd invalidation and clearing
    s390/mm: Add gmap pmd notification bit setting
    s390/mm: Add gmap pmd linking
    ...

    Linus Torvalds
     
  • Pull x86 timer updates from Thomas Gleixner:
    "Early TSC based time stamping to allow better boot time analysis.

    This comes with a general cleanup of the TSC calibration code which
    grew warts and duct taping over the years and removes 250 lines of
    code. Initiated and mostly implemented by Pavel with help from various
    folks"

    * 'x86-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (37 commits)
    x86/kvmclock: Mark kvm_get_preset_lpj() as __init
    x86/tsc: Consolidate init code
    sched/clock: Disable interrupts when calling generic_sched_clock_init()
    timekeeping: Prevent false warning when persistent clock is not available
    sched/clock: Close a hole in sched_clock_init()
    x86/tsc: Make use of tsc_calibrate_cpu_early()
    x86/tsc: Split native_calibrate_cpu() into early and late parts
    sched/clock: Use static key for sched_clock_running
    sched/clock: Enable sched clock early
    sched/clock: Move sched clock initialization and merge with generic clock
    x86/tsc: Use TSC as sched clock early
    x86/tsc: Initialize cyc2ns when tsc frequency is determined
    x86/tsc: Calibrate tsc only once
    ARM/time: Remove read_boot_clock64()
    s390/time: Remove read_boot_clock64()
    timekeeping: Default boot time offset to local_clock()
    timekeeping: Replace read_boot_clock64() with read_persistent_wall_and_boot_offset()
    s390/time: Add read_persistent_wall_and_boot_offset()
    x86/xen/time: Output xen sched_clock time from 0
    x86/xen/time: Initialize pv xen time in init_hypervisor_platform()
    ...

    Linus Torvalds
     
  • Pull x86 PTI updates from Thomas Gleixner:
    "The Speck brigade sadly provides yet another large set of patches
    destroying the perfomance which we carefully built and preserved

    - PTI support for 32bit PAE. The missing counter part to the 64bit
    PTI code implemented by Joerg.

    - A set of fixes for the Global Bit mechanics for non PCID CPUs which
    were setting the Global Bit too widely and therefore possibly
    exposing interesting memory needlessly.

    - Protection against userspace-userspace SpectreRSB

    - Support for the upcoming Enhanced IBRS mode, which is preferred
    over IBRS. Unfortunately we dont know the performance impact of
    this, but it's expected to be less horrible than the IBRS
    hammering.

    - Cleanups and simplifications"

    * 'x86/pti' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (60 commits)
    x86/mm/pti: Move user W+X check into pti_finalize()
    x86/relocs: Add __end_rodata_aligned to S_REL
    x86/mm/pti: Clone kernel-image on PTE level for 32 bit
    x86/mm/pti: Don't clear permissions in pti_clone_pmd()
    x86/mm/pti: Fix 32 bit PCID check
    x86/mm/init: Remove freed kernel image areas from alias mapping
    x86/mm/init: Add helper for freeing kernel image pages
    x86/mm/init: Pass unconverted symbol addresses to free_init_pages()
    mm: Allow non-direct-map arguments to free_reserved_area()
    x86/mm/pti: Clear Global bit more aggressively
    x86/speculation: Support Enhanced IBRS on future CPUs
    x86/speculation: Protect against userspace-userspace spectreRSB
    x86/kexec: Allocate 8k PGDs for PTI
    Revert "perf/core: Make sure the ring-buffer is mapped in all page-tables"
    x86/mm: Remove in_nmi() warning from vmalloc_fault()
    x86/entry/32: Check for VM86 mode in slow-path check
    perf/core: Make sure the ring-buffer is mapped in all page-tables
    x86/pti: Check the return value of pti_user_pagetable_walk_pmd()
    x86/pti: Check the return value of pti_user_pagetable_walk_p4d()
    x86/entry/32: Add debug code to check entry/exit CR3
    ...

    Linus Torvalds
     

13 Aug, 2018

1 commit

  • This is purely a preparatory patch for upcoming changes during the 4.19
    merge window.

    We have a function called "boot_cpu_state_init()" that isn't really
    about the bootup cpu state: that is done much earlier by the similarly
    named "boot_cpu_init()" (note lack of "state" in name).

    This function initializes some hotplug CPU state, and needs to run after
    the percpu data has been properly initialized. It even has a comment to
    that effect.

    Except it _doesn't_ actually run after the percpu data has been properly
    initialized. On x86 it happens to do that, but on at least arm and
    arm64, the percpu base pointers are initialized by the arch-specific
    'smp_prepare_boot_cpu()' hook, which ran _after_ boot_cpu_state_init().

    This had some unexpected results, and in particular we have a patch
    pending for the merge window that did the obvious cleanup of using
    'this_cpu_write()' in the cpu hotplug init code:

    - per_cpu_ptr(&cpuhp_state, smp_processor_id())->state = CPUHP_ONLINE;
    + this_cpu_write(cpuhp_state.state, CPUHP_ONLINE);

    which is obviously the right thing to do. Except because of the
    ordering issue, it actually failed miserably and unexpectedly on arm64.

    So this just fixes the ordering, and changes the name of the function to
    be 'boot_cpu_hotplug_init()' to make it obvious that it's about cpu
    hotplug state, because the core CPU state was supposed to have already
    been done earlier.

    Marked for stable, since the (not yet merged) patch that will show this
    problem is marked for stable.

    Reported-by: Vlastimil Babka
    Reported-by: Mian Yousaf Kaukab
    Suggested-by: Catalin Marinas
    Acked-by: Thomas Gleixner
    Cc: Will Deacon
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

11 Aug, 2018

1 commit

  • Joel Fernandes created a nice patch that cleaned up the duplicate hooks used
    by lockdep and irqsoff latency tracer. It made both use tracepoints. But it
    caused lockdep to trigger several false positives. We have not figured out
    why yet, but removing lockdep from using the trace event hooks and just call
    its helper functions directly (like it use to), makes the problem go away.

    This is a partial revert of the clean up patch c3bc8fd637a9 ("tracing:
    Centralize preemptirq tracepoints and unify their usage") that adds direct
    calls for lockdep, but also keeps most of the clean up done to get rid of
    the horrible preprocessor if statements.

    Link: http://lkml.kernel.org/r/20180806155058.5ee875f4@gandalf.local.home

    Cc: Peter Zijlstra
    Reviewed-by: Joel Fernandes (Google)
    Fixes: c3bc8fd637a9 ("tracing: Centralize preemptirq tracepoints and unify their usage")
    Signed-off-by: Steven Rostedt (VMware)

    Steven Rostedt (VMware)
     

09 Aug, 2018

1 commit


02 Aug, 2018

3 commits


31 Jul, 2018

1 commit

  • This patch detaches the preemptirq tracepoints from the tracers and
    keeps it separate.

    Advantages:
    * Lockdep and irqsoff event can now run in parallel since they no longer
    have their own calls.

    * This unifies the usecase of adding hooks to an irqsoff and irqson
    event, and a preemptoff and preempton event.
    3 users of the events exist:
    - Lockdep
    - irqsoff and preemptoff tracers
    - irqs and preempt trace events

    The unification cleans up several ifdefs and makes the code in preempt
    tracer and irqsoff tracers simpler. It gets rid of all the horrific
    ifdeferry around PROVE_LOCKING and makes configuration of the different
    users of the tracepoints more easy and understandable. It also gets rid
    of the time_* function calls from the lockdep hooks used to call into
    the preemptirq tracer which is not needed anymore. The negative delta in
    lines of code in this patch is quite large too.

    In the patch we introduce a new CONFIG option PREEMPTIRQ_TRACEPOINTS
    as a single point for registering probes onto the tracepoints. With
    this,
    the web of config options for preempt/irq toggle tracepoints and its
    users becomes:

    PREEMPT_TRACER PREEMPTIRQ_EVENTS IRQSOFF_TRACER PROVE_LOCKING
    | | \ | |
    \ (selects) / \ \ (selects) /
    TRACE_PREEMPT_TOGGLE ----> TRACE_IRQFLAGS
    \ /
    \ (depends on) /
    PREEMPTIRQ_TRACEPOINTS

    Other than the performance tests mentioned in the previous patch, I also
    ran the locking API test suite. I verified that all tests cases are
    passing.

    I also injected issues by not registering lockdep probes onto the
    tracepoints and I see failures to confirm that the probes are indeed
    working.

    This series + lockdep probes not registered (just to inject errors):
    [ 0.000000] hard-irqs-on + irq-safe-A/21: ok | ok | ok |
    [ 0.000000] soft-irqs-on + irq-safe-A/21: ok | ok | ok |
    [ 0.000000] sirq-safe-A => hirqs-on/12:FAILED|FAILED| ok |
    [ 0.000000] sirq-safe-A => hirqs-on/21:FAILED|FAILED| ok |
    [ 0.000000] hard-safe-A + irqs-on/12:FAILED|FAILED| ok |
    [ 0.000000] soft-safe-A + irqs-on/12:FAILED|FAILED| ok |
    [ 0.000000] hard-safe-A + irqs-on/21:FAILED|FAILED| ok |
    [ 0.000000] soft-safe-A + irqs-on/21:FAILED|FAILED| ok |
    [ 0.000000] hard-safe-A + unsafe-B #1/123: ok | ok | ok |
    [ 0.000000] soft-safe-A + unsafe-B #1/123: ok | ok | ok |

    With this series + lockdep probes registered, all locking tests pass:

    [ 0.000000] hard-irqs-on + irq-safe-A/21: ok | ok | ok |
    [ 0.000000] soft-irqs-on + irq-safe-A/21: ok | ok | ok |
    [ 0.000000] sirq-safe-A => hirqs-on/12: ok | ok | ok |
    [ 0.000000] sirq-safe-A => hirqs-on/21: ok | ok | ok |
    [ 0.000000] hard-safe-A + irqs-on/12: ok | ok | ok |
    [ 0.000000] soft-safe-A + irqs-on/12: ok | ok | ok |
    [ 0.000000] hard-safe-A + irqs-on/21: ok | ok | ok |
    [ 0.000000] soft-safe-A + irqs-on/21: ok | ok | ok |
    [ 0.000000] hard-safe-A + unsafe-B #1/123: ok | ok | ok |
    [ 0.000000] soft-safe-A + unsafe-B #1/123: ok | ok | ok |

    Link: http://lkml.kernel.org/r/20180730222423.196630-4-joel@joelfernandes.org

    Acked-by: Peter Zijlstra (Intel)
    Reviewed-by: Namhyung Kim
    Signed-off-by: Joel Fernandes (Google)
    Signed-off-by: Steven Rostedt (VMware)

    Joel Fernandes (Google)
     

20 Jul, 2018

3 commits

  • Introduce a new function to finalize the kernel mappings for the userspace
    page-table after all ro/nx protections have been applied to the kernel
    mappings.

    Also move the call to pti_clone_kernel_text() to that function so that it
    will run on 32 bit kernels too.

    Signed-off-by: Joerg Roedel
    Signed-off-by: Thomas Gleixner
    Tested-by: Pavel Machek
    Cc: "H . Peter Anvin"
    Cc: linux-mm@kvack.org
    Cc: Linus Torvalds
    Cc: Andy Lutomirski
    Cc: Dave Hansen
    Cc: Josh Poimboeuf
    Cc: Juergen Gross
    Cc: Peter Zijlstra
    Cc: Borislav Petkov
    Cc: Jiri Kosina
    Cc: Boris Ostrovsky
    Cc: Brian Gerst
    Cc: David Laight
    Cc: Denys Vlasenko
    Cc: Eduardo Valentin
    Cc: Greg KH
    Cc: Will Deacon
    Cc: aliguori@amazon.com
    Cc: daniel.gruss@iaik.tugraz.at
    Cc: hughd@google.com
    Cc: keescook@google.com
    Cc: Andrea Arcangeli
    Cc: Waiman Long
    Cc: "David H . Gutteridge"
    Cc: joro@8bytes.org
    Link: https://lkml.kernel.org/r/1531906876-13451-30-git-send-email-joro@8bytes.org

    Joerg Roedel
     
  • Allow sched_clock() to be used before schec_clock_init() is called. This
    provides a way to get early boot timestamps on machines with unstable
    clocks.

    Signed-off-by: Pavel Tatashin
    Signed-off-by: Thomas Gleixner
    Cc: steven.sistare@oracle.com
    Cc: daniel.m.jordan@oracle.com
    Cc: linux@armlinux.org.uk
    Cc: schwidefsky@de.ibm.com
    Cc: heiko.carstens@de.ibm.com
    Cc: john.stultz@linaro.org
    Cc: sboyd@codeaurora.org
    Cc: hpa@zytor.com
    Cc: douly.fnst@cn.fujitsu.com
    Cc: peterz@infradead.org
    Cc: prarit@redhat.com
    Cc: feng.tang@intel.com
    Cc: pmladek@suse.com
    Cc: gnomes@lxorguk.ukuu.org.uk
    Cc: linux-s390@vger.kernel.org
    Cc: boris.ostrovsky@oracle.com
    Cc: jgross@suse.com
    Cc: pbonzini@redhat.com
    Link: https://lkml.kernel.org/r/20180719205545.16512-24-pasha.tatashin@oracle.com

    Pavel Tatashin
     
  • sched_clock_postinit() initializes a generic clock on systems where no
    other clock is provided. This function may be called only after
    timekeeping_init().

    Rename sched_clock_postinit to generic_clock_inti() and call it from
    sched_clock_init(). Move the call for sched_clock_init() until after
    time_init().

    Suggested-by: Peter Zijlstra
    Signed-off-by: Pavel Tatashin
    Signed-off-by: Thomas Gleixner
    Cc: steven.sistare@oracle.com
    Cc: daniel.m.jordan@oracle.com
    Cc: linux@armlinux.org.uk
    Cc: schwidefsky@de.ibm.com
    Cc: heiko.carstens@de.ibm.com
    Cc: john.stultz@linaro.org
    Cc: sboyd@codeaurora.org
    Cc: hpa@zytor.com
    Cc: douly.fnst@cn.fujitsu.com
    Cc: prarit@redhat.com
    Cc: feng.tang@intel.com
    Cc: pmladek@suse.com
    Cc: gnomes@lxorguk.ukuu.org.uk
    Cc: linux-s390@vger.kernel.org
    Cc: boris.ostrovsky@oracle.com
    Cc: jgross@suse.com
    Cc: pbonzini@redhat.com
    Link: https://lkml.kernel.org/r/20180719205545.16512-23-pasha.tatashin@oracle.com

    Pavel Tatashin
     

18 Jul, 2018

1 commit

  • In Fedora, the debug information is packaged separately (foo-debuginfo) and
    can be installed separately. There's been a long standing issue where only
    one version of a debuginfo info package can be installed at a time. There's
    been an effort for Fedora for parallel debuginfo to rectify this problem.

    Part of the requirement to allow parallel debuginfo to work is that build ids
    are unique between builds. The existing upstream rpm implementation ensures
    this by re-calculating the build-id using the version and release as a
    seed. This doesn't work 100% for the kernel because of the vDSO which is
    its own binary and doesn't get updated when embedded.

    Fix this by adding some data in an ELF note for both the kernel and modules.
    The data is controlled via a Kconfig option so distributions can set it
    to an appropriate value to ensure uniqueness between builds.

    Suggested-by: Masahiro Yamada
    Signed-off-by: Laura Abbott
    Signed-off-by: Masahiro Yamada

    Laura Abbott
     

01 Jul, 2018

1 commit

  • …masahiroy/linux-kbuild

    Pull Kbuild fixes from Masahiro Yamada:

    - introduce __diag_* macros and suppress -Wattribute-alias warnings
    from GCC 8

    - fix stack protector test script for x86_64

    - fix line number handling in Kconfig

    - document that '#' starts a comment in Kconfig

    - handle P_SYMBOL property in dump debugging of Kconfig

    - correct help message of LD_DEAD_CODE_DATA_ELIMINATION

    - fix occasional segmentation faults in Kconfig

    * tag 'kbuild-fixes-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kconfig: loop boundary condition fix
    kbuild: reword help of LD_DEAD_CODE_DATA_ELIMINATION
    kconfig: handle P_SYMBOL in print_symbol()
    kconfig: document Kconfig source file comments
    kconfig: fix line numbers for if-entries in menu tree
    stack-protector: Fix test with 32-bit userland and CONFIG_64BIT=y
    powerpc: Remove -Wattribute-alias pragmas
    disable -Wattribute-alias warning for SYSCALL_DEFINEx()
    kbuild: add macro for controlling warnings to linux/compiler.h

    Linus Torvalds
     

28 Jun, 2018

1 commit

  • Since commit 5d20ee3192a5 ("kbuild: Allow LD_DEAD_CODE_DATA_ELIMINATION
    to be selectable if enabled"), HAVE_LD_DEAD_CODE_DATA_ELIMINATION is
    supposed to be selected by architectures that are capable of this
    functionality. LD_DEAD_CODE_DATA_ELIMINATION is now users' selection.
    Update the help message.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

25 Jun, 2018

1 commit

  • Add "None" as the kernel compression mode.

    This option is useful for debugging the kernel in slow simulation
    environments, where decompressing and moving the kernel is awfully slow.

    Uncompressed kernel implementation might allow early boot code to skip the
    decompressor and jump right at uncompressed kernel image entry point.

    Platforms implementing that should define HAVE_KERNEL_UNCOMPRESSED.

    Reviewed-by: Heiko Carstens
    Signed-off-by: Vasily Gorbik
    Signed-off-by: Martin Schwidefsky

    Vasily Gorbik
     

14 Jun, 2018

1 commit

  • Currently the code is split over various files with dma- prefixes in the
    lib/ and drives/base directories, and the number of files keeps growing.
    Move them into a single directory to keep the code together and remove
    the file name prefixes. To match the irq infrastructure this directory
    is placed under the kernel/ directory.

    Signed-off-by: Christoph Hellwig

    Christoph Hellwig
     

13 Jun, 2018

1 commit

  • Pull more Kbuild updates from Masahiro Yamada:

    - fix some bugs introduced by the recent Kconfig syntax extension

    - add some symbols about compiler information in Kconfig, such as
    CC_IS_GCC, CC_IS_CLANG, GCC_VERSION, etc.

    - test compiler capability for the stack protector in Kconfig, and
    clean-up Makefile

    - test compiler capability for GCC-plugins in Kconfig, and clean-up
    Makefile

    - allow to enable GCC-plugins for COMPILE_TEST

    - test compiler capability for KCOV in Kconfig and correct dependency

    - remove auto-detect mode of the GCOV format, which is now more nicely
    handled in Kconfig

    - test compiler capability for mprofile-kernel on PowerPC, and clean-up
    Makefile

    - misc cleanups

    * tag 'kbuild-v4.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    linux/linkage.h: replace VMLINUX_SYMBOL_STR() with __stringify()
    kconfig: fix localmodconfig
    sh: remove no-op macro VMLINUX_SYMBOL()
    powerpc/kbuild: move -mprofile-kernel check to Kconfig
    Documentation: kconfig: add recommended way to describe compiler support
    gcc-plugins: disable GCC_PLUGIN_STRUCTLEAK_BYREF_ALL for COMPILE_TEST
    gcc-plugins: allow to enable GCC_PLUGINS for COMPILE_TEST
    gcc-plugins: test plugin support in Kconfig and clean up Makefile
    gcc-plugins: move GCC version check for PowerPC to Kconfig
    kcov: test compiler capability in Kconfig and correct dependency
    gcov: remove CONFIG_GCOV_FORMAT_AUTODETECT
    arm64: move GCC version check for ARCH_SUPPORTS_INT128 to Kconfig
    kconfig: add CC_IS_CLANG and CLANG_VERSION
    kconfig: add CC_IS_GCC and GCC_VERSION
    stack-protector: test compiler capability in Kconfig and drop AUTO mode
    kbuild: fix endless syncconfig in case arch Makefile sets CROSS_COMPILE

    Linus Torvalds
     

11 Jun, 2018

1 commit

  • Pull restartable sequence support from Thomas Gleixner:
    "The restartable sequences syscall (finally):

    After a lot of back and forth discussion and massive delays caused by
    the speculative distraction of maintainers, the core set of
    restartable sequences has finally reached a consensus.

    It comes with the basic non disputed core implementation along with
    support for arm, powerpc and x86 and a full set of selftests

    It was exposed to linux-next earlier this week, so it does not fully
    comply with the merge window requirements, but there is really no
    point to drag it out for yet another cycle"

    * 'core-rseq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    rseq/selftests: Provide Makefile, scripts, gitignore
    rseq/selftests: Provide parametrized tests
    rseq/selftests: Provide basic percpu ops test
    rseq/selftests: Provide basic test
    rseq/selftests: Provide rseq library
    selftests/lib.mk: Introduce OVERRIDE_TARGETS
    powerpc: Wire up restartable sequences system call
    powerpc: Add syscall detection for restartable sequences
    powerpc: Add support for restartable sequences
    x86: Wire up restartable sequence system call
    x86: Add support for restartable sequences
    arm: Wire up restartable sequences system call
    arm: Add syscall detection for restartable sequences
    arm: Add restartable sequences support
    rseq: Introduce restartable sequences system call
    uapi/headers: Provide types_32_64.h

    Linus Torvalds
     

08 Jun, 2018

2 commits


07 Jun, 2018

4 commits

  • Pull networking updates from David Miller:

    1) Add Maglev hashing scheduler to IPVS, from Inju Song.

    2) Lots of new TC subsystem tests from Roman Mashak.

    3) Add TCP zero copy receive and fix delayed acks and autotuning with
    SO_RCVLOWAT, from Eric Dumazet.

    4) Add XDP_REDIRECT support to mlx5 driver, from Jesper Dangaard
    Brouer.

    5) Add ttl inherit support to vxlan, from Hangbin Liu.

    6) Properly separate ipv6 routes into their logically independant
    components. fib6_info for the routing table, and fib6_nh for sets of
    nexthops, which thus can be shared. From David Ahern.

    7) Add bpf_xdp_adjust_tail helper, which can be used to generate ICMP
    messages from XDP programs. From Nikita V. Shirokov.

    8) Lots of long overdue cleanups to the r8169 driver, from Heiner
    Kallweit.

    9) Add BTF ("BPF Type Format"), from Martin KaFai Lau.

    10) Add traffic condition monitoring to iwlwifi, from Luca Coelho.

    11) Plumb extack down into fib_rules, from Roopa Prabhu.

    12) Add Flower classifier offload support to igb, from Vinicius Costa
    Gomes.

    13) Add UDP GSO support, from Willem de Bruijn.

    14) Add documentation for eBPF helpers, from Quentin Monnet.

    15) Add TLS tx offload to mlx5, from Ilya Lesokhin.

    16) Allow applications to be given the number of bytes available to read
    on a socket via a control message returned from recvmsg(), from
    Soheil Hassas Yeganeh.

    17) Add x86_32 eBPF JIT compiler, from Wang YanQing.

    18) Add AF_XDP sockets, with zerocopy support infrastructure as well.
    From Björn Töpel.

    19) Remove indirect load support from all of the BPF JITs and handle
    these operations in the verifier by translating them into native BPF
    instead. From Daniel Borkmann.

    20) Add GRO support to ipv6 gre tunnels, from Eran Ben Elisha.

    21) Allow XDP programs to do lookups in the main kernel routing tables
    for forwarding. From David Ahern.

    22) Allow drivers to store hardware state into an ELF section of kernel
    dump vmcore files, and use it in cxgb4. From Rahul Lakkireddy.

    23) Various RACK and loss detection improvements in TCP, from Yuchung
    Cheng.

    24) Add TCP SACK compression, from Eric Dumazet.

    25) Add User Mode Helper support and basic bpfilter infrastructure, from
    Alexei Starovoitov.

    26) Support ports and protocol values in RTM_GETROUTE, from Roopa
    Prabhu.

    27) Support bulking in ->ndo_xdp_xmit() API, from Jesper Dangaard
    Brouer.

    28) Add lots of forwarding selftests, from Petr Machata.

    29) Add generic network device failover driver, from Sridhar Samudrala.

    * ra.kernel.org:/pub/scm/linux/kernel/git/davem/net-next: (1959 commits)
    strparser: Add __strp_unpause and use it in ktls.
    rxrpc: Fix terminal retransmission connection ID to include the channel
    net: hns3: Optimize PF CMDQ interrupt switching process
    net: hns3: Fix for VF mailbox receiving unknown message
    net: hns3: Fix for VF mailbox cannot receiving PF response
    bnx2x: use the right constant
    Revert "net: sched: cls: Fix offloading when ingress dev is vxlan"
    net: dsa: b53: Fix for brcm tag issue in Cygnus SoC
    enic: fix UDP rss bits
    netdev-FAQ: clarify DaveM's position for stable backports
    rtnetlink: validate attributes in do_setlink()
    mlxsw: Add extack messages for port_{un, }split failures
    netdevsim: Add extack error message for devlink reload
    devlink: Add extack to reload and port_{un, }split operations
    net: metrics: add proper netlink validation
    ipmr: fix error path when ipmr_new_table fails
    ip6mr: only set ip6mr_table from setsockopt when ip6mr_new_table succeeds
    net: hns3: remove unused hclgevf_cfg_func_mta_filter
    netfilter: provide udp*_lib_lookup for nf_tproxy
    qed*: Utilize FW 8.37.2.0
    ...

    Linus Torvalds
     
  • Pull audit updates from Paul Moore:
    "Another reasonable chunk of audit changes for v4.18, thirteen patches
    in total.

    The thirteen patches can mostly be broken down into one of four
    categories: general bug fixes, accessor functions for audit state
    stored in the task_struct, negative filter matches on executable
    names, and extending the (relatively) new seccomp logging knobs to the
    audit subsystem.

    The main driver for the accessor functions from Richard are the
    changes we're working on to associate audit events with containers,
    but I think they have some standalone value too so I figured it would
    be good to get them in now.

    The seccomp/audit patches from Tyler apply the seccomp logging
    improvements from a few releases ago to audit's seccomp logging;
    starting with this patchset the changes in
    /proc/sys/kernel/seccomp/actions_logged should apply to both the
    standard kernel logging and audit.

    As usual, everything passes the audit-testsuite and it happens to
    merge cleanly with your tree"

    [ Heh, except it had trivial merge conflicts with the SELinux tree that
    also came in from Paul - Linus ]

    * tag 'audit-pr-20180605' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit:
    audit: Fix wrong task in comparison of session ID
    audit: use existing session info function
    audit: normalize loginuid read access
    audit: use new audit_context access funciton for seccomp_actions_logged
    audit: use inline function to set audit context
    audit: use inline function to get audit context
    audit: convert sessionid unset to a macro
    seccomp: Don't special case audited processes when logging
    seccomp: Audit attempts to modify the actions_logged sysctl
    seccomp: Configurable separator for the actions_logged string
    seccomp: Separate read and write code for actions_logged sysctl
    audit: allow not equal op for audit by executable
    audit: add syscall information to FEATURE_CHANGE records

    Linus Torvalds
     
  • Pull Kconfig updates from Masahiro Yamada:
    "Kconfig now supports new functionality to perform textual
    substitution. It has been a while since Linus suggested to move
    compiler option tests from makefiles to Kconfig. Finally, here it is.

    The implementation has been generalized into a Make-like macro
    language.

    Some built-in functions such as 'shell' are provided. Variables and
    user-defined functions are also supported so that 'cc-option',
    'ld-option', etc. are implemented as macros.

    Summary:

    - refactor package checks for building {m,n,q,g}conf

    - remove unused/unmaintained localization support

    - remove Kbuild cache

    - drop CONFIG_CROSS_COMPILE support

    - replace 'option env=' with direct variable expansion

    - add built-in functions such as 'shell'

    - support variables and user-defined functions

    - add helper macros as as 'cc-option'

    - add unit tests and a document of the new macro language

    - add 'testconfig' to help

    - fix warnings from GCC 8.1"

    * tag 'kconfig-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (30 commits)
    kconfig: Avoid format overflow warning from GCC 8.1
    kbuild: Move last word of nconfig help to the previous line
    kconfig: Add testconfig into make help output
    kconfig: add basic helper macros to scripts/Kconfig.include
    kconfig: show compiler version text in the top comment
    kconfig: test: add Kconfig macro language tests
    Documentation: kconfig: document a new Kconfig macro language
    kconfig: error out if a recursive variable references itself
    kconfig: add 'filename' and 'lineno' built-in variables
    kconfig: add 'info', 'warning-if', and 'error-if' built-in functions
    kconfig: expand lefthand side of assignment statement
    kconfig: support append assignment operator
    kconfig: support simply expanded variable
    kconfig: support user-defined function and recursively expanded variable
    kconfig: begin PARAM state only when seeing a command keyword
    kconfig: replace $(UNAME_RELEASE) with function call
    kconfig: add 'shell' built-in function
    kconfig: add built-in function support
    kconfig: make default prompt of mainmenu less specific
    kconfig: remove sym_expand_string_value()
    ...

    Linus Torvalds
     
  • Pull Kbuild updates from Masahiro Yamada:

    - improve fixdep to coalesce consecutive slashes in dep-files

    - fix some issues of the maintainer string generation in deb-pkg script

    - remove unused CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX and clean-up
    several tools and linker scripts

    - clean-up modpost

    - allow to enable the dead code/data elimination for PowerPC in EXPERT
    mode

    - improve two coccinelle scripts for better performance

    - pass endianness and machine size flags to sparse for all architecture

    - misc fixes

    * tag 'kbuild-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (25 commits)
    kbuild: add machine size to CHECKFLAGS
    kbuild: add endianness flag to CHEKCFLAGS
    kbuild: $(CHECK) doesnt need NOSTDINC_FLAGS twice
    scripts: Fixed printf format mismatch
    scripts/tags.sh: use `find` for $ALLSOURCE_ARCHS generation
    coccinelle: deref_null: improve performance
    coccinelle: mini_lock: improve performance
    powerpc: Allow LD_DEAD_CODE_DATA_ELIMINATION to be selected
    kbuild: Allow LD_DEAD_CODE_DATA_ELIMINATION to be selectable if enabled
    kbuild: LD_DEAD_CODE_DATA_ELIMINATION no -ffunction-sections/-fdata-sections for module build
    kbuild: Fix asm-generic/vmlinux.lds.h for LD_DEAD_CODE_DATA_ELIMINATION
    modpost: constify *modname function argument where possible
    modpost: remove redundant is_vmlinux() test
    modpost: use strstarts() helper more widely
    modpost: pass struct elf_info pointer to get_modinfo()
    checkpatch: remove VMLINUX_SYMBOL() check
    vmlinux.lds.h: remove no-op macro VMLINUX_SYMBOL()
    kbuild: remove CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX
    export.h: remove code for prefixing symbols with underscore
    depmod.sh: remove symbol prefix support
    ...

    Linus Torvalds
     

06 Jun, 2018

1 commit

  • Expose a new system call allowing each thread to register one userspace
    memory area to be used as an ABI between kernel and user-space for two
    purposes: user-space restartable sequences and quick access to read the
    current CPU number value from user-space.

    * Restartable sequences (per-cpu atomics)

    Restartables sequences allow user-space to perform update operations on
    per-cpu data without requiring heavy-weight atomic operations.

    The restartable critical sections (percpu atomics) work has been started
    by Paul Turner and Andrew Hunter. It lets the kernel handle restart of
    critical sections. [1] [2] The re-implementation proposed here brings a
    few simplifications to the ABI which facilitates porting to other
    architectures and speeds up the user-space fast path.

    Here are benchmarks of various rseq use-cases.

    Test hardware:

    arm32: ARMv7 Processor rev 4 (v7l) "Cubietruck", 2-core
    x86-64: Intel E5-2630 v3@2.40GHz, 16-core, hyperthreading

    The following benchmarks were all performed on a single thread.

    * Per-CPU statistic counter increment

    getcpu+atomic (ns/op) rseq (ns/op) speedup
    arm32: 344.0 31.4 11.0
    x86-64: 15.3 2.0 7.7

    * LTTng-UST: write event 32-bit header, 32-bit payload into tracer
    per-cpu buffer

    getcpu+atomic (ns/op) rseq (ns/op) speedup
    arm32: 2502.0 2250.0 1.1
    x86-64: 117.4 98.0 1.2

    * liburcu percpu: lock-unlock pair, dereference, read/compare word

    getcpu+atomic (ns/op) rseq (ns/op) speedup
    arm32: 751.0 128.5 5.8
    x86-64: 53.4 28.6 1.9

    * jemalloc memory allocator adapted to use rseq

    Using rseq with per-cpu memory pools in jemalloc at Facebook (based on
    rseq 2016 implementation):

    The production workload response-time has 1-2% gain avg. latency, and
    the P99 overall latency drops by 2-3%.

    * Reading the current CPU number

    Speeding up reading the current CPU number on which the caller thread is
    running is done by keeping the current CPU number up do date within the
    cpu_id field of the memory area registered by the thread. This is done
    by making scheduler preemption set the TIF_NOTIFY_RESUME flag on the
    current thread. Upon return to user-space, a notify-resume handler
    updates the current CPU value within the registered user-space memory
    area. User-space can then read the current CPU number directly from
    memory.

    Keeping the current cpu id in a memory area shared between kernel and
    user-space is an improvement over current mechanisms available to read
    the current CPU number, which has the following benefits over
    alternative approaches:

    - 35x speedup on ARM vs system call through glibc
    - 20x speedup on x86 compared to calling glibc, which calls vdso
    executing a "lsl" instruction,
    - 14x speedup on x86 compared to inlined "lsl" instruction,
    - Unlike vdso approaches, this cpu_id value can be read from an inline
    assembly, which makes it a useful building block for restartable
    sequences.
    - The approach of reading the cpu id through memory mapping shared
    between kernel and user-space is portable (e.g. ARM), which is not the
    case for the lsl-based x86 vdso.

    On x86, yet another possible approach would be to use the gs segment
    selector to point to user-space per-cpu data. This approach performs
    similarly to the cpu id cache, but it has two disadvantages: it is
    not portable, and it is incompatible with existing applications already
    using the gs segment selector for other purposes.

    Benchmarking various approaches for reading the current CPU number:

    ARMv7 Processor rev 4 (v7l)
    Machine model: Cubietruck
    - Baseline (empty loop): 8.4 ns
    - Read CPU from rseq cpu_id: 16.7 ns
    - Read CPU from rseq cpu_id (lazy register): 19.8 ns
    - glibc 2.19-0ubuntu6.6 getcpu: 301.8 ns
    - getcpu system call: 234.9 ns

    x86-64 Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz:
    - Baseline (empty loop): 0.8 ns
    - Read CPU from rseq cpu_id: 0.8 ns
    - Read CPU from rseq cpu_id (lazy register): 0.8 ns
    - Read using gs segment selector: 0.8 ns
    - "lsl" inline assembly: 13.0 ns
    - glibc 2.19-0ubuntu6 getcpu: 16.6 ns
    - getcpu system call: 53.9 ns

    - Speed (benchmark taken on v8 of patchset)

    Running 10 runs of hackbench -l 100000 seems to indicate, contrary to
    expectations, that enabling CONFIG_RSEQ slightly accelerates the
    scheduler:

    Configuration: 2 sockets * 8-core Intel(R) Xeon(R) CPU E5-2630 v3 @
    2.40GHz (directly on hardware, hyperthreading disabled in BIOS, energy
    saving disabled in BIOS, turboboost disabled in BIOS, cpuidle.off=1
    kernel parameter), with a Linux v4.6 defconfig+localyesconfig,
    restartable sequences series applied.

    * CONFIG_RSEQ=n

    avg.: 41.37 s
    std.dev.: 0.36 s

    * CONFIG_RSEQ=y

    avg.: 40.46 s
    std.dev.: 0.33 s

    - Size

    On x86-64, between CONFIG_RSEQ=n/y, the text size increase of vmlinux is
    567 bytes, and the data size increase of vmlinux is 5696 bytes.

    [1] https://lwn.net/Articles/650333/
    [2] http://www.linuxplumbersconf.org/2013/ocw/system/presentations/1695/original/LPC%20-%20PerCpu%20Atomics.pdf

    Signed-off-by: Mathieu Desnoyers
    Signed-off-by: Thomas Gleixner
    Acked-by: Peter Zijlstra (Intel)
    Cc: Joel Fernandes
    Cc: Catalin Marinas
    Cc: Dave Watson
    Cc: Will Deacon
    Cc: Andi Kleen
    Cc: "H . Peter Anvin"
    Cc: Chris Lameter
    Cc: Russell King
    Cc: Andrew Hunter
    Cc: Michael Kerrisk
    Cc: "Paul E . McKenney"
    Cc: Paul Turner
    Cc: Boqun Feng
    Cc: Josh Triplett
    Cc: Steven Rostedt
    Cc: Ben Maurer
    Cc: Alexander Viro
    Cc: linux-api@vger.kernel.org
    Cc: Andy Lutomirski
    Cc: Andrew Morton
    Cc: Linus Torvalds
    Link: http://lkml.kernel.org/r/20151027235635.16059.11630.stgit@pjt-glaptop.roam.corp.google.com
    Link: http://lkml.kernel.org/r/20150624222609.6116.86035.stgit@kitami.mtv.corp.google.com
    Link: https://lkml.kernel.org/r/20180602124408.8430-3-mathieu.desnoyers@efficios.com

    Mathieu Desnoyers
     

29 May, 2018

3 commits

  • Now that 'shell' function is supported, this can be self-contained in
    Kconfig.

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Kees Cook
    Reviewed-by: Ulf Magnusson

    Masahiro Yamada
     
  • To get access to environment variables, Kconfig needs to define a
    symbol using "option env=" syntax. It is tedious to add a symbol entry
    for each environment variable given that we need to define much more
    such as 'CC', 'AS', 'srctree' etc. to evaluate the compiler capability
    in Kconfig.

    Adding '$' for symbol references is grammatically inconsistent.
    Looking at the code, the symbols prefixed with 'S' are expanded by:
    - conf_expand_value()
    This is used to expand 'arch/$ARCH/defconfig' and 'defconfig_list'
    - sym_expand_string_value()
    This is used to expand strings in 'source' and 'mainmenu'

    All of them are fixed values independent of user configuration. So,
    they can be changed into the direct expansion instead of symbols.

    This change makes the code much cleaner. The bounce symbols 'SRCARCH',
    'ARCH', 'SUBARCH', 'KERNELVERSION' are gone.

    sym_init() hard-coding 'UNAME_RELEASE' is also gone. 'UNAME_RELEASE'
    should be replaced with an environment variable.

    ARCH_DEFCONFIG is a normal symbol, so it should be simply referenced
    without '$' prefix.

    The new syntax is addicted by Make. The variable reference needs
    parentheses, like $(FOO), but you can omit them for single-letter
    variables, like $F. Yet, in Makefiles, people tend to use the
    parenthetical form for consistency / clarification.

    At this moment, only the environment variable is supported, but I will
    extend the concept of 'variable' later on.

    The variables are expanded in the lexer so we can simplify the token
    handling on the parser side.

    For example, the following code works.

    [Example code]

    config MY_TOOLCHAIN_LIST
    string
    default "My tools: CC=$(CC), AS=$(AS), CPP=$(CPP)"

    [Result]

    $ make -s alldefconfig && tail -n 1 .config
    CONFIG_MY_TOOLCHAIN_LIST="My tools: CC=gcc, AS=as, CPP=gcc -E"

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Kees Cook

    Masahiro Yamada
     
  • Kbuild provides a couple of ways to specify CROSS_COMPILE:

    [1] Command line
    [2] Environment
    [3] arch/*/Makefile (only some architectures)
    [4] CONFIG_CROSS_COMPILE

    [4] is problematic for the compiler capability tests in Kconfig.
    CONFIG_CROSS_COMPILE allows users to change the compiler prefix from
    'make menuconfig', etc. It means, the compiler options would have
    to be all re-calculated everytime CONFIG_CROSS_COMPILE is changed.

    To avoid complexity and performance issues, I'd like to evaluate
    the shell commands statically, i.e. only parsing Kconfig files.

    I guess the majority is [1] or [2]. Currently, there are only
    5 defconfig files that specify CONFIG_CROSS_COMPILE.
    arch/arm/configs/lpc18xx_defconfig
    arch/hexagon/configs/comet_defconfig
    arch/nds32/configs/defconfig
    arch/openrisc/configs/or1ksim_defconfig
    arch/openrisc/configs/simple_smp_defconfig

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Kees Cook

    Masahiro Yamada
     

27 May, 2018

1 commit


26 May, 2018

1 commit

  • In commit c7753208a94c ("x86, swiotlb: Add memory encryption support") a
    call to function `mem_encrypt_init' was added. Include prototype
    defined in header to prevent a warning reported
    during compilation with W=1:

    init/main.c:494:20: warning: no previous prototype for `mem_encrypt_init' [-Wmissing-prototypes]

    Link: http://lkml.kernel.org/r/20180522195533.31415-1-malat@debian.org
    Signed-off-by: Mathieu Malaterre
    Reviewed-by: Andrew Morton
    Acked-by: Steven Rostedt (VMware)
    Cc: Tom Lendacky
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Kees Cook
    Cc: Laura Abbott
    Cc: Dominik Brodowski
    Cc: Gargi Sharma
    Cc: Josh Poimboeuf
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mathieu Malaterre
     

22 May, 2018

1 commit

  • S390 bpf_jit.S is removed in net-next and had changes in 'net',
    since that code isn't used any more take the removal.

    TLS data structures split the TX and RX components in 'net-next',
    put the new struct members from the bug fix in 'net' into the RX
    part.

    The 'net-next' tree had some reworking of how the ERSPAN code works in
    the GRE tunneling code, overlapping with a one-line headroom
    calculation fix in 'net'.

    Overlapping changes in __sock_map_ctx_update_elem(), keep the bits
    that read the prog members via READ_ONCE() into local variables
    before using them.

    Signed-off-by: David S. Miller

    David S. Miller
     

18 May, 2018

1 commit

  • The 'tip' prefix probably referred to the -tip tree and is not required,
    remove it.

    Signed-off-by: Sebastian Andrzej Siewior
    Acked-by: Peter Zijlstra
    Cc: Linus Torvalds
    Cc: Paul Turner
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/20180515165328.24899-1-bigeasy@linutronix.de
    Signed-off-by: Ingo Molnar

    Sebastian Andrzej Siewior
     

17 May, 2018

1 commit