My randconfig builds sometimes (around one in every 700 configs) run
into this warning on x86:
Symbol __pfx_snnnng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nnng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nnnng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nnng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nnnnng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nnng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nnnng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nnng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nng1h2i3j4k5l6m7ng1h2i3j4k5l6m7n too long for kallsyms (517 >= 512).
Please increase KSYM_NAME_LEN both in kernel and kallsyms.c
The check that gets triggered was added in commit c104c16073b
("Kunit to check the longest symbol length"), see
https://lore.kernel.org/all/20241117195923.222145-1-sergio.collado@gmail.co…
and the overlong identifier seems to be the result of objtool adding
the six-byte "__pfx_" string to a symbol in elf_create_prefix_symbol()
when CONFIG_FUNCTION_PADDING_CFI is set.
I think the suggestion to "Please increase KSYM_NAME_LEN both in
kernel and kallsyms.c" is misleading here and should probably be
changed. I don't know if this something that objtool should work
around, or something that needs to be adapted in the test.
Arnd
Fix a misspelling of "slow".
Signed-off-by: Geert Uytterhoeven <geert(a)linux-m68k.org>
---
include/kunit/test.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/kunit/test.h b/include/kunit/test.h
index 58dbab60f8530588..9b773406e01f3c43 100644
--- a/include/kunit/test.h
+++ b/include/kunit/test.h
@@ -67,7 +67,7 @@ enum kunit_status {
/*
* Speed Attribute is stored as an enum and separated into categories of
- * speed: very_slowm, slow, and normal. These speeds are relative to
+ * speed: very_slow, slow, and normal. These speeds are relative to
* other KUnit tests.
*
* Note: unset speed attribute acts as default of KUNIT_SPEED_NORMAL.
--
2.43.0
Hi Linus,
Please pull the following kselftest next update for Linux 6.15-rc1.
Fixes bugs and cleans up code in tracing, ftrace, and user_events tests.
Adds missing executables to ftrace gitignore.
diff is attached.
thanks,
-- Shuah
----------------------------------------------------------------
The following changes since commit a64dcfb451e254085a7daee5fe51bf22959d52d3:
Linux 6.14-rc2 (2025-02-09 12:45:03 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux_kselftest-next-6.15-rc1
for you to fetch changes up to 82ef781f24ac26f4aa71f02d7624c439ab8389a7:
selftests/ftrace: add 'poll' binary to gitignore (2025-03-04 08:51:17 -0700)
----------------------------------------------------------------
linux_kselftest-next-6.15-rc1
Fixes bugs and cleans up code in tracing, ftrace, and user_events tests.
Adds missing executables to ftrace gitignore.
----------------------------------------------------------------
Bharadwaj Raju (1):
selftests/ftrace: add 'poll' binary to gitignore
Heiko Carstens (1):
selftests/ftrace: Use readelf to find entry point in uprobe test
Steven Rostedt (3):
selftests/tracing: Test only toplevel README file not the instances
selftests/ftrace: Clean up triggers after setting them
selftests/tracing: Allow some more tests to run in instances
Yiqian Xun (1):
selftests/user_events: Fix failures caused by test code
tools/testing/selftests/ftrace/.gitignore | 1 +
.../selftests/ftrace/test.d/dynevent/add_remove_uprobe.tc | 10 +++++++---
tools/testing/selftests/ftrace/test.d/functions | 8 +++++++-
.../test.d/trigger/inter-event/trigger-action-hist-xfail.tc | 1 +
.../test.d/trigger/inter-event/trigger-onchange-action-hist.tc | 3 +++
.../test.d/trigger/inter-event/trigger-snapshot-action-hist.tc | 3 +++
.../ftrace/test.d/trigger/trigger-hist-expressions.tc | 1 +
tools/testing/selftests/user_events/dyn_test.c | 2 ++
8 files changed, 25 insertions(+), 4 deletions(-)
----------------------------------------------------------------
Hi Linus,
Please pull the following kunit next update for Linux 6.15-rc1.
kunit tool:
- Changes to kunit tool to use qboot on QEMU x86_64, and build GDB scripts.
- Fixes kunit tool bug in parsing test plan.
- Adds test to kunit tool to check parsing late test plan.
kunit:
- Clarifies kunit_skip() argument name.
- Adds Kunit check for the longest symbol length.
- Changes qemu_configs for sparc to use Zilog console.
Conflicts in lib/Makefile
between commit:
b341f6fd45ab ("blackhole_dev: convert self-test to KUnit")
from the net-next tree and commit:
c104c16073b7 ("Kunit to check the longest symbol length")
The commit c104c16073b7 conflicts with the mainline now with
62f3802332ed ("vdso: add generic time data storage") from kspp
is now in the mainline.
Stephen has the fixes for these two conflicts in next.
(Thank you Stephen)
diff is attached.
thanks,
-- Shuah
----------------------------------------------------------------
The following changes since commit a64dcfb451e254085a7daee5fe51bf22959d52d3:
Linux 6.14-rc2 (2025-02-09 12:45:03 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux_kselftest-kunit-6.15-rc1
for you to fetch changes up to 2e0cf2b32f72b20b0db5cc665cd8465d0f257278:
kunit: tool: add test to check parsing late test plan (2025-03-15 18:13:43 -0600)
----------------------------------------------------------------
linux_kselftest-kunit-6.15-rc1
kunit tool:
- Changes to kunit tool to use qboot on QEMU x86_64, and build GDB scripts.
- Fixes kunit tool bug in parsing test plan.
- Adds test to kunit tool to check parsing late test plan.
kunit:
- Clarifies kunit_skip() argument name.
- Adds Kunit check for the longest symbol length.
- Changes qemu_configs for sparc to use Zilog console.
----------------------------------------------------------------
Brendan Jackman (2):
kunit: tool: Use qboot on QEMU x86_64
kunit: tool: Build GDB scripts
Kevin Brodsky (1):
kunit: Clarify kunit_skip() argument name
Rae Moar (2):
kunit: tool: Fix bug in parsing test plan
kunit: tool: add test to check parsing late test plan
Sergio González Collado (1):
Kunit to check the longest symbol length
Thomas Weißschuh (1):
kunit: qemu_configs: sparc: use Zilog console
arch/x86/tools/insn_decoder_test.c | 3 +-
include/kunit/test.h | 20 ++++----
lib/Kconfig.debug | 9 ++++
lib/Makefile | 2 +
lib/longest_symbol_kunit.c | 82 ++++++++++++++++++++++++++++++
tools/testing/kunit/kunit_kernel.py | 4 +-
tools/testing/kunit/kunit_parser.py | 9 ++--
tools/testing/kunit/kunit_tool_test.py | 11 ++++
tools/testing/kunit/qemu_configs/sparc.py | 5 +-
tools/testing/kunit/qemu_configs/x86_64.py | 4 +-
10 files changed, 128 insertions(+), 21 deletions(-)
create mode 100644 lib/longest_symbol_kunit.c
----------------------------------------------------------------
This started with a patch that enabled `clippy::ptr_as_ptr`. Benno
Lossin suggested I also look into `clippy::ptr_cast_constness` and I
discovered `clippy::as_ptr_cast_mut`. This series now enables all 3
lints. It also enables `clippy::as_underscore` which ensures other
pointer casts weren't missed. The first commit reduces the need for
pointer casts and is shared with another series[1].
As a later addition, `clippy::cast_lossless` and `clippy::ref_as_ptr`
are also enabled.
Link: https://lore.kernel.org/all/20250307-no-offset-v1-0-0c728f63b69c@gmail.com/ [1]
Signed-off-by: Tamir Duberstein <tamird(a)gmail.com>
---
Changes in v7:
- Add patch to enable `clippy::ref_as_ptr`.
- Link to v6: https://lore.kernel.org/r/20250324-ptr-as-ptr-v6-0-49d1b7fd4290@gmail.com
Changes in v6:
- Drop strict provenance patch.
- Fix URLs in doc comments.
- Add patch to enable `clippy::cast_lossless`.
- Rebase on rust-next.
- Link to v5: https://lore.kernel.org/r/20250317-ptr-as-ptr-v5-0-5b5f21fa230a@gmail.com
Changes in v5:
- Use `pointer::addr` in OF. (Boqun Feng)
- Add documentation on stubs. (Benno Lossin)
- Mark stubs `#[inline]`.
- Pick up Alice's RB on a shared commit from
https://lore.kernel.org/all/Z9f-3Aj3_FWBZRrm@google.com/.
- Link to v4: https://lore.kernel.org/r/20250315-ptr-as-ptr-v4-0-b2d72c14dc26@gmail.com
Changes in v4:
- Add missing SoB. (Benno Lossin)
- Use `without_provenance_mut` in alloc. (Boqun Feng)
- Limit strict provenance lints to the `kernel` crate to avoid complex
logic in the build system. This can be revisited on MSRV >= 1.84.0.
- Rebase on rust-next.
- Link to v3: https://lore.kernel.org/r/20250314-ptr-as-ptr-v3-0-e7ba61048f4a@gmail.com
Changes in v3:
- Fixed clippy warning in rust/kernel/firmware.rs. (kernel test robot)
Link: https://lore.kernel.org/all/202503120332.YTCpFEvv-lkp@intel.com/
- s/as u64/as bindings::phys_addr_t/g. (Benno Lossin)
- Use strict provenance APIs and enable lints. (Benno Lossin)
- Link to v2: https://lore.kernel.org/r/20250309-ptr-as-ptr-v2-0-25d60ad922b7@gmail.com
Changes in v2:
- Fixed typo in first commit message.
- Added additional patches, converted to series.
- Link to v1: https://lore.kernel.org/r/20250307-ptr-as-ptr-v1-1-582d06514c98@gmail.com
---
Tamir Duberstein (7):
rust: retain pointer mut-ness in `container_of!`
rust: enable `clippy::ptr_as_ptr` lint
rust: enable `clippy::ptr_cast_constness` lint
rust: enable `clippy::as_ptr_cast_mut` lint
rust: enable `clippy::as_underscore` lint
rust: enable `clippy::cast_lossless` lint
rust: enable `clippy::ref_as_ptr` lint
Makefile | 6 ++++++
drivers/gpu/drm/drm_panic_qr.rs | 10 +++++-----
rust/bindings/lib.rs | 3 +++
rust/kernel/alloc/allocator_test.rs | 2 +-
rust/kernel/alloc/kvec.rs | 4 ++--
rust/kernel/block/mq/operations.rs | 2 +-
rust/kernel/block/mq/request.rs | 7 ++++---
rust/kernel/device.rs | 5 +++--
rust/kernel/device_id.rs | 5 +++--
rust/kernel/devres.rs | 19 ++++++++++---------
rust/kernel/dma.rs | 6 +++---
rust/kernel/error.rs | 2 +-
rust/kernel/firmware.rs | 3 ++-
rust/kernel/fs/file.rs | 3 ++-
rust/kernel/io.rs | 18 +++++++++---------
rust/kernel/kunit.rs | 15 +++++++--------
rust/kernel/lib.rs | 5 ++---
rust/kernel/list/impl_list_item_mod.rs | 2 +-
rust/kernel/miscdevice.rs | 2 +-
rust/kernel/net/phy.rs | 4 ++--
rust/kernel/of.rs | 6 +++---
rust/kernel/pci.rs | 13 ++++++++-----
rust/kernel/platform.rs | 6 ++++--
rust/kernel/print.rs | 11 +++++------
rust/kernel/rbtree.rs | 23 ++++++++++-------------
rust/kernel/seq_file.rs | 3 ++-
rust/kernel/str.rs | 14 +++++++-------
rust/kernel/sync/poll.rs | 2 +-
rust/kernel/uaccess.rs | 5 +++--
rust/kernel/workqueue.rs | 12 ++++++------
rust/uapi/lib.rs | 3 +++
31 files changed, 120 insertions(+), 101 deletions(-)
---
base-commit: 28bb48c4cb34f65a9aa602142e76e1426da31293
change-id: 20250307-ptr-as-ptr-21b1867fc4d4
Best regards,
--
Tamir Duberstein <tamird(a)gmail.com>
When compiling the RTC library functions test as a module, the module
has the non-descriptive name "lib_test.ko". Fix this by adding the
subsystem's name as a prefix.
Signed-off-by: Geert Uytterhoeven <geert(a)linux-m68k.org>
---
drivers/rtc/Makefile | 2 +-
drivers/rtc/{lib_test.c => rtc_lib_test.c} | 0
2 files changed, 1 insertion(+), 1 deletion(-)
rename drivers/rtc/{lib_test.c => rtc_lib_test.c} (100%)
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 489b4ab07068c758..c0ccbbfe2739c1aa 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -15,7 +15,7 @@ rtc-core-$(CONFIG_RTC_INTF_DEV) += dev.o
rtc-core-$(CONFIG_RTC_INTF_PROC) += proc.o
rtc-core-$(CONFIG_RTC_INTF_SYSFS) += sysfs.o
-obj-$(CONFIG_RTC_LIB_KUNIT_TEST) += lib_test.o
+obj-$(CONFIG_RTC_LIB_KUNIT_TEST) += rtc_lib_test.o
# Keep the list ordered.
diff --git a/drivers/rtc/lib_test.c b/drivers/rtc/rtc_lib_test.c
similarity index 100%
rename from drivers/rtc/lib_test.c
rename to drivers/rtc/rtc_lib_test.c
--
2.43.0
This series introduces support in the KVM and ARM PMUv3 driver for
partitioning PMU counters into two separate ranges by taking advantage
of the MDCR_EL2.HPMN register field.
The advantage of a partitioned PMU would be to allow KVM guests direct
access to a subset of PMU functionality, greatly reducing the overhead
of performance monitoring in guests.
While this feature could be accepted on its own merits, practically
there is a lot more to be done before it will be fully useful, so I'm
sending as an RFC for now.
v3:
* Include cpucap definition for FEAT_HPMN0 to allow for setting HPMN
to 0
* Include PMU header cleanup provided by Marc [1] with some minor
changes so compilation works
* Pull functions out of pmu-emul.c that aren't specific to the
emulated PMU. This and the previous item aren't strictly
needed but they provide a nicer starting point.
* As suggested by Oliver, start a file for partitioned PMU functions
and move the reserved_host_counters parameter and MDCR handling into
KVM so the driver does not have to know about it and we need fewer
hacks to keep the driver working on 32-bit ARM. This was not a
complete separation because the driver still needs to start and stop
the host counters all at once and needs to toggle MDCR_EL2.HPME to
do that. Introduce kvm_pmu_host_counters_{enable,disable}()
functions to handle this and define them as no ops on 32-bit ARM.
* As suggested by Oliver, don't limit PMCR.N on emulated PMU. This
value will be read correctly when the right traps are disabled to
use the partitioned PMU
v2:
https://lore.kernel.org/kvm/20250208020111.2068239-1-coltonlewis@google.com/
v1:
https://lore.kernel.org/kvm/20250127222031.3078945-1-coltonlewis@google.com/
[1] https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/log/?…
Colton Lewis (7):
arm64: cpufeature: Add cap for HPMN0
arm64: Generate sign macro for sysreg Enums
KVM: arm64: Reorganize PMU functions
KVM: arm64: Introduce module param to partition the PMU
perf: arm_pmuv3: Generalize counter bitmasks
perf: arm_pmuv3: Keep out of guest counter partition
KVM: arm64: selftests: Reword selftests error
Marc Zyngier (1):
KVM: arm64: Cleanup PMU includes
arch/arm/include/asm/arm_pmuv3.h | 2 +
arch/arm64/include/asm/arm_pmuv3.h | 2 +-
arch/arm64/include/asm/kvm_host.h | 199 +++++++-
arch/arm64/include/asm/kvm_pmu.h | 47 ++
arch/arm64/kernel/cpufeature.c | 8 +
arch/arm64/kvm/Makefile | 2 +-
arch/arm64/kvm/arm.c | 1 -
arch/arm64/kvm/debug.c | 10 +-
arch/arm64/kvm/hyp/include/hyp/switch.h | 1 +
arch/arm64/kvm/pmu-emul.c | 464 +-----------------
arch/arm64/kvm/pmu-part.c | 63 +++
arch/arm64/kvm/pmu.c | 454 +++++++++++++++++
arch/arm64/kvm/sys_regs.c | 2 +
arch/arm64/tools/cpucaps | 1 +
arch/arm64/tools/gen-sysreg.awk | 1 +
arch/arm64/tools/sysreg | 6 +-
drivers/perf/arm_pmuv3.c | 73 ++-
include/kvm/arm_pmu.h | 204 --------
include/linux/perf/arm_pmu.h | 16 +-
include/linux/perf/arm_pmuv3.h | 27 +-
.../selftests/kvm/arm64/vpmu_counter_access.c | 2 +-
virt/kvm/kvm_main.c | 1 +
22 files changed, 882 insertions(+), 704 deletions(-)
create mode 100644 arch/arm64/include/asm/kvm_pmu.h
create mode 100644 arch/arm64/kvm/pmu-part.c
delete mode 100644 include/kvm/arm_pmu.h
base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b
--
2.48.1.601.g30ceb7b040-goog