Re: [PATCH 4/9] time: test: Fix incorrect format specifier

2024-02-21 Thread Justin Stitt
Hi, On Wed, Feb 21, 2024 at 05:27:17PM +0800, David Gow wrote: > 'days' is a s64 (from div_s64), and so should use a %lld specifier. > > This was found by extending KUnit's assertion macros to use gcc's > __printf attribute. > > Fixes: 276010551664 ("time: Improve performance of time64_to_tm()") >

Re: [PATCH 5/9] rtc: test: Fix invalid format specifier.

2024-02-21 Thread Justin Stitt
Hi, On Wed, Feb 21, 2024 at 05:27:18PM +0800, David Gow wrote: > 'days' is a s64 (from div_s64), and so should use a %lld specifier. > > This was found by extending KUnit's assertion macros to use gcc's > __printf attribute. > > Fixes: 1d1bb12a8b18 ("rtc: Improve performance of rtc_time64_to_tm().

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

2024-02-21 Thread Shuah Khan
On 2/21/24 05:26, Marcos Paulo de Souza wrote: On Tue, 20 Feb 2024 17:19:54 -0700 Shuah Khan wrote: 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, ker

Re: [ovs-dev] [RFC 3/7] selftests: openvswitch: use non-graceful kills when needed

2024-02-21 Thread Aaron Conole
Adrian Moreno writes: > On 2/16/24 16:28, Aaron Conole wrote: >> Normally a spawned process under OVS is given a SIGTERM when the test >> ends as part of cleanup. However, in case the process is still lingering >> for some reason, we also send a SIGKILL to force it down faster. >> Signed-off-by:

[PATCH 0/2] selftests/damon: misc fixes

2024-02-21 Thread SeongJae Park
Resending misc fixes for DAMON selftets on behalf of the original authors for more visibility and inclusion on mm tree. The patches are same to their original versions, except added Links: for the original posts, and Signed-off-by: of mine. Javier Carrasco (1): selftests: damon: add access_memo

[PATCH 1/2] selftest: damon: fix minor typos in test logs

2024-02-21 Thread SeongJae Park
From: Vincenzo Mezzela This patch resolves a spelling error in the test log, preventing potential confusion. It is submitted as part of my application to the "Linux Kernel Bug Fixing Spring Unpaid 2024" mentorship program of the Linux Foundation. Link: https://lore.kernel.org/r/20240204122523.

[PATCH 2/2] selftests: damon: add access_memory to .gitignore

2024-02-21 Thread SeongJae Park
From: Javier Carrasco This binary is missing in the .gitignore and stays as an untracked file. Link: https://lore.kernel.org/r/20240214-damon_selftest_gitignore-v1-1-f517d0f9f...@gmail.com Reported-by: Bernd Edlinger Closes: https://lore.kernel.org/all/as8p193mb1285c963658008f1b2702af7e4...@a

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

2024-02-21 Thread H.J. Lu
On Wed, Feb 21, 2024 at 12:25 PM H.J. Lu wrote: > > On Wed, Feb 21, 2024 at 12:18 PM H.J. Lu wrote: > > > > On Wed, Feb 21, 2024 at 11:22 AM Edgecombe, Rick P > > wrote: > > > > > > On Wed, 2024-02-21 at 14:06 -0500, dal...@libc.org wrote: > > > > Due to arbitrarily nestable signal frames, no, t

Re: [PATCH 6/9] net: test: Fix printf format specifier in skb_segment kunit test

2024-02-21 Thread Justin Stitt
Hi, On Wed, Feb 21, 2024 at 05:27:19PM +0800, David Gow wrote: > KUNIT_FAIL() accepts a printf-style format string, but previously did > not let gcc validate it with the __printf() attribute. The use of %lld > for the result of PTR_ERR() is not correct. > > Instead, use %pe and pass the actual err

Re: [PATCH 7/9] drm: tests: Fix invalid printf format specifiers in KUnit tests

2024-02-21 Thread Justin Stitt
Hi, On Wed, Feb 21, 2024 at 05:27:20PM +0800, David Gow wrote: > The drm_buddy_test's alloc_contiguous test used a u64 for the page size, > which was then updated to be an 'unsigned long' to avoid 64-bit > multiplication division helpers. > > However, the variable is logged by some KUNIT_ASSERT_EQ

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

2024-02-21 Thread Kees Cook
On Wed, Feb 21, 2024 at 05:39:55PM +0100, Daniel Borkmann wrote: > On 2/20/24 7:54 PM, Kees Cook wrote: > > 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 > > a

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

2024-02-21 Thread Kees Cook
On Wed, Feb 21, 2024 at 05:39:55PM +0100, Daniel Borkmann wrote: > The build in BPF CI is still broken, did you try to build selftests? Okay, I give up. How is a mortal supposed to build these? If I try to follow what I see in https://github.com/libbpf/ci/blob/main/build-selftests/build_selftests

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

2024-02-21 Thread Marcos Paulo de Souza
On Wed, 21 Feb 2024 14:12:00 -0700 Shuah Khan wrote: > On 2/21/24 05:26, Marcos Paulo de Souza wrote: > > On Tue, 20 Feb 2024 17:19:54 -0700 Shuah Khan > > wrote: > > > >> On 2/19/24 06:53, Marcos Paulo de Souza wrote: > >>> On Mon, 19 Feb 2024 09:15:15 -0300 Marcos Paulo de Souza > >>> wrot

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

2024-02-21 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 net 0/5] tls: fixes for record type handling with PEEK

