Re: [PATCH v7 1/1] selftests: Centralize -D_GNU_SOURCE= to CFLAGS in lib.mk

2024-06-30 Thread Muhammad Usama Anjum
On 6/26/24 3:34 AM, Edward Liaw wrote: > Centralize the _GNU_SOURCE definition to CFLAGS in lib.mk. Remove > redundant defines from Makefiles that import lib.mk. Convert any usage > of "#define _GNU_SOURCE 1" to "#define _GNU_SOURCE". > > This uses the form "-D_GNU_SOURCE=", which is equivalent

Re: [PATCH v3] selftests/capabilities: Fix possible file leak in copy_fromat_to

2024-06-30 Thread Muhammad Usama Anjum
Thanks for the patch! On 6/30/24 6:00 PM, Ma Ke wrote: > The open() function returns -1 on error. openat() and open() initialize > 'from' and 'to', and only 'from' validated with 'if' statement. If the > initialization of variable 'to' fails, we should better check the value > of 'to' and close 'f

[PATCH] selftests/breakpoints:Add return value in main function

2024-06-30 Thread Zhu Jun
Main function return value is int type, so add return value in the end Signed-off-by: Zhu Jun --- .../testing/selftests/breakpoints/step_after_suspend_test.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/breakpoints/step_after_suspend_test.c b

[PATCH] selftests/breakpoints:Remove unused variable

2024-06-30 Thread Zhu Jun
This variable is never referenced in the code, just remove them. Signed-off-by: Zhu Jun --- tools/testing/selftests/breakpoints/step_after_suspend_test.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/breakpoints/step_after_suspend_test.c b/tools/testing/selftests/br

[PATCH] selftests/bpf:fix a resource leak

2024-06-30 Thread Zhu Jun
The requested resources should be closed before return in main(), otherwise resource leak will occur Signed-off-by: Zhu Jun --- tools/testing/selftests/bpf/test_sockmap.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tools/testing/selftests/bpf/test_sockmap.

[PATCH AUTOSEL 6.6 09/12] selftests: openvswitch: Set value to nla flags.

2024-06-30 Thread Sasha Levin
From: Adrian Moreno [ Upstream commit a876349d21b570b26160d0a5e0a2ee529d22 ] Netlink flags, although they don't have payload at the netlink level, are represented as having "True" as value in pyroute2. Without it, trying to add a flow with a flag-type action (e.g: pop_vlan) fails with the f

[PATCH AUTOSEL 6.9 13/20] selftests: openvswitch: Set value to nla flags.

2024-06-30 Thread Sasha Levin
From: Adrian Moreno [ Upstream commit a876349d21b570b26160d0a5e0a2ee529d22 ] Netlink flags, although they don't have payload at the netlink level, are represented as having "True" as value in pyroute2. Without it, trying to add a flow with a flag-type action (e.g: pop_vlan) fails with the f

Re: [RFC PATCH 0/3] tracing: Support poll on event hist file

2024-06-30 Thread Tom Zanussi
Hi Masami, On Wed, 2024-06-26 at 00:16 +0900, Masami Hiramatsu (Google) wrote: > Hi, > > Here is an RFC patch to support polling on event 'hist' file. > > There has been interest in allowing user programs to monitor kernel > events in real time. Ftrace provides `trace_pipe` interface to wait > o

[PATCH net-next v7 10/10] selftests: openvswitch: add psample test

2024-06-30 Thread Adrian Moreno
Add a test to verify sampling packets via psample works. In order to do that, create a subcommand in ovs-dpctl.py to listen to on the psample multicast group and print samples. Signed-off-by: Adrian Moreno --- .../selftests/net/openvswitch/openvswitch.sh | 115 +- .../selftests

[PATCH net-next v7 09/10] selftests: openvswitch: parse trunc action

2024-06-30 Thread Adrian Moreno
The trunc action was supported decode-able but not parse-able. Add support for parsing the action string. Reviewed-by: Aaron Conole Signed-off-by: Adrian Moreno --- .../testing/selftests/net/openvswitch/ovs-dpctl.py | 13 + 1 file changed, 13 insertions(+) diff --git a/tools/testi

[PATCH net-next v7 08/10] selftests: openvswitch: add userspace parsing

