1. 16 Aug, 2023 1 commit
  2. 13 Aug, 2023 2 commits
  3. 07 Aug, 2023 4 commits
    • Rasmus Villemoes's avatar
      scripts/setlocalversion: also consider annotated tags of the form vx.y.z-${file_localversion} · 01e89a4a
      Rasmus Villemoes authored
      Commit 6ab7e1f9 ("setlocalversion: use only the correct release
      tag for git-describe") was absolutely correct to limit which annotated
      tags would be used to compute the -01234-gabcdef suffix. Otherwise, if
      some random annotated tag exists closer to HEAD than the vX.Y.Z one,
      the commit count would be too low.
      
      However, since the version string always includes the
      ${file_localversion} part, now the problem is that the count can be
      too high. For example, building an 6.4.6-rt8 kernel with a few patches
      on top, I currently get
      
      $ make -s kernelrelease
      6.4.6-rt8-00128-gd78b7f406397
      
      But those 128 commits include the 100 commits that are in
      v6.4.6..v6.4.6-rt8, so this is somewhat misleading.
      
      Amend the logic so that, in addition to the linux-next consideration,
      the script also looks for a tag corresponding to the 6.4.6-rt8 part of
      what will become the `uname -r` string. With this patch (so 29 patches
      on top of v6.4.6-rt8), one instead gets
      
      $ make -s kernelrelease
      6.4.6-rt8-00029-gd533209291a2
      
      While there, note that the line
      
        git describe --exact-match --match=$tag $tag 2>/dev/null
      
      obviously asks if $tag is an annotated tag, but it does not actually
      tell if the commit pointed to has any relation to HEAD. So remove both
      uses of --exact-match, and instead just ask if the description
      generated is identical to the tag we provided. Since we then already
      have the result of
      
        git describe --match=$tag
      
      we also end up reducing the number of times we invoke "git describe".
      Signed-off-by: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      01e89a4a
    • Rasmus Villemoes's avatar
      scripts/setlocalversion: clean up stale comment · 3354c64d
      Rasmus Villemoes authored
      Nobody has complained since 2a73cce2 ("scripts/setlocalversion:
      remove mercurial, svn and git-svn supports"), so let's also clean up
      the header comment accordingly.
      Signed-off-by: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      3354c64d
    • Masahiro Yamada's avatar
      kbuild: deb-pkg: split debian/rules · d9287ea8
      Masahiro Yamada authored
      debian/rules is generated by shell, but the escape sequence (\$) is
      unreadable.
      
      debian/rules embeds only two variables (ARCH and KERNELRELEASE).
      
      Split them out to debian/rules.vars, and check-in the rest of Makefile
      code to scripts/package/debian/rules.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Tested-by: default avatarNathan Chancellor <nathan@kernel.org>
      Reviewed-by: default avatarNicolas Schier <nicolas@fjasle.eu>
      d9287ea8
    • Masahiro Yamada's avatar
      kbuild: deb-pkg: use Debian compliant shebang for debian/rules · 4b970e43
      Masahiro Yamada authored
      Debian Policy "4.9. Main building script: debian/rules" requires
      "debian/rules must start with the line #!/usr/bin/make -f". [1]
      
      Currently, Kbuild does not follow this policy.
      
      When Kbuild generates debian/rules, "#!$(command -v $MAKE) -f" is
      expanded by shell. The resuling string may not be "#!/usr/bin/make -f".
      
      There was a reason to opt out the Debian policy.
      
      If you run '/path/to/my/custom/make deb-pkg', debian/rules must also be
      invoked by the same Make program. If #!/usr/bin/make were hard-coded in
      debian/rules, the sub-make would be executed by a possibly different
      Make version.
      
      This is problematic due to the MAKEFLAGS incompatibility, especially the
      job server flag. Old Make versions used --jobserver-fds to propagate job
      server file descriptors, but Make >= 4.2 uses --jobserver-auth. The flag
      disagreement between the parent/child Makes would result in a process
      fork explosion.
      
      However, having a non-standard path in the shebang causes another issue;
      the generated source package is not portable as such a path does not
      exist in other build environments.
      
      This commit solves those conflicting demands.
      
      Hard-code '#!/usr/bin/make -f' in debian/rules to create a portable and
      Debian-compliant source package.
      
      Pass '--rules-file=$(MAKE) -f debian/rules' when dpkg-buildpackage is
      invoked from Makefile so that debian/rules is executed by the same Make
      program as used to start Kbuild.
      
      [1] https://www.debian.org/doc/debian-policy/ch-source.html#main-building-script-debian-rulesSigned-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Tested-by: default avatarNathan Chancellor <nathan@kernel.org>
      Reviewed-by: default avatarNicolas Schier <nicolas@fjasle.eu>
      4b970e43
  4. 31 Jul, 2023 4 commits
  5. 24 Jul, 2023 24 commits
  6. 23 Jul, 2023 5 commits
    • Linus Torvalds's avatar
      Linux 6.5-rc3 · 6eaae198
      Linus Torvalds authored
      6eaae198
    • Linus Torvalds's avatar
      Merge tag 'trace-v6.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace · 3b4e48b8
      Linus Torvalds authored
      Pull tracing fixes from Steven Rostedt:
      
       - Swapping the ring buffer for snapshotting (for things like irqsoff)
         can crash if the ring buffer is being resized. Disable swapping when
         this happens. The missed swap will be reported to the tracer
      
       - Report error if the histogram fails to be created due to an error in
         adding a histogram variable, in event_hist_trigger_parse()
      
       - Remove unused declaration of tracing_map_set_field_descr()
      
      * tag 'trace-v6.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        tracing/histograms: Return an error if we fail to add histogram to hist_vars list
        ring-buffer: Do not swap cpu_buffer during resize process
        tracing: Remove unused extern declaration tracing_map_set_field_descr()
      3b4e48b8
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v6.5' of... · 12a5336c
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - Fix stale help text in gconfig
      
       - Support *.S files in compile_commands.json
      
       - Flatten KBUILD_CFLAGS
      
       - Fix external module builds with Rust so that temporary files are
         created in the modules directories instead of the kernel tree
      
      * tag 'kbuild-fixes-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        kbuild: rust: avoid creating temporary files
        kbuild: flatten KBUILD_CFLAGS
        gen_compile_commands: add assembly files to compilation database
        kconfig: gconfig: correct program name in help text
        kconfig: gconfig: drop the Show Debug Info help text
      12a5336c
    • Miguel Ojeda's avatar
      kbuild: rust: avoid creating temporary files · df01b7cf
      Miguel Ojeda authored
      `rustc` outputs by default the temporary files (i.e. the ones saved
      by `-Csave-temps`, such as `*.rcgu*` files) in the current working
      directory when `-o` and `--out-dir` are not given (even if
      `--emit=x=path` is given, i.e. it does not use those for temporaries).
      
      Since out-of-tree modules are compiled from the `linux` tree,
      `rustc` then tries to create them there, which may not be accessible.
      
      Thus pass `--out-dir` explicitly, even if it is just for the temporary
      files.
      
      Similarly, do so for Rust host programs too.
      Reported-by: default avatarRaphael Nestler <raphael.nestler@gmail.com>
      Closes: https://github.com/Rust-for-Linux/linux/issues/1015Reported-by: default avatarAndrea Righi <andrea.righi@canonical.com>
      Tested-by: Raphael Nestler <raphael.nestler@gmail.com> # non-hostprogs
      Tested-by: Andrea Righi <andrea.righi@canonical.com> # non-hostprogs
      Fixes: 295d8398 ("kbuild: specify output names separately for each emission type from rustc")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
      Tested-by: default avatarMartin Rodriguez Reboredo <yakoyoku@gmail.com>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      df01b7cf
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 269f4a4b
      Linus Torvalds authored
      Pull kvm fixes from Paolo Bonzini:
       "ARM:
      
         - Avoid pKVM finalization if KVM initialization fails
      
         - Add missing BTI instructions in the hypervisor, fixing an early
           boot failure on BTI systems
      
         - Handle MMU notifiers correctly for non hugepage-aligned memslots
      
         - Work around a bug in the architecture where hypervisor timer
           controls have UNKNOWN behavior under nested virt
      
         - Disable preemption in kvm_arch_hardware_enable(), fixing a kernel
           BUG in cpu hotplug resulting from per-CPU accessor sanity checking
      
         - Make WFI emulation on GICv4 systems robust w.r.t. preemption,
           consistently requesting a doorbell interrupt on vcpu_put()
      
         - Uphold RES0 sysreg behavior when emulating older PMU versions
      
         - Avoid macro expansion when initializing PMU register names,
           ensuring the tracepoints pretty-print the sysreg
      
        s390:
      
         - Two fixes for asynchronous destroy
      
        x86 fixes will come early next week"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: s390: pv: fix index value of replaced ASCE
        KVM: s390: pv: simplify shutdown and fix race
        KVM: arm64: Fix the name of sys_reg_desc related to PMU
        KVM: arm64: Correctly handle RES0 bits PMEVTYPER<n>_EL0.evtCount
        KVM: arm64: vgic-v4: Make the doorbell request robust w.r.t preemption
        KVM: arm64: Add missing BTI instructions
        KVM: arm64: Correctly handle page aging notifiers for unaligned memslot
        KVM: arm64: Disable preemption in kvm_arch_hardware_enable()
        KVM: arm64: Handle kvm_arm_init failure correctly in finalize_pkvm
        KVM: arm64: timers: Use CNTHCTL_EL2 when setting non-CNTKCTL_EL1 bits
      269f4a4b