- Oct 03, 2024
-
-
Eder Zulian authored
The help text in osnoise top and timerlat top had some minor errors and omissions. The -d option was missing the 's' (second) abbreviation and the error message for '-d' used '-D'. Cc: stable@vger.kernel.org Fixes: 1eceb2fc ("rtla/osnoise: Add osnoise top mode") Fixes: a828cd18 ("rtla: Add timerlat tool and timelart top mode") Link: https://lore.kernel.org/20240813155831.384446-1-ezulian@redhat.com Suggested-by:
Tomas Glozar <tglozar@redhat.com> Reviewed-by:
Tomas Glozar <tglozar@redhat.com> Signed-off-by:
Eder Zulian <ezulian@redhat.com> Signed-off-by:
Steven Rostedt (Google) <rostedt@goodmis.org>
-
Ben Hutchings authored
rtla now supports out-of-tree builds, but installation fails as it still tries to install the rtla binary from the source tree. Use the existing macro $(RTLA) to refer to the binary. Link: https://lore.kernel.org/ZudubuoU_JHjPZ7w@decadent.org.uk Fixes: 01474dc7 ("tools/rtla: Use tools/build makefiles to build rtla") Reviewed-by:
Tomas Glozar <tglozar@redhat.com> Tested-by:
Tomas Glozar <tglozar@redhat.com> Signed-off-by:
Ben Hutchings <benh@debian.org> Signed-off-by:
Steven Rostedt (Google) <rostedt@goodmis.org>
-
Hangbin Liu authored
The include.sh file is generated for inclusion and should not be executable. Otherwise, it will be added to kselftest-list.txt. Additionally, add the executable bit for test.py at the same time to ensure proper functionality. Fixes: 3ade6ce1 ("selftests: rds: add testing infrastructure") Signed-off-by:
Hangbin Liu <liuhangbin@gmail.com> Link: https://patch.msgid.link/20240927041349.81216-1-liuhangbin@gmail.com Signed-off-by:
Jakub Kicinski <kuba@kernel.org>
-
- Oct 02, 2024
-
-
Al Viro authored
asm/unaligned.h is always an include of asm-generic/unaligned.h; might as well move that thing to linux/unaligned.h and include that - there's nothing arch-specific in that header. auto-generated by the following: for i in `git grep -l -w asm/unaligned.h`; do sed -i -e "s/asm\/unaligned.h/linux\/unaligned.h/" $i done for i in `git grep -l -w asm-generic/unaligned.h`; do sed -i -e "s/asm-generic\/unaligned.h/linux\/unaligned.h/" $i done git mv include/asm-generic/unaligned.h include/linux/unaligned.h git mv tools/include/asm-generic/unaligned.h tools/include/linux/unaligned.h sed -i -e "/unaligned.h/d" include/asm-generic/Kbuild sed -i -e "s/__ASM_GENERIC/__LINUX/" include/linux/unaligned.h tools/include/linux/unaligned.h
-
Yifei Liu authored
step_after_suspend_test fails with device busy error while writing to /sys/power/state to start suspend. The test believes it failed to enter suspend state with $ sudo ./step_after_suspend_test TAP version 13 Bail out! Failed to enter Suspend state However, in the kernel message, I indeed see the system get suspended and then wake up later. [611172.033108] PM: suspend entry (s2idle) [611172.044940] Filesystems sync: 0.006 seconds [611172.052254] Freezing user space processes [611172.059319] Freezing user space processes completed (elapsed 0.001 seconds) [611172.067920] OOM killer disabled. [611172.072465] Freezing remaining freezable tasks [611172.080332] Freezing remaining freezable tasks completed (elapsed 0.001 seconds) [611172.089724] printk: Suspending console(s) (use no_console_suspend to debug) [611172.117126] serial 00:03: disabled some other hardware get reconnected [611203.136277] OOM killer enabled. [611203.140637] Restarting tasks ... [611203.141135] usb 1-8.1: USB disconnect, device number 7 [611203.141755] done. [611203.155268] random: crng reseeded on system resumption [611203.162059] PM: suspend exit After investigation, I noticed that for the code block if (write(power_state_fd, "mem", strlen("mem")) != strlen("mem")) ksft_exit_fail_msg("Failed to enter Suspend state\n"); The write will return -1 and errno is set to 16 (device busy). It should be caused by the write function is not successfully returned before the system suspend and the return value get messed when waking up. As a result, It may be better to check the time passed of those few instructions to determine whether the suspend is executed correctly for it is pretty hard to execute those few lines for 5 seconds. The timer to wake up the system is set to expire after 5 seconds and no re-arm. If the timer remaining time is 0 second and 0 nano secomd, it means the timer expired and wake the system up. Otherwise, the system could be considered to enter the suspend state failed if there is any remaining time. After appling this patch, the test would not fail for it believes the system does not go to suspend by mistake. It now could continue to the rest part of the test after suspend. Fixes: bfd092b8 ("selftests: breakpoint: add step_after_suspend_test") Reported-by:
Sinadin Shan <sinadin.shan@oracle.com> Signed-off-by:
Yifei Liu <yifei.l.liu@oracle.com> Signed-off-by:
Shuah Khan <skhan@linuxfoundation.org>
-
Alessandro Zanni authored
Insert raw strings to prevent Python3 from interpreting string literals as Unicode strings and "\d" as invalid escaped sequence. Fix the warnings: tools/testing/selftests/devices/probe/test_discoverable_devices.py:48: SyntaxWarning: invalid escape sequence '\d' usb_controller_sysfs_dir = "usb[\d]+" tools/testing/selftests/devices/probe/test_discoverable_devices.py: 94: SyntaxWarning: invalid escape sequence '\d' re_usb_version = re.compile("PRODUCT=.*/(\d)/.*") Fixes: dacf1d7a ("kselftest: Add test to verify probe of devices from discoverable buses") Reviewed-by:
Nícolas F. R. A. Prado <nfraprado@collabora.com> Signed-off-by:
Alessandro Zanni <alessandro.zanni87@gmail.com> Signed-off-by:
Shuah Khan <skhan@linuxfoundation.org>
-
- Oct 01, 2024
-
-
Mark Brown authored
The recent addition of support for testing with the x86 specific quirk KVM_X86_QUIRK_SLOT_ZAP_ALL disabled in the generic memslot tests broke the build of the KVM selftests for all other architectures: In file included from include/kvm_util.h:8, from include/memstress.h:13, from memslot_modification_stress_test.c:21: memslot_modification_stress_test.c: In function ‘main’: memslot_modification_stress_test.c:176:38: error: ‘KVM_X86_QUIRK_SLOT_ZAP_ALL’ undeclared (first use in this function) 176 | KVM_X86_QUIRK_SLOT_ZAP_ALL); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ Add __x86_64__ guard defines to avoid building the relevant code on other architectures. Fixes: 61de4c34 ("KVM: selftests: Test memslot move in memslot_perf_test with quirk disabled") Fixes: 218f6415 ("KVM: selftests: Allow slot modification stress test with quirk disabled") Reported-by:
Aishwarya TCV <aishwarya.tcv@arm.com> Signed-off-by:
Mark Brown <broonie@kernel.org> Message-ID: <20240930-kvm-build-breakage-v1-1-866fad3cc164@kernel.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Yun Lu authored
HID test cases run tests using the run-hid-tools-tests.sh script. When installed with "make install", the run-hid-tools-tests.sh script will not be copied over, resulting in the following error message. make -C tools/testing/selftests/ TARGETS=hid install \ INSTALL_PATH=$KSFT_INSTALL_PATH cd $KSFT_INSTALL_PATH ./run_kselftest.sh -c hid selftests: hid: hid-core.sh bash: ./run-hid-tools-tests.sh: No such file or directory Add the run-hid-tools-tests.sh script to the TEST_FILES in the Makefile for it to be installed. Fixes: ffb85d5c ("selftests: hid: import hid-tools hid-core tests") Signed-off-by:
Yun Lu <luyun@kylinos.cn> Acked-by:
Benjamin Tissoires <bentiss@kernel.org> Signed-off-by:
Shuah Khan <skhan@linuxfoundation.org>
-
Jason A. Donenfeld authored
This prevents false sharing, which makes a large difference on machines with several NUMA nodes, such as on a dual socket Intel(R) Xeon(R) Gold 6338 CPU @ 2.00GHz, where the "bench-multi" test goes from 2.7s down to 1.9s. While this is just test code, it also forms the basis of how folks will wind up implementing this in libraries, so we should implement this simple cache alignment improvement here. Suggested-by:
Florian Weimer <fweimer@redhat.com> Cc: Adhemerval Zanella <adhemerval.zanella@linaro.org> Signed-off-by:
Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by:
Shuah Khan <skhan@linuxfoundation.org>
-
- Sep 30, 2024
-
-
Javier Carrasco authored
The name of the "load_address" objects has been modified, but the corresponding entry in the gitignore file must be updated. Update the load_address entry in the gitignore file to account for the new names, adding an exception to keep on tracking load_address.c. Signed-off-by:
Javier Carrasco <javier.carrasco.cruz@gmail.com> Signed-off-by:
Shuah Khan <skhan@linuxfoundation.org>
-
Javier Carrasco authored
This executable is missing from the corresponding gitignore file. Add unshare_test to the core gitignore list. Signed-off-by:
Javier Carrasco <javier.carrasco.cruz@gmail.com> Signed-off-by:
Shuah Khan <skhan@linuxfoundation.org>
-
Ba Jing authored
The macro MAX_PID_NS_LEVEL is never referenced in the code, so remove it. Signed-off-by:
Ba Jing <bajing@cmss.chinamobile.com> Reviewed-by:
Christian Brauner <brauner@kernel.org> Signed-off-by:
Shuah Khan <skhan@linuxfoundation.org>
-
Shuah Khan authored
__fatal_error routine doesn't check strerror_r() return value, which results in the following compile time warning: posix_timers.c: In function ‘__fatal_error’: posix_timers.c:31:9: warning: ignoring return value of ‘strerror_r’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 31 | strerror_r(errno, buf, sizeof(buf)); Fix this by adding a check for return value and error handling appropriate for the GNU-specific strerror_r() in use in __fatal_error(). Check if return string is null and handle accordingly. From Linux strerror_r() manual page: "The GNU-specific strerror_r() returns a pointer to a string containing the error message. This may be either a pointer to a string that the function stores in buf, or a pointer to some (immutable) static string (in which case buf is unused). If the function stores a string in buf, then at most buflen bytes are stored (the string may be truncated if buflen is too small and errnum is unknown). The string always includes a terminating null byte." Signed-off-by:
Shuah Khan <skhan@linuxfoundation.org> Acked-by:
John Stultz <jstultz@google.com> Acked-by:
Thomas Gleixner <tglx@linutronix.de> Signed-off-by:
Shuah Khan <skhan@linuxfoundation.org>
-
Joseph Jang authored
The rtctest requires the read permission on /dev/rtc0. The rtctest will be skipped if the /dev/rtc0 is not readable. Reviewed-by:
Koba Ko <kobak@nvidia.com> Reviewed-by:
Matthew R. Ochs <mochs@nvidia.com> Signed-off-by:
Joseph Jang <jjang@nvidia.com> Acked-by:
Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by:
Shuah Khan <skhan@linuxfoundation.org>
-
Currently, if alsa development package is not installed on the user's system then the make command would print a `pagefull` of errors. In particular one error message is repeated 3 times. This error is returned by `pkg-config` and since it is not being handeled appropriately, repeated calls to `pkg-config` prints the same message again. This patch adds check for alsa package installation. If alsa is not installed, a short and consize error is returned. Also, it does not affect the compilation of other tests. Signed-off-by:
Abdul Rahim <abdul.rahim@myyahoo.com> Reviewed-by:
Shuah Khan <skhan@linuxfoundation.org> Link: https://patch.msgid.link/20240922225824.18918-1-abdul.rahim@myyahoo.com Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- Sep 27, 2024
-
-
Jason A. Donenfeld authored
When switching on -O2, gcc generates SSE2 instructions that assume a 16-byte aligned stack, which the standalone test's start point wasn't aligning. Fix this with the usual alignment sequence. Fixes: ecb8bd70 ("selftests: vDSO: build tests with O2 optimization") Reported-by:
kernel test robot <oliver.sang@intel.com> Closes: https://lore.kernel.org/oe-lkp/202409241558.98e13f6f-oliver.sang@intel.com Signed-off-by:
Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by:
Shuah Khan <skhan@linuxfoundation.org>
-
zhang jiao authored
There is no return value in count_entries, just add it. Fixes: eff3c558 ("netfilter: ctnetlink: support filtering by zone") Signed-off-by:
zhang jiao <zhangjiao2@cmss.chinamobile.com> Signed-off-by:
Pablo Neira Ayuso <pablo@netfilter.org>
-
Phil Sutter authored
As a side-effect of nftables' commit dbff26bfba833 ("cache: consolidate reset command"), audit logs changed when more objects were reset than fit into a single netlink message. Since the objects' distribution in netlink messages is not relevant, implement a summarizing function which combines repeated audit logs into a single one with summed up 'entries=' value. Fixes: 203bb9d3 ("selftests: netfilter: Extend nft_audit.sh") Signed-off-by:
Phil Sutter <phil@nwl.cc> Signed-off-by:
Pablo Neira Ayuso <pablo@netfilter.org>
-
- Sep 26, 2024
-
-
Tejun Heo authored
scx_flatcg was using SCX_DSQ_GLOBAL for fallback handling. However, it is assuming that SCX_DSQ_GLOBAL isn't automatically consumed, which was true a while ago but is no longer the case. Also, there are further changes planned for SCX_DSQ_GLOBAL which will disallow explicit consumption from it. Switch to a user DSQ for fallback. Signed-off-by:
Tejun Heo <tj@kernel.org> Acked-by:
David Vernet <void@manifault.com>
-
Muhammad Usama Anjum authored
grep -rnIF "#define __NR_userfaultfd" tools/include/uapi/asm-generic/unistd.h:681:#define __NR_userfaultfd 282 arch/x86/include/generated/uapi/asm/unistd_32.h:374:#define __NR_userfaultfd 374 arch/x86/include/generated/uapi/asm/unistd_64.h:327:#define __NR_userfaultfd 323 arch/x86/include/generated/uapi/asm/unistd_x32.h:282:#define __NR_userfaultfd (__X32_SYSCALL_BIT + 323) arch/arm/include/generated/uapi/asm/unistd-eabi.h:347:#define __NR_userfaultfd (__NR_SYSCALL_BASE + 388) arch/arm/include/generated/uapi/asm/unistd-oabi.h:359:#define __NR_userfaultfd (__NR_SYSCALL_BASE + 388) include/uapi/asm-generic/unistd.h:681:#define __NR_userfaultfd 282 The number is dependent on the architecture. The above data shows that: x86 374 x86_64 323 The value of __NR_userfaultfd was changed to 282 when asm-generic/unistd.h was included. It makes the test to fail every time as the correct number of this syscall on x86_64 is 323. Fix the header to asm/unistd.h. Link: https://lkml.kernel.org/r/20240923053836.3270393-1-usama.anjum@collabora.com Fixes: a5c6bc59 ("selftests/mm: remove local __NR_* definitions") Signed-off-by:
Muhammad Usama Anjum <usama.anjum@collabora.com> Reviewed-by:
Shuah Khan <skhan@linuxfoundation.org> Reviewed-by:
David Hildenbrand <david@redhat.com> Cc: John Hubbard <jhubbard@nvidia.com> Cc: <stable@vger.kernel.org> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org>
-
Lorenzo Stoakes authored
The shared radix-tree build is not correctly recompiling when lib/maple_tree.c and lib/test_maple_tree.c are modified - fix this by adding these core components to the SHARED_DEPS list. Additionally, add missing header guards to shared header files. Link: https://lkml.kernel.org/r/20240924180724.112169-1-lorenzo.stoakes@oracle.com Fixes: 74579d8d ("tools: separate out shared radix-tree components") Signed-off-by:
Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Tested-by:
Sidhartha Kumar <sidhartha.kumar@oracle.com> Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com> Cc: Matthew Wilcox <willy@infradead.org> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: <stable@vger.kernel.org> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org>
-
Phil Sutter authored
If the client can't reach the server, the latter remains listening forever. Kill it after 5s of waiting. Fixes: 867d2190 ("selftests: netfilter: add ipvs test script") Signed-off-by:
Phil Sutter <phil@nwl.cc> Signed-off-by:
Pablo Neira Ayuso <pablo@netfilter.org>
-
Florian Westphal authored
The netfilter race happens when two packets with the same tuple are DNATed and enqueued with nfqueue in the postrouting hook. Once one of the packet is reinjected it may be DNATed again to a different destination, but the conntrack entry remains the same and the return packet was dropped. Based on earlier patch from Antonio Ojea. Link: https://bugzilla.netfilter.org/show_bug.cgi?id=1766 Co-developed-by:
Antonio Ojea <aojea@google.com> Signed-off-by:
Antonio Ojea <aojea@google.com> Signed-off-by:
Florian Westphal <fw@strlen.de> Signed-off-by:
Pablo Neira Ayuso <pablo@netfilter.org>
-
Antonio Ojea authored
The TPROXY functionality is widely used, however, there are only mptcp selftests covering this feature. The selftests represent the most common scenarios and can also be used as selfdocumentation of the feature. UDP and TCP testcases are split in different files because of the different nature of the protocols, specially due to the challenges that present to reliable test UDP due to the connectionless nature of the protocol. UDP only covers the scenarios involving the prerouting hook. The UDP tests are signfinicantly slower than the TCP ones, hence they use a larger timeout, it takes 20 seconds to run the full UDP suite on a 48 vCPU Intel(R) Xeon(R) CPU @2.60GHz. Signed-off-by:
Antonio Ojea <aojea@google.com> Signed-off-by:
Pablo Neira Ayuso <pablo@netfilter.org>
-
Florian Westphal authored
Add test program that is sending UDP packets in both directions and check that packets arrive without source port modification. Signed-off-by:
Florian Westphal <fw@strlen.de> Signed-off-by:
Pablo Neira Ayuso <pablo@netfilter.org>
-
Some packetdrill tests are flaky in debug mode. As discussed, increase tolerance. We have been doing this for debug builds outside ksft too. Previous setting was 10000. A manual 50 runs in virtme-ng showed two failures that needed 12000. To be on the safe side, Increase to 14000. Link: https://lore.kernel.org/netdev/Zuhhe4-MQHd3EkfN@mini-arch/ Fixes: 1e42f73f ("selftests/net: packetdrill: import tcp/zerocopy") Reported-by:
Stanislav Fomichev <sdf@fomichev.me> Signed-off-by:
Willem de Bruijn <willemb@google.com> Reviewed-by:
Simon Horman <horms@kernel.org> Acked-by:
Stanislav Fomichev <sdf@fomichev.me> Acked-by:
Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20240919124412.3014326-1-willemdebruijn.kernel@gmail.com Signed-off-by:
Paolo Abeni <pabeni@redhat.com>
-
- Sep 25, 2024
-
-
Tejun Heo authored
Receive misc tools/sched_ext updates from https://github.com/sched-ext/scx to sync userspace bits. - LSP macros to help language servers. - bpf_cpumask_weight() declaration and cast_mask() helper. - Cosmetic updates to scx_flatcg.bpf.c. Signed-off-by:
Tejun Heo <tj@kernel.org>
-
Tejun Heo authored
cgroup support and scx_bpf_dispatch[_vtime]_from_dsq() are newly added since 8bb30798 ("sched_ext: Fixes incorrect type in bpf_scx_init()") which is the current earliest commit targeted by BPF schedulers. Add compat helpers for them and apply them in the example schedulers. These will be dropped after a few kernel releases. The exact backward compatibility window hasn't been decided yet. Signed-off-by:
Tejun Heo <tj@kernel.org>
-
Masami Hiramatsu (Google) authored
Add a test case for tracepoint events on modules. This checks if it can add and remove the events correctly. Link: https://lore.kernel.org/all/172397781494.286558.7581515061075998225.stgit@devnote2/ Signed-off-by:
Masami Hiramatsu (Google) <mhiramat@kernel.org>
-
Masami Hiramatsu (Google) authored
Support raw tracepoint events on future loaded (unloaded) modules. This allows user to create raw tracepoint events which can be used from module's __init functions. Note: since the kernel does not have any information about the tracepoints in the unloaded modules, fprobe events can not check whether the tracepoint exists nor extend the BTF based arguments. Link: https://lore.kernel.org/all/172397780593.286558.18360375226968537828.stgit@devnote2/ Suggested-by:
Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by:
Masami Hiramatsu (Google) <mhiramat@kernel.org>
-
- Sep 23, 2024
-
-
Andrea Righi authored
As discussed during the distro-centric session within the sched_ext Microconference at LPC 2024, introduce a sequence counter that is incremented every time a BPF scheduler is loaded. This feature can help distributions in diagnosing potential performance regressions by identifying systems where users are running (or have ran) custom BPF schedulers. Example: arighi@virtme-ng~> cat /sys/kernel/sched_ext/enable_seq 0 arighi@virtme-ng~> sudo scx_simple local=1 global=0 ^CEXIT: unregistered from user space arighi@virtme-ng~> cat /sys/kernel/sched_ext/enable_seq 1 In this way user-space tools (such as Ubuntu's apport and similar) are able to gather and include this information in bug reports. Cc: Giovanni Gherdovich <giovanni.gherdovich@suse.com> Cc: Kleber Sacilotto de Souza <kleber.souza@canonical.com> Cc: Marcelo Henrique Cerri <marcelo.cerri@canonical.com> Cc: Phil Auld <pauld@redhat.com> Signed-off-by:
Andrea Righi <andrea.righi@linux.dev> Signed-off-by:
Tejun Heo <tj@kernel.org>
-
Heiko Carstens authored
Similar to commit f8d92fc5 ("selftests: vDSO: fix include order in build of test_vdso_chacha") add SYM_DATA_START, SYM_DATA_START_LOCAL, and SYM_DATA_END stubs to tools/include/linux/linkage.h so that the proper macros can be used within the kernel's vdso code as well as in the vdso_test_chacha selftest. Signed-off-by:
Heiko Carstens <hca@linux.ibm.com> Reviewed-by:
Jens Remus <jremus@linux.ibm.com> Signed-off-by:
Vasily Gorbik <gor@linux.ibm.com>
-
John B. Wyatt IV authored
Add SPDX identifier to the gitignore. Remove the comment and .i file since the file it references was removed in another patch. This patch depends on Min-Hua Chen's 'pm: cpupower: rename raw_pylibcpupower.i'. Signed-off-by:
John B. Wyatt IV <jwyatt@redhat.com> Signed-off-by:
John B. Wyatt IV <sageofredondo@gmail.com> Signed-off-by:
Shuah Khan <skhan@linuxfoundation.org>
-
- Sep 20, 2024
-
-
Chuck Lever authored
I noticed that "xdrgen source" reorders the procedure encoder and decoder functions every time it is run. I would prefer that the generated code be more deterministic: it enables a reader to better see exactly what has changed between runs of the tool. The problem is that Python sets are not ordered. I use a Python set to ensure that, when multiple procedures use a particular argument or result type, the encoder/decoder for that type is emitted only once. Sets aren't ordered, but I can use Python dictionaries for this purpose to ensure the procedure functions are always emitted in the same order if the .x file does not change. Signed-off-by:
Chuck Lever <chuck.lever@oracle.com>
-
Chuck Lever authored
'typedef opaque yada<XYZ>' should use xdrgen's built-in opaque encoder and decoder, to enable better compiler optimization. Signed-off-by:
Chuck Lever <chuck.lever@oracle.com>
-
Chuck Lever authored
xdr_stream_encode_u32() returns XDR_UNIT on success. xdr_stream_decode_u32() returns zero or -EMSGSIZE, but never XDR_UNIT. Signed-off-by:
Chuck Lever <chuck.lever@oracle.com>
-
Chuck Lever authored
Add a Python-based tool for translating XDR specifications into XDR encoder and decoder functions written in the Linux kernel's C coding style. The generator attempts to match the usual C coding style of the Linux kernel's SunRPC consumers. This approach is similar to the netlink code generator in tools/net/ynl . The maintainability benefits of machine-generated XDR code include: - Stronger type checking - Reduces the number of bugs introduced by human error - Makes the XDR code easier to audit and analyze - Enables rapid prototyping of new RPC-based protocols - Hardens the layering between protocol logic and marshaling - Makes it easier to add observability on demand - Unit tests might be built for both the tool and (automatically) for the generated code In addition, converting the XDR layer to use memory-safe languages such as Rust will be easier if much of the code can be converted automatically. Tested-by:
Jeff Layton <jlayton@kernel.org> Signed-off-by:
Chuck Lever <chuck.lever@oracle.com>
-
Charlie Jenkins authored
Now that the riscv tools tree supports optimized barriers, use them in the ring buffer. Signed-off-by:
Charlie Jenkins <charlie@rivosinc.com> Reviewed-by:
Andrea Parri <parri.andrea@gmail.com> Link: https://lore.kernel.org/r/20240806-optimize_ring_buffer_read_riscv-v2-2-ca7e193ae198@rivosinc.com Signed-off-by:
Palmer Dabbelt <palmer@rivosinc.com>
-
Charlie Jenkins authored
Many of the other architectures use their custom barrier implementations. Use the barrier code from the kernel sources to optimize barriers in tools. Signed-off-by:
Charlie Jenkins <charlie@rivosinc.com> Reviewed-by:
Andrea Parri <parri.andrea@gmail.com> Link: https://lore.kernel.org/r/20240806-optimize_ring_buffer_read_riscv-v2-1-ca7e193ae198@rivosinc.com Signed-off-by:
Palmer Dabbelt <palmer@rivosinc.com>
-
- Sep 17, 2024
-
-
Michal Suchánek authored
Since Linux 5.6 tpm_version_major sysfs file is avaialble which gives the TPM version. Using this file the test can be skipped on systems with TPM 1.2. Signed-off-by:
Michal Suchanek <msuchanek@suse.de> Reviewed-by:
Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by:
Jarkko Sakkinen <jarkko@kernel.org>
-