1. 06 May, 2019 19 commits
    • Linus Torvalds's avatar
      Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · f725492d
      Linus Torvalds authored
      Pull x86 asm updates from Ingo Molnar:
       "This includes the following changes:
      
         - cpu_has() cleanups
      
         - sync_bitops.h modernization to the rmwcc.h facility, similarly to
           bitops.h
      
         - continued LTO annotations/fixes
      
         - misc cleanups and smaller cleanups"
      
      * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/um/vdso: Drop unnecessary cc-ldoption
        x86/vdso: Rename variable to fix -Wshadow warning
        x86/cpu/amd: Exclude 32bit only assembler from 64bit build
        x86/asm: Mark all top level asm statements as .text
        x86/build/vdso: Add FORCE to the build rule of %.so
        x86/asm: Modernize sync_bitops.h
        x86/mm: Convert some slow-path static_cpu_has() callers to boot_cpu_has()
        x86: Convert some slow-path static_cpu_has() callers to boot_cpu_has()
        x86/asm: Clarify static_cpu_has()'s intended use
        x86/uaccess: Fix implicit cast of __user pointer
        x86/cpufeature: Remove __pure attribute to _static_cpu_has()
      f725492d
    • Linus Torvalds's avatar
      Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 80e77644
      Linus Torvalds authored
      Pull x86 apic update from Ingo Molnar:
       "A single commit which unifies the unnecessarily diverged
        implementations of APIC timer initialization. As a result the
        max_delta parameter is now consistently taken into account"
      
      * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/apic: Unify duplicated local apic timer clockevent initialization
      80e77644
    • Linus Torvalds's avatar
      Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a0e928ed
      Linus Torvalds authored
      Pull timer updates from Ingo Molnar:
       "This cycle had the following changes:
      
         - Timer tracing improvements (Anna-Maria Gleixner)
      
         - Continued tasklet reduction work: remove the hrtimer_tasklet
           (Thomas Gleixner)
      
         - Fix CPU hotplug remove race in the tick-broadcast mask handling
           code (Thomas Gleixner)
      
         - Force upper bound for setting CLOCK_REALTIME, to fix ABI
           inconsistencies with handling values that are close to the maximum
           supported and the vagueness of when uptime related wraparound might
           occur. Make the consistent maximum the year 2232 across all
           relevant ABIs and APIs. (Thomas Gleixner)
      
         - various cleanups and smaller fixes"
      
      * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        tick: Fix typos in comments
        tick/broadcast: Fix warning about undefined tick_broadcast_oneshot_offline()
        timekeeping: Force upper bound for setting CLOCK_REALTIME
        timer/trace: Improve timer tracing
        timer/trace: Replace deprecated vsprintf pointer extension %pf by %ps
        timer: Move trace point to get proper index
        tick/sched: Update tick_sched struct documentation
        tick: Remove outgoing CPU from broadcast masks
        timekeeping: Consistently use unsigned int for seqcount snapshot
        softirq: Remove tasklet_hrtimer
        xfrm: Replace hrtimer tasklet with softirq hrtimer
        mac80211_hwsim: Replace hrtimer tasklet with softirq hrtimer
      a0e928ed
    • Linus Torvalds's avatar
      Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 5a2bf1ab
      Linus Torvalds authored
      Pull CPU hotplug updates from Ingo Molnar:
       "Two changes in this cycle:
      
         - Make the /sys/devices/system/cpu/smt/* files available on all
           arches, so user space has a consistent way to detect whether SMT is
           enabled.
      
         - Sparse annotation fix"
      
      * 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        smpboot: Place the __percpu annotation correctly
        cpu/hotplug: Create SMT sysfs interface for all arches
      5a2bf1ab
    • Linus Torvalds's avatar
      Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e00d4135
      Linus Torvalds authored
      Pull scheduler updates from Ingo Molnar:
       "The main changes in this cycle were:
      
         - Make nohz housekeeping processing more permissive and less
           intrusive to isolated CPUs
      
         - Decouple CPU-bound workqueue acconting from the scheduler and move
           it into the workqueue code.
      
         - Optimize topology building
      
         - Better handle quota and period overflows
      
         - Add more RCU annotations
      
         - Comment updates, misc cleanups"
      
      * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (25 commits)
        nohz_full: Allow the boot CPU to be nohz_full
        sched/isolation: Require a present CPU in housekeeping mask
        kernel/cpu: Allow non-zero CPU to be primary for suspend / kexec freeze
        power/suspend: Add function to disable secondaries for suspend
        sched/core: Allow the remote scheduler tick to be started on CPU0
        sched/nohz: Run NOHZ idle load balancer on HK_FLAG_MISC CPUs
        sched/debug: Fix spelling mistake "logaritmic" -> "logarithmic"
        sched/topology: Update init_sched_domains() comment
        cgroup/cpuset: Update stale generate_sched_domains() comments
        sched/core: Check quota and period overflow at usec to nsec conversion
        sched/core: Handle overflow in cpu_shares_write_u64
        sched/rt: Check integer overflow at usec to nsec conversion
        sched/core: Fix typo in comment
        sched/core: Make some functions static
        sched/core: Unify p->on_rq updates
        sched/core: Remove ttwu_activate()
        sched/core, workqueues: Distangle worker accounting from rq lock
        sched/fair: Remove unneeded prototype of capacity_of()
        sched/topology: Skip duplicate group rewrites in build_sched_groups()
        sched/topology: Fix build_sched_groups() comment
        ...
      e00d4135
    • Linus Torvalds's avatar
      Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 90489a72
      Linus Torvalds authored
      Pull perf updates from Ingo Molnar:
       "The main kernel changes were:
      
         - add support for Intel's "adaptive PEBS v4" - which embedds LBS data
           in PEBS records and can thus batch up and reduce the IRQ (NMI) rate
           significantly - reducing overhead and making call-graph profiling
           less intrusive.
      
         - add Intel CPU core and uncore support updates for Tremont, Icelake,
      
         - extend the x86 PMU constraints scheduler with 'constraint ranges'
           to better support Icelake hw constraints,
      
         - make x86 call-chain support work better with CONFIG_FRAME_POINTER=y
      
         - misc other changes
      
        Tooling changes:
      
         - updates to the main tools: 'perf record', 'perf trace', 'perf
           stat'
      
         - updated Intel and S/390 vendor events
      
         - libtraceevent updates
      
         - misc other updates and fixes"
      
      * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (69 commits)
        perf/x86: Make perf callchains work without CONFIG_FRAME_POINTER
        watchdog: Fix typo in comment
        perf/x86/intel: Add Tremont core PMU support
        perf/x86/intel/uncore: Add Intel Icelake uncore support
        perf/x86/msr: Add Icelake support
        perf/x86/intel/rapl: Add Icelake support
        perf/x86/intel/cstate: Add Icelake support
        perf/x86/intel: Add Icelake support
        perf/x86: Support constraint ranges
        perf/x86/lbr: Avoid reading the LBRs when adaptive PEBS handles them
        perf/x86/intel: Support adaptive PEBS v4
        perf/x86/intel/ds: Extract code of event update in short period
        perf/x86/intel: Extract memory code PEBS parser for reuse
        perf/x86: Support outputting XMM registers
        perf/x86/intel: Force resched when TFA sysctl is modified
        perf/core: Add perf_pmu_resched() as global function
        perf/headers: Fix stale comment for struct perf_addr_filter
        perf/core: Make perf_swevent_init_cpu() static
        perf/x86: Add sanity checks to x86_schedule_events()
        perf/x86: Optimize x86_schedule_events()
        ...
      90489a72
    • Linus Torvalds's avatar
      Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 007dc78f
      Linus Torvalds authored
      Pull locking updates from Ingo Molnar:
       "Here are the locking changes in this cycle:
      
         - rwsem unification and simpler micro-optimizations to prepare for
           more intrusive (and more lucrative) scalability improvements in
           v5.3 (Waiman Long)
      
         - Lockdep irq state tracking flag usage cleanups (Frederic
           Weisbecker)
      
         - static key improvements (Jakub Kicinski, Peter Zijlstra)
      
         - misc updates, cleanups and smaller fixes"
      
      * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (26 commits)
        locking/lockdep: Remove unnecessary unlikely()
        locking/static_key: Don't take sleeping locks in __static_key_slow_dec_deferred()
        locking/static_key: Factor out the fast path of static_key_slow_dec()
        locking/static_key: Add support for deferred static branches
        locking/lockdep: Test all incompatible scenarios at once in check_irq_usage()
        locking/lockdep: Avoid bogus Clang warning
        locking/lockdep: Generate LOCKF_ bit composites
        locking/lockdep: Use expanded masks on find_usage_*() functions
        locking/lockdep: Map remaining magic numbers to lock usage mask names
        locking/lockdep: Move valid_state() inside CONFIG_TRACE_IRQFLAGS && CONFIG_PROVE_LOCKING
        locking/rwsem: Prevent unneeded warning during locking selftest
        locking/rwsem: Optimize rwsem structure for uncontended lock acquisition
        locking/rwsem: Enable lock event counting
        locking/lock_events: Don't show pvqspinlock events on bare metal
        locking/lock_events: Make lock_events available for all archs & other locks
        locking/qspinlock_stat: Introduce generic lockevent_*() counting APIs
        locking/rwsem: Enhance DEBUG_RWSEMS_WARN_ON() macro
        locking/rwsem: Add debug check for __down_read*()
        locking/rwsem: Micro-optimize rwsem_try_read_lock_unqueued()
        locking/rwsem: Move rwsem internal function declarations to rwsem-xadd.h
        ...
      007dc78f
    • Linus Torvalds's avatar
      Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 2f1835df
      Linus Torvalds authored
      Pull irq updates from Ingo Molnar:
       "The changes in this cycle were:
      
         - Remove the irq timings/variance statistics code that tried to
           predict when the next interrupt would occur, which didn't work out
           as hoped and is replaced by another mechanism.
      
         - This new mechanism is the 'array suffix computation' estimate,
           which is superior to the previous one as it can detect not just a
           single periodic pattern, but independent periodic patterns along a
           log-2 scale of bucketing and exponential moving average. The
           comments are longer than the code - and it works better at
           predicting various complex interrupt patterns from real-world
           devices than the previous estimate.
      
         - avoid IRQ-work self-IPIs on the local CPU
      
         - fix work-list corruption in irq_set_affinity_notifier()"
      
      * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irq_work: Do not raise an IPI when queueing work on the local CPU
        genirq/devres: Use struct_size() in devm_kzalloc()
        genirq/timings: Add array suffix computation code
        genirq/timings: Remove variance computation code
        genirq: Prevent use-after-free and work list corruption
      2f1835df
    • Linus Torvalds's avatar
      Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · d90dcc1f
      Linus Torvalds authored
      Pull EFI updates from Ingo Molnar:
       "The changes in this cycle were:
      
         - Squash a spurious warning when using the EFI framebuffer on a
           non-EFI boot
      
         - Use DMI data to annotate RAS memory errors on ARM just like we do
           on Intel
      
         - Followup cleanups for DMI
      
         - libstub Makefile cleanups"
      
      * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        efi/libstub/arm: Omit unneeded stripping of ksymtab/kcrctab sections
        efi: Unify DMI setup code over the arm/arm64, ia64 and x86 architectures
        efi/arm: Show SMBIOS bank/device location in CPER and GHES error logs
        efifb: Omit memory map check on legacy boot
        efi/libstub: Refactor the cmd_stubcopy Makefile command
      d90dcc1f
    • Linus Torvalds's avatar
      Merge branch 'core-stacktrace-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 2c6a392c
      Linus Torvalds authored
      Pull stack trace updates from Ingo Molnar:
       "So Thomas looked at the stacktrace code recently and noticed a few
        weirdnesses, and we all know how such stories of crummy kernel code
        meeting German engineering perfection end: a 45-patch series to clean
        it all up! :-)
      
        Here's the changes in Thomas's words:
      
         'Struct stack_trace is a sinkhole for input and output parameters
          which is largely pointless for most usage sites. In fact if embedded
          into other data structures it creates indirections and extra storage
          overhead for no benefit.
      
          Looking at all usage sites makes it clear that they just require an
          interface which is based on a storage array. That array is either on
          stack, global or embedded into some other data structure.
      
          Some of the stack depot usage sites are outright wrong, but
          fortunately the wrongness just causes more stack being used for
          nothing and does not have functional impact.
      
          Another oddity is the inconsistent termination of the stack trace
          with ULONG_MAX. It's pointless as the number of entries is what
          determines the length of the stored trace. In fact quite some call
          sites remove the ULONG_MAX marker afterwards with or without nasty
          comments about it. Not all architectures do that and those which do,
          do it inconsistenly either conditional on nr_entries == 0 or
          unconditionally.
      
          The following series cleans that up by:
      
            1) Removing the ULONG_MAX termination in the architecture code
      
            2) Removing the ULONG_MAX fixups at the call sites
      
            3) Providing plain storage array based interfaces for stacktrace
               and stackdepot.
      
            4) Cleaning up the mess at the callsites including some related
               cleanups.
      
            5) Removing the struct stack_trace based interfaces
      
          This is not changing the struct stack_trace interfaces at the
          architecture level, but it removes the exposure to the generic
          code'"
      
      * 'core-stacktrace-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (45 commits)
        x86/stacktrace: Use common infrastructure
        stacktrace: Provide common infrastructure
        lib/stackdepot: Remove obsolete functions
        stacktrace: Remove obsolete functions
        livepatch: Simplify stack trace retrieval
        tracing: Remove the last struct stack_trace usage
        tracing: Simplify stack trace retrieval
        tracing: Make ftrace_trace_userstack() static and conditional
        tracing: Use percpu stack trace buffer more intelligently
        tracing: Simplify stacktrace retrieval in histograms
        lockdep: Simplify stack trace handling
        lockdep: Remove save argument from check_prev_add()
        lockdep: Remove unused trace argument from print_circular_bug()
        drm: Simplify stacktrace handling
        dm persistent data: Simplify stack trace handling
        dm bufio: Simplify stack trace retrieval
        btrfs: ref-verify: Simplify stack trace retrieval
        dma/debug: Simplify stracktrace retrieval
        fault-inject: Simplify stacktrace retrieval
        mm/page_owner: Simplify stack trace handling
        ...
      2c6a392c
    • Linus Torvalds's avatar
      Merge branch 'core-speculation-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0a499fc5
      Linus Torvalds authored
      Pull speculation mitigation update from Ingo Molnar:
       "This adds the "mitigations=" bootline option, which offers a
        cross-arch set of options that will work on x86, PowerPC and s390 that
        will map to the arch specific option internally"
      
      * 'core-speculation-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        s390/speculation: Support 'mitigations=' cmdline option
        powerpc/speculation: Support 'mitigations=' cmdline option
        x86/speculation: Support 'mitigations=' cmdline option
        cpu/speculation: Add 'mitigations=' cmdline option
      0a499fc5
    • Linus Torvalds's avatar
      Merge branch 'core-rseq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e50c5d2e
      Linus Torvalds authored
      Pull rseq updates from Ingo Molnar:
       "A cleanup and a fix to comments"
      
      * 'core-rseq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        rseq: Remove superfluous rseq_len from task_struct
        rseq: Clean up comments by reflecting removal of event counter
      e50c5d2e
    • Linus Torvalds's avatar
      Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 5ba2a4b1
      Linus Torvalds authored
      Pull RCU updates from Ingo Molnar:
       "This cycles's RCU changes include:
      
         - a couple of straggling RCU flavor consolidation updates
      
         - SRCU updates
      
         - RCU CPU stall-warning updates
      
         - torture-test updates
      
         - an LKMM commit adding support for synchronize_srcu_expedited()
      
         - documentation updates
      
         - miscellaneous fixes"
      
      * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (57 commits)
        net/ipv4/netfilter: Update comment from call_rcu_bh() to call_rcu()
        tools/memory-model: Add support for synchronize_srcu_expedited()
        doc/kprobes: Update obsolete RCU update functions
        torture: Suppress false-positive CONFIG_INITRAMFS_SOURCE complaint
        locktorture: NULL cxt.lwsa and cxt.lrsa to allow bad-arg detection
        rcuperf: Fix cleanup path for invalid perf_type strings
        rcutorture: Fix cleanup path for invalid torture_type strings
        rcutorture: Fix expected forward progress duration in OOM notifier
        rcutorture: Remove ->ext_irq_conflict field
        rcutorture: Make rcutorture_extend_mask() comment match the code
        tools/.../rcutorture: Convert to SPDX license identifier
        torture: Don't try to offline the last CPU
        rcu: Fix nohz status in stall warning
        rcu: Move forward-progress checkers into tree_stall.h
        rcu: Move irq-disabled stall-warning checking to tree_stall.h
        rcu: Organize functions in tree_stall.h
        rcu: Move FAST_NO_HZ stall-warning code to tree_stall.h
        rcu: Inline RCU stall-warning info helper functions
        rcu: Move rcu_print_task_exp_stall() to tree_exp.h
        rcu: Inline RCU task stall-warning helper functions
        ...
      5ba2a4b1
    • Linus Torvalds's avatar
      Merge branch 'core-objtool-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 6ec62961
      Linus Torvalds authored
      Pull objtool updates from Ingo Molnar:
       "This is a series from Peter Zijlstra that adds x86 build-time uaccess
        validation of SMAP to objtool, which will detect and warn about the
        following uaccess API usage bugs and weirdnesses:
      
         - call to %s() with UACCESS enabled
         - return with UACCESS enabled
         - return with UACCESS disabled from a UACCESS-safe function
         - recursive UACCESS enable
         - redundant UACCESS disable
         - UACCESS-safe disables UACCESS
      
        As it turns out not leaking uaccess permissions outside the intended
        uaccess functionality is hard when the interfaces are complex and when
        such bugs are mostly dormant.
      
        As a bonus we now also check the DF flag. We had at least one
        high-profile bug in that area in the early days of Linux, and the
        checking is fairly simple. The checks performed and warnings emitted
        are:
      
         - call to %s() with DF set
         - return with DF set
         - return with modified stack frame
         - recursive STD
         - redundant CLD
      
        It's all x86-only for now, but later on this can also be used for PAN
        on ARM and objtool is fairly cross-platform in principle.
      
        While all warnings emitted by this new checking facility that got
        reported to us were fixed, there might be GCC version dependent
        warnings that were not reported yet - which we'll address, should they
        trigger.
      
        The warnings are non-fatal build warnings"
      
      * 'core-objtool-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (27 commits)
        mm/uaccess: Use 'unsigned long' to placate UBSAN warnings on older GCC versions
        x86/uaccess: Dont leak the AC flag into __put_user() argument evaluation
        sched/x86_64: Don't save flags on context switch
        objtool: Add Direction Flag validation
        objtool: Add UACCESS validation
        objtool: Fix sibling call detection
        objtool: Rewrite alt->skip_orig
        objtool: Add --backtrace support
        objtool: Rewrite add_ignores()
        objtool: Handle function aliases
        objtool: Set insn->func for alternatives
        x86/uaccess, kcov: Disable stack protector
        x86/uaccess, ftrace: Fix ftrace_likely_update() vs. SMAP
        x86/uaccess, ubsan: Fix UBSAN vs. SMAP
        x86/uaccess, kasan: Fix KASAN vs SMAP
        x86/smap: Ditch __stringify()
        x86/uaccess: Introduce user_access_{save,restore}()
        x86/uaccess, signal: Fix AC=1 bloat
        x86/uaccess: Always inline user_access_begin()
        x86/uaccess, xen: Suppress SMAP warnings
        ...
      6ec62961
    • Linus Torvalds's avatar
      Merge branch 'core-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 171c2bcb
      Linus Torvalds authored
      Pull unified TLB flushing from Ingo Molnar:
       "This contains the generic mmu_gather feature from Peter Zijlstra,
        which is an all-arch unification of TLB flushing APIs, via the
        following (broad) steps:
      
         - enhance the <asm-generic/tlb.h> APIs to cover more arch details
      
         - convert most TLB flushing arch implementations to the generic
           <asm-generic/tlb.h> APIs.
      
         - remove leftovers of per arch implementations
      
        After this series every single architecture makes use of the unified
        TLB flushing APIs"
      
      * 'core-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        mm/resource: Use resource_overlaps() to simplify region_intersects()
        ia64/tlb: Eradicate tlb_migrate_finish() callback
        asm-generic/tlb: Remove tlb_table_flush()
        asm-generic/tlb: Remove tlb_flush_mmu_free()
        asm-generic/tlb: Remove CONFIG_HAVE_GENERIC_MMU_GATHER
        asm-generic/tlb: Remove arch_tlb*_mmu()
        s390/tlb: Convert to generic mmu_gather
        asm-generic/tlb: Introduce CONFIG_HAVE_MMU_GATHER_NO_GATHER=y
        arch/tlb: Clean up simple architectures
        um/tlb: Convert to generic mmu_gather
        sh/tlb: Convert SH to generic mmu_gather
        ia64/tlb: Convert to generic mmu_gather
        arm/tlb: Convert to generic mmu_gather
        asm-generic/tlb, arch: Invert CONFIG_HAVE_RCU_TABLE_INVALIDATE
        asm-generic/tlb, ia64: Conditionally provide tlb_migrate_finish()
        asm-generic/tlb: Provide generic tlb_flush() based on flush_tlb_mm()
        asm-generic/tlb, arch: Provide generic tlb_flush() based on flush_tlb_range()
        asm-generic/tlb, arch: Provide generic VIPT cache flush
        asm-generic/tlb, arch: Provide CONFIG_HAVE_MMU_GATHER_PAGE_SIZE
        asm-generic/tlb: Provide a comment
      171c2bcb
    • Linus Torvalds's avatar
      tty: rocket: fix incorrect forward declaration of 'rp_init()' · 423ea325
      Linus Torvalds authored
      Make the forward declaration actually match the real function
      definition, something that previous versions of gcc had just ignored.
      
      This is another patch to fix new warnings from gcc-9 before I start the
      merge window pulls.  I don't want to miss legitimate new warnings just
      because my system update brought a new compiler with new warnings.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      423ea325
    • Andrey Ryabinin's avatar
      ubsan: Remove vla bound checks. · 9a91ad92
      Andrey Ryabinin authored
      The kernel the kernel is built with -Wvla for some time, so is not
      supposed to have any variable length arrays.  Remove vla bounds checking
      from ubsan since it's useless now.
      Signed-off-by: default avatarAndrey Ryabinin <aryabinin@virtuozzo.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9a91ad92
    • Andrey Ryabinin's avatar
      ubsan: Fix nasty -Wbuiltin-declaration-mismatch GCC-9 warnings · f0996bc2
      Andrey Ryabinin authored
      Building lib/ubsan.c with gcc-9 results in a ton of nasty warnings like
      this one:
      
          lib/ubsan.c warning: conflicting types for built-in function
               ‘__ubsan_handle_negate_overflow’; expected ‘void(void *, void *)’ [-Wbuiltin-declaration-mismatch]
      
      The kernel's declarations of __ubsan_handle_*() often uses 'unsigned
      long' types in parameters while GCC these parameters as 'void *' types,
      hence the mismatch.
      
      Fix this by using 'void *' to match GCC's declarations.
      Reported-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarAndrey Ryabinin <aryabinin@virtuozzo.com>
      Fixes: c6d30853 ("UBSAN: run-time undefined behavior sanity checker")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f0996bc2
    • Linus Torvalds's avatar
      Linux 5.1 · e93c9c99
      Linus Torvalds authored
      e93c9c99
  2. 05 May, 2019 5 commits
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 7178fb0b
      Linus Torvalds authored
      Pull perf fixes from Ingo Molnar:
       "I'd like to apologize for this very late pull request: I was dithering
        through the week whether to send the fixes, and then yesterday Jiri's
        crash fix for a regression introduced in this cycle clearly marked
        perf/urgent as 'must merge now'.
      
        Most of the commits are tooling fixes, plus there's three kernel fixes
        via four commits:
      
          - race fix in the Intel PEBS code
      
          - fix an AUX bug and roll back a previous attempt
      
          - fix AMD family 17h generic HW cache-event perf counters
      
        The largest diffstat contribution comes from the AMD fix - a new event
        table is introduced, which is a fairly low risk change but has a large
        linecount"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/x86/intel: Fix race in intel_pmu_disable_event()
        perf/x86/intel/pt: Remove software double buffering PMU capability
        perf/ring_buffer: Fix AUX software double buffering
        perf tools: Remove needless asm/unistd.h include fixing build in some places
        tools arch uapi: Copy missing unistd.h headers for arc, hexagon and riscv
        tools build: Add -ldl to the disassembler-four-args feature test
        perf cs-etm: Always allocate memory for cs_etm_queue::prev_packet
        perf cs-etm: Don't check cs_etm_queue::prev_packet validity
        perf report: Report OOM in status line in the GTK UI
        perf bench numa: Add define for RUSAGE_THREAD if not present
        tools lib traceevent: Change tag string for error
        perf annotate: Fix build on 32 bit for BPF annotation
        tools uapi x86: Sync vmx.h with the kernel
        perf bpf: Return value with unlocking in perf_env__find_btf()
        MAINTAINERS: Include vendor specific files under arch/*/events/*
        perf/x86/amd: Update generic hardware cache events for Family 17h
      7178fb0b
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 70c9fb57
      Linus Torvalds authored
      Pull scheduler fix from Ingo Molnar:
       "Fix a kobject memory leak in the cpufreq code"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/cpufreq: Fix kobject memleak
      70c9fb57
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 13369e83
      Linus Torvalds authored
      Pull x86 fix from Ingo Molnar:
       "Disable function tracing during early SME setup to fix a boot crash on
        SME-enabled kernels running distro kernels (some of which have
        function tracing enabled)"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mm/mem_encrypt: Disable all instrumentation for early SME setup
      13369e83
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 51987aff
      Linus Torvalds authored
      Pull vfs fixes from Al Viro:
      
       - a couple of ->i_link use-after-free fixes
      
       - regression fix for wrong errno on absent device name in mount(2)
         (this cycle stuff)
      
       - ancient UFS braino in large GID handling on Solaris UFS images (bogus
         cut'n'paste from large UID handling; wrong field checked to decide
         whether we should look at old (16bit) or new (32bit) field)
      
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        ufs: fix braino in ufs_get_inode_gid() for solaris UFS flavour
        Abort file_remove_privs() for non-reg. files
        [fix] get rid of checking for absent device name in vfs_get_tree()
        apparmorfs: fix use-after-free on symlink traversal
        securityfs: fix use-after-free on symlink traversal
      51987aff
    • Jiri Olsa's avatar
      perf/x86/intel: Fix race in intel_pmu_disable_event() · 6f55967a
      Jiri Olsa authored
      New race in x86_pmu_stop() was introduced by replacing the
      atomic __test_and_clear_bit() of cpuc->active_mask by separate
      test_bit() and __clear_bit() calls in the following commit:
      
        3966c3fe ("x86/perf/amd: Remove need to check "running" bit in NMI handler")
      
      The race causes panic for PEBS events with enabled callchains:
      
        BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
        ...
        RIP: 0010:perf_prepare_sample+0x8c/0x530
        Call Trace:
         <NMI>
         perf_event_output_forward+0x2a/0x80
         __perf_event_overflow+0x51/0xe0
         handle_pmi_common+0x19e/0x240
         intel_pmu_handle_irq+0xad/0x170
         perf_event_nmi_handler+0x2e/0x50
         nmi_handle+0x69/0x110
         default_do_nmi+0x3e/0x100
         do_nmi+0x11a/0x180
         end_repeat_nmi+0x16/0x1a
        RIP: 0010:native_write_msr+0x6/0x20
        ...
         </NMI>
         intel_pmu_disable_event+0x98/0xf0
         x86_pmu_stop+0x6e/0xb0
         x86_pmu_del+0x46/0x140
         event_sched_out.isra.97+0x7e/0x160
        ...
      
      The event is configured to make samples from PEBS drain code,
      but when it's disabled, we'll go through NMI path instead,
      where data->callchain will not get allocated and we'll crash:
      
                x86_pmu_stop
                  test_bit(hwc->idx, cpuc->active_mask)
                  intel_pmu_disable_event(event)
                  {
                    ...
                    intel_pmu_pebs_disable(event);
                    ...
      
      EVENT OVERFLOW ->  <NMI>
                           intel_pmu_handle_irq
                             handle_pmi_common
         TEST PASSES ->        test_bit(bit, cpuc->active_mask))
                                 perf_event_overflow
                                   perf_prepare_sample
                                   {
                                     ...
                                     if (!(sample_type & __PERF_SAMPLE_CALLCHAIN_EARLY))
                                           data->callchain = perf_callchain(event, regs);
      
               CRASH ->              size += data->callchain->nr;
                                   }
                         </NMI>
                    ...
                    x86_pmu_disable_event(event)
                  }
      
                  __clear_bit(hwc->idx, cpuc->active_mask);
      
      Fixing this by disabling the event itself before setting
      off the PEBS bit.
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Arcari <darcari@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Lendacky Thomas <Thomas.Lendacky@amd.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Fixes: 3966c3fe ("x86/perf/amd: Remove need to check "running" bit in NMI handler")
      Link: http://lkml.kernel.org/r/20190504151556.31031-1-jolsa@kernel.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      6f55967a
  3. 04 May, 2019 1 commit
  4. 03 May, 2019 14 commits
  5. 02 May, 2019 1 commit