2024-06-30 Thread Adrian Moreno
The userspace action lacks parsing support plus it contains a bug in the name of one of its attributes. This patch makes userspace action work. Reviewed-by: Aaron Conole Signed-off-by: Adrian Moreno --- .../selftests/net/openvswitch/ovs-dpctl.py| 24 +-- 1 file changed, 22

[PATCH net-next v7 07/10] selftests: openvswitch: add psample action

2024-06-30 Thread Adrian Moreno
Add sample and psample action support to ovs-dpctl.py. Refactor common attribute parsing logic into an external function. Signed-off-by: Adrian Moreno --- .../selftests/net/openvswitch/ovs-dpctl.py| 162 +- 1 file changed, 161 insertions(+), 1 deletion(-) diff --git a/tools

[PATCH net-next v7 00/10] net: openvswitch: Add sample multicasting.

2024-06-30 Thread Adrian Moreno
** Background ** Currently, OVS supports several packet sampling mechanisms (sFlow, per-bridge IPFIX, per-flow IPFIX). These end up being translated into a userspace action that needs to be handled by ovs-vswitchd's handler threads only to be forwarded to some third party application that will some

[PATCH v2] selftest: acct: Add selftest for the acct() syscall

2024-06-30 Thread Abdulrasaq Lawani
Noticed that there was no selftest for the acct() syscall which enables the kernel to record terminated processes into a specified file. The acct() system call enables or disables process accounting. If accounting is turned on, records for each terminating process are appended to a specified filen

[PATCH v4] memfd: `MFD_NOEXEC_SEAL` should not imply `MFD_ALLOW_SEALING`

2024-06-30 Thread Barnabás Pőcze
`MFD_NOEXEC_SEAL` should remove the executable bits and set `F_SEAL_EXEC` to prevent further modifications to the executable bits as per the comment in the uapi header file: not executable and sealed to prevent changing to executable However, commit 105ff5339f498a ("mm/memfd: add MFD_NOEXEC_SEA

Re: [PATCH v4 2/2] selftests: Add a test mangling with uc_sigmask

2024-06-30 Thread Oleg Nesterov
I see nothing wrong, but perhaps this test can be simplified? Feel free to ignore. Say, On 06/27, Dev Jain wrote: > > +void handler_usr(int signo, siginfo_t *info, void *uc) > +{ > + int ret; > + > + /* > + * Break out of infinite recursion caused by raise(SIGUSR1) invoked > + *

[PATCH v3] selftests/capabilities: Fix possible file leak in copy_fromat_to

2024-06-30 Thread Ma Ke
The open() function returns -1 on error. openat() and open() initialize 'from' and 'to', and only 'from' validated with 'if' statement. If the initialization of variable 'to' fails, we should better check the value of 'to' and close 'from' to avoid possible file leak. Improve the checking of 'from'

Re: [PATCH v7 1/4] mm/memory-failure: refactor log format in soft offline code

2024-06-30 Thread Lance Yang
On Sat, Jun 29, 2024 at 5:00 AM Jiaqi Yan wrote: > > Logs from soft_offline_page and soft_offline_in_use_page have > different formats than majority of the memory failure code: > > "Memory failure: 0x${pfn}: ${lower_case_message}" > > Convert them to the following format: > > "Soft offline: 0x

Re: [PATCH v7 4/4] docs: mm: add enable_soft_offline sysctl

2024-06-30 Thread David Rientjes
On Fri, 28 Jun 2024, Jiaqi Yan wrote: > Add the documentation for soft offline behaviors / costs, and what > the new enable_soft_offline sysctl is for. > > Acked-by: Oscar Salvador > Acked-by: Miaohe Lin > Signed-off-by: Jiaqi Yan Acked-by: David Rientjes

Re: [PATCH v7 3/4] selftest/mm: test enable_soft_offline behaviors

2024-06-30 Thread David Rientjes
On Fri, 28 Jun 2024, Jiaqi Yan wrote: > Add regression and new tests when hugepage has correctable memory > errors, and how userspace wants to deal with it: > * if enable_soft_offline=1, mapped hugepage is soft offlined > * if enable_soft_offline=0, mapped hugepage is intact > > Free hugepages ca