1. 20 Feb, 2024 2 commits
  2. 19 Feb, 2024 1 commit
  3. 13 Feb, 2024 29 commits
  4. 22 Jan, 2024 3 commits
    • Marcos Paulo de Souza's avatar
      selftests: livepatch: Test livepatching a heavily called syscall · 6a717704
      Marcos Paulo de Souza authored
      The test proves that a syscall can be livepatched. It is interesting
      because syscalls are called a tricky way. Also the process gets
      livepatched either when sleeping in the userspace or when entering
      or leaving the kernel space.
      
      The livepatch is a bit tricky:
        1. The syscall function name is architecture specific. Also
           ARCH_HAS_SYSCALL_WRAPPER must be taken in account.
      
        2. The syscall must stay working the same way for other processes
           on the system. It is solved by decrementing a counter only
           for PIDs of the test processes. It means that the test processes
           has to call the livepatched syscall at least once.
      
      The test creates one userspace process per online cpu. The processes
      are calling getpid in a busy loop. The intention is to create random
      locations when the livepatch gets enabled. Nothing is guarantted.
      The magic is in the randomness.
      Reviewed-by: default avatarJoe Lawrence <joe.lawrence@redhat.com>
      Reviewed-by: default avatarPetr Mladek <pmladek@suse.com>
      Signed-off-by: default avatarMarcos Paulo de Souza <mpdesouza@suse.com>
      Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
      6a717704
    • Marcos Paulo de Souza's avatar
      livepatch: Move tests from lib/livepatch to selftests/livepatch · c4bbe83d
      Marcos Paulo de Souza authored
      The modules are being moved from lib/livepatch to
      tools/testing/selftests/livepatch/test_modules.
      
      This code moving will allow writing more complex tests, like for example an
      userspace C code that will call a livepatched kernel function.
      
      The modules are now built as out-of-tree
      modules, but being part of the kernel source means they will be maintained.
      
      Another advantage of the code moving is to be able to easily change,
      debug and rebuild the tests by running make on the selftests/livepatch
      directory, which is not currently possible since the modules on
      lib/livepatch are build and installed using the "modules" target.
      
      The current approach also keeps the ability to execute the tests manually
      by executing the scripts inside selftests/livepatch directory, as it's
      currently supported. If the modules are modified, they needed to be
      rebuilt before running the scripts though.
      
      The modules are built before running the selftests when using the
      kselftest invocations:
      
      	make kselftest TARGETS=livepatch
      or
      	make -C tools/testing/selftests/livepatch run_tests
      
      Having the modules being built as out-of-modules requires changing the
      currently used 'modprobe' by 'insmod' and adapt the test scripts that
      check for the kernel message buffer.
      
      Now it is possible to only compile the modules by running:
      
      	make -C tools/testing/selftests/livepatch/
      
      This way the test modules and other test program can be built in order
      to be packaged if so desired.
      
      As there aren't any modules being built on lib/livepatch, remove the
      TEST_LIVEPATCH Kconfig and it's references.
      
      Note: "make gen_tar" packages the pre-built binaries into the tarball.
             It means that it will store the test modules pre-built for
             the kernel running on the build host.
      
             Note that these modules need not binary compatible with
             the kernel built from the same sources. But the same
             is true for other packaged selftest binaries.
      
             The entire kernel sources are needed for rebuilding
             the selftests on another system.
      Reviewed-by: default avatarJoe Lawrence <joe.lawrence@redhat.com>
      Reviewed-by: default avatarPetr Mladek <pmladek@suse.com>
      Signed-off-by: default avatarMarcos Paulo de Souza <mpdesouza@suse.com>
      Acked-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
      c4bbe83d
    • Marcos Paulo de Souza's avatar
      kselftests: lib.mk: Add TEST_GEN_MODS_DIR variable · 6727980b
      Marcos Paulo de Souza authored
      Add TEST_GEN_MODS_DIR variable for kselftests. It can point to
      a directory containing kernel modules that will be used by
      selftest scripts.
      
      The modules are built as external modules for the running kernel.
      As a result they are always binary compatible and the same tests
      can be used for older or newer kernels.
      
      The build requires "kernel-devel" package to be installed.
      For example, in the upstream sources, the rpm devel package
      is produced by "make rpm-pkg"
      
      The modules can be built independently by
      
        make -C tools/testing/selftests/livepatch/
      
      or they will be automatically built before running the tests via
      
        make -C tools/testing/selftests/livepatch/ run_tests
      
      Note that they are _not_ built when running the standalone
      tests by calling, for example, ./test-state.sh.
      
      Along with TEST_GEN_MODS_DIR, it was necessary to create a new install
      rule. INSTALL_MODS_RULE is needed because INSTALL_SINGLE_RULE would
      copy the entire TEST_GEN_MODS_DIR directory to the destination, even
      the files created by Kbuild to compile the modules. The new install
      rule copies only the .ko files, as we would expect the gen_tar to work.
      Reviewed-by: default avatarJoe Lawrence <joe.lawrence@redhat.com>
      Reviewed-by: default avatarPetr Mladek <pmladek@suse.com>
      Signed-off-by: default avatarMarcos Paulo de Souza <mpdesouza@suse.com>
      Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
      6727980b
  5. 21 Jan, 2024 5 commits
    • Linus Torvalds's avatar
      Linux 6.8-rc1 · 6613476e
      Linus Torvalds authored
      6613476e
    • Linus Torvalds's avatar
      Merge tag 'bcachefs-2024-01-21' of https://evilpiepirate.org/git/bcachefs · 35a4474b
      Linus Torvalds authored
      Pull more bcachefs updates from Kent Overstreet:
       "Some fixes, Some refactoring, some minor features:
      
         - Assorted prep work for disk space accounting rewrite
      
         - BTREE_TRIGGER_ATOMIC: after combining our trigger callbacks, this
           makes our trigger context more explicit
      
         - A few fixes to avoid excessive transaction restarts on
           multithreaded workloads: fstests (in addition to ktest tests) are
           now checking slowpath counters, and that's shaking out a few bugs
      
         - Assorted tracepoint improvements
      
         - Starting to break up bcachefs_format.h and move on disk types so
           they're with the code they belong to; this will make room to start
           documenting the on disk format better.
      
         - A few minor fixes"
      
      * tag 'bcachefs-2024-01-21' of https://evilpiepirate.org/git/bcachefs: (46 commits)
        bcachefs: Improve inode_to_text()
        bcachefs: logged_ops_format.h
        bcachefs: reflink_format.h
        bcachefs; extents_format.h
        bcachefs: ec_format.h
        bcachefs: subvolume_format.h
        bcachefs: snapshot_format.h
        bcachefs: alloc_background_format.h
        bcachefs: xattr_format.h
        bcachefs: dirent_format.h
        bcachefs: inode_format.h
        bcachefs; quota_format.h
        bcachefs: sb-counters_format.h
        bcachefs: counters.c -> sb-counters.c
        bcachefs: comment bch_subvolume
        bcachefs: bch_snapshot::btime
        bcachefs: add missing __GFP_NOWARN
        bcachefs: opts->compression can now also be applied in the background
        bcachefs: Prep work for variable size btree node buffers
        bcachefs: grab s_umount only if snapshotting
        ...
      35a4474b
    • Linus Torvalds's avatar
      Merge tag 'timers-core-2024-01-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4fbbed78
      Linus Torvalds authored
      Pull timer updates from Thomas Gleixner:
       "Updates for time and clocksources:
      
         - A fix for the idle and iowait time accounting vs CPU hotplug.
      
           The time is reset on CPU hotplug which makes the accumulated
           systemwide time jump backwards.
      
         - Assorted fixes and improvements for clocksource/event drivers"
      
      * tag 'timers-core-2024-01-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        tick-sched: Fix idle and iowait sleeptime accounting vs CPU hotplug
        clocksource/drivers/ep93xx: Fix error handling during probe
        clocksource/drivers/cadence-ttc: Fix some kernel-doc warnings
        clocksource/drivers/timer-ti-dm: Fix make W=n kerneldoc warnings
        clocksource/timer-riscv: Add riscv_clock_shutdown callback
        dt-bindings: timer: Add StarFive JH8100 clint
        dt-bindings: timer: thead,c900-aclint-mtimer: separate mtime and mtimecmp regs
      4fbbed78
    • Linus Torvalds's avatar
      Merge tag 'powerpc-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 7b297a5c
      Linus Torvalds authored
      Pull powerpc fixes from Aneesh Kumar:
      
       - Increase default stack size to 32KB for Book3S
      
      Thanks to Michael Ellerman.
      
      * tag 'powerpc-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/64s: Increase default stack size to 32KB
      7b297a5c
    • Kent Overstreet's avatar
      bcachefs: Improve inode_to_text() · 249f441f
      Kent Overstreet authored
      Add line breaks - inode_to_text() is now much easier to read.
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      249f441f