1. 04 Jan, 2021 19 commits
    • Paul E. McKenney's avatar
      torture: Allow standalone kvm-recheck.sh run detect --trust-make · b79b0b67
      Paul E. McKenney authored
      Normally, kvm-recheck.sh is run from kvm.sh, which provides the
      TORTURE_TRUST_MAKE environment variable that, if a non-empty string,
      indicates that the --trust-make command-line parameter has been passed
      to kvm.sh.  If there was no --trust-make, kvm-recheck.sh insists
      that the Make.out file contain at least one "CC" command.  Thus, when
      kvm-recheck.sh is run standalone to evaluate a prior --trust-make run,
      it will incorrectly insist that a proper kernel build did not happen.
      
      This commit therefore causes kvm-recheck.sh to also search the "log"
      file in the top-level results directory for the string "--trust-make".
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      b79b0b67
    • Paul E. McKenney's avatar
      torture: Remove "Failed to add ttynull console" false positive · 546eee2d
      Paul E. McKenney authored
      Commit 757055ae ("init/console: Use ttynull as a fallback when
      there is no console") results in the string "Warning: Failed to add
      ttynull console. No stdin, stdout, and stderr for the init process!"
      appearing on the console, which the rcutorture scripting interprets as
      a warning, which causes every rcutorture run to be flagged.  However,
      the rcutorture init process never attempts to do any I/O, and thus does
      not care that it has no stdin, stdout, or stderr.
      
      This commit therefore causes the rcutorture scripting to ignore this
      message.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      546eee2d
    • Paul E. McKenney's avatar
      torture: Simplify exit-code plumbing for kvm-recheck.sh and kvm-find-errors.sh · 365dc5cb
      Paul E. McKenney authored
      This commit simplifies exit-code plumbing.  It makes kvm-recheck.sh return
      the value 1 for a build error and 2 for a runtime error.  It also makes
      kvm-find-errors.sh avoid checking runtime files for --build-only runs.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      365dc5cb
    • Paul E. McKenney's avatar
      torture: s/STOP/STOP.1/ to avoid scenario collision · c821f855
      Paul E. McKenney authored
      This commit changes the "STOP" file that is used to cleanly halt a running
      rcutorture run to "STOP.1" because no scenario directory will ever end
      with ".1".  If there really was a scenario named "STOP", its directories
      would instead be named "STOP", "STOP.2", "STOP.3", and so on.  While in
      the area, the commit also changes the kernel-run-time checks for this
      file to look directly in the directory above $resdir, thus avoiding the
      need to pass the TORTURE_STOPFILE environment variable to remote systems.
      
      While in the area, move the STOP.1 file to the top-level directory
      covering all of the scenarios.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      c821f855
    • Paul E. McKenney's avatar
      torture: Add --dryrun batches to help schedule a distributed run · 755cf0af
      Paul E. McKenney authored
      When all of the remote systems have the same number of CPUs, one
      approach is to use one "--buildonly" run and one "--dryrun sched" run,
      and then distributing the batches out one per remote system.  However,
      the output of "--dryrun sched" is not made for parsing, so this commit
      adds a "--dryrun batches" that provides the same information in easily
      parsed form.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      755cf0af
    • Paul E. McKenney's avatar
      torture: Stop hanging on panic · f716348f
      Paul E. McKenney authored
      By default, the "panic" kernel parameter is zero, which causes the kernel
      to loop indefinitely after a panic().  The rcutorture scripting will
      eventually kill the corresponding qemu process, but only after waiting
      for the full run duration plus a few minutes.  This works, but delays
      notifying the developer of the failure.
      
      This commit therefore causes the rcutorture scripting to pass the
      "panic=-1" kernel parameter, which caused the kernel to instead
      unceremoniously shut down immediately.  This in turn causes qemu to
      terminate, so that if all of the runs in a given batch panic(), the
      rcutorture scripting can immediately proceed to the next batch.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      f716348f
    • Paul E. McKenney's avatar
      torture: Add kvm.sh test summary to end of log file · 0beb3948
      Paul E. McKenney authored
      This commit adds the test summary to the end of the log in the top-level
      directory containing the kvm.sh test artifacts.  While in the area, it adds
      the kvm.sh exit code to this test summary.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      0beb3948
    • Paul E. McKenney's avatar
      torture: Make kvm.sh include --kconfig arguments in CPU calculation · 22bf64cc
      Paul E. McKenney authored
      Currently, passing something like "--kconfig CONFIG_NR_CPUS=2" to kvm.sh
      has no effect on scenario scheduling.  For scenarios that do not specify
      the number of CPUs, this can result in kvm.sh wastefully scheduling only
      one scenario at a time even when the --kconfig argument would allow
      a number to be run concurrently.  This commit therefore makes kvm.sh
      consider the --kconfig arguments when scheduling scenarios across the
      available CPUs.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      22bf64cc
    • Paul E. McKenney's avatar
      torture: Make kvm.sh return failure upon build failure · 23239fc0
      Paul E. McKenney authored
      The kvm.sh script uses kvm-find-errors.sh to evaluate whether or not
      a build failed.  Unfortunately, kvm-find-errors.sh returns success if
      there are no failed runs (including when there are no runs at all) even if
      there are build failures.  This commit therefore makes kvm-find-errors.sh
      return failure in response to build failures.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      23239fc0
    • Paul E. McKenney's avatar
      torture: Print run duration at end of kvm.sh execution · 0bcca183
      Paul E. McKenney authored
      Yes, you can mentally subtract the timestamps, but this commit makes
      the computer do this work.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      0bcca183
    • Paul E. McKenney's avatar
      torture: Make kvm.sh arguments accumulate · 45261371
      Paul E. McKenney authored
      Given that kvm.sh in invoked from scripts, it is only natural for
      different levels of scripting to provide their own Kconfig option values,
      for example.  Unfortunately, right now, the last such argument on the
      command line wins.
      
      This commit therefore makes the --bootargs, --configs, --kconfigs,
      --kmake-args, and --qemu-args argument values accumulate.  For example,
      where "--configs TREE01 --configs TREE02" would previously have run only
      scenario TREE02, now it will run both scenarios.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      45261371
    • Paul E. McKenney's avatar
      torture: Make kvm.sh "Test Summary" date be end of test · cb212767
      Paul E. McKenney authored
      Currently, the "date" command producing the output on the kvm.sh "Test
      Summary" line is executed at the beginning of the test, which produces a
      date that is less than helpful to someone wanting to know the duration
      of the test.  This commit therefore defers this command's execution to
      the end of the test.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      cb212767
    • Frederic Weisbecker's avatar
      tools/rcutorture: Make identify_qemu_vcpus() independent of local language · 106cc0d9
      Frederic Weisbecker authored
      The rcutorture scripts' identify_qemu_vcpus() function expects `lscpu`
      to have a "CPU: " line, for example:
      
      	CPU(s):		8
      
      But different local language settings can give different results:
      
      	Processeur(s) :		8
      
      As a result, identify_qemu_vcpus() may return an empty string, resulting
      in the following warning (with the same local language settings):
      
      	kvm-test-1-run.sh: ligne 138 : test:  : nombre entier attendu comme expression
      
      This commit therefore changes identify_qemu_vcpus() to use getconf,
      which produces local-language-independend output.
      
      Cc: Josh Triplett <josh@joshtriplett.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Lai Jiangshan <jiangshanlai@gmail.com>
      Cc: rcu@vger.kernel.org
      Signed-off-by: default avatarFrederic Weisbecker <frederic@kernel.org>
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      106cc0d9
    • Paul E. McKenney's avatar
      torture: Add config2csv.sh script to compare torture scenarios · d4a945e2
      Paul E. McKenney authored
      This commit adds a config2csv.sh script that converts the specified
      torture-test scenarios' Kconfig options and kernel-boot parameters to
      .csv format.  This allows easier comparison of scenarios when one fails
      and another does not.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      d4a945e2
    • Paul E. McKenney's avatar
      torture: Prepare for splitting qemu execution from kvm-test-1-run.sh · 315957ca
      Paul E. McKenney authored
      Distributed execution of rcutorture is eased if the qemu execution can
      be split from the building of the kernel, as this allows target systems
      to be used that are not set up to build kernels.  It also avoids issues
      with toolchain version skew across the cluster, aside of course from
      qemu and KVM version skew.
      
      This commit therefore records needed data as comments in the qemu-cmd file
      and moves recording of the starting time to just before qemu is launched.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      315957ca
    • Paul E. McKenney's avatar
      torture: Allow kvm.sh --datestamp to specify subdirectories · bc407358
      Paul E. McKenney authored
      Scripts like kvm-check-branches.sh group runs under a single directory
      in resdir in order to allow easier retrospective analysis.  However, they
      do this by letting kvm.sh create a directory as usual and then moving it
      after the run.  This can be very confusing when looking at the results
      while kvm-check-branches.sh is running.  This commit therefore enables
      --datestamp to hand subdirectories to kvm.sh.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      bc407358
    • Paul E. McKenney's avatar
      torture: Make kvm.sh "--dryrun sched" summarize number of builds · eca0501a
      Paul E. McKenney authored
      Knowing the number of builds that kvm.sh will split a run into allows
      estimation of the duration of a test, give or take build duration.
      This commit therefore adds a line of output to "--dryrun sched" that
      gives the number of builds that will be run.  This excludes "builds"
      for repeated scenarios that reuse an earlier build.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      eca0501a
    • Paul E. McKenney's avatar
      torture: Make kvm.sh "--dryrun sched" summarize number of batches · 1f947be7
      Paul E. McKenney authored
      Knowing the number of batches that kvm.sh will split a run into allows
      estimation of the duration of a test, give or take the number of builds.
      This commit therefore adds a line of output to "--dryrun sched" that
      gives the number of batches that will be run.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      1f947be7
    • Paul E. McKenney's avatar
      torture: Make --kcsan specify lockdep · 0682aa7a
      Paul E. McKenney authored
      The --kcsan argument to kvm.sh adds CONFIG_KCSAN_VERBOSE=y in order to
      get more detail from the KCSAN reports.  However, this Kconfig option
      requires lockdep to be enabled.  This commit therefore causes --kcsan
      to also enable lockdep.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      0682aa7a
  2. 27 Dec, 2020 8 commits
  3. 26 Dec, 2020 5 commits
  4. 25 Dec, 2020 5 commits
    • Linus Torvalds's avatar
      drm/amd/display: avoid uninitialized variable warning · 61d79136
      Linus Torvalds authored
      clang (quite rightly) complains fairly loudly about the newly added
      mpc1_get_mpc_out_mux() function returning an uninitialized value if the
      'opp_id' checks don't pass.
      
      This may not happen in practice, but the code really shouldn't return
      garbage if the sanity checks don't pass.
      
      So just initialize 'val' to zero to avoid the issue.
      
      Fixes: 110b055b ("drm/amd/display: add getter routine to retrieve mpcc mux")
      Cc: Josip Pavic <Josip.Pavic@amd.com>
      Cc: Bindu Ramamurthy <bindu.r@amd.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      61d79136
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-2020-12-24' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux · 5814bc2d
      Linus Torvalds authored
      Pull more perf tools updates from Arnaldo Carvalho de Melo:
      
       - Refactor 'perf stat' per CPU/socket/die/thread aggregation fixing use
         cases in ARM machines.
      
       - Fix memory leak when synthesizing SDT probes in 'perf probe'.
      
       - Update kernel header copies related to KVM, epol_pwait. msr-index and
         powerpc and s390 syscall tables.
      
      * tag 'perf-tools-2020-12-24' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (24 commits)
        perf probe: Fix memory leak when synthesizing SDT probes
        perf stat aggregation: Add separate thread member
        perf stat aggregation: Add separate core member
        perf stat aggregation: Add separate die member
        perf stat aggregation: Add separate socket member
        perf stat aggregation: Add separate node member
        perf stat aggregation: Start using cpu_aggr_id in map
        perf cpumap: Drop in cpu_aggr_map struct
        perf cpumap: Add new map type for aggregation
        perf stat: Replace aggregation ID with a struct
        perf cpumap: Add new struct for cpu aggregation
        perf cpumap: Use existing allocator to avoid using malloc
        perf tests: Improve topology test to check all aggregation types
        perf tools: Update s390's syscall.tbl copy from the kernel sources
        perf tools: Update powerpc's syscall.tbl copy from the kernel sources
        perf s390: Move syscall.tbl check into check-headers.sh
        perf powerpc: Move syscall.tbl check to check-headers.sh
        tools headers UAPI: Synch KVM's svm.h header with the kernel
        tools kvm headers: Update KVM headers from the kernel sources
        tools headers UAPI: Sync KVM's vmx.h header with the kernel sources
        ...
      5814bc2d
    • Linus Torvalds's avatar
      Merge branch 'for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux · 42dc45e8
      Linus Torvalds authored
      Pull coccinelle updates from Julia Lawall.
      
      * 'for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux:
        scripts: coccicheck: Correct usage of make coccicheck
        coccinelle: update expiring email addresses
        coccinnelle: Remove ptr_ret script
        kbuild: do not use scripts/ld-version.sh for checking spatch version
        remove boolinit.cocci
      42dc45e8
    • Michael Ellerman's avatar
      genirq: Fix export of irq_to_desc() for powerpc KVM · 11cc92eb
      Michael Ellerman authored
      Commit 64a1b95b ("genirq: Restrict export of irq_to_desc()") removed
      the export of irq_to_desc() unless powerpc KVM is being built, because
      there is still a use of irq_to_desc() in modular code there.
      
      However it used:
      
        #ifdef CONFIG_KVM_BOOK3S_64_HV
      
      Which doesn't work when that symbol is =m, leading to a build failure:
      
        ERROR: modpost: "irq_to_desc" [arch/powerpc/kvm/kvm-hv.ko] undefined!
      
      Fix it by checking for the definedness of the correct symbol which is
      CONFIG_KVM_BOOK3S_64_HV_MODULE.
      
      Fixes: 64a1b95b ("genirq: Restrict export of irq_to_desc()")
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      11cc92eb
    • Linus Torvalds's avatar
      Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 7bb5226c
      Linus Torvalds authored
      Pull misc vfs updates from Al Viro:
       "Assorted patches from previous cycle(s)..."
      
      * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        fix hostfs_open() use of ->f_path.dentry
        Make sure that make_create_in_sticky() never sees uninitialized value of dir_mode
        fs: Kill DCACHE_DONTCACHE dentry even if DCACHE_REFERENCED is set
        fs: Handle I_DONTCACHE in iput_final() instead of generic_drop_inode()
        fs/namespace.c: WARN if mnt_count has become negative
      7bb5226c
  5. 24 Dec, 2020 3 commits
    • Linus Torvalds's avatar
      Merge tag 'docs-5.11-2' of git://git.lwn.net/linux · 71c5f031
      Linus Torvalds authored
      Pull documentation fixes from Jonathan Corbet:
       "A small set of late-arriving, small documentation fixes"
      
      * tag 'docs-5.11-2' of git://git.lwn.net/linux:
        docs: admin-guide: Fix default value of max_map_count in sysctl/vm.rst
        Documentation/submitting-patches: Document the SoB chain
        Documentation: process: Correct numbering
        docs: submitting-patches: Trivial - fix grammatical error
      71c5f031
    • Linus Torvalds's avatar
      Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · 555a6e8c
      Linus Torvalds authored
      Pull ext4 updates from Ted Ts'o:
       "Various bug fixes and cleanups for ext4; no new features this cycle"
      
      * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (29 commits)
        ext4: remove unnecessary wbc parameter from ext4_bio_write_page
        ext4: avoid s_mb_prefetch to be zero in individual scenarios
        ext4: defer saving error info from atomic context
        ext4: simplify ext4 error translation
        ext4: move functions in super.c
        ext4: make ext4_abort() use __ext4_error()
        ext4: standardize error message in ext4_protect_reserved_inode()
        ext4: remove redundant sb checksum recomputation
        ext4: don't remount read-only with errors=continue on reboot
        ext4: fix deadlock with fs freezing and EA inodes
        jbd2: add a helper to find out number of fast commit blocks
        ext4: make fast_commit.h byte identical with e2fsprogs/fast_commit.h
        ext4: fix fall-through warnings for Clang
        ext4: add docs about fast commit idempotence
        ext4: remove the unused EXT4_CURRENT_REV macro
        ext4: fix an IS_ERR() vs NULL check
        ext4: check for invalid block size early when mounting a file system
        ext4: fix a memory leak of ext4_free_data
        ext4: delete nonsensical (commented-out) code inside ext4_xattr_block_set()
        ext4: update ext4_data_block_valid related comments
        ...
      555a6e8c
    • Linus Torvalds's avatar
      Merge tag 'Smack-for-5.11-io_uring-fix' of git://github.com/cschaufler/smack-next · 2f2fce3d
      Linus Torvalds authored
      Pull smack fix from Casey Schaufler:
       "Provide a fix for the incorrect handling of privilege in the face of
        io_uring's use of kernel threads. That invalidated an long standing
        assumption regarding the privilege of kernel threads.
      
        The fix is simple and safe. It was provided by Jens Axboe and has been
        tested"
      
      * tag 'Smack-for-5.11-io_uring-fix' of git://github.com/cschaufler/smack-next:
        Smack: Handle io_uring kernel thread privileges
      2f2fce3d