Re: [PATCH v4 0/2] KVM: s390: Fix AR parameter in ioctl

2024-02-20 Thread Janosch Frank
On 2/20/24 22:12, Eric Farman wrote: Hi Janosch, Here is a new (final?) version for the AR/MEM_OP issue I'm attempting to address. Hopefully they can be picked up to whatever tree makes sense. I've got good and bad news for you :) You need to re-base this patch set on Heiko's feature branch

[linux-next:master] BUILD REGRESSION 2d5c7b7eb345249cb34d42cbc2b97b4c57ea944e

2024-02-20 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 2d5c7b7eb345249cb34d42cbc2b97b4c57ea944e Add linux-next specific files for 20240220 Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202402210011.c42qmsp5-...@intel.com Error

Re: [RFC PATCH v5 04/29] KVM: selftests: Refactor steps in vCPU descriptor table initialization

2024-02-20 Thread Binbin Wu
On 12/13/2023 4:46 AM, Sagi Shahar wrote: From: Ackerley Tng Split the vCPU descriptor table initialization process into a few steps and expose them: + Setting up the IDT + Syncing exception handlers into the guest In kvm_setup_idt(), we conditionally allocate guest memory for vm->idt to

Re: [PATCH bpf-next 2/5] bpf: tracing: support to attach program to multi hooks

2024-02-20 Thread Dan Carpenter
Hi Menglong, kernel test robot noticed the following build warnings: url: https://github.com/intel-lab-lkp/linux/commits/Menglong-Dong/bpf-tracing-add-support-to-record-and-check-the-accessed-args/20240220-115317 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master

Re: [musl] Re: [PATCH v8 00/38] arm64/gcs: Provide support for GCS in userspace

2024-02-20 Thread Edgecombe, Rick P
On Tue, 2024-02-20 at 18:59 -0500, Stefan O'Rear wrote: > > Ideally for riscv only writes would cause conversion, an incssp > underflow > which performs shadow stack reads would be able to fault early. Why can't makecontext() just clobber part of the low address side of the passed in stack with

Re: [musl] Re: [PATCH v8 00/38] arm64/gcs: Provide support for GCS in userspace

2024-02-20 Thread Edgecombe, Rick P
On Tue, 2024-02-20 at 18:11 -0800, Rick Edgecombe wrote: > Some specific cases that were still open were longjmp()ing off of a > custom userspace threading library stack, which may not have left a > token behind when it jumped to a new stack. And also, potentially off > of an alt shadow stack in

Re: [External] Re: [PATCH bpf-next 0/5] bpf: make tracing program support multi-attach

2024-02-20 Thread 梦龙董
On Wed, Feb 21, 2024 at 11:18 AM Alexei Starovoitov wrote: > > On Tue, Feb 20, 2024 at 7:06 PM 梦龙董 wrote: > > > > On Wed, Feb 21, 2024 at 11:02 AM Alexei Starovoitov > > wrote: > > > > > > On Tue, Feb 20, 2024 at 6:45 PM 梦龙董 wrote: > > > > > > > > On Wed, Feb 21, 2024 at 10:35 AM 梦龙董 > > > >

Re: [External] Re: [PATCH bpf-next 0/5] bpf: make tracing program support multi-attach

2024-02-20 Thread Alexei Starovoitov
On Tue, Feb 20, 2024 at 7:06 PM 梦龙董 wrote: > > On Wed, Feb 21, 2024 at 11:02 AM Alexei Starovoitov > wrote: > > > > On Tue, Feb 20, 2024 at 6:45 PM 梦龙董 wrote: > > > > > > On Wed, Feb 21, 2024 at 10:35 AM 梦龙董 wrote: > > > > > > > > Hello, > > > > > > > > On Wed, Feb 21, 2024 at 9:24 AM Alexei

Re: [External] Re: [PATCH bpf-next 1/5] bpf: tracing: add support to record and check the accessed args

2024-02-20 Thread 梦龙董
On Wed, Feb 21, 2024 at 2:22 AM Kui-Feng Lee wrote: > > > > On 2/19/24 19:51, Menglong Dong wrote: > > In this commit, we add the 'accessed_args' field to struct bpf_prog_aux, > > which is used to record the accessed index of the function args in > > btf_ctx_access(). > > > > Meanwhile, we add

Re: [External] Re: [PATCH bpf-next 0/5] bpf: make tracing program support multi-attach

2024-02-20 Thread 梦龙董
On Wed, Feb 21, 2024 at 11:02 AM Alexei Starovoitov wrote: > > On Tue, Feb 20, 2024 at 6:45 PM 梦龙董 wrote: > > > > On Wed, Feb 21, 2024 at 10:35 AM 梦龙董 wrote: > > > > > > Hello, > > > > > > On Wed, Feb 21, 2024 at 9:24 AM Alexei Starovoitov > > > wrote: > > > > > > > > On Mon, Feb 19, 2024 at

Re: [External] Re: [PATCH bpf-next 0/5] bpf: make tracing program support multi-attach

2024-02-20 Thread Alexei Starovoitov
On Tue, Feb 20, 2024 at 6:45 PM 梦龙董 wrote: > > On Wed, Feb 21, 2024 at 10:35 AM 梦龙董 wrote: > > > > Hello, > > > > On Wed, Feb 21, 2024 at 9:24 AM Alexei Starovoitov > > wrote: > > > > > > On Mon, Feb 19, 2024 at 7:51 PM Menglong Dong > > > wrote: > > > > > > > > For now, the BPF program of

Re: [PATCH RFC bpf-next v2 02/10] bpf/helpers: introduce sleepable timers

