1. 21 Aug, 2019 10 commits
    • Masahiro Yamada's avatar
      kbuild: rebuild modules when module linker scripts are updated · 10df0638
      Masahiro Yamada authored
      Currently, the timestamp of module linker scripts are not checked.
      Add them to the dependency of modules so they are correctly rebuilt.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      10df0638
    • Masahiro Yamada's avatar
      kbuild: move KBUILD_LDS, KBUILD_VMLINUX_{OBJS,LIBS} to makefiles.rst · 888f0c34
      Masahiro Yamada authored
      These three variables are not intended to be tweaked by users.
      Move them from kbuild.rst to makefiles.rst.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      888f0c34
    • Masahiro Yamada's avatar
      treewide: remove dummy Makefiles for single targets · cbdf59ad
      Masahiro Yamada authored
      Now that the single target build descends into sub-directories in the
      same way as the normal build, these dummy Makefiles are not needed
      any more.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      cbdf59ad
    • Masahiro Yamada's avatar
      kbuild: make single targets work more correctly · 394053f4
      Masahiro Yamada authored
      Currently, the single target build directly descends into the directory
      of the target. For example,
      
        $ make foo/bar/baz.o
      
      ... directly descends into foo/bar/.
      
      On the other hand, the normal build usually descends one directory at
      a time, i.e. descends into foo/, and then foo/bar/.
      
      This difference causes some problems.
      
      [1] miss subdir-asflags-y, subdir-ccflags-y in upper Makefiles
      
          The options in subdir-{as,cc}flags-y take effect in the current
          and its sub-directories. In other words, they are inherited
          downward. In the example above, the single target will miss
          subdir-{as,cc}flags-y if they are defined in foo/Makefile.
      
      [2] could be built in a different directory
      
          As Documentation/kbuild/modules.rst section 4.3 says, Kbuild can
          handle files that are spread over several sub-directories.
      
          The build rule of foo/bar/baz.o may not necessarily be specified in
          foo/bar/Makefile. It might be specifies in foo/Makefile as follows:
      
          [foo/Makefile]
          obj-y := bar/baz.o
      
          This often happens when a module is so big that its source files
          are divided into sub-directories.
      
          In this case, there is no Makefile in the foo/bar/ directory, yet
          the single target descends into foo/bar/, then fails due to the
          missing Makefile. You can still do 'make foo/bar/' for partial
          building, but cannot do 'make foo/bar/baz.s'. I believe the single
          target '%.s' is a useful feature for inspecting the compiler output.
      
          Some modules work around this issue by putting an empty Makefile
          in every sub-directory.
      
      This commit fixes those problems by making the single target build
      descend in the same way as the normal build does.
      
      Another change is the single target build will observe the CONFIG
      options. Previously, it allowed users to build the foo.o even when
      the corresponding CONFIG_FOO is disabled:
      
         obj-$(CONFIG_FOO) += foo.o
      
      In the new behavior, the single target build will just fail and show
      "No rule to make target ..." (or "Nothing to be done for ..." if the
      stale object already exists, but cannot be updated).
      
      The disadvantage of this commit is the build speed. Now that the
      single target build visits every directory and parses lots of
      Makefiles, it is slower than before. (But, I hope it will not be
      too slow.)
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      394053f4
    • Kees Cook's avatar
      kbuild: Parameterize kallsyms generation and correct reporting · 8959e392
      Kees Cook authored
      When kallsyms generation happens, temporary vmlinux outputs are linked
      but the quiet make output didn't report it, giving the impression that
      the prior command is taking longer than expected.
      
      Instead, report the linking step explicitly. While at it, this
      consolidates the repeated "kallsyms generation step" into a single
      function and removes the existing copy/pasting.
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      8959e392
    • Masahiro Yamada's avatar
      kbuild: re-implement detection of CONFIG options leaked to user-space · c7c0eecf
      Masahiro Yamada authored
      scripts/headers_check.pl can detect references to CONFIG options in
      exported headers, but it has been disabled for more than a decade.
      
      Reverting commit 7e3fa561 ("kbuild: drop check for CONFIG_ in
      headers_check") would emit the following warnings for headers_check
      on x86:
      
      usr/include/mtd/ubi-user.h:283: leaks CONFIG_MTD_UBI_BEB_LIMIT to userspace where it is not valid
      usr/include/linux/cm4000_cs.h:26: leaks CONFIG_COMPAT to userspace where it is not valid
      usr/include/linux/pkt_cls.h:301: leaks CONFIG_NET_CLS_ACT to userspace where it is not valid
      usr/include/linux/videodev2.h:2465: leaks CONFIG_VIDEO_ADV_DEBUG to userspace where it is not valid
      usr/include/linux/bpf.h:249: leaks CONFIG_EFFICIENT_UNALIGNED_ACCESS to userspace where it is not valid
      usr/include/linux/bpf.h:819: leaks CONFIG_CGROUP_NET_CLASSID to userspace where it is not valid
      usr/include/linux/bpf.h:1011: leaks CONFIG_IP_ROUTE_CLASSID to userspace where it is not valid
      usr/include/linux/bpf.h:1742: leaks CONFIG_BPF_KPROBE_OVERRIDE to userspace where it is not valid
      usr/include/linux/bpf.h:1747: leaks CONFIG_FUNCTION_ERROR_INJECTION to userspace where it is not valid
      usr/include/linux/bpf.h:1936: leaks CONFIG_XFRM to userspace where it is not valid
      usr/include/linux/bpf.h:2184: leaks CONFIG_BPF_LIRC_MODE2 to userspace where it is not valid
      usr/include/linux/bpf.h:2210: leaks CONFIG_BPF_LIRC_MODE2 to userspace where it is not valid
      usr/include/linux/bpf.h:2227: leaks CONFIG_SOCK_CGROUP_DATA to userspace where it is not valid
      usr/include/linux/bpf.h:2311: leaks CONFIG_NET to userspace where it is not valid
      usr/include/linux/bpf.h:2348: leaks CONFIG_NET to userspace where it is not valid
      usr/include/linux/bpf.h:2422: leaks CONFIG_BPF_LIRC_MODE2 to userspace where it is not valid
      usr/include/linux/bpf.h:2528: leaks CONFIG_NET to userspace where it is not valid
      usr/include/linux/pktcdvd.h:37: leaks CONFIG_CDROM_PKTCDVD_WCACHE to userspace where it is not valid
      usr/include/linux/hw_breakpoint.h:27: leaks CONFIG_HAVE_MIXED_BREAKPOINTS_REGS to userspace where it is not valid
      usr/include/linux/raw.h:17: leaks CONFIG_MAX_RAW_DEVS to userspace where it is not valid
      usr/include/linux/elfcore.h:62: leaks CONFIG_BINFMT_ELF_FDPIC to userspace where it is not valid
      usr/include/linux/eventpoll.h:82: leaks CONFIG_PM_SLEEP to userspace where it is not valid
      usr/include/linux/atmdev.h:104: leaks CONFIG_COMPAT to userspace where it is not valid
      usr/include/asm-generic/unistd.h:651: leaks CONFIG_MMU to userspace where it is not valid
      usr/include/asm-generic/bitsperlong.h:9: leaks CONFIG_64BIT to userspace where it is not valid
      usr/include/asm-generic/fcntl.h:119: leaks CONFIG_64BIT to userspace where it is not valid
      usr/include/asm/auxvec.h:14: leaks CONFIG_IA32_EMULATION to userspace where it is not valid
      usr/include/asm/e820.h:14: leaks CONFIG_NODES_SHIFT to userspace where it is not valid
      usr/include/asm/e820.h:39: leaks CONFIG_X86_PMEM_LEGACY to userspace where it is not valid
      usr/include/asm/e820.h:49: leaks CONFIG_INTEL_TXT to userspace where it is not valid
      usr/include/asm/mman.h:7: leaks CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS to userspace where it is not valid
      
      Most of these are false positives because scripts/headers_check.pl
      parses comment lines.
      
      It is also false negative. arch/x86/include/uapi/asm/auxvec.h contains
      CONFIG_IA32_EMULATION and CONFIG_X86_64, but the only former is reported.
      
      It would be possible to fix scripts/headers_check.pl, of course.
      However, we already have some duplicated checks between headers_check
      and CONFIG_UAPI_HEADER_TEST. At this moment of time, there are still
      dozens of headers excluded from the header test (usr/include/Makefile),
      but we might be able to remove headers_check eventually.
      
      I re-implemented it in scripts/headers_install.sh by using sed because
      the most of code in scripts/headers_install.sh is written in sed.
      
      This patch works like this:
      
      [1] Run scripts/unifdef first because we need to drop the code
          surrounded by #ifdef __KERNEL__ ... #endif
      
      [2] Remove all C style comments. The sed code is somewhat complicated
          since we need to deal with both single and multi line comments.
      
          Precisely speaking, a comment block is replaced with a space just
          in case.
      
            CONFIG_FOO/* this is a comment */CONFIG_BAR
      
          should be converted into:
      
            CONFIG_FOO CONFIG_BAR
      
          instead of:
      
            CONFIG_FOOCONFIG_BAR
      
      [3] Match CONFIG_... pattern. It correctly matches to all CONFIG
          options that appear in a single line.
      
      After this commit, this would detect the following warnings, all of
      which are real ones.
      
      warning: include/uapi/linux/pktcdvd.h: leak CONFIG_CDROM_PKTCDVD_WCACHE to user-space
      warning: include/uapi/linux/hw_breakpoint.h: leak CONFIG_HAVE_MIXED_BREAKPOINTS_REGS to user-space
      warning: include/uapi/linux/raw.h: leak CONFIG_MAX_RAW_DEVS to user-space
      warning: include/uapi/linux/elfcore.h: leak CONFIG_BINFMT_ELF_FDPIC to user-space
      warning: include/uapi/linux/eventpoll.h: leak CONFIG_PM_SLEEP to user-space
      warning: include/uapi/linux/atmdev.h: leak CONFIG_COMPAT to user-space
      warning: include/uapi/asm-generic/fcntl.h: leak CONFIG_64BIT to user-space
      warning: arch/x86/include/uapi/asm/auxvec.h: leak CONFIG_IA32_EMULATION to user-space
      warning: arch/x86/include/uapi/asm/auxvec.h: leak CONFIG_X86_64 to user-space
      warning: arch/x86/include/uapi/asm/mman.h: leak CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS to user-space
      
      However, it is not nice to show them right now. I created a list of
      existing leakages. They are not warned, but a new leakage will be
      blocked by the 0-day bot.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
      c7c0eecf
    • Masahiro Yamada's avatar
      kbuild: unify clean-dirs rule for in-kernel and external module · 76cd306d
      Masahiro Yamada authored
      Factor out the duplicated code for in-kernel and external module
      cleaning.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      76cd306d
    • Masahiro Yamada's avatar
      kbuild: unify vmlinux-dirs and module-dirs rules · c99f3918
      Masahiro Yamada authored
      The in-kernel build and external module build have similar code
      for descending into sub-directories.
      
      Factor out the code into the common place.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      c99f3918
    • Masahiro Yamada's avatar
      kbuild: unset variables in top Makefile instead of setting 0 · 2042b548
      Masahiro Yamada authored
      There is no need to set 0 to variables such as config-targets,
      mixed-targets, etc.
      
      Unset instead of setting 0 in order to use 'ifdef' to test them.
      
      I also renamed:
      
        config-targets  ->  config-build
        mixed-targets   ->  mixed-build
        dot-config      ->  need-config
      
      to clarify what we are doing.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      2042b548
    • Masahiro Yamada's avatar
      kbuild: do not descend to ./Kbuild when cleaning · 125d059b
      Masahiro Yamada authored
      'make clean' descends into ./Kbuild, but does not clean anything
      since everything is added to no-clean-files.
      
      There is no need to descend to ./Kbuild in the first place.
      We can drop the no-clean-files assignment.
      
      With this, there is no more user of no-clean-files. I will keep it
      for a while to see whether a new user will appear.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      125d059b
  2. 14 Aug, 2019 6 commits
  3. 13 Aug, 2019 7 commits
    • Masahiro Yamada's avatar
      kbuild: add [M] marker for build log of *.mod.o · f6545bec
      Masahiro Yamada authored
      This builds module objects, so [M] makes sense.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      f6545bec
    • Thomas Gleixner's avatar
      Kbuild: Handle PREEMPT_RT for version string and magic · 4b950bb9
      Thomas Gleixner authored
      Update the build scripts and the version magic to reflect when
      CONFIG_PREEMPT_RT is enabled in the same way as CONFIG_PREEMPT is treated.
      
      The resulting version strings:
      
        Linux m 5.3.0-rc1+ #100 SMP Fri Jul 26 ...
        Linux m 5.3.0-rc1+ #101 SMP PREEMPT Fri Jul 26 ...
        Linux m 5.3.0-rc1+ #102 SMP PREEMPT_RT Fri Jul 26 ...
      
      The module vermagic:
      
        5.3.0-rc1+ SMP mod_unload modversions
        5.3.0-rc1+ SMP preempt mod_unload modversions
        5.3.0-rc1+ SMP preempt_rt mod_unload modversions
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      4b950bb9
    • Masahiro Yamada's avatar
      kbuild: move flex and bison rules to Makefile.host · cf8dfd15
      Masahiro Yamada authored
      Flex and bison are used for kconfig, dtc, genksyms, all of which are
      host programs. I never imagine the kernel embeds a parser or a lexer.
      
      Move the flex and bison rules to scripts/Makefile.host. This file is
      included only when hostprogs-y etc. is present in the Makefile in the
      directory. So, parsing these rules are skipped in most of directories.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      cf8dfd15
    • Masahiro Yamada's avatar
      kbuild: make bison create C file and header in a single pattern rule · 6ba7dc66
      Masahiro Yamada authored
      We generally expect bison to create not only a C file, but also a
      header, which will be included from the lexer.
      
      Currently, Kbuild generates them in separate rules. So, for instance,
      when building Kconfig, you will notice bison is invoked twice:
      
        HOSTCC  scripts/kconfig/conf.o
        HOSTCC  scripts/kconfig/confdata.o
        HOSTCC  scripts/kconfig/expr.o
        LEX     scripts/kconfig/lexer.lex.c
        YACC    scripts/kconfig/parser.tab.h
        HOSTCC  scripts/kconfig/lexer.lex.o
        YACC    scripts/kconfig/parser.tab.c
        HOSTCC  scripts/kconfig/parser.tab.o
        HOSTCC  scripts/kconfig/preprocess.o
        HOSTCC  scripts/kconfig/symbol.o
        HOSTLD  scripts/kconfig/conf
      
      Make handles such cases nicely in pattern rules [1]. Merge the two
      rules so that one invokcation of bison can generate both of them.
      
        HOSTCC  scripts/kconfig/conf.o
        HOSTCC  scripts/kconfig/confdata.o
        HOSTCC  scripts/kconfig/expr.o
        LEX     scripts/kconfig/lexer.lex.c
        YACC    scripts/kconfig/parser.tab.[ch]
        HOSTCC  scripts/kconfig/lexer.lex.o
        HOSTCC  scripts/kconfig/parser.tab.o
        HOSTCC  scripts/kconfig/preprocess.o
        HOSTCC  scripts/kconfig/symbol.o
        HOSTLD  scripts/kconfig/conf
      
      [1] Pattern rule
      
      GNU Make manual says:
      "Pattern rules may have more than one target. Unlike normal rules,
      this does not act as many different rules with the same prerequisites
      and recipe. If a pattern rule has multiple targets, make knows that
      the rule's recipe is responsible for making all of the targets. The
      recipe is executed only once to make all the targets. When searching
      for a pattern rule to match a target, the target patterns of a rule
      other than the one that matches the target in need of a rule are
      incidental: make worries only about giving a recipe and prerequisites
      to the file presently in question. However, when this file's recipe is
      run, the other targets are marked as having been updated themselves."
      
      https://www.gnu.org/software/make/manual/html_node/Pattern-Intro.htmlSigned-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      6ba7dc66
    • Masahiro Yamada's avatar
      kbuild: use $(basename ...) for cmd_asn1_compiler · 49d5089d
      Masahiro Yamada authored
      $(basename ...) trims the last suffix. Using it is more intuitive in
      my opinion.
      
      This pattern rule makes %.asn1.c and %.asn1.h at the same time.
      Previously, the short log showed only either of them, depending on
      the target file in question.
      
      To clarify that two files are being generated by the single recipe,
      I changed the log as follows:
      
      Before:
      
        ASN.1   crypto/asymmetric_keys/x509.asn1.c
      
      After:
      
        ASN.1   crypto/asymmetric_keys/x509.asn1.[ch]
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      49d5089d
    • Thomas Gleixner's avatar
      kbuild: Fail if gold linker is detected · 75959d44
      Thomas Gleixner authored
      The gold linker has known issues of failing the build both in random and in
      predictible ways:
      
       - The x86/X32 VDSO build fails with:
      
         arch/x86/entry/vdso/vclock_gettime-x32.o:vclock_gettime.c:function do_hres:
         error: relocation overflow: reference to 'hvclock_page'
      
         That's a known issue for years and the usual workaround is to disable
         CONFIG_X86_32
      
       - A recent build failure is caused by turning a relocation into an
         absolute one for unknown reasons. See link below.
      
       - There are a couple of gold workarounds applied already, but reports
         about broken builds with ld.gold keep coming in on a regular base and in
         most cases the root cause is unclear.
      
      In context of the most recent fail H.J. stated:
      
        "Since building a workable kernel for different kernel configurations
         isn't a requirement for gold, I don't recommend gold for kernel."
      
      So instead of dealing with attempts to duct tape gold support without
      understanding the root cause and without support from the gold folks, fail
      the build when gold is detected.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: default avatarIngo Molnar <mingo@kernel.org>
      Link: https://lore.kernel.org/r/CAMe9rOqMqkQ0LNpm25yE_Yt0FKp05WmHOrwc0aRDb53miFKM+w@mail.gmail.comReviewed-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Tested-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      75959d44
    • Denis Efremov's avatar
      modpost: check for static EXPORT_SYMBOL* functions · 15bfc234
      Denis Efremov authored
      This patch adds a check to warn about static EXPORT_SYMBOL* functions
      during the modpost. In most of the cases, a static symbol marked for
      exporting is an odd combination that should be fixed either by deleting
      the exporting mark or by removing the static attribute and adding the
      appropriate declaration to headers.
      
      This check could help to detect the following problems:
      1. 550113d4 ("i2c: add newly exported functions to the header, too")
      2. 54638c6e ("net: phy: make exported variables non-static")
      3. 98ef2046 ("mm: remove the exporting of totalram_pages")
      4. 73df167c ("s390/zcrypt: remove the exporting of ap_query_configuration")
      5. a57caf8c ("sunrpc/cache: remove the exporting of cache_seq_next")
      6. e4e47306 ("crypto: skcipher - remove the exporting of skcipher_walk_next")
      7. 14b4c48b ("gve: Remove the exporting of gve_probe")
      8. 9b79ee97 ("scsi: libsas: remove the exporting of sas_wait_eh")
      9. ...
      
      The build time impact is very limited and is almost at the unnoticeable
      level (< 1 sec).
      Acked-by: default avatarEmil Velikov <emil.l.velikov@gmail.com>
      Signed-off-by: default avatarDenis Efremov <efremov@linux.com>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      15bfc234
  4. 11 Aug, 2019 3 commits
  5. 10 Aug, 2019 14 commits
    • Linus Torvalds's avatar
      Merge tag 'riscv/for-v5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 296d05cb
      Linus Torvalds authored
      Pull RISC-V updates from Paul Walmsley:
       "A few minor RISC-V updates for v5.3-rc4:
      
         - Remove __udivdi3() from the 32-bit Linux port, converting the only
           upstream user to use do_div(), per Linux policy
      
         - Convert the RISC-V standard clocksource away from per-cpu data
           structures, since only one is used by Linux, even on a multi-CPU
           system
      
         - A set of DT binding updates that remove an obsolete text binding in
           favor of a YAML binding, fix a bogus compatible string in the
           schema (thus fixing a "make dtbs_check" warning), and clarifies the
           future values expected in one of the RISC-V CPU properties"
      
      * tag 'riscv/for-v5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        dt-bindings: riscv: fix the schema compatible string for the HiFive Unleashed board
        dt-bindings: riscv: remove obsolete cpus.txt
        RISC-V: Remove udivdi3
        riscv: delay: use do_div() instead of __udivdi3()
        dt-bindings: Update the riscv,isa string description
        RISC-V: Remove per cpu clocksource
      296d05cb
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 6d8f809c
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "A few fixes for x86:
      
         - Don't reset the carefully adjusted build flags for the purgatory
           and remove the unwanted flags instead. The 'reset all' approach led
           to build fails under certain circumstances.
      
         - Unbreak CLANG build of the purgatory by avoiding the builtin
           memcpy/memset implementations.
      
         - Address missing prototype warnings by including the proper header
      
         - Fix yet more fall-through issues"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/lib/cpu: Address missing prototypes warning
        x86/purgatory: Use CFLAGS_REMOVE rather than reset KBUILD_CFLAGS
        x86/purgatory: Do not use __builtin_memcpy and __builtin_memset
        x86: mtrr: cyrix: Mark expected switch fall-through
        x86/ptrace: Mark expected switch fall-through
      6d8f809c
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · d2359a51
      Linus Torvalds authored
      Pull perf tooling fixes from Thomas Gleixner:
       "Perf tooling fixes all over the place:
      
         - Fix the selection of the main thread COMM in db-export
      
         - Fix the disassemmbly display for BPF in annotate
      
         - Fix cpumap mask setup in perf ftrace when only one CPU is present
      
         - Add the missing 'cpu_clk_unhalted.core' event
      
         - Fix CPU 0 bindings in NUMA benchmarks
      
         - Fix the module size calculations for s390
      
         - Handle the gap between kernel end and module start on s390
           correctly
      
         - Build and typo fixes"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf pmu-events: Fix missing "cpu_clk_unhalted.core" event
        perf annotate: Fix s390 gap between kernel end and module start
        perf record: Fix module size on s390
        perf tools: Fix include paths in ui directory
        perf tools: Fix a typo in a variable name in the Documentation Makefile
        perf cpumap: Fix writing to illegal memory in handling cpumap mask
        perf ftrace: Fix failure to set cpumask when only one cpu is present
        perf db-export: Fix thread__exec_comm()
        perf annotate: Fix printing of unaugmented disassembled instructions from BPF
        perf bench numa: Fix cpu0 binding
      d2359a51
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · dcbb4a15
      Linus Torvalds authored
      Pull scheduler fixes from Thomas Gleixner:
       "Three fixlets for the scheduler:
      
         - Avoid double bandwidth accounting in the push & pull code
      
         - Use a sane FIFO priority for the Pressure Stall Information (PSI)
           thread.
      
         - Avoid permission checks when setting the scheduler params for the
           PSI thread"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/psi: Do not require setsched permission from the trigger creator
        sched/psi: Reduce psimon FIFO priority
        sched/deadline: Fix double accounting of rq/running bw in push & pull
      dcbb4a15
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ed254bb5
      Linus Torvalds authored
      Pull irq fix from Thomas Gleixner:
       "A small fix for the affinity spreading code.
      
        It failed to handle situations where a single vector was requested
        either due to only one CPU being available or vector exhaustion
        causing only a single interrupt to be granted.
      
        The fix is to simply remove the requirement in the affinity spreading
        code for more than one interrupt being available"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        genirq/affinity: Create affinity mask for single vector
      ed254bb5
    • Linus Torvalds's avatar
      Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 6054f4ec
      Linus Torvalds authored
      Pull objtool warning fix from Thomas Gleixner:
       "The recent objtool fixes/enhancements unearthed a unbalanced CLAC in
        the i915 driver.
      
        Chris asked me to pick the fix up and route it through"
      
      * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        drm/i915: Remove redundant user_access_end() from __copy_from_user() error path
      6054f4ec
    • Linus Torvalds's avatar
      Merge tag 'gfs2-v5.3-rc3.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 · 829890d2
      Linus Torvalds authored
      Pull gfs2 fix from Andreas Gruenbacher:
       "Fix incorrect lseek / fiemap results"
      
      * tag 'gfs2-v5.3-rc3.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
        gfs2: gfs2_walk_metadata fix
      829890d2
    • Joe Perches's avatar
      Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang · bfd77145
      Joe Perches authored
      A compilation -Wimplicit-fallthrough warning was enabled by commit
      a035d552 ("Makefile: Globally enable fall-through warning")
      
      Even though clang 10.0.0 does not currently support this warning without
      a patch, clang currently does not support a value for this option.
      
        Link: https://bugs.llvm.org/show_bug.cgi?id=39382
      
      The gcc default for this warning is 3 so removing the =3 has no effect
      for gcc and enables the warning for patched versions of clang.
      
      Also remove the =3 from an existing use in a parisc Makefile:
      arch/parisc/math-emu/Makefile
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Reviewed-and-tested-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Cc: Gustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      bfd77145
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 5aa91007
      Linus Torvalds authored
      Pull char/misc driver fixes Greg KH:
       "Here are some small char/misc driver fixes for 5.3-rc4.
      
        Two of these are for the habanalabs driver for issues found when
        running on a big-endian system (are they still alive?) The others are
        tiny fixes reported by people, and a MAINTAINERS update about the
        location of the fpga development tree.
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'char-misc-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        coresight: Fix DEBUG_LOCKS_WARN_ON for uninitialized attribute
        MAINTAINERS: Move linux-fpga tree to new location
        nvmem: Use the same permissions for eeprom as for nvmem
        habanalabs: fix host memory polling in BE architecture
        habanalabs: fix F/W download in BE architecture
      5aa91007
    • Linus Torvalds's avatar
      Merge tag 'driver-core-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core · 36e630ed
      Linus Torvalds authored
      Pull driver core fixes from Greg KH:
       "Here are two small fixes for some driver core issues that have been
        reported. There is also a kernfs "fix" here, which was then reverted
        because it was found to cause problems in linux-next.
      
        The driver core fixes both resolve reported issues, one with gpioint
        stuff that showed up in 5.3-rc1, and the other finally (and hopefully)
        resolves a very long standing race when removing glue directories.
        It's nice to get that issue finally resolved and the developers
        involved should be applauded for the persistence it took to get this
        patch finally accepted.
      
        All of these have been in linux-next for a while with no reported
        issues. Well, the one reported issue, hence the revert :)"
      
      * tag 'driver-core-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        Revert "kernfs: fix memleak in kernel_ops_readdir()"
        kernfs: fix memleak in kernel_ops_readdir()
        driver core: Fix use-after-free and double free on glue directory
        driver core: platform: return -ENXIO for missing GpioInt
      36e630ed
    • Linus Torvalds's avatar
      Merge tag 'tty-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · c13f8670
      Linus Torvalds authored
      Pull tty fix from Greg KH:
       "Here is a single tty kgdb fix for 5.3-rc4.
      
        It fixes an annoying log message that has caused kdb to become
        useless. It's another fallout from commit ddde3c18 ("vt: More
        locking checks") which tries to enforce locking checks more strictly
        in the tty layer, unfortunatly when kdb is stopped, there's no need
        for locks :)
      
        This patch has been linux-next for a while with no reported issues"
      
      * tag 'tty-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        kgdboc: disable the console lock when in kgdb
      c13f8670
    • Linus Torvalds's avatar
      Merge tag 'staging-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 15fa98e4
      Linus Torvalds authored
      Pull staging / IIO driver fixes from Greg KH:
       "Here are some small staging and IIO driver fixes for 5.3-rc4.
      
        Nothing major, just resolutions for a number of small reported issues,
        full details in the shortlog.
      
        All have been in linux-next for a while with no reported issues"
      
      * tag 'staging-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        iio: adc: gyroadc: fix uninitialized return code
        docs: generic-counter.rst: fix broken references for ABI file
        staging: android: ion: Bail out upon SIGKILL when allocating memory.
        Staging: fbtft: Fix GPIO handling
        staging: unisys: visornic: Update the description of 'poll_for_irq()'
        staging: wilc1000: flush the workqueue before deinit the host
        staging: gasket: apex: fix copy-paste typo
        Staging: fbtft: Fix reset assertion when using gpio descriptor
        Staging: fbtft: Fix probing of gpio descriptor
        iio: imu: mpu6050: add missing available scan masks
        iio: cros_ec_accel_legacy: Fix incorrect channel setting
        IIO: Ingenic JZ47xx: Set clock divider on probe
        iio: adc: max9611: Fix misuse of GENMASK macro
      15fa98e4
    • Linus Torvalds's avatar
      Merge tag 'usb-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 1041f509
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some small USB fixes for 5.3-rc4.
      
        The "biggest" one here is moving code from one file to another in
        order to fix a long-standing race condition with the creation of sysfs
        files for USB devices. Turns out that there are now userspace tools
        out there that are hitting this long-known bug, so it's time to fix
        them. Thankfully the tool-maker in this case fixed the issue :)
      
        The other patches in here are all fixes for reported issues. Now that
        syzbot knows how to fuzz USB drivers better, and is starting to now
        fuzz the userspace facing side of them at the same time, there will be
        more and more small fixes like these coming, which is a good thing.
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'usb-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        usb: setup authorized_default attributes using usb_bus_notify
        usb: iowarrior: fix deadlock on disconnect
        Revert "USB: rio500: simplify locking"
        usb: usbfs: fix double-free of usb memory upon submiturb error
        usb: yurex: Fix use-after-free in yurex_delete
        usb: typec: tcpm: Ignore unsupported/unknown alternate mode requests
        xhci: Fix NULL pointer dereference at endpoint zero reset.
        usb: host: xhci-rcar: Fix timeout in xhci_suspend()
        usb: typec: ucsi: ccg: Fix uninitilized symbol error
        usb: typec: tcpm: remove tcpm dir if no children
        usb: typec: tcpm: free log buf memory when remove debug file
        usb: typec: tcpm: Add NULL check before dereferencing config
      1041f509
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 97946f59
      Linus Torvalds authored
      Pull pin control fixes from Linus Walleij:
      
       - Delay acquisition of regmaps in the Aspeed G5 driver.
      
       - Make a symbol static to reduce compiler noise.
      
      * tag 'pinctrl-v5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl: aspeed: Make aspeed_pinmux_ips static
        pinctrl: aspeed-g5: Delay acquisition of regmaps
      97946f59