- Jul 28, 2024
-
-
Linus Torvalds authored
This just standardizes the use of MIN() and MAX() macros, with the very traditional semantics. The goal is to use these for C constant expressions and for top-level / static initializers, and so be able to simplify the min()/max() macros. These macro names were used by various kernel code - they are very traditional, after all - and all such users have been fixed up, with a few different approaches: - trivial duplicated macro definitions have been removed Note that 'trivial' here means that it's obviously kernel code that already included all the major kernel headers, and thus gets the new generic MIN/MAX macros automatically. - non-trivial duplicated macro definitions are guarded with #ifndef This is the "yes, they define their own versions, but no, the include situation is not entirely obvious, and maybe they don't get the generic version automatically" case. - strange use case #1 A couple of drivers decided...
-
- Jul 26, 2024
-
-
Dev Jain authored
Post my improvement of the test in e4a4ba41 ("selftests/mm: va_high_addr_switch: dynamically initialize testcases to enable LPA2 testing"): The test begins to fail on 4k and 16k pages, on non-LPA2 systems. To reduce noise in the CI systems, let us skip the test when higher address space is not implemented. Link: https://lkml.kernel.org/r/20240718052504.356517-1-dev.jain@arm.com Fixes: e4a4ba41 ("selftests/mm: va_high_addr_switch: dynamically initialize testcases to enable LPA2 testing") Signed-off-by:
Dev Jain <dev.jain@arm.com> Reviewed-by:
Ryan Roberts <ryan.roberts@arm.com> Cc: Anshuman Khandual <anshuman.khandual@arm.com> Cc: Mark Brown <broonie@kernel.org> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org>
-
Len Brown authored
Release 2024.07.26: Enable turbostat extensions to add both perf and PMT (Intel Platform Monitoring Technology) counters from the cmdline. Demonstrate PMT access with built-in support for Meteor Lake's Die%c6 counter. This commit: Clean up white-space nits introduced since version 2024.05.10 Signed-off-by:
Len Brown <len.brown@intel.com>
-
Patryk Wlazlyn authored
Some counters, like cpu/cache-misses/, expose and require umask=%x parameter alongside event=%x in the sysfs perf counter's event file. This change make sure we parse and use it when opening user added counters. Signed-off-by:
Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Patryk Wlazlyn authored
Add a general description of the user interface for adding PMT counters with the new --add pmt,... option. Provide a complete example for requesting two counters. Signed-off-by:
Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Patryk Wlazlyn authored
Provide a definition for metadata that allows reading DC6 residency counter via PMT and exposes it as a builtin counter. Note that this residency counter is updated and read via entirely different mechanisms vs the MSR-based residency counters. On MTL processors, there are times when Die%c6 will report above 100%. This is still useful, but don't expect 3 digits of precision... Signed-off-by:
Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Patryk Wlazlyn authored
Allows users to read Intel PMT (Platform Monitoring Technology) counters, providing interface similar to one used to add MSR and perf counters. Because PMT is exposed as a raw MMIO range, without metadata, user has to supply the necessary information to find and correctly display the requested counter. Signed-off-by:
Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Leo Yan authored
Records the commands for cross compilation with two methods. The first method relies on Multiarch. The second approach is to explicitly specify the PKG_CONFIG variables, which is widely used in build system (like Buildroot, Yocto, etc). Co-developed-by:
James Clark <james.clark@arm.com> Signed-off-by:
James Clark <james.clark@arm.com> Signed-off-by:
Leo Yan <leo.yan@arm.com> Tested-by:
Ian Rogers <irogers@google.com> Cc: amadio@gentoo.org Cc: Thomas Richter <tmricht@linux.ibm.com> Link: https://lore.kernel.org/r/20240717082211.524826-7-leo.yan@arm.com Signed-off-by:
Namhyung Kim <namhyung@kernel.org>
-
Leo Yan authored
When build static perf, Makefile reports the error: Makefile.config:480: No libdw DWARF unwind found, Please install elfutils-devel/libdw-dev >= 0.158 and/or set LIBDW_DIR The libdw has been installed on the system, but the build system fails to build the feature detecting binary 'test-libdw-dwarf-unwind'. The failure is caused by missing to link the lib 'zstd'. Link lib 'zstd' for the static build, in the end, the dwarf feature can be enabled in the static perf. Signed-off-by:
Leo Yan <leo.yan@arm.com> Tested-by:
Ian Rogers <irogers@google.com> Cc: amadio@gentoo.org Cc: James Clark <james.clark@linaro.org> Cc: Thomas Richter <tmricht@linux.ibm.com> Link: https://lore.kernel.org/r/20240717082211.524826-6-leo.yan@arm.com Signed-off-by:
Namhyung Kim <namhyung@kernel.org>
-
Leo Yan authored
The libunwind feature test failed with the static linkage. This is due to the 'lzma' lib is missed, so link it to dismiss building failure. Signed-off-by:
Leo Yan <leo.yan@arm.com> Tested-by:
Ian Rogers <irogers@google.com> Cc: amadio@gentoo.org Cc: James Clark <james.clark@linaro.org> Cc: Thomas Richter <tmricht@linux.ibm.com> Link: https://lore.kernel.org/r/20240717082211.524826-5-leo.yan@arm.com Signed-off-by:
Namhyung Kim <namhyung@kernel.org>
-
Leo Yan authored
Since libdw version 0.177, elfutils has merged libebl.a into libdw (see the commit "libebl: Don't install libebl.a, libebl.h and remove backends from spec." in the elfutils repository). As a result, libebl.a does not exist on Debian Bullseye and newer releases, causing static perf builds to fail on these distributions. This commit checks the libdw version and only links libebl.a if it detects that the libdw version is older than 0.177. Signed-off-by:
Leo Yan <leo.yan@arm.com> Tested-by:
Ian Rogers <irogers@google.com> Cc: amadio@gentoo.org Cc: James Clark <james.clark@linaro.org> Cc: Thomas Richter <tmricht@linux.ibm.com> Link: https://lore.kernel.org/r/20240717082211.524826-4-leo.yan@arm.com Signed-off-by:
Namhyung Kim <namhyung@kernel.org>
-
Leo Yan authored
Python configuration has dedicated folders for different architectures. For example, Python 3.11 has two folders as shown below, one for Arm64 and another for x86_64: /usr/lib/python3.11/config-3.11-aarch64-linux-gnu/ /usr/lib/python3.11/config-3.11-x86_64-linux-gnu/ This commit updates the Python configuration path based on the compiler's machine type, guiding the compiler to find the correct path for Python libraries. It also renames the generated .so file name to match the machine name. Signed-off-by:
Leo Yan <leo.yan@arm.com> Tested-by:
Ian Rogers <irogers@google.com> Cc: amadio@gentoo.org Cc: James Clark <james.clark@linaro.org> Cc: Thomas Richter <tmricht@linux.ibm.com> Link: https://lore.kernel.org/r/20240717082211.524826-3-leo.yan@arm.com Signed-off-by:
Namhyung Kim <namhyung@kernel.org>
-
Leo Yan authored
On recent Linux distros like Ubuntu Noble and Debian Bookworm, the 'pkg-config-aarch64-linux-gnu' package is missing. As a result, the aarch64-linux-gnu-pkg-config command is not available, which causes build failures. When a build passes the environment variables PKG_CONFIG_LIBDIR or PKG_CONFIG_PATH, like a user uses make command or a build system (like Yocto, Buildroot, etc) prepares the variables and passes to the Perf's Makefile, the commit keeps these variables for package configuration. Otherwise, this commit sets the PKG_CONFIG_LIBDIR variable to use the Multiarch libs for the cross compilation. Signed-off-by:
Leo Yan <leo.yan@arm.com> Tested-by:
Ian Rogers <irogers@google.com> Cc: amadio@gentoo.org Cc: Thomas Richter <tmricht@linux.ibm.com> Link: https://lore.kernel.org/r/20240717082211.524826-2-leo.yan@arm.com Signed-off-by:
Namhyung Kim <namhyung@kernel.org>
-
Casey Chen authored
With 0dd5041c ("perf addr_location: Add init/exit/copy functions"), when cpumode is 3 (macro PERF_RECORD_MISC_HYPERVISOR), thread__find_map() could return with al->maps being NULL. The path below could add a callchain_cursor_node with NULL ms.maps. add_callchain_ip() thread__find_symbol(.., &al) thread__find_map(.., &al) // al->maps becomes NULL ms.maps = maps__get(al.maps) callchain_cursor_append(..., &ms, ...) node->ms.maps = maps__get(ms->maps) Then the path below would dereference NULL maps and get segfault. fill_callchain_info() maps__machine(node->ms.maps); Fix it by checking if maps is NULL in fill_callchain_info(). Fixes: 0dd5041c ("perf addr_location: Add init/exit/copy functions") Signed-off-by:
Casey Chen <cachen@purestorage.com> Reviewed-by:
Ian Rogers <irogers@google.com> Reviewed-by:
Arnaldo Carvalho de Melo <acme@redhat.com> Acked-by:
Namhyung Kim <namhyung@kernel.org> Cc: yzhong@purestorage.com Link: https://lore.kernel.org/r/20240722211548.61455-1-cachen@purestorage.com Signed-off-by:
Namhyung Kim <namhyung@kernel.org>
-
Patryk Wlazlyn authored
Test adds several perf counters from msr, cstate_core and cstate_pkg groups and checks if the columns for those counters show up. The test skips the counters that are not present. It is not an error, but the test may not be as exhaustive. Signed-off-by:
Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Patryk Wlazlyn authored
The test requests BICs that are dependent on SMI, APERF and MPERF counters and checks if the columns show up in the output and the turbostat doesn't crash. Read the counters in both --no-msr and --no-perf mode. The test skips counters that are not present or user does not have permissions to read. It is not an error, but the test may not be as exhaustive. Signed-off-by:
Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Patryk Wlazlyn authored
Printing information about the source and value during initialization and reading of the counter for each cpu, while useful when debugging, results in too verbose output. Signed-off-by:
Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Patryk Wlazlyn authored
This leaves the stdout cleaner, having only counter data. It makes it easier for programs to parse the output of turbostat, for example selftests. Signed-off-by:
Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
- Jul 25, 2024
-
-
Stanislav Fomichev authored
This flag is now required to use tx_metadata_len. Fixes: 40808a23 ("selftests/bpf: Add TX side to xdp_metadata") Reported-by:
Julian Schindel <mail@arctic-alpaca.de> Signed-off-by:
Stanislav Fomichev <sdf@fomichev.me> Signed-off-by:
Daniel Borkmann <daniel@iogearbox.net> Reviewed-by:
Maciej Fijalkowski <maciej.fijalkowski@intel.com> Link: https://lore.kernel.org/bpf/20240713015253.121248-3-sdf@fomichev.me
-
- Jul 24, 2024
-
-
Benjamin Tissoires authored
Turns out that we would en up in a bad state if we attempt to attach twice the same HID-BPF struct_ops, so have a test for it. Link: https://patch.msgid.link/20240723-fix-6-11-bpf-v1-4-b9d770346784@kernel.org Signed-off-by:
Benjamin Tissoires <bentiss@kernel.org>
-
Benjamin Tissoires authored
Since commit 08ac454e ("libbpf: Auto-attach struct_ops BPF maps in BPF skeleton"), libbpf automatically calls bpf_map__attach_struct_ops() on every struct_ops it sees in the bpf object. The problem is that our test bpf object has many of them but only one should be manually loaded at a time, or we end up locking the syscall. Link: https://patch.msgid.link/20240723-fix-6-11-bpf-v1-2-b9d770346784@kernel.org Signed-off-by:
Benjamin Tissoires <bentiss@kernel.org>
-
Benjamin Tissoires authored
Since commit f56f4d54 ("bpf: helpers: fix bpf_wq_set_callback_impl signature"), the API for bpf_wq changed a bit. We need to update the selftests/hid code to reflect that or the bpf program will not load. Link: https://patch.msgid.link/20240723-fix-6-11-bpf-v1-1-b9d770346784@kernel.org Signed-off-by:
Benjamin Tissoires <bentiss@kernel.org>
-
Mickaël Salaün authored
Check that keyctl(KEYCTL_SESSION_TO_PARENT) preserves the parent's restrictions. Fixes: e1199815 ("selftests/landlock: Add user space tests") Co-developed-by:
Jann Horn <jannh@google.com> Signed-off-by:
Jann Horn <jannh@google.com> Link: https://lore.kernel.org/r/20240724.Ood5aige9she@digikod.net Signed-off-by:
Mickaël Salaün <mic@digikod.net>
-
Hangbin Liu authored
If the testing kernel doesn't support setting fdb_max_learned or show fdb_n_learned, just skip it. Or we will get errors like ./bridge_fdb_learning_limit.sh: line 218: [: null: integer expression expected ./bridge_fdb_learning_limit.sh: line 225: [: null: integer expression expected Fixes: 6f840903 ("selftests: forwarding: bridge_fdb_learning_limit: Add a new selftest") Signed-off-by:
Hangbin Liu <liuhangbin@gmail.com> Acked-by:
Nikolay Aleksandrov <razor@blackwall.org> Reviewed-by:
Johannes Nixdorf <jnixdorf-oss@avm.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Christian Brauner authored
Add selftests to verify that deriving namespace file descriptors from pidfd file descriptors works correctly. Link: https://lore.kernel.org/r/20240722-work-pidfs-69dbea91edab@brauner Signed-off-by:
Christian Brauner <brauner@kernel.org>
-
- Jul 23, 2024
-
-
Remington Brasga authored
The string passed to ksft_test_result_skip is missing the `type_name` Signed-off-by:
Remington Brasga <rbrasga@uci.edu> Reviewed-by:
Dev Jain <dev.jain@arm.com> Reviewed-by:
Anshuman Khandual <anshuman.khandual@arm.com> Link: https://lore.kernel.org/r/20240712231730.2794-1-rbrasga@uci.edu Signed-off-by:
Will Deacon <will@kernel.org>
-
- Jul 22, 2024
-
-
Liwei Song authored
Add a type cast for set8->pairs to fix below compile warning: main.c: In function 'sets_patch': main.c:699:50: warning: comparison of distinct pointer types lacks a cast 699 | BUILD_BUG_ON(set8->pairs != &set8->pairs[0].id); | ^~ Fixes: 9707ac4f ("tools/resolve_btfids: Refactor set sorting with types from btf_ids.h") Signed-off-by:
Liwei Song <liwei.song.lsong@gmail.com> Signed-off-by:
Daniel Borkmann <daniel@iogearbox.net> Acked-by:
Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/bpf/20240722083305.4009723-1-liwei.song.lsong@gmail.com
-
- Jul 20, 2024
-
-
Jann Horn authored
Commit cf8e8658 ("arch: Remove Itanium (IA-64) architecture") removed the last use of the absolute kallsyms. Signed-off-by:
Jann Horn <jannh@google.com> Acked-by:
Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/all/20240221202655.2423854-1-jannh@google.com/ [masahiroy@kernel.org: rebase the code and reword the commit description] Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org>
-
- Jul 19, 2024
-
-
Jason A. Donenfeld authored
This adds two tests for vgetrandom. The first one, vdso_test_chacha, simply checks that the assembly implementation of chacha20 matches that of libsodium, a basic sanity check that should catch most errors. The second, vdso_test_getrandom, is a full "libc-like" implementation of the userspace side of vgetrandom() support. It's meant to be used also as example code for libcs that might be integrating this. Cc: linux-kselftest@vger.kernel.org Signed-off-by:
Jason A. Donenfeld <Jason@zx2c4.com>
-
Jason A. Donenfeld authored
The vDSO getrandom() implementation works with a buffer allocated with a new system call that has certain requirements: - It shouldn't be written to core dumps. * Easy: VM_DONTDUMP. - It should be zeroed on fork. * Easy: VM_WIPEONFORK. - It shouldn't be written to swap. * Uh-oh: mlock is rlimited. * Uh-oh: mlock isn't inherited by forks. - It shouldn't reserve actual memory, but it also shouldn't crash when page faulting in memory if none is available * Uh-oh: VM_NORESERVE means segfaults. It turns out that the vDSO getrandom() function has three really nice characteristics that we can exploit to solve this problem: 1) Due to being wiped during fork(), the vDSO code is already robust to having the contents of the pages it reads zeroed out midway through the function's execution. 2) In the absolute worst case of whatever contingency we're coding for, we have the option to fallback to the getrandom() syscall, and everything is fine. 3) The buffers the function uses are only ever useful for a maximum of 60 seconds -- a sort of cache, rather than a long term allocation. These characteristics mean that we can introduce VM_DROPPABLE, which has the following semantics: a) It never is written out to swap. b) Under memory pressure, mm can just drop the pages (so that they're zero when read back again). c) It is inherited by fork. d) It doesn't count against the mlock budget, since nothing is locked. e) If there's not enough memory to service a page fault, it's not fatal, and no signal is sent. This way, allocations used by vDSO getrandom() can use: VM_DROPPABLE | VM_DONTDUMP | VM_WIPEONFORK | VM_NORESERVE And there will be no problem with OOMing, crashing on overcommitment, using memory when not in use, not wiping on fork(), coredumps, or writing out to swap. In order to let vDSO getrandom() use this, expose these via mmap(2) as MAP_DROPPABLE. Note that this involves removing the MADV_FREE special case from sort_folio(), which according to Yu Zhao is unnecessary and will simply result in an extra call to shrink_folio_list() in the worst case. The chunk removed reenables the swapbacked flag, which we don't want for VM_DROPPABLE, and we can't conditionalize it here because there isn't a vma reference available. Finally, the provided self test ensures that this is working as desired. Cc: linux-mm@kvack.org Acked-by:
David Hildenbrand <david@redhat.com> Signed-off-by:
Jason A. Donenfeld <Jason@zx2c4.com>
-
- Jul 18, 2024
-
-
Mark Brown authored
Drivers report a string with a name for each PCM, log it during startup of pcm-test as a diagnostic aid. Signed-off-by:
Mark Brown <broonie@kernel.org> Link: https://patch.msgid.link/20240716-alsa-kselftest-board-name-v2-2-60f1acdde096@kernel.org Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Mark Brown authored
Currently for the PCM and mixer tests we report test names which identify the card being tested with the card number. This ensures we have unique names but since card numbers are dynamically assigned at runtime the names we end up with will often not be stable on systems with multiple cards especially where those cards are provided by separate modules loeaded at runtime. This makes it difficult for automated systems and UIs to relate test results between runs on affected platforms. Address this by replacing our use of card numbers with card names which are more likely to be stable across runs. We use the card ID since it is guaranteed to be unique by default, unlike the long name. There is still some vulnerability to ordering issues if multiple cards with the same base ID are present in the system but have separate dependencies but not all drivers put distinguishing information in their long names. Signed-off-by:
Mark Brown <broonie@kernel.org> Link: https://patch.msgid.link/20240716-alsa-kselftest-board-name-v2-1-60f1acdde096@kernel.org Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Ido Schimmel authored
The TOS value that is returned to user space in the route get reply is the one with which the lookup was performed ('fl4->flowi4_tos'). This is fine when the matched route is configured with a TOS as it would not match if its TOS value did not match the one with which the lookup was performed. However, matching on TOS is only performed when the route's TOS is not zero. It is therefore possible to have the kernel incorrectly return a non-zero TOS: # ip link add name dummy1 up type dummy # ip address add 192.0.2.1/24 dev dummy1 # ip route get fibmatch 192.0.2.2 tos 0xfc 192.0.2.0/24 tos 0x1c dev dummy1 proto kernel scope link src 192.0.2.1 Fix by instead returning the DSCP field from the FIB result structure which was populated during the route lookup. Output after the patch: # ip link add name dummy1 up type dummy # ip address add 192.0.2.1/24 dev dummy1 # ip route get fibmatch 192.0.2.2 tos 0xfc 192.0.2.0/24 dev dummy1 proto kernel scope link src 192.0.2.1 Extend the existing selftests to not only verify that the correct route is returned, but that it is also returned with correct "tos" value (or without it). Fixes: b6179813 ("net: ipv4: RTM_GETROUTE: return matched fib result when requested") Signed-off-by:
Ido Schimmel <idosch@nvidia.com> Reviewed-by:
David Ahern <dsahern@kernel.org> Reviewed-by:
Guillaume Nault <gnault@redhat.com> Signed-off-by:
Paolo Abeni <pabeni@redhat.com>
-
- Jul 17, 2024
-
-
Michal Luczaj authored
Verify that out-of-band packets are silently dropped before they reach the redirection logic. The idea is to test with a 2 byte long send(). Should a MSG_OOB flag be in use, only the last byte will be treated as out-of-band. Test fails if verd_mapfd indicates a wrong number of packets processed (e.g. if OOB wasn't dropped at the source) or if it was possible to recv() MSG_OOB from the mapped socket, or if any stale OOB data have been left reachable from the unmapped socket. Signed-off-by:
Michal Luczaj <mhal@rbox.co> Signed-off-by:
Daniel Borkmann <daniel@iogearbox.net> Tested-by:
Jakub Sitnicki <jakub@cloudflare.com> Reviewed-by:
Jakub Sitnicki <jakub@cloudflare.com> Link: https://lore.kernel.org/bpf/20240713200218.2140950-5-mhal@rbox.co
-
Michal Luczaj authored
Extend pairs_redir_to_connected() and unix_inet_redir_to_connected() with a send_flags parameter. Replace write() with send() allowing packets to be sent as MSG_OOB. Signed-off-by:
Michal Luczaj <mhal@rbox.co> Signed-off-by:
Daniel Borkmann <daniel@iogearbox.net> Tested-by:
Jakub Sitnicki <jakub@cloudflare.com> Reviewed-by:
Jakub Sitnicki <jakub@cloudflare.com> Link: https://lore.kernel.org/bpf/20240713200218.2140950-4-mhal@rbox.co
-
Michal Luczaj authored
Function ignores the AF_UNIX socket type argument, SOCK_DGRAM is hardcoded. Fix to respect the argument provided. Fixes: 75e0e27d ("selftest/bpf: Change udp to inet in some function names") Suggested-by:
Jakub Sitnicki <jakub@cloudflare.com> Signed-off-by:
Michal Luczaj <mhal@rbox.co> Signed-off-by:
Daniel Borkmann <daniel@iogearbox.net> Tested-by:
Jakub Sitnicki <jakub@cloudflare.com> Reviewed-by:
Jakub Sitnicki <jakub@cloudflare.com> Link: https://lore.kernel.org/bpf/20240713200218.2140950-3-mhal@rbox.co
-
Donald Hunter authored
The usage help for "bpftool prog help" contains a ° instead of the _ symbol for cgroup/sendmsg_unix. Fix the typo. Fixes: 8b3cba98 ("bpftool: Add support for cgroup unix socket address hooks") Signed-off-by:
Donald Hunter <donald.hunter@gmail.com> Signed-off-by:
Daniel Borkmann <daniel@iogearbox.net> Acked-by:
Quentin Monnet <qmo@kernel.org> Link: https://lore.kernel.org/bpf/20240717134508.77488-1-donald.hunter@gmail.com
-
Andrii Nakryiko authored
For all these years libbpf's BTF dumper has been emitting not strictly valid syntax for function prototypes that have no input arguments. Instead of `int (*blah)()` we should emit `int (*blah)(void)`. This is not normally a problem, but it manifests when we get kfuncs in vmlinux.h that have no input arguments. Due to compiler internal specifics, we get no BTF information for such kfuncs, if they are not declared with proper `(void)`. The fix is trivial. We also need to adjust a few ancient tests that happily assumed `()` is correct. Fixes: 351131b5 ("libbpf: add btf_dump API for BTF-to-C conversion") Reported-by:
Tejun Heo <tj@kernel.org> Signed-off-by:
Andrii Nakryiko <andrii@kernel.org> Signed-off-by:
Daniel Borkmann <daniel@iogearbox.net> Acked-by:
Stanislav Fomichev <sdf@fomichev.me> Link: https://lore.kernel.org/bpf/20240712224442.282823-1-andrii@kernel.org
-
James Clark authored
Now that symsrc_filename is always accessed through an accessor, we also need a free() function for it to avoid the following compilation error: util/unwind-libunwind-local.c:416:12: error: lvalue required as unary ‘&’ operand 416 | zfree(&dso__symsrc_filename(dso)); Fixes: 1553419c ("perf dso: Fix address sanitizer build") Signed-off-by:
James Clark <james.clark@linaro.org> Reviewed-by:
Ian Rogers <irogers@google.com> Tested-by:
Leo Yan <leo.yan@arm.com> Tested-by:
Florian Fainelli <florian.fainelli@broadcom.com> Cc: Yunseong Kim <yskelg@gmail.com> Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Link: https://lore.kernel.org/r/20240715094715.3914813-1-james.clark@linaro.org Signed-off-by:
Namhyung Kim <namhyung@kernel.org>
-
Guilherme Amadio authored
This allows to build against libtraceevent and libtracefs installed in non-standard locations. Signed-off-by:
Guilherme Amadio <amadio@gentoo.org> Tested-by:
Thorsten Leemhuis <linux@leemhuis.info> Tested-by:
Leo Yan <leo.yan@arm.com> Acked-by:
Steven Rostedt (Google) <rostedt@goodmis.org> Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20240717174739.186988-6-amadio@gentoo.org Signed-off-by:
Namhyung Kim <namhyung@kernel.org>
-