2024-02-20 Thread Alexei Starovoitov
On Fri, Feb 16, 2024 at 10:50:10AM +0100, Benjamin Tissoires wrote: > static bool is_rbtree_lock_required_kfunc(u32 btf_id) > { > return is_bpf_rbtree_api_kfunc(btf_id); > @@ -12140,6 +12143,16 @@ static int check_kfunc_call(struct bpf_verifier_env > *env, struct bpf_insn *insn, >

Re: [External] Re: [PATCH bpf-next 1/5] bpf: tracing: add support to record and check the accessed args

2024-02-20 Thread 梦龙董
On Wed, Feb 21, 2024 at 1:18 AM Jiri Olsa wrote: > > On Tue, Feb 20, 2024 at 11:51:01AM +0800, Menglong Dong wrote: > > SNIP > > > +static int get_ctx_arg_idx_aligned(struct btf *btf, const struct btf_type > > *t, > > +int off) > > +{ > > + const struct

Re: [PATCH RFC bpf-next v2 03/10] bpf/verifier: allow more maps in sleepable bpf programs

2024-02-20 Thread Alexei Starovoitov
On Wed, Feb 14, 2024 at 06:18:32PM +0100, Benjamin Tissoires wrote: > These 2 maps types are required for HID-BPF when a user wants to do > IO with a device from a sleepable tracing point. > > Allowing BPF_MAP_TYPE_QUEUE (and therefore BPF_MAP_TYPE_STACK) allows > for a BPF program to prepare

Re: [PATCH RFC bpf-next v2 02/10] bpf/helpers: introduce sleepable timers

2024-02-20 Thread Alexei Starovoitov
On Fri, Feb 16, 2024 at 03:58:20PM +0100, Benjamin Tissoires wrote: > > So (and this also answers your second email today) I'm thinking at: > - have multiple flags to control the timer (with dedicated timer_cb > kernel functions): > - BPF_F_TIMER_HRTIMER (default) > - BPF_F_TIMER_WORKER (no

Re: [External] Re: [PATCH bpf-next 0/5] bpf: make tracing program support multi-attach

2024-02-20 Thread 梦龙董
On Wed, Feb 21, 2024 at 10:35 AM 梦龙董 wrote: > > Hello, > > On Wed, Feb 21, 2024 at 9:24 AM Alexei Starovoitov > wrote: > > > > On Mon, Feb 19, 2024 at 7:51 PM Menglong Dong > > wrote: > > > > > > For now, the BPF program of type BPF_PROG_TYPE_TRACING is not allowed to > > > be attached to

Re: [PATCH] Fix implicit cast warning in test_klp_state.c

2024-02-20 Thread zhang warden
Would you please pasting the original warning of your complier? And did you check your source code if your source code is the the latest version? Regards, Warden > On Feb 20, 2024, at 21:20, Shresth Prasad wrote: > >> What compiler version and architecture? Are you >compiling using flags

Re: [External] Re: [PATCH bpf-next 0/5] bpf: make tracing program support multi-attach

2024-02-20 Thread 梦龙董
Hello, On Wed, Feb 21, 2024 at 9:24 AM Alexei Starovoitov wrote: > > On Mon, Feb 19, 2024 at 7:51 PM Menglong Dong > wrote: > > > > For now, the BPF program of type BPF_PROG_TYPE_TRACING is not allowed to > > be attached to multiple hooks, and we have to create a BPF program for > > each kernel

Re: [RFC PATCH v5 03/29] KVM: selftests: Store initial stack address in struct kvm_vcpu

2024-02-20 Thread Binbin Wu
On 12/13/2023 4:46 AM, Sagi Shahar wrote: From: Ackerley Tng TDX guests' registers cannot be initialized directly using vcpu_regs_set(), hence the stack pointer needs to be initialized by the guest itself, running boot code beginning at the reset vector. We store the stack address as part

Re: [RFC PATCH v5 02/29] KVM: selftests: Expose function that sets up sregs based on VM's mode

2024-02-20 Thread Binbin Wu
On 12/13/2023 4:46 AM, Sagi Shahar wrote: From: Ackerley Tng This allows initializing sregs without setting vCPU registers in KVM. No functional change intended. Reviewed-by: Binbin Wu Signed-off-by: Ackerley Tng Signed-off-by: Ryan Afranji Signed-off-by: Sagi Shahar ---

Re: [PATCH v5 11/12] KVM: riscv: selftests: Change vcpu_has_ext to a common function

2024-02-20 Thread Haibo Xu
On Wed, Feb 21, 2024 at 7:03 AM Atish Patra wrote: > > On Mon, Jan 22, 2024 at 1:48 AM Haibo Xu wrote: > > > > Move vcpu_has_ext to the processor.c and rename it to __vcpu_has_ext > > so that other test cases can use it for vCPU extension check. > > > > Signed-off-by: Haibo Xu > > Reviewed-by:

Re: [musl] Re: [PATCH v8 00/38] arm64/gcs: Provide support for GCS in userspace

2024-02-20 Thread Edgecombe, Rick P
On Tue, 2024-02-20 at 20:27 -0500, dal...@libc.org wrote: > > Then I think WRSS might fit your requirements better than what > > glibc > > did. It was considered a reduced security mode that made libc's job > > much easier and had better compatibility, but the last discussion > > was > > to try to

Re: [PATCH net 3/5] tls: don't skip over different type records from the rx_list

2024-02-20 Thread Jakub Kicinski
On Tue, 20 Feb 2024 00:10:58 +0100 Sabrina Dubroca wrote: > 2024-02-19, 12:07:03 -0800, Jakub Kicinski wrote: > > On Thu, 15 Feb 2024 17:17:31 +0100 Sabrina Dubroca wrote: > > > @@ -1772,7 +1772,8 @@ static int process_rx_list(struct tls_sw_context_rx > > > *ctx, > > > u8

Re: [RFC PATCH v5 01/29] KVM: selftests: Add function to allow one-to-one GVA to GPA mappings

2024-02-20 Thread Binbin Wu
On 12/13/2023 4:46 AM, Sagi Shahar wrote: From: Ackerley Tng One-to-one GVA to GPA mappings can be used in the guest to set up boot sequences during which paging is enabled, hence requiring a transition from using physical to virtual addresses in consecutive instructions. Signed-off-by:

Re: [musl] Re: [PATCH v8 00/38] arm64/gcs: Provide support for GCS in userspace

2024-02-20 Thread dal...@libc.org
On Wed, Feb 21, 2024 at 12:35:48AM +, Edgecombe, Rick P wrote: > On Tue, 2024-02-20 at 18:54 -0500, dal...@libc.org wrote: > > On Tue, Feb 20, 2024 at 11:30:22PM +, Edgecombe, Rick P wrote: > > > On Tue, 2024-02-20 at 13:57 -0500, Rich Felker wrote: > > > > On Tue, Feb 20, 2024 at

Re: [PATCH bpf-next 0/5] bpf: make tracing program support multi-attach

2024-02-20 Thread Alexei Starovoitov
On Mon, Feb 19, 2024 at 7:51 PM Menglong Dong wrote: > > For now, the BPF program of type BPF_PROG_TYPE_TRACING is not allowed to > be attached to multiple hooks, and we have to create a BPF program for > each kernel function, for which we want to trace, even through all the > program have the

Re: [PATCH net-next v3 09/11] selftests: kselftest_harness: let PASS / FAIL provide diagnostic

2024-02-20 Thread Kees Cook
On Tue, Feb 20, 2024 at 11:22:33AM -0800, Jakub Kicinski wrote: > Switch to printing KTAP line for PASS / FAIL with ksft_test_result_code(), > this gives us the ability to report diagnostic messages. > > Signed-off-by: Jakub Kicinski Reviewed-by: Kees Cook -- Kees Cook

Re: [PATCH net-next v3 10/11] selftests: kselftest_harness: support using xfail

2024-02-20 Thread Kees Cook
On Tue, Feb 20, 2024 at 11:22:34AM -0800, Jakub Kicinski wrote: > Currently some tests report skip for things they expect to fail > e.g. when given combination of parameters is known to be unsupported. > This is confusing because in an ideal test environment and fully > featured kernel no tests

Re: [PATCH net-next v3 08/11] selftests: kselftest_harness: separate diagnostic message with # in ksft_test_result_code()

2024-02-20 Thread Kees Cook
On Tue, Feb 20, 2024 at 11:22:32AM -0800, Jakub Kicinski wrote: > According to the spec we should always print a # if we add > a diagnostic message. Having the caller pass in the new line > as part of diagnostic message makes handling this a bit > counter-intuitive, so append the new line in the

Re: [PATCH net-next v3 07/11] selftests: kselftest_harness: print test name for SKIP

2024-02-20 Thread Kees Cook
On Tue, Feb 20, 2024 at 11:22:31AM -0800, Jakub Kicinski wrote: > Jakub points out that for parsers it's rather useful to always > have the test name on the result line. Currently if we SKIP > (or soon XFAIL or XPASS), we will print: > > ok 17 # SKIP SCTP doesn't support IP_BIND_ADDRESS_NO_PORT >

Re: [PATCH net-next v3 06/11] selftests: kselftest: add ksft_test_result_code(), handling all exit codes

2024-02-20 Thread Kees Cook
On Tue, Feb 20, 2024 at 11:22:30AM -0800, Jakub Kicinski wrote: > For generic test harness code it's more useful to deal with exit > codes directly, rather than having to switch on them and call > the right ksft_test_result_*() helper. Add such function to kselftest.h. > > Note that "directive"

Re: [PATCH net-next v3 05/11] selftests: kselftest_harness: use exit code to store skip

2024-02-20 Thread Kees Cook
On Tue, Feb 20, 2024 at 11:22:29AM -0800, Jakub Kicinski wrote: > We always use skip in combination with exit_code being 0 > (KSFT_PASS). This are basic KSFT / KTAP semantics. > Store the right KSFT_* code in exit_code directly. > > This makes it easier to support tests reporting other > extended

Re: [musl] Re: [PATCH v8 00/38] arm64/gcs: Provide support for GCS in userspace

2024-02-20 Thread Mark Brown
On Wed, Feb 21, 2024 at 12:35:48AM +, Edgecombe, Rick P wrote: > doing. But those threads might be using shadow stack instructions > (INCSSP, RSTORSSP, etc). These are a collection of instructions that > allow limited control of the SSP. When shadow stack gets disabled, > these suddenly turn

Re: [musl] Re: [PATCH v8 00/38] arm64/gcs: Provide support for GCS in userspace

2024-02-20 Thread Mark Brown
On Tue, Feb 20, 2024 at 06:59:58PM -0500, Stefan O'Rear wrote: > On Tue, Feb 20, 2024, at 6:30 PM, Edgecombe, Rick P wrote: > > Maybe I'm misunderstanding. I thought the proposal included allowing > > shadow stack access to convert normal address ranges to shadow stack, > > and normal writes to

Re: [musl] Re: [PATCH v8 00/38] arm64/gcs: Provide support for GCS in userspace

2024-02-20 Thread Edgecombe, Rick P
On Tue, 2024-02-20 at 18:54 -0500, dal...@libc.org wrote: > On Tue, Feb 20, 2024 at 11:30:22PM +, Edgecombe, Rick P wrote: > > On Tue, 2024-02-20 at 13:57 -0500, Rich Felker wrote: > > > On Tue, Feb 20, 2024 at 06:41:05PM +, Edgecombe, Rick P > > > wrote: > > > > Hmm, could the shadow

Re: [PATCH][next] selftests: sched: Fix spelling mistake "hiearchy" -> "hierarchy"

2024-02-20 Thread Shuah Khan
On 2/20/24 02:23, Colin Ian King wrote: There is a spelling mistake in a printed message. Fix it. Signed-off-by: Colin Ian King --- tools/testing/selftests/sched/cs_prctl_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/sched/cs_prctl_test.c

Re: [PATCH 08/10] selftests/sched: Migrate cs_prctl_test to kselfttest

2024-02-20 Thread Joel Fernandes
On 2/20/2024 7:03 PM, Shuah Khan wrote: > On 2/16/24 12:18, Chris Hyser wrote: >> On 2/16/24 13:31, Joel Fernandes (Google) wrote: >> >>> This test begs to be a kselftest, is in the kselftest hierarchy and does >>> not even use a single kselftest API. Convert it. >>> >>> It simplifies some of

Re: [PATCH 08/10] selftests/sched: Migrate cs_prctl_test to kselfttest

2024-02-20 Thread Joel Fernandes
On 2/20/2024 7:03 PM, Shuah Khan wrote: > On 2/16/24 12:18, Chris Hyser wrote: >> On 2/16/24 13:31, Joel Fernandes (Google) wrote: >> >>> This test begs to be a kselftest, is in the kselftest hierarchy and does >>> not even use a single kselftest API. Convert it. >>> >>> It simplifies some of

Re: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR

2024-02-20 Thread Shuah Khan
On 2/19/24 06:53, Marcos Paulo de Souza wrote: On Mon, 19 Feb 2024 09:15:15 -0300 Marcos Paulo de Souza wrote: On Mon, 19 Feb 2024 14:35:16 +0800 kernel test robot wrote: Hi Marcos, kernel test robot noticed the following build errors: [auto build test ERROR on

Re: [PATCH v3] selftests/mqueue: Set timeout to 180 seconds

2024-02-20 Thread Shuah Khan
On 2/19/24 17:08, SeongJae Park wrote: While mq_perf_tests runs with the default kselftest timeout limit, which is 45 seconds, the test takes about 60 seconds to complete on i3.metal AWS instances. Hence, the test always times out. Increase the timeout to 180 seconds. Fixes: 852c8cbf34d3

Re: [PATCH 08/10] selftests/sched: Migrate cs_prctl_test to kselfttest

2024-02-20 Thread Shuah Khan
On 2/16/24 12:18, Chris Hyser wrote: On 2/16/24 13:31, Joel Fernandes (Google) wrote: This test begs to be a kselftest, is in the kselftest hierarchy and does not even use a single kselftest API. Convert it. It simplifies some of the code and the output also looks much nicer now:   Totals:

Re: [musl] Re: [PATCH v8 00/38] arm64/gcs: Provide support for GCS in userspace

2024-02-20 Thread Stefan O'Rear
On Tue, Feb 20, 2024, at 6:30 PM, Edgecombe, Rick P wrote: > On Tue, 2024-02-20 at 13:57 -0500, Rich Felker wrote: >> On Tue, Feb 20, 2024 at 06:41:05PM +, Edgecombe, Rick P wrote: >> > Hmm, could the shadow stack underflow onto the real stack then? Not >> > sure how bad that is. INCSSP

Re: [PATCH] selftest: ftrace: fix minor typo in log

2024-02-20 Thread Steven Rostedt
On Tue, 20 Feb 2024 16:41:01 -0700 Shuah Khan wrote: > Steve, > > I picked this up fpr next for Linux 6.9-rc1 Sure, and you can add my: Acked-by: Steven Rostedt (Google) Thanks Shuah, -- Steve

Re: [musl] Re: [PATCH v8 00/38] arm64/gcs: Provide support for GCS in userspace

2024-02-20 Thread dal...@libc.org
On Tue, Feb 20, 2024 at 11:30:22PM +, Edgecombe, Rick P wrote: > On Tue, 2024-02-20 at 13:57 -0500, Rich Felker wrote: > > On Tue, Feb 20, 2024 at 06:41:05PM +, Edgecombe, Rick P wrote: > > > Hmm, could the shadow stack underflow onto the real stack then? Not > > > sure how bad that is.

Re: [PATCH] tools: selftests: Remove unnecessary semicolons

2024-02-20 Thread Shuah Khan
On 2/13/24 05:23, Thorsten Blum wrote: Remove unnecessary semicolons reported by Coccinelle/coccicheck and the semantic patch at scripts/coccinelle/misc/semicolon.cocci. Signed-off-by: Thorsten Blum --- tools/testing/selftests/bpf/benchs/bench_local_storage_create.c | 2 +-

Re: [PATCH RESEND] selftests/ftrace: Add test to exercize function tracer across cpu hotplug

2024-02-20 Thread Shuah Khan
On 2/16/24 07:23, Steven Rostedt wrote: On Fri, 16 Feb 2024 15:26:26 +0530 Naveen N Rao wrote: Add a test to exercize cpu hotplug with the function tracer active to ensure that sensitive functions in idle path are excluded from being traced. This helps catch issues such as the one fixed by

Re: [PATCH] selftest: ftrace: fix minor typo in log

2024-02-20 Thread Shuah Khan
On 2/11/24 04:18, Vincenzo Mezzela wrote: Resolves a spelling error in the test log, preventing potential confusion. Signed-off-by: Vincenzo Mezzela --- It is submitted as part of my application to the "Linux Kernel Bug Fixing Spring Unpaid 2024" mentorship program of the Linux Foundation.

Re: [PATCH v4 0/3] selftests: add missing gitignore files and include generated objects

2024-02-20 Thread Shuah Khan
On 2/13/24 17:03, Javier Carrasco wrote: This series aims to keep the git status clean after building the selftests by adding some missing .gitignore files and object inclusion in existing .gitignore files. This is one of the requirements listed in the selftests documentation for new tests, but

Re: [PATCH v8 00/38] arm64/gcs: Provide support for GCS in userspace

2024-02-20 Thread Edgecombe, Rick P
On Tue, 2024-02-20 at 20:14 +, Mark Brown wrote: > > Hmm, could the shadow stack underflow onto the real stack then? Not > > sure how bad that is. INCSSP (incrementing the SSP register on x86) > > loops are not rare so it seems like something that could happen. > > Yes, they'd trash any pages

Re: [musl] Re: [PATCH v8 00/38] arm64/gcs: Provide support for GCS in userspace

2024-02-20 Thread Edgecombe, Rick P
On Tue, 2024-02-20 at 13:57 -0500, Rich Felker wrote: > On Tue, Feb 20, 2024 at 06:41:05PM +, Edgecombe, Rick P wrote: > > Hmm, could the shadow stack underflow onto the real stack then? Not > > sure how bad that is. INCSSP (incrementing the SSP register on x86) > > loops are not rare so it

Re: Linux 6.8-rc5

2024-02-20 Thread Shuah Khan
On 2/20/24 13:16, Linus Torvalds wrote: On Tue, 20 Feb 2024 at 11:57, Linus Torvalds wrote: It turns out that that commit is buggy for another reason, but it's hidden by the fact that apparently KUNIT_ASSERT_FALSE_MSG() doesn't check the format string. The fix for that is this: ---

Re: [PATCH v5 11/12] KVM: riscv: selftests: Change vcpu_has_ext to a common function

2024-02-20 Thread Atish Patra
On Mon, Jan 22, 2024 at 1:48 AM Haibo Xu wrote: > > Move vcpu_has_ext to the processor.c and rename it to __vcpu_has_ext > so that other test cases can use it for vCPU extension check. > > Signed-off-by: Haibo Xu > Reviewed-by: Andrew Jones > --- >

Re: [PATCH 0/4] selftests: ktap_helpers: Add some missing helpers

2024-02-20 Thread Shuah Khan
On 1/31/24 15:02, Nícolas F. R. A. Prado wrote: This series adds a few missing functions to the shell KTAP helpers script which are present in the C counterpart, kselftest.h. This series depends on "selftests: Move KTAP bash helpers to selftests common folder"

Re: [PATCH] selftests: Move KTAP bash helpers to selftests common folder

2024-02-20 Thread Shuah Khan
On 2/12/24 08:01, Nícolas F. R. A. Prado wrote: On Tue, Jan 02, 2024 at 03:15:28PM +0100, Laura Nao wrote: Move bash helpers for outputting in KTAP format to the common selftests folder. This allows kselftests other than the dt one to source the file and make use of the helper functions. Define

Re: [PATCH] selftests: ftrace: fix typo in test description

2024-02-20 Thread Shuah Khan
On 1/31/24 08:13, Masami Hiramatsu (Google) wrote: On Wed, 31 Jan 2024 14:33:06 +0100 Ali Zahraee wrote: The typo in the description shows up in test logs and output. This patch submission is part of my application to the Linux Foundation mentorship program: Linux kernel Bug Fixing Spring

Re: [PATCH] selftest/ftrace: fix typo in ftracetest script

2024-02-20 Thread Shuah Khan
On 1/31/24 07:52, Masami Hiramatsu (Google) wrote: Hi, On Mon, 29 Jan 2024 21:58:07 +0530 Kousik Sanagavarapu wrote: Fix a typo in ftracetest script which is run when running the kselftests for ftrace. s/faii/fail Thanks, this looks obvious typo. Signed-off-by: Kousik Sanagavarapu

[PATCH v4 2/2] KVM: s390: selftests: memop: add a simple AR test

2024-02-20 Thread Eric Farman
There is a selftest that checks for an (expected) error when an invalid AR is specified, but not one that exercises the AR path. Add a simple test that mirrors the vanilla write/read test while providing an AR. An AR that contains zero will direct the CPU to use the primary address space normally

[PATCH v4 0/2] KVM: s390: Fix AR parameter in ioctl

2024-02-20 Thread Eric Farman
Hi Janosch, Here is a new (final?) version for the AR/MEM_OP issue I'm attempting to address. Hopefully they can be picked up to whatever tree makes sense. Changes: v4: [HC,CB,NSG] Add tags (thank you!) [NSG] Add commentary v3:

[PATCH v4 1/2] KVM: s390: fix access register usage in ioctls

2024-02-20 Thread Eric Farman
The routine ar_translation() can be reached by both the instruction intercept path (where the access registers had been loaded with the guest register contents), and the MEM_OP ioctls (which hadn't). Since this routine saves the current registers to vcpu->run, this routine erroneously saves host

Re: [PATCH v6 4/5] selftests/resctrl: Add resource_info_file_exists()

2024-02-20 Thread Reinette Chatre
Hi Maciej, On 2/16/2024 12:35 AM, Maciej Wieczor-Retman wrote: > Feature checking done by resctrl_mon_feature_exists() covers features > represented by the feature name presence inside the 'mon_features' file > in /sys/fs/resctrl/info/L3_MON directory. There exists a different way > to represent

Re: [PATCH v6 3/5] selftests/resctrl: Split validate_resctrl_feature_request()

2024-02-20 Thread Reinette Chatre
Hi Maciej, On 2/16/2024 12:35 AM, Maciej Wieczor-Retman wrote: > validate_resctrl_feature_request() is used to test both if a resource is > present in the info directory, and if a passed monitoring feature is > present in the mon_features file. > > Refactor validate_resctrl_feature_request()

[PATCH v18 6/6] ring-buffer/selftest: Add ring-buffer mapping test

2024-02-20 Thread Vincent Donnefort
This test maps a ring-buffer and validate the meta-page after reset and after emitting few events. Cc: Shuah Khan Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Signed-off-by: Vincent Donnefort diff --git a/tools/testing/selftests/ring-buffer/Makefile

Re: Linux 6.8-rc5

2024-02-20 Thread Linus Torvalds
On Tue, 20 Feb 2024 at 11:57, Linus Torvalds wrote: > > It turns out that that commit is buggy for another reason, but it's > hidden by the fact that apparently KUNIT_ASSERT_FALSE_MSG() doesn't > check the format string. The fix for that is this: --- a/include/kunit/test.h +++

Re: [PATCH v8 00/38] arm64/gcs: Provide support for GCS in userspace

2024-02-20 Thread Mark Brown
On Tue, Feb 20, 2024 at 06:41:05PM +, Edgecombe, Rick P wrote: > On Tue, 2024-02-20 at 11:36 -0500, Stefan O'Rear wrote: > > 2. Shadow stack faults on non-shadow stack pages, if flexible shadow > > stack > >    handling is in effect, cause the affected page to become a shadow > > stack > >   

[PATCH net-next v3 11/11] selftests: ip_local_port_range: use XFAIL instead of SKIP

2024-02-20 Thread Jakub Kicinski
SCTP does not support IP_LOCAL_PORT_RANGE and we know it, so use XFAIL instead of SKIP. Reviewed-by: Kees Cook Tested-by: Jakub Sitnicki Signed-off-by: Jakub Kicinski --- tools/testing/selftests/net/ip_local_port_range.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH net-next v3 10/11] selftests: kselftest_harness: support using xfail

2024-02-20 Thread Jakub Kicinski
Currently some tests report skip for things they expect to fail e.g. when given combination of parameters is known to be unsupported. This is confusing because in an ideal test environment and fully featured kernel no tests should be skipped. Selftest summary line already includes xfail and xpass

[PATCH net-next v3 09/11] selftests: kselftest_harness: let PASS / FAIL provide diagnostic

2024-02-20 Thread Jakub Kicinski
Switch to printing KTAP line for PASS / FAIL with ksft_test_result_code(), this gives us the ability to report diagnostic messages. Signed-off-by: Jakub Kicinski --- tools/testing/selftests/kselftest_harness.h | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git

[PATCH net-next v3 08/11] selftests: kselftest_harness: separate diagnostic message with # in ksft_test_result_code()

2024-02-20 Thread Jakub Kicinski
According to the spec we should always print a # if we add a diagnostic message. Having the caller pass in the new line as part of diagnostic message makes handling this a bit counter-intuitive, so append the new line in the helper. Signed-off-by: Jakub Kicinski ---

[PATCH net-next v3 07/11] selftests: kselftest_harness: print test name for SKIP

2024-02-20 Thread Jakub Kicinski
Jakub points out that for parsers it's rather useful to always have the test name on the result line. Currently if we SKIP (or soon XFAIL or XPASS), we will print: ok 17 # SKIP SCTP doesn't support IP_BIND_ADDRESS_NO_PORT ^ no test name Always print the test name. KTAP format seems to

[PATCH net-next v3 06/11] selftests: kselftest: add ksft_test_result_code(), handling all exit codes

2024-02-20 Thread Jakub Kicinski
For generic test harness code it's more useful to deal with exit codes directly, rather than having to switch on them and call the right ksft_test_result_*() helper. Add such function to kselftest.h. Note that "directive" and "diagnostic" are what ktap docs call those parts of the message.

[PATCH net-next v3 05/11] selftests: kselftest_harness: use exit code to store skip

2024-02-20 Thread Jakub Kicinski
We always use skip in combination with exit_code being 0 (KSFT_PASS). This are basic KSFT / KTAP semantics. Store the right KSFT_* code in exit_code directly. This makes it easier to support tests reporting other extended KSFT_* codes like XFAIL / XPASS. Signed-off-by: Jakub Kicinski ---

[PATCH net-next v3 04/11] selftests: kselftest_harness: save full exit code in metadata

2024-02-20 Thread Jakub Kicinski
Instead of tracking passed = 0/1 rename the field to exit_code and invert the values so that they match the KSFT_* exit codes. This will allow us to fold SKIP / XFAIL into the same value. Signed-off-by: Jakub Kicinski --- tools/testing/selftests/kselftest_harness.h | 48 +++

[PATCH net-next v3 03/11] selftests: kselftest_harness: generate test name once

2024-02-20 Thread Jakub Kicinski
Since we added variant support generating full test case name takes 4 string arguments. We're about to need it in another two places. Stop the duplication and print once into a temporary buffer. Suggested-by: Jakub Sitnicki Acked-by: Kees Cook Signed-off-by: Jakub Kicinski ---

[PATCH net-next v3 02/11] selftests: kselftest_harness: use KSFT_* exit codes

2024-02-20 Thread Jakub Kicinski
Now that we no longer need low exit codes to communicate assertion steps - use normal KSFT exit codes. Acked-by: Kees Cook Tested-by: Jakub Sitnicki Signed-off-by: Jakub Kicinski --- CC: keesc...@chromium.org CC: l...@amacapital.net CC: w...@chromium.org CC: sh...@kernel.org CC:

[PATCH net-next v3 01/11] selftests: kselftest_harness: pass step via shared memory

2024-02-20 Thread Jakub Kicinski
Commit 0ef67a888375 ("selftests/harness: Report skip reason") added shared memory to communicate between harness and test. Use that instead of exit codes to send the failing step back to the harness. The exit codes are limited and because of the step passing we can't use the full range of KSFT_*

[PATCH net-next v3 00/11] selftests: kselftest_harness: support using xfail

2024-02-20 Thread Jakub Kicinski
Hi! When running selftests for our subsystem in our CI we'd like all tests to pass. Currently some tests use SKIP for cases they expect to fail, because the kselftest_harness limits the return codes to pass/fail/skip. Clean up and support the use of the full range of ksft exit codes under

Re: [musl] Re: [PATCH v8 00/38] arm64/gcs: Provide support for GCS in userspace

2024-02-20 Thread Rich Felker
On Tue, Feb 20, 2024 at 06:41:05PM +, Edgecombe, Rick P wrote: > Hi, > > I worked on the x86 kernel shadow stack support. I think it is an > interesting suggestion. Some questions below, and I will think more on > it. > > On Tue, 2024-02-20 at 11:36 -0500, Stefan O'Rear wrote: > > While

[PATCH v4] bpf: Replace bpf_lpm_trie_key 0-length array with flexible array

2024-02-20 Thread Kees Cook
Replace deprecated 0-length array in struct bpf_lpm_trie_key with flexible array. Found with GCC 13: ../kernel/bpf/lpm_trie.c:207:51: warning: array subscript i is outside array bounds of 'const __u8[0]' {aka 'const unsigned char[]'} [-Warray-bounds=] 207 |

Re: [PATCH v3] bpf: Replace bpf_lpm_trie_key 0-length array with flexible array

2024-02-20 Thread Kees Cook
On Tue, Feb 20, 2024 at 11:18:40AM +0100, Daniel Borkmann wrote: > On 2/20/24 12:41 AM, Kees Cook wrote: > > Replace deprecated 0-length array in struct bpf_lpm_trie_key with > > flexible array. Found with GCC 13: > [...] > This fails the BPF CI : > > [...] > INSTALL >

Re: [PATCH v8 00/38] arm64/gcs: Provide support for GCS in userspace

2024-02-20 Thread Edgecombe, Rick P
Hi, I worked on the x86 kernel shadow stack support. I think it is an interesting suggestion. Some questions below, and I will think more on it. On Tue, 2024-02-20 at 11:36 -0500, Stefan O'Rear wrote: > While discussing the ABI implications of shadow stacks in the context > of > Zicfiss and musl

Re: [PATCH bpf-next 1/5] bpf: tracing: add support to record and check the accessed args

2024-02-20 Thread Kui-Feng Lee
On 2/19/24 19:51, Menglong Dong wrote: In this commit, we add the 'accessed_args' field to struct bpf_prog_aux, which is used to record the accessed index of the function args in btf_ctx_access(). Meanwhile, we add the function btf_check_func_part_match() to compare the accessed function

kselftest/next kselftest-lkdtm: 2 runs, 1 regressions (v6.8-rc1-33-gf17d8a87ecb55)

2024-02-20 Thread kernelci.org bot
kselftest/next kselftest-lkdtm: 2 runs, 1 regressions (v6.8-rc1-33-gf17d8a87ecb55) Regressions Summary --- platform| arch | lab | compiler | defconfig | regressions

kselftest/next kselftest-livepatch: 1 runs, 1 regressions (v6.8-rc1-33-gf17d8a87ecb55)

2024-02-20 Thread kernelci.org bot
kselftest/next kselftest-livepatch: 1 runs, 1 regressions (v6.8-rc1-33-gf17d8a87ecb55) Regressions Summary --- platform| arch | lab | compiler | defconfig | regressions

Re: [PATCH net 03/13] mptcp: fix lockless access in subflow ULP diag

2024-02-20 Thread Eric Dumazet
On Tue, Feb 20, 2024 at 6:33 PM Paolo Abeni wrote: > > On Mon, 2024-02-19 at 19:33 +0100, Eric Dumazet wrote: > > On Mon, Feb 19, 2024 at 7:04 PM Paolo Abeni wrote: > > > Thanks for the head-up. This later option looks preferable, to avoid > > > quit a bit of noise with _ONCE annotation. Is

Re: [RFC 0/7] selftests: openvswitch: cleanups for running as selftests

2024-02-20 Thread Aaron Conole
Jakub Kicinski writes: > On Fri, 16 Feb 2024 10:28:39 -0500 Aaron Conole wrote: >> The series is a host of cleanups to the openvswitch selftest suite >> which should be ready to run under the netdev selftest runners using >> vng. For now, the testing has been done with RW directories, but >>

Re: [PATCH net 03/13] mptcp: fix lockless access in subflow ULP diag

2024-02-20 Thread Paolo Abeni
On Mon, 2024-02-19 at 19:33 +0100, Eric Dumazet wrote: > On Mon, Feb 19, 2024 at 7:04 PM Paolo Abeni wrote: > > Thanks for the head-up. This later option looks preferable, to avoid > > quit a bit of noise with _ONCE annotation. Is there a syzkaller splat I > > could look at? if it landed on the

Re: [PATCH bpf-next 1/5] bpf: tracing: add support to record and check the accessed args

2024-02-20 Thread Jiri Olsa
On Tue, Feb 20, 2024 at 11:51:01AM +0800, Menglong Dong wrote: SNIP > +static int get_ctx_arg_idx_aligned(struct btf *btf, const struct btf_type *t, > +int off) > +{ > + const struct btf_param *args; > + u32 offset = 0, nr_args; > + int i; > + > +

Re: [PATCH bpf-next 2/5] bpf: tracing: support to attach program to multi hooks

2024-02-20 Thread Jiri Olsa
On Tue, Feb 20, 2024 at 11:51:02AM +0800, Menglong Dong wrote: SNIP > @@ -3228,7 +3260,9 @@ static int bpf_tracing_prog_attach(struct bpf_prog > *prog, > struct bpf_link_primer link_primer; > struct bpf_prog *tgt_prog = NULL; > struct bpf_trampoline *tr = NULL; > + struct

Re: [PATCH v13 00/21] KVM: xen: update shared_info and vcpu_info handling

2024-02-20 Thread Paul Durrant
On 20/02/2024 16:15, Sean Christopherson wrote: On Tue, Feb 20, 2024, Paul Durrant wrote: On 20/02/2024 15:55, Sean Christopherson wrote: On Thu, 15 Feb 2024 15:28:55 +, Paul Durrant wrote: From: Paul Durrant This series contains a new patch from Sean added since v12 [1]: * KVM: s390:

kselftest/next build: 3 builds: 2 failed, 1 passed, 2 errors, 3 warnings (v6.8-rc1-33-gf17d8a87ecb55)

2024-02-20 Thread kernelci.org bot
kselftest/next build: 3 builds: 2 failed, 1 passed, 2 errors, 3 warnings (v6.8-rc1-33-gf17d8a87ecb55) Full Build Summary: https://kernelci.org/build/kselftest/branch/next/kernel/v6.8-rc1-33-gf17d8a87ecb55/ Tree: kselftest Branch: next Git Describe: v6.8-rc1-33-gf17d8a87ecb55 Git Commit:

Re: [PATCH v8 00/38] arm64/gcs: Provide support for GCS in userspace

2024-02-20 Thread Stefan O'Rear
On Sat, Feb 3, 2024, at 7:25 AM, Mark Brown wrote: > The arm64 Guarded Control Stack (GCS) feature provides support for > hardware protected stacks of return addresses, intended to provide > hardening against return oriented programming (ROP) attacks and to make > it easier to gather call stacks

Re: [PATCH v13 00/21] KVM: xen: update shared_info and vcpu_info handling

2024-02-20 Thread David Woodhouse
On 20 February 2024 17:15:06 CET, Sean Christopherson wrote: >On Tue, Feb 20, 2024, Paul Durrant wrote: >> On 20/02/2024 15:55, Sean Christopherson wrote: >> > On Thu, 15 Feb 2024 15:28:55 +, Paul Durrant wrote: >> > > From: Paul Durrant >> > > >> > > This series contains a new patch from

Re: [PATCH v13 00/21] KVM: xen: update shared_info and vcpu_info handling

2024-02-20 Thread Sean Christopherson
On Tue, Feb 20, 2024, Paul Durrant wrote: > On 20/02/2024 15:55, Sean Christopherson wrote: > > On Thu, 15 Feb 2024 15:28:55 +, Paul Durrant wrote: > > > From: Paul Durrant > > > > > > This series contains a new patch from Sean added since v12 [1]: > > > > > > * KVM: s390: Refactor

Re: [PATCH v13 00/21] KVM: xen: update shared_info and vcpu_info handling

2024-02-20 Thread Paul Durrant
On 20/02/2024 15:55, Sean Christopherson wrote: On Thu, 15 Feb 2024 15:28:55 +, Paul Durrant wrote: From: Paul Durrant This series contains a new patch from Sean added since v12 [1]: * KVM: s390: Refactor kvm_is_error_gpa() into kvm_is_gpa_in_memslot() This frees up the function name

Re: [PATCH v13 00/21] KVM: xen: update shared_info and vcpu_info handling

2024-02-20 Thread Sean Christopherson
On Thu, 15 Feb 2024 15:28:55 +, Paul Durrant wrote: > From: Paul Durrant > > This series contains a new patch from Sean added since v12 [1]: > > * KVM: s390: Refactor kvm_is_error_gpa() into kvm_is_gpa_in_memslot() > > This frees up the function name kvm_is_error_gpa() such that it can

Re: [PATCH v3 1/2] KVM: s390: fix access register usage in ioctls

2024-02-20 Thread Eric Farman
On Tue, 2024-02-20 at 15:19 +0100, Janosch Frank wrote: > On 2/20/24 15:15, Christian Borntraeger wrote: > > > > > > Am 16.02.24 um 22:36 schrieb Eric Farman: > > > The routine ar_translation() can be reached by both the > > > instruction > > > intercept path (where the access registers had been

Re: [PATCH v2 2/2] KVM: s390: selftests: memop: add a simple AR test

2024-02-20 Thread Eric Farman
On Tue, 2024-02-20 at 14:34 +0100, Nina Schoetterl-Glausch wrote: > On Thu, 2024-02-15 at 21:53 +0100, Eric Farman wrote: > > There is a selftest that checks for an (expected) error when an > > invalid AR is specified, but not one that exercises the AR path. > > > > Add a simple test that mirrors

Re: [PATCH v3 2/2] KVM: s390: selftests: memop: add a simple AR test

2024-02-20 Thread Christian Borntraeger
Am 16.02.24 um 22:36 schrieb Eric Farman: There is a selftest that checks for an (expected) error when an invalid AR is specified, but not one that exercises the AR path. Add a simple test that mirrors the vanilla write/read test while providing an AR. An AR that contains zero will direct

Re: [PATCH 2/3] selftests/resctrl: Simplify cleanup in ctrl-c handler

2024-02-20 Thread Ilpo Järvinen
On Tue, 20 Feb 2024, Maciej Wieczor-Retman wrote: > On 2024-02-20 at 15:45:23 +0200, Ilpo Järvinen wrote: > >On Tue, 20 Feb 2024, Maciej Wieczor-Retman wrote: > > > >> Ctrl-c handler isn't aware of what test is currently running. Because of > >> that it executes all cleanups even if they aren't

Re: [PATCH v3 1/2] KVM: s390: fix access register usage in ioctls

2024-02-20 Thread Janosch Frank
On 2/20/24 15:15, Christian Borntraeger wrote: Am 16.02.24 um 22:36 schrieb Eric Farman: The routine ar_translation() can be reached by both the instruction intercept path (where the access registers had been loaded with the guest register contents), and the MEM_OP ioctls (which hadn't).

  1   2   >