1. 19 7月, 2021 18 次提交
  2. 18 7月, 2021 15 次提交
    • R
      Documentation: Fix intiramfs script name · 5e60f363
      Robert Richter 提交于
      Documentation was not changed when renaming the script in commit
      80e715a0 ("initramfs: rename gen_initramfs_list.sh to
      gen_initramfs.sh"). Fixing this.
      
      Basically does:
      
       $ sed -i -e s/gen_initramfs_list.sh/gen_initramfs.sh/g $(git grep -l gen_initramfs_list.sh)
      
      Fixes: 80e715a0 ("initramfs: rename gen_initramfs_list.sh to gen_initramfs.sh")
      Signed-off-by: NRobert Richter <rrichter@amd.com>
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      5e60f363
    • L
      Kbuild: lto: fix module versionings mismatch in GNU make 3.X · 1d11053d
      Lecopzer Chen 提交于
      When building modules(CONFIG_...=m), I found some of module versions
      are incorrect and set to 0.
      This can be found in build log for first clean build which shows
      
      WARNING: EXPORT symbol "XXXX" [drivers/XXX/XXX.ko] version generation failed,
      symbol will not be versioned.
      
      But in second build(incremental build), the WARNING disappeared and the
      module version becomes valid CRC and make someone who want to change
      modules without updating kernel image can't insert their modules.
      
      The problematic code is
      +	$(foreach n, $(filter-out FORCE,$^),				\
      +		$(if $(wildcard $(n).symversions),			\
      +			; cat $(n).symversions >> $@.symversions))
      
      For example:
        rm -f fs/notify/built-in.a.symversions    ; rm -f fs/notify/built-in.a; \
      llvm-ar cDPrST fs/notify/built-in.a fs/notify/fsnotify.o \
      fs/notify/notification.o fs/notify/group.o ...
      
      `foreach n` shows nothing to `cat` into $(n).symversions because
      `if $(wildcard $(n).symversions)` return nothing, but actually
      they do exist during this line was executed.
      
      -rw-r--r-- 1 root root 168580 Jun 13 19:10 fs/notify/fsnotify.o
      -rw-r--r-- 1 root root    111 Jun 13 19:10 fs/notify/fsnotify.o.symversions
      
      The reason is the $(n).symversions are generated at runtime, but
      Makefile wildcard function expends and checks the file exist or not
      during parsing the Makefile.
      
      Thus fix this by use `test` shell command to check the file
      existence in runtime.
      
      Rebase from both:
      1. [https://lore.kernel.org/lkml/20210616080252.32046-1-lecopzer.chen@mediatek.com/]
      2. [https://lore.kernel.org/lkml/20210702032943.7865-1-lecopzer.chen@mediatek.com/]
      
      Fixes: 38e89184 ("kbuild: lto: fix module versioning")
      Co-developed-by: NSami Tolvanen <samitolvanen@google.com>
      Signed-off-by: NLecopzer Chen <lecopzer.chen@mediatek.com>
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      1d11053d
    • M
      kbuild: do not suppress Kconfig prompts for silent build · d952cfaf
      Masahiro Yamada 提交于
      When a new CONFIG option is available, Kbuild shows a prompt to get
      the user input.
      
        $ make
        [ snip ]
        Core Scheduling for SMT (SCHED_CORE) [N/y/?] (NEW)
      
      This is the only interactive place in the build process.
      
      Commit 174a1dcc ("kbuild: sink stdout from cmd for silent build")
      suppressed Kconfig prompts as well because syncconfig is invoked by
      the 'cmd' macro. You cannot notice the fact that Kconfig is waiting
      for the user input.
      
      Use 'kecho' to show the equivalent short log without suppressing stdout
      from sub-make.
      
      Fixes: 174a1dcc ("kbuild: sink stdout from cmd for silent build")
      Reported-by: NTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      Tested-by: NTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      d952cfaf
    • M
      scripts/setlocalversion: fix a bug when LOCALVERSION is empty · 5df99bec
      Mikulas Patocka 提交于
      The commit 042da426 ("scripts/setlocalversion: simplify the short
      version part") reduces indentation. Unfortunately, it also changes behavior
      in a subtle way - if the user has empty "LOCALVERSION" variable, the plus
      sign is appended to the kernel version. It wasn't appended before.
      
      This patch reverts to the old behavior - we append the plus sign only if
      the LOCALVERSION variable is not set.
      
      Fixes: 042da426 ("scripts/setlocalversion: simplify the short version part")
      Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      5df99bec
    • Y
      perf sched: Fix record failure when CONFIG_SCHEDSTATS is not set · b0f00855
      Yang Jihong 提交于
      The tracepoints trace_sched_stat_{wait, sleep, iowait} are not exposed to user
      if CONFIG_SCHEDSTATS is not set, "perf sched record" records the three events.
      As a result, the command fails.
      
      Before:
      
        #perf sched record sleep 1
        event syntax error: 'sched:sched_stat_wait'
                             \___ unknown tracepoint
      
        Error:  File /sys/kernel/tracing/events/sched/sched_stat_wait not found.
        Hint:   Perhaps this kernel misses some CONFIG_ setting to enable this feature?.
      
        Run 'perf list' for a list of valid events
      
         Usage: perf record [<options>] [<command>]
            or: perf record [<options>] -- <command> [<options>]
      
            -e, --event <event>   event selector. use 'perf list' to list available events
      
      Solution:
        Check whether schedstat tracepoints are exposed. If no, these events are not recorded.
      
      After:
        # perf sched record sleep 1
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.163 MB perf.data (1091 samples) ]
        # perf sched report
        run measurement overhead: 4736 nsecs
        sleep measurement overhead: 9059979 nsecs
        the run test took 999854 nsecs
        the sleep test took 8945271 nsecs
        nr_run_events:        716
        nr_sleep_events:      785
        nr_wakeup_events:     0
        ...
        ------------------------------------------------------------
      
      Fixes: 2a09b5de ("sched/fair: do not expose some tracepoints to user if CONFIG_SCHEDSTATS is not set")
      Signed-off-by: NYang Jihong <yangjihong1@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
      Cc: Yafang Shao <laoar.shao@gmail.com>
      Link: http://lore.kernel.org/lkml/20210713112358.194693-1-yangjihong1@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b0f00855
    • Y
      perf probe: Fix add event failure when running 32-bit perf in a 64-bit kernel · 22a66551
      Yang Jihong 提交于
      The "address" member of "struct probe_trace_point" uses long data type.
      If kernel is 64-bit and perf program is 32-bit, size of "address"
      variable is 32 bits.
      
      As a result, upper 32 bits of address read from kernel are truncated, an
      error occurs during address comparison in kprobe_warn_out_range().
      
      Before:
      
        # perf probe -a schedule
        schedule is out of .text, skip it.
          Error: Failed to add events.
      
      Solution:
        Change data type of "address" variable to u64 and change corresponding
      address printing and value assignment.
      
      After:
      
        # perf.new.new probe -a schedule
        Added new event:
          probe:schedule       (on schedule)
      
        You can now use it in all perf tools, such as:
      
                perf record -e probe:schedule -aR sleep 1
      
        # perf probe -l
          probe:schedule       (on schedule@kernel/sched/core.c)
        # perf record -e probe:schedule -aR sleep 1
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.156 MB perf.data (1366 samples) ]
        # perf report --stdio
        # To display the perf.data header info, please use --header/--header-only options.
        #
        #
        # Total Lost Samples: 0
        #
        # Samples: 1K of event 'probe:schedule'
        # Event count (approx.): 1366
        #
        # Overhead  Command          Shared Object      Symbol
        # ........  ...............  .................  ............
        #
             6.22%  migration/0      [kernel.kallsyms]  [k] schedule
             6.22%  migration/1      [kernel.kallsyms]  [k] schedule
             6.22%  migration/2      [kernel.kallsyms]  [k] schedule
             6.22%  migration/3      [kernel.kallsyms]  [k] schedule
             6.15%  migration/10     [kernel.kallsyms]  [k] schedule
             6.15%  migration/11     [kernel.kallsyms]  [k] schedule
             6.15%  migration/12     [kernel.kallsyms]  [k] schedule
             6.15%  migration/13     [kernel.kallsyms]  [k] schedule
             6.15%  migration/14     [kernel.kallsyms]  [k] schedule
             6.15%  migration/15     [kernel.kallsyms]  [k] schedule
             6.15%  migration/4      [kernel.kallsyms]  [k] schedule
             6.15%  migration/5      [kernel.kallsyms]  [k] schedule
             6.15%  migration/6      [kernel.kallsyms]  [k] schedule
             6.15%  migration/7      [kernel.kallsyms]  [k] schedule
             6.15%  migration/8      [kernel.kallsyms]  [k] schedule
             6.15%  migration/9      [kernel.kallsyms]  [k] schedule
             0.22%  rcu_sched        [kernel.kallsyms]  [k] schedule
        ...
        #
        # (Cannot load tips.txt file, please install perf!)
        #
      Signed-off-by: NYang Jihong <yangjihong1@huawei.com>
      Acked-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jianlin Lv <jianlin.lv@arm.com>
      Cc: Jin Yao <yao.jin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Li Huafei <lihuafei1@huawei.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Link: http://lore.kernel.org/lkml/20210715063723.11926-1-yangjihong1@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      22a66551
    • R
      perf data: Close all files in close_dir() · d4b3eedc
      Riccardo Mancini 提交于
      When using 'perf report' in directory mode, the first file is not closed
      on exit, causing a memory leak.
      
      The problem is caused by the iterating variable never reaching 0.
      
      Fixes: 14552063 ("perf data: Add perf_data__(create_dir|close_dir) functions")
      Signed-off-by: NRiccardo Mancini <rickyman7@gmail.com>
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Zhen Lei <thunder.leizhen@huawei.com>
      Link: http://lore.kernel.org/lkml/20210716141122.858082-1-rickyman7@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      d4b3eedc
    • R
      perf probe-file: Delete namelist in del_events() on the error path · e0fa7ab4
      Riccardo Mancini 提交于
      ASan reports some memory leaks when running:
      
        # perf test "42: BPF filter"
      
      This second leak is caused by a strlist not being dellocated on error
      inside probe_file__del_events.
      
      This patch adds a goto label before the deallocation and makes the error
      path jump to it.
      Signed-off-by: NRiccardo Mancini <rickyman7@gmail.com>
      Fixes: e7895e42 ("perf probe: Split del_perf_probe_events()")
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/174963c587ae77fa108af794669998e4ae558338.1626343282.git.rickyman7@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e0fa7ab4
    • L
      Merge tag 'soc-fixes-5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 1d67c8d9
      Linus Torvalds 提交于
      Pull ARM SoC fixes from Arnd Bergmann:
       "Here are the patches for this week that came as the fallout of the
        merge window:
      
         - Two fixes for the NVidia memory controller driver
      
         - multiple defconfig files get patched to turn CONFIG_FB back on
           after that is no longer selected by CONFIG_DRM
      
         - ffa and scmpi firmware drivers fixes, mostly addressing compiler
           and documentation warnings
      
         - Platform specific fixes for device tree files on ASpeed, Renesas
           and NVidia SoC, mostly for recent regressions.
      
         - A workaround for a regression on the USB PHY with devlink when the
           usb-nop-xceiv driver is not available until the rootfs is mounted.
      
         - Device tree compiler warnings in Arm Versatile-AB"
      
      * tag 'soc-fixes-5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (35 commits)
        ARM: dts: versatile: Fix up interrupt controller node names
        ARM: multi_v7_defconfig: Make NOP_USB_XCEIV driver built-in
        ARM: configs: Update u8500_defconfig
        ARM: configs: Update Vexpress defconfig
        ARM: configs: Update Versatile defconfig
        ARM: configs: Update RealView defconfig
        ARM: configs: Update Integrator defconfig
        arm: Typo s/PCI_IXP4XX_LEGACY/IXP4XX_PCI_LEGACY/
        firmware: arm_scmi: Fix range check for the maximum number of pending messages
        firmware: arm_scmi: Avoid padding in sensor message structure
        firmware: arm_scmi: Fix kernel doc warnings about return values
        firmware: arm_scpi: Fix kernel doc warnings
        firmware: arm_scmi: Fix kernel doc warnings
        ARM: shmobile: defconfig: Restore graphical consoles
        firmware: arm_ffa: Fix a possible ffa_linux_errmap buffer overflow
        firmware: arm_ffa: Fix the comment style
        firmware: arm_ffa: Simplify probe function
        firmware: arm_ffa: Ensure drivers provide a probe function
        firmware: arm_scmi: Fix possible scmi_linux_errmap buffer overflow
        firmware: arm_scmi: Ensure drivers provide a probe function
        ...
      1d67c8d9
    • L
      Revert "mm/slub: use stackdepot to save stack trace in objects" · ae14c63a
      Linus Torvalds 提交于
      This reverts commit 78869146.
      
      It's not clear why, but it causes unexplained problems in entirely
      unrelated xfs code.  The most likely explanation is some slab
      corruption, possibly triggered due to CONFIG_SLUB_DEBUG_ON.  See [1].
      
      It ends up having a few other problems too, like build errors on
      arch/arc, and Geert reporting it using much more memory on m68k [3] (it
      probably does so elsewhere too, but it is probably just more noticeable
      on m68k).
      
      The architecture issues (both build and memory use) are likely just
      because this change effectively force-enabled STACKDEPOT (along with a
      very bad default value for the stackdepot hash size).  But together with
      the xfs issue, this all smells like "this commit was not ready" to me.
      
      Link: https://lore.kernel.org/linux-xfs/YPE3l82acwgI2OiV@infradead.org/ [1]
      Link: https://lore.kernel.org/lkml/202107150600.LkGNb4Vb-lkp@intel.com/ [2]
      Link: https://lore.kernel.org/lkml/CAMuHMdW=eoVzM1Re5FVoEN87nKfiLmM2+Ah7eNu2KXEhCvbZyA@mail.gmail.com/ [3]
      Reported-by: NChristoph Hellwig <hch@infradead.org>
      Reported-by: Nkernel test robot <lkp@intel.com>
      Reported-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ae14c63a
    • L
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 5d766d55
      Linus Torvalds 提交于
      Pull SCSI fixes from James Bottomley:
       "One core fix for an oops which can occur if the error handling thread
        fails to start for some reason and the driver is removed.
      
        The other fixes are all minor ones in drivers"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: ufs: core: Add missing host_lock in ufshcd_vops_setup_xfer_req()
        scsi: mpi3mr: Fix W=1 compilation warnings
        scsi: pm8001: Clean up kernel-doc and comments
        scsi: zfcp: Report port fc_security as unknown early during remote cable pull
        scsi: core: Fix bad pointer dereference when ehandler kthread is invalid
        scsi: fas216: Fix a build error
        scsi: core: Fix the documentation of the scsi_execute() time parameter
      5d766d55
    • L
      Merge tag '5.14-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 · 44cb60b4
      Linus Torvalds 提交于
      Pull cifs fixes from Steve French:
       "Eight cifs/smb3 fixes, including three for stable.
      
        Three are DFS related fixes, and two to fix problems pointed out by
        static checkers"
      
      * tag '5.14-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: do not share tcp sessions of dfs connections
        SMB3.1.1: fix mount failure to some servers when compression enabled
        cifs: added WARN_ON for all the count decrements
        cifs: fix missing null session check in mount
        cifs: handle reconnect of tcon when there is no cached dfs referral
        cifs: fix the out of range assignment to bit fields in parse_server_interfaces
        cifs: Do not use the original cruid when following DFS links for multiuser mounts
        cifs: use the expiry output of dns_query to schedule next resolution
      44cb60b4
    • L
      Merge tag 'linux-kselftest-kunit-fixes-5.14-rc2' of... · ccbb22b9
      Linus Torvalds 提交于
      Merge tag 'linux-kselftest-kunit-fixes-5.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull kunit fixes from Shuah Khan:
       "Fixes to kunit tool and documentation:
      
         - fix asserts on older python versions
      
         - fixes to misleading error messages when TAP header format is
           incorrect or when file is missing
      
         - documentation fix: drop obsolete information about uml_abort
           coverage
      
         - remove unnecessary annotations"
      
      * tag 'linux-kselftest-kunit-fixes-5.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        kunit: tool: Assert the version requirement
        kunit: tool: remove unnecessary "annotations" import
        Documentation: kunit: drop obsolete note about uml_abort for coverage
        kunit: tool: Fix error messages for cases of no tests and wrong TAP header
      ccbb22b9
    • L
      Merge tag 'linux-kselftest-fixes-5.14-rc2' of... · 00397e74
      Linus Torvalds 提交于
      Merge tag 'linux-kselftest-fixes-5.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull kselftest fix from Shuah Khan:
       "A fix to memory-hotplug hot-remove test to stop spamming logs with
        dump_page() entries and slowing the system down to a crawl"
      
      * tag 'linux-kselftest-fixes-5.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests: memory-hotplug: avoid spamming logs with dump_page(), ratio limit hot-remove error test
      00397e74
    • L
      Merge tag 'trace-v5.14-5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · 3fdacf40
      Linus Torvalds 提交于
      Pull tracing fix from Steven Rostedt:
       "Fix the histogram logic from possibly crashing the kernel
      
        Working on the histogram code, I found that if you dereference a char
        pointer in a trace event that happens to point to user space, it can
        crash the kernel, as it does no checks of that pointer. I have code
        coming that will do this better, so just remove this ability to treat
        character pointers in trace events as stings in the histogram"
      
      * tag 'trace-v5.14-5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tracing: Do not reference char * as a string in histograms
      3fdacf40
  3. 17 7月, 2021 7 次提交