2024-02-21 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net.git (main) by Jakub Kicinski : On Thu, 15 Feb 2024 17:17:28 +0100 you wrote: > There are multiple bugs in tls_sw_recvmsg's handling of record types > when MSG_PEEK flag is used, which can lead to incorrectly merging two > records: > - consecutive non-

[PATCH] Build guest_memfd_test also on arm64.

2024-02-21 Thread Itaru Kitayama
--- on arm64 KVM_CAP_GUEST_MEMDF capability is not enabled, but guest_memfd_test can build on arm64, let's build it on arm64 as well. Signed-off-by: Itaru Kitayama --- tools/testing/selftests/kvm/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/kvm/Makefile

Re: [RFC PATCH v1 11/28] riscv: Implementing "PROT_SHADOWSTACK" on riscv

2024-02-21 Thread Deepak Gupta
On Fri, Feb 09, 2024 at 08:44:35PM +, Edgecombe, Rick P wrote: On Wed, 2024-01-24 at 22:21 -0800, de...@rivosinc.com wrote: +   /* +    * PROT_SHADOWSTACK is a kernel only protection flag on risc- v. +    * mmap doesn't expect PROT_SHADOWSTACK to be set by user space. +    *

Re: [RFC PATCH v1 18/28] prctl: arch-agnostic prtcl for indirect branch tracking

2024-02-21 Thread Deepak Gupta
On Tue, Feb 06, 2024 at 04:13:39PM +, Mark Brown wrote: On Wed, Jan 24, 2024 at 10:21:43PM -0800, de...@rivosinc.com wrote: To allow userspace to enable this feature for itself, following prtcls are defined: - PR_GET_INDIR_BR_LP_STATUS: Gets current configured status for indirect branch

Re: [RFC PATCH v1 15/28] riscv/mm: Implement map_shadow_stack() syscall

2024-02-21 Thread Deepak Gupta
On Tue, Feb 06, 2024 at 04:01:28PM +, Mark Brown wrote: On Wed, Jan 24, 2024 at 10:21:40PM -0800, de...@rivosinc.com wrote: As discussed extensively in the changelog for the addition of this syscall on x86 ("x86/shstk: Introduce map_shadow_stack syscall") the existing mmap() and madvise() s

Re: [PATCH v2 17/31] ntsync: Allow waits to use the REALTIME clock.

2024-02-21 Thread Elizabeth Figura
On Tuesday, 20 February 2024 01:01:59 CST Arnd Bergmann wrote: > On Mon, Feb 19, 2024, at 23:38, Elizabeth Figura wrote: > > NtWaitForMultipleObjects() can receive a timeout in two forms, relative or > > absolute. Relative timeouts are unaffected by changes to the system time > > and do > > not co

Re: [RFC PATCH v1 15/28] riscv/mm: Implement map_shadow_stack() syscall

2024-02-21 Thread Deepak Gupta
On Fri, Feb 09, 2024 at 08:44:53PM +, Edgecombe, Rick P wrote: On Wed, 2024-01-24 at 22:21 -0800, de...@rivosinc.com wrote: From: Deepak Gupta As discussed extensively in the changelog for the addition of this syscall on x86 ("x86/shstk: Introduce map_shadow_stack syscall") the existing mm

Re: [RFC PATCH v1 09/28] mm: abstract shadow stack vma behind `arch_is_shadow_stack`

2024-02-21 Thread Deepak Gupta
On Tue, Feb 13, 2024 at 11:34:59AM +0100, David Hildenbrand wrote: On 25.01.24 18:07, Deepak Gupta wrote: On Thu, Jan 25, 2024 at 09:18:07AM +0100, David Hildenbrand wrote: On 25.01.24 07:21, de...@rivosinc.com wrote: From: Deepak Gupta x86 has used VM_SHADOW_STACK (alias to VM_HIGH_ARCH_5)

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

2024-02-21 Thread Yujie Liu
les/? > > >>> > > >> > > >> This would be a regression to automated test rings. Do you have any other > > >> solutions? > > > > > > I would say that we could skip the these tests if kernel-devel package is > > > not > > > installed. Would it be acceptable? At least we would avoid such issues > > > like this > > > in the future as well. > > > > > > > We have to check and skip build. Something we could do in the livepatch > > Makefile. Can you send patch for this - I will oull this in for next > > so we don't break test rings. > > I added a new patch in the same patchset that would cover this, skipping the > build and test if kernel-devel is not installed. The patchset was sent earlier > today. Please check if the new patch fixes things on the build robot. Hi Shuah, Hi Marcos, Sorry for this wrong report. The files are organized in a different way in the bot and cause this issue. We have fixed the bot to explicitly set KDIR to the correct path before building the selftests. The patch [1] can also work well in bot's environment. [1] https://lore.kernel.org/all/20240221-lp-selftests-fixes-v2-2-a19be1e02...@suse.com/ Best Regards, Yujie

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

2024-02-21 Thread Marcos Paulo de Souza
/lib/modules/? > > > >>> > > > >> > > > >> This would be a regression to automated test rings. Do you have any > > > >> other > > > >> solutions? > > > > > > > > I would say that we could skip the t

[PATCH v3 3/3] selftests: add zswapin and no zswap tests (fix)

2024-02-21 Thread Nhat Pham
Remove redundant "set up" comment and add check to ensure enough data is swapped out (in swapin test) and zswapped-in. Suggested-by: Yosry Ahmed Signed-off-by: Nhat Pham --- tools/testing/selftests/cgroup/test_zswap.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --gi

Re: [PATCH 8/9] drm/xe/tests: Fix printf format specifiers in xe_migrate test

2024-02-21 Thread Lucas De Marchi
On Wed, Feb 21, 2024 at 05:27:21PM +0800, David Gow wrote: KUNIT_FAIL() is used to fail the xe_migrate test when an error occurs. However, there's a mismatch in the format specifier: '%li' is used to log 'err', which is an 'int'. Use '%i' instead of '%li', and for the case where we're printing a

Re: [PATCH 8/9] drm/xe/tests: Fix printf format specifiers in xe_migrate test

2024-02-21 Thread Linus Torvalds
On Wed, 21 Feb 2024 at 21:05, Lucas De Marchi wrote: > > this has a potential to cause conflicts with upcoming work, so I think > it's better to apply this through drm-xe-next. Let me know if you agree. I disagree. Violently. For this to be fixed, we need to have the printf format checking enabl

Re: [PATCH 2/9] lib/cmdline: Fix an invalid format specifier in an assertion msg

2024-02-21 Thread David Gow
On Thu, 22 Feb 2024 at 04:10, 'Justin Stitt' via KUnit Development wrote: > > Hi, > > On Wed, Feb 21, 2024 at 05:27:15PM +0800, David Gow wrote: > > The correct format specifier for p - n (both p and n are pointers) is > > %td, as the type should be ptrdiff_t. > > I think %tu is better. d specifie

[PATCH] selftests/iommu: fix the config fragment

2024-02-21 Thread Muhammad Usama Anjum
The config fragment doesn't follow the correct format to enable those config options which make the config options getting missed while merging with other configs. ➜ merge_config.sh -m .config tools/testing/selftests/iommu/config Using .config as base Merging tools/testing/selftests/iommu/config ➜

<    1   2