[PATCH] Documentation: Add description to stack_order interface

2024-09-24 Thread Wardenjohn
Update description of klp_patch stack_order sysfs interface to livepatch ABI documentation. Signed-off-by: Wardenjohn diff --git a/Documentation/ABI/testing/sysfs-kernel-livepatch b/Documentation/ABI/testing/sysfs-kernel-livepatch index a5df9b4910dc..9cad725a69c7 100644 --- a/Documentation/ABI/

[PATCH] livepatch: introduce 'stack_order' sysfs interface to klp_patch

2024-09-24 Thread Wardenjohn
This feature can provide livepatch patch order information. With the order of sysfs interface of one klp_patch, we can use patch order to find out which function of the patch is now activate. After the discussion, we decided that patch-level sysfs interface is the only accaptable way to introduce

[PATCH 0/2] livepatch: introduce 'stack_order' sysfs interface to klp_patch

2024-09-24 Thread Wardenjohn
As previous discussion, maintainers think that patch-level sysfs interface is the only acceptable way to maintain the information of the order that klp_patch is applied to the system. However, the previous patch introduce klp_ops into klp_func is a optimization methods of the patch introducing

Re: [RFC PATCH 1/1] hpref: Hazard Pointers with Reference Counter

2024-09-24 Thread Mathieu Desnoyers
On 2024-09-25 07:57, Jonas Oberhauser wrote: Hi Mathieu, interesting idea. Conceptually it looks good. There's another approach of using hazard pointer to optimize shared reference counting (to make it lock-free in common cases). https://github.com/cmuparlay/concurrent_deferred_rc It doesn'

Re: [RFC PATCH 1/1] hpref: Hazard Pointers with Reference Counter

2024-09-24 Thread Jonas Oberhauser
Hi Mathieu, interesting idea. Conceptually it looks good. There's another approach of using hazard pointer to optimize shared reference counting (to make it lock-free in common cases). https://github.com/cmuparlay/concurrent_deferred_rc It doesn't go as far as what you're doing, but they als

Re: [PATCH v1 1/1] selftests: set executable bit

2024-09-24 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to bpf/bpf-next.git (master) by Palmer Dabbelt : On Tue, 24 Sep 2024 13:54:57 -0400 you wrote: > Turn on the executable bit for the following script files. These scripts > are set to TEST_PROGS in their respective Makefiles, but currently, when > these tests are run,

[PATCH] Fix issue related with assigning two diffrent vids to the same interface.

2024-09-24 Thread Kacper Ludwinski
Fixes: 476a4f05d9b8 ("selftests: forwarding: add a no_forwarding.sh test") Signed-off-by: Kacper Ludwinski --- tools/testing/selftests/net/forwarding/no_forwarding.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/forwarding/no_forwarding.sh b/too

[PATCH] Fix issue related with assigning two diffrent vids to the same interface.

2024-09-24 Thread Kacper Ludwinski
Fixes: 476a4f0 ("selftests: forwarding: add a no_forwarding.sh test") Signed-off-by: Kacper Ludwinski --- tools/testing/selftests/net/forwarding/no_forwarding.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/forwarding/no_forwarding.sh b/tools/te

Re: [PATCH] virtio: Make vring_new_virtqueue support for packed vring

2024-09-24 Thread Jason Wang
On Sat, Sep 21, 2024 at 4:21 AM Wenyu Huang wrote: > > From: Wenyu Huang > > It's also available for packed ring now. > > Signed-off-by: Wenyu Huang > --- Patch seems to be fine at a first glance. Is this used for testing or transport like remoteproc? Thanks

Re: [PATCH v2] dt-bindings: remoteproc: qcom,sa8775p-pas: Document QCS8300 remoteproc

2024-09-24 Thread Jingyi Wang
On 9/16/2024 10:57 PM, Krzysztof Kozlowski wrote: > On 11/09/2024 08:41, Jingyi Wang wrote: >> + - items: >> + - enum: >> + - qcom,qcs8300-adsp-pas >> + - const: qcom,sa8775p-adsp-pas >> + - items: >> + - enum: >> + - qcom,qcs8300-cd

Re: [PATCH 1/2] livepatch: introduce 'order' sysfs interface to klp_patch

2024-09-24 Thread zhang warden
Hi! Petr! > On Sep 24, 2024, at 19:27, Petr Mladek wrote: > > This does not work well. It uses the order on the stack when > the livepatch is being loaded. It is not updated when any livepatch gets > removed. It might create wrong values. > > I have even tried to reproduce this: > > # modprob

Re: [PATCH bpf-next v2] selftests/bpf: convert test_xdp_features.sh to test_progs

2024-09-24 Thread Martin KaFai Lau
On 9/22/24 12:04 PM, Alexis Lothoré wrote: Hello all, sorry for the slow feedback, I have been off last week. On 9/14/24 15:38, Jakub Kicinski wrote: On Sat, 14 Sep 2024 11:25:47 +0200 Lorenzo Bianconi wrote: On Sep 13, Martin KaFai Lau wrote: test a physical network device that supports a ce

Re: [PATCH] selftest: remoteproc: Add basic test for start/stop sequence

2024-09-24 Thread Bjorn Andersson
On Fri, Sep 20, 2024 at 11:28:42PM GMT, Wasim Nazir wrote: > Add new basic remoteproc test that check start/stop > sequence of all subsystems available. > Please describe your test scenario more than just "check start/stop sequence". Signed-off-by... > diff --git a/MAINTAINERS b/MAINTAINERS > i

Re: [PATCH 2/2] selftests: timers: Remove local NSEC_PER_SEC and USEC_PER_SEC defines

2024-09-24 Thread John Stultz
On Tue, Sep 24, 2024 at 8:57 AM Shuah Khan wrote: > > Remove local NSEC_PER_SEC and USEC_PER_SEC defines. Pick them up from > include/vdso/time64.h. This requires -I $(top_srcdir) to the timers > Makefile to include the include/vdso/time64.h. > > posix_timers test names the defines NSECS_PER_SEC a

Re: [RFC PATCH 2/3] ipv6: Run a reverse sk_lookup on sendmsg.

2024-09-24 Thread Martin KaFai Lau
On 9/17/24 6:15 PM, Tiago Lam wrote: On Fri, Sep 13, 2024 at 11:24:09AM -0700, Martin KaFai Lau wrote: On 9/13/24 2:39 AM, Tiago Lam wrote: This follows the same rationale provided for the ipv4 counterpart, where it now runs a reverse socket lookup when source addresses and/or ports are changed

Re: [PATCH 0/1] Add KUnit tests for lib/crc16.c

2024-09-24 Thread Vinicius Peixoto
Hi André, On 9/24/24 6:33 PM, André Almeida wrote: Hey! On 9/23/24 01:26, Vinicius Peixoto wrote: Hi all, This patch was developed during a hackathon organized by LKCAMP [1], with the objective of writing KUnit tests, both to introduce people to the kernel development process and to learn ab

Re: [PATCH bpf-next v1] selftests/bpf:Enhance bpf ability to detect ksym read error by libcap

2024-09-24 Thread Martin KaFai Lau
On 9/14/24 11:24 AM, Lin Yikai wrote: diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index 04716a5e43f1..369c5ad8fc4a 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -183,7 +183,7 @@ NON_CHECK_FEAT_TARGETS

Re: [PATCH] virtio: Make vring_new_virtqueue support for packed vring

2024-09-24 Thread Michael S. Tsirkin
On Sat, Sep 21, 2024 at 04:21:41AM +0800, Wenyu Huang wrote: > From: Wenyu Huang > > It's also available for packed ring now. > > Signed-off-by: Wenyu Huang More specifically, what are you trying to address here? Which configuration did not work but does now? > --- > drivers/virtio/virtio_r

Re: [PATCH 0/1] Add KUnit tests for lib/crc16.c

2024-09-24 Thread André Almeida
Hey! On 9/23/24 01:26, Vinicius Peixoto wrote: Hi all, This patch was developed during a hackathon organized by LKCAMP [1], with the objective of writing KUnit tests, both to introduce people to the kernel development process and to learn about different subsystems (with the positive side effec

[PATCH v4 07/16] module: Factor out elf_validity_cache_index_sym

2024-09-24 Thread Matthew Maurer
Centralize symbol table detection and property validation. Signed-off-by: Matthew Maurer --- kernel/module/main.c | 73 ++-- 1 file changed, 44 insertions(+), 29 deletions(-) diff --git a/kernel/module/main.c b/kernel/module/main.c index ec638187ffcf..6be

[PATCH v4 14/16] modules: Support extended MODVERSIONS info

2024-09-24 Thread Matthew Maurer
Adds a new format for MODVERSIONS which stores each field in a separate ELF section. This initially adds support for variable length names, but could later be used to add additional fields to MODVERSIONS in a backwards compatible way if needed. Any new fields will be ignored by old user tooling, un

[PATCH v4 02/16] module: Factor out elf_validity_ehdr

2024-09-24 Thread Matthew Maurer
Factor out verification of the ELF header and document what is checked. Signed-off-by: Matthew Maurer --- kernel/module/main.c | 70 +--- 1 file changed, 47 insertions(+), 23 deletions(-) diff --git a/kernel/module/main.c b/kernel/module/main.c index 1a2d

[PATCH v4 09/16] module: Group section index calculations together

2024-09-24 Thread Matthew Maurer
Group all the index detection together to make the parent function easier to read. Signed-off-by: Matthew Maurer --- kernel/module/main.c | 68 +--- 1 file changed, 51 insertions(+), 17 deletions(-) diff --git a/kernel/module/main.c b/kernel/module/main.c

[PATCH v4 12/16] module: Reformat struct for code style

2024-09-24 Thread Matthew Maurer
Using commas to declare struct members makes adding new members to this struct not as nice with patch management. Signed-off-by: Matthew Maurer --- kernel/module/internal.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/module/internal.h b/kernel/module/internal

[PATCH v4 11/16] module: Additional validation in elf_validity_cache_strtab

2024-09-24 Thread Matthew Maurer
Validate properties of the strtab that are depended on elsewhere, but were previously unchecked: * String table nonempty (offset 0 is valid) * String table has a leading NUL (offset 0 corresponds to "") * String table is NUL terminated (strfoo functions won't run out of the table while reading).

[PATCH v4 04/16] module: Factor out elf_validity_cache_secstrings

2024-09-24 Thread Matthew Maurer
Factor out the validation of section names. There are two behavioral changes: 1. Previously, we did not validate non-SHF_ALLOC sections. This may have once been safe, as find_sec skips non-SHF_ALLOC sections, but find_any_sec, which will be used to load BTF if that is enabled, ignores th

[PATCH v4 08/16] module: Factor out elf_validity_cache_index_str

2024-09-24 Thread Matthew Maurer
Pull out index validation for the symbol string section. Note that this does not validate the *contents* of the string table, only shape and presence of the section. Signed-off-by: Matthew Maurer --- kernel/module/main.c | 37 - 1 file changed, 28 insertions(

[PATCH v4 01/16] module: Take const arg in validate_section_offset

2024-09-24 Thread Matthew Maurer
`validate_section_offset` doesn't modify the info passed in. Make this clear by adjusting the type signature. Signed-off-by: Matthew Maurer --- kernel/module/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/module/main.c b/kernel/module/main.c index 49b9bca9de12.

[PATCH v4 06/16] module: Factor out elf_validity_cache_index_mod

2024-09-24 Thread Matthew Maurer
Centralize .gnu.linkonce.this_module detection and property validation. Signed-off-by: Matthew Maurer --- kernel/module/main.c | 129 ++- 1 file changed, 67 insertions(+), 62 deletions(-) diff --git a/kernel/module/main.c b/kernel/module/main.c index 511d

[PATCH v4 10/16] module: Factor out elf_validity_cache_strtab

2024-09-24 Thread Matthew Maurer
This patch only moves the existing strtab population to a function. Validation comes in a following patch, this is split out to make the new validation checks more clearly separated. Signed-off-by: Matthew Maurer --- kernel/module/main.c | 23 --- 1 file changed, 20 insertion

[PATCH v4 05/16] module: Factor out elf_validity_cache_index_info

2024-09-24 Thread Matthew Maurer
Centralize .modinfo detection and property validation. Signed-off-by: Matthew Maurer --- kernel/module/main.c | 82 1 file changed, 68 insertions(+), 14 deletions(-) diff --git a/kernel/module/main.c b/kernel/module/main.c index 6a9159afca02..511d645

[PATCH v4 03/16] module: Factor out elf_validity_cache_sechdrs

2024-09-24 Thread Matthew Maurer
Factor out and document the validation of section headers. Because we now validate all section offsets and lengths before accessing them, we can remove the ad-hoc checks. Signed-off-by: Matthew Maurer --- kernel/module/main.c | 125 --- 1 file changed, 82

Re: [GIT PULL] remoteproc updates for v6.12

2024-09-24 Thread Mathieu Poirier
On Tue, Sep 24, 2024 at 12:52:42PM -0700, Linus Torvalds wrote: > On Tue, 24 Sept 2024 at 12:31, Linus Torvalds > wrote: > > > > It's in my tree now, but please fix asap. > > Argh, now that I noticed it, I can no longer unsee it. > > So I did this > > - depends on ARCH_K3 || COMPILE_TEST

[GIT PULL] virtio: features, fixes, cleanups

2024-09-24 Thread Michael S. Tsirkin
The following changes since commit 431c1646e1f86b949fa3685efc50b660a364c2b6: Linux 6.11-rc6 (2024-09-01 19:46:02 +1200) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus for you to fetch changes up to 1bc6f4910ae955971097f3f

Re: [PATCH 2/2] selftest: rtc: Check if could access /dev/rtc0 before testing

2024-09-24 Thread Shuah Khan
On 9/24/24 13:31, Alexandre Belloni wrote: Hello, On 24/09/2024 10:05:43-0600, Shuah Khan wrote: On 9/23/24 23:37, Joseph Jang wrote: Hi Alexandre, Thank you for looking at the rtc patch. I saw you Acked the [PATCH 2/2], not sure when could we see the patch in kernel master or next branch ?

Re: [GIT PULL] remoteproc updates for v6.12

2024-09-24 Thread Linus Torvalds
On Tue, 24 Sept 2024 at 12:31, Linus Torvalds wrote: > > It's in my tree now, but please fix asap. Argh, now that I noticed it, I can no longer unsee it. So I did this - depends on ARCH_K3 || COMPILE_TEST + depends on ARCH_OMAP2PLUS || ARCH_K3 to the TI_K3_M4_REMOTEPROC entry so th

Re: [PATCH] remoteproc: qcom: q6v5-mss: Use common error handling code in q6v5_mpss_load()

2024-09-24 Thread Dmitry Baryshkov
On Tue, Sep 24, 2024 at 04:08:11PM GMT, Markus Elfring wrote: > From: Markus Elfring > Date: Tue, 24 Sep 2024 15:55:06 +0200 > > Add jump targets so that a bit of exception handling can be better reused > at the end of this function implementation. > > Signed-off-by: Markus Elfring > --- > dri

Re: [GIT PULL] hwspinlock update for v6.12

2024-09-24 Thread pr-tracker-bot
The pull request you sent on Mon, 23 Sep 2024 21:54:19 -0700: > https://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git > tags/hwlock-v6.12 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/6db6a19f1ae31e29857b0f6f3e3896c22543be21 Thank you! -- Deet-doot-

Re: [GIT PULL] rpmsg updates for v6.12

2024-09-24 Thread pr-tracker-bot
The pull request you sent on Mon, 23 Sep 2024 21:52:22 -0700: > https://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git > tags/rpmsg-v6.12 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/6e10aa1fee979a898b06a4c8f2083de16e16df69 Thank you! -- Deet-doot-d

Re: [GIT PULL] remoteproc updates for v6.12

2024-09-24 Thread pr-tracker-bot
The pull request you sent on Mon, 23 Sep 2024 21:47:40 -0700: > https://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git > tags/rproc-v6.12 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/5c480f1da82c15f635a2b663740cb2bb241cc416 Thank you! -- Deet-doot-d

Re: [GIT PULL] remoteproc updates for v6.12

2024-09-24 Thread Linus Torvalds
On Mon, 23 Sept 2024 at 21:44, Bjorn Andersson wrote: > > remoteproc updates for v6.12 Grr. I didn't immediately notice this new Kconfig warning, so now it's in my tree: WARNING: unmet direct dependencies detected for OMAP2PLUS_MBOX Depends on [n]: MAILBOX [=y] && (ARCH_OMAP2PLUS || ARCH_K

Re: [PATCH 2/2] selftest: rtc: Check if could access /dev/rtc0 before testing

2024-09-24 Thread Alexandre Belloni
Hello, On 24/09/2024 10:05:43-0600, Shuah Khan wrote: > On 9/23/24 23:37, Joseph Jang wrote: > > Hi Alexandre, > > > > Thank you for looking at the rtc patch. > > I saw you Acked the [PATCH 2/2], not sure when could we see the patch > > in kernel master or next branch ? > > > > Thank you, > > Jo

[PATCH] selftests/mm: add pkey_sighandler_xx, hugetlb_dio to .gitignore

2024-09-24 Thread Lorenzo Stoakes
Commit 6998a73efbb8 ("selftests/mm: Add new testcases for pkeys") and commit 3a103b5315b7 ("selftest: mm: Test if hugepage does not get leaked during __bio_release_pages()") generate test binaries hugetlb_dio, pkey_sighandler_tests_32 and pkey_sighandler_tests_64 but did not add these to .gitignore

Re: [PATCH v1 1/1] selftests: set executable bit

2024-09-24 Thread SeongJae Park
Hi David, On Tue, 24 Sep 2024 13:54:57 -0400 David Hunter wrote: > Turn on the executable bit for the following script files. These scripts > are set to TEST_PROGS in their respective Makefiles, but currently, when > these tests are run, a warning occurs: > > # Warning: is not executable T

Re: [PATCH bpf-next v3 1/2] bpf: verifier: Support eliding map lookup nullness

2024-09-24 Thread Eduard Zingerman
On Tue, 2024-09-24 at 04:40 -0600, Daniel Xu wrote: > This commit allows progs to elide a null check on statically known map > lookup keys. In other words, if the verifier can statically prove that > the lookup will be in-bounds, allow the prog to drop the null check. > > This is useful for two re

[PATCH v1 1/1] selftests: set executable bit

2024-09-24 Thread David Hunter
Turn on the executable bit for the following script files. These scripts are set to TEST_PROGS in their respective Makefiles, but currently, when these tests are run, a warning occurs: # Warning: is not executable Signed-off-by: David Hunter --- tools/testing/selftests/damon/damon_nr_regions

Re: [PATCH v6 3/3] x86/sgx: Resolve EREMOVE page vs EAUG page data race

2024-09-24 Thread Jarkko Sakkinen
On Tue Sep 24, 2024 at 12:49 PM EEST, Dmitrii Kuvaiskii wrote: > Two enclave threads may try to add and remove the same enclave page > simultaneously (e.g., if the SGX runtime supports both lazy allocation > and MADV_DONTNEED semantics). Consider some enclave page added to the > enclave. User space

Re: [PATCH 2/2] selftest: rtc: Check if could access /dev/rtc0 before testing

2024-09-24 Thread Shuah Khan
On 9/23/24 23:37, Joseph Jang wrote: Hi Alexandre, Thank you for looking at the rtc patch. I saw you Acked the [PATCH 2/2], not sure when could we see the patch in kernel master or next branch ? Thank you, Joseph. Please don't top post. It is hard to follow the thread. On 2024/6/21 3:37 AM

[PATCH 2/2] selftests: timers: Remove local NSEC_PER_SEC and USEC_PER_SEC defines

2024-09-24 Thread Shuah Khan
Remove local NSEC_PER_SEC and USEC_PER_SEC defines. Pick them up from include/vdso/time64.h. This requires -I $(top_srcdir) to the timers Makefile to include the include/vdso/time64.h. posix_timers test names the defines NSECS_PER_SEC and USECS_PER_SEC. Include the include/vdso/time64.h and change

[PATCH 1/2] selftests:timers: posix_timers: Fix warn_unused_result in __fatal_error()

2024-09-24 Thread Shuah Khan
__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

[PATCH 0/2] timers test fix and duplicate defines cleanup

2024-09-24 Thread Shuah Khan
The first patch in this two patch fixes warn_unused_result compile time warning in posix_timers test. The second patch removes local NSEC_PER_SEC and USEC_PER_SEC defines. NSEC_PER_SEC and USEC_PER_SEC are defines in several timers tests. These defines are inconsistent with variations of ULL, LL,

Re: [PATCH] remoteproc: k3: Call of_node_put(rmem_np) only once in three functions

2024-09-24 Thread Andrew Davis
On 9/24/24 7:43 AM, Markus Elfring wrote: From: Markus Elfring Date: Tue, 24 Sep 2024 14:28:35 +0200 An of_node_put(rmem_np) call was immediately used after a pointer check for a of_reserved_mem_lookup() call in three function implementations. Thus call such a function only once instead directl

Re: [PATCH 3/4] selftests: rds: add gitignore file for include.sh

2024-09-24 Thread Allison Henderson
On Tue, 2024-09-24 at 14:49 +0200, Javier Carrasco wrote: > The generated include.sh should be ignored by git. Create a new > gitignore and add the file to the list. > > Signed-off-by: Javier Carrasco Thanks! Reviewed-by: Allison Henderson > --- >  tools/testing/selftests/net/rds/.gitignore |

Re: [PATCH 2/4] selftests: rds: add include.sh to EXTRA_CLEAN

2024-09-24 Thread Allison Henderson
On Tue, 2024-09-24 at 14:49 +0200, Javier Carrasco wrote: > The include.sh file is generated when building the net/rds selftests, > but there is no rule to delete it with the clean target. Add the file > to > EXTRA_CLEAN in order to remove it when required. > > Signed-off-by: Javier Carrasco Ok,

Re: [PATCH 1/2] livepatch: introduce 'order' sysfs interface to klp_patch

2024-09-24 Thread Petr Mladek
On Tue 2024-09-24 13:27:58, Petr Mladek wrote: > On Fri 2024-09-20 17:04:03, Wardenjohn wrote: > > This feature can provide livepatch patch order information. > > With the order of sysfs interface of one klp_patch, we can > > use patch order to find out which function of the patch is > > now activa

Re: [PATCH] remoteproc: k3: Call of_node_put(rmem_np) only once in three functions

2024-09-24 Thread Martyn Welch
On Tue, 2024-09-24 at 14:43 +0200, Markus Elfring wrote: > From: Markus Elfring > Date: Tue, 24 Sep 2024 14:28:35 +0200 > > An of_node_put(rmem_np) call was immediately used after a pointer > check > for a of_reserved_mem_lookup() call in three function > implementations. > Thus call such a funct

[PATCH] remoteproc: qcom: q6v5-mss: Use common error handling code in q6v5_mpss_load()

2024-09-24 Thread Markus Elfring
From: Markus Elfring Date: Tue, 24 Sep 2024 15:55:06 +0200 Add jump targets so that a bit of exception handling can be better reused at the end of this function implementation. Signed-off-by: Markus Elfring --- drivers/remoteproc/qcom_q6v5_mss.c | 17 + 1 file changed, 9 insert

[PATCH 4/4] selftests: exec: update gitignore for load_address

2024-09-24 Thread Javier Carrasco
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. Signed-off-by: Javier Carrasco --- tools/testing/selftests/exec/.gitignore | 2 +- 1 fil

[PATCH 3/4] selftests: rds: add gitignore file for include.sh

2024-09-24 Thread Javier Carrasco
The generated include.sh should be ignored by git. Create a new gitignore and add the file to the list. Signed-off-by: Javier Carrasco --- tools/testing/selftests/net/rds/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/net/rds/.gitignore b/tools/testing/se

[PATCH 2/4] selftests: rds: add include.sh to EXTRA_CLEAN

2024-09-24 Thread Javier Carrasco
The include.sh file is generated when building the net/rds selftests, but there is no rule to delete it with the clean target. Add the file to EXTRA_CLEAN in order to remove it when required. Signed-off-by: Javier Carrasco --- tools/testing/selftests/net/rds/Makefile | 2 +- 1 file changed, 1 in

[PATCH 1/4] selftests: add unshare_test and msg_oob to gitignore

2024-09-24 Thread Javier Carrasco
These executables are missing from their corresponding gitignore files. Add them to the lists. Signed-off-by: Javier Carrasco --- tools/testing/selftests/core/.gitignore | 1 + tools/testing/selftests/net/.gitignore | 1 + 2 files changed, 2 insertions(+) diff --git a/tools/testing/selftests/c

[PATCH 0/4] selftsets: gitignore and clean target file additions

2024-09-24 Thread Javier Carrasco
| 1 + tools/testing/selftests/net/rds/.gitignore | 1 + tools/testing/selftests/net/rds/Makefile | 2 +- 5 files changed, 5 insertions(+), 2 deletions(-) --- base-commit: 4d0326b60bb753627437fff0f76bf1525bcda422 change-id: 20240924-selftests-gitignore-e41133e6c5bd Best regards, -- Javier

[PATCH] remoteproc: k3: Call of_node_put(rmem_np) only once in three functions

2024-09-24 Thread Markus Elfring
From: Markus Elfring Date: Tue, 24 Sep 2024 14:28:35 +0200 An of_node_put(rmem_np) call was immediately used after a pointer check for a of_reserved_mem_lookup() call in three function implementations. Thus call such a function only once instead directly before the checks. This issue was transfo

Re: [PATCH v3 0/5] KVM: s390: selftests: Add regression tests for CPU subfunctions

2024-09-24 Thread Janosch Frank
On 8/23/24 3:05 PM, Hariharan Mari wrote: This patch series introduces a set of regression tests for various s390x CPU subfunctions in KVM. The tests ensure that the KVM implementation accurately reflects the behavior of actual CPU instructions for these subfunctions. The series adds tests for a

[PATCH] selftests: vDSO: align stack for O2-optimized memcpy

2024-09-24 Thread Jason A. Donenfeld
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 alignnent sequence. Fixes: ecb8bd70d51 ("selftests: vDSO: build tests with O2 optimization") Reported-by: kernel test robot

Re: [PATCH 1/2] livepatch: introduce 'order' sysfs interface to klp_patch

2024-09-24 Thread Petr Mladek
On Fri 2024-09-20 17:04:03, Wardenjohn wrote: > This feature can provide livepatch patch order information. > With the order of sysfs interface of one klp_patch, we can > use patch order to find out which function of the patch is > now activate. > > After the discussion, we decided that patch-leve

Re: [PATCH] selftests/bpf: Add missing va_end.

2024-09-24 Thread Eduard Zingerman
On Tue, 2024-09-24 at 12:55 +0800, zhangjiao2 wrote: > From: zhang jiao > > There is no va_end after va_copy, just add it. > > Signed-off-by: zhang jiao > --- My bad, thank you for fixing this. Acked-by: Eduard Zingerman

Re: [PATCH bpf-next v2 0/6] selftests/bpf: Various sockmap-related fixes

2024-09-24 Thread Michal Luczaj
On 8/19/24 22:05, Jakub Sitnicki wrote: > On Wed, Aug 14, 2024 at 06:14 PM +02, Michal Luczaj wrote: >> On 8/6/24 19:45, Jakub Sitnicki wrote: >>> On Tue, Aug 06, 2024 at 07:18 PM +02, Michal Luczaj wrote: Great, thanks for the review. With this completed, I guess we can unwind the (mail)

[PATCH bpf-next v3 2/2] bpf: selftests: verifier: Add nullness elision tests

2024-09-24 Thread Daniel Xu
Test that nullness elision works for common use cases. For example, we want to check that both full and subreg stack slots are recognized. As well as when there's both const and non-const values of R2 leading up to a lookup. And obviously some bound checks. Acked-by: Eduard Zingerman Signed-off-b

[PATCH bpf-next v3 1/2] bpf: verifier: Support eliding map lookup nullness

2024-09-24 Thread Daniel Xu
This commit allows progs to elide a null check on statically known map lookup keys. In other words, if the verifier can statically prove that the lookup will be in-bounds, allow the prog to drop the null check. This is useful for two reasons: 1. Large numbers of nullness checks (especially when t

[PATCH bpf-next v3 0/2] Support eliding map lookup nullness

2024-09-24 Thread Daniel Xu
This patch allows progs to elide a null check on statically known map lookup keys. In other words, if the verifier can statically prove that the lookup will be in-bounds, allow the prog to drop the null check. This is useful for two reasons: 1. Large numbers of nullness checks (especially when th

Re: [PATCH v3] mac802154: Fix potential RCU dereference issue in mac802154_scan_worker

2024-09-24 Thread Stefan Schmidt
Hello Jiawei Ye. On Tue, 24 Sep 2024 06:58:05 +, Jiawei Ye wrote: > In the `mac802154_scan_worker` function, the `scan_req->type` field was > accessed after the RCU read-side critical section was unlocked. According > to RCU usage rules, this is illegal and can lead to unpredictable > behavior

[PATCH v6 3/3] x86/sgx: Resolve EREMOVE page vs EAUG page data race

2024-09-24 Thread Dmitrii Kuvaiskii
Two enclave threads may try to add and remove the same enclave page simultaneously (e.g., if the SGX runtime supports both lazy allocation and MADV_DONTNEED semantics). Consider some enclave page added to the enclave. User space decides to temporarily remove this page (e.g., emulating the MADV_DONT

[PATCH v6 2/3] x86/sgx: Resolve EAUG race where losing thread returns SIGBUS

2024-09-24 Thread Dmitrii Kuvaiskii
Imagine an mmap()'d file. Two threads touch the same address at the same time and fault. Both allocate a physical page and race to install a PTE for that page. Only one will win the race. The loser frees its page, but still continues handling the fault as a success and returns VM_FAULT_NOPAGE from

[PATCH v6 1/3] x86/sgx: Split SGX_ENCL_PAGE_BEING_RECLAIMED into two flags

2024-09-24 Thread Dmitrii Kuvaiskii
The page reclaimer thread sets SGX_ENC_PAGE_BEING_RECLAIMED flag when the enclave page is being reclaimed (moved to the backing store). This flag however has two logical meanings: 1. Don't attempt to load the enclave page (the page is busy), see __sgx_encl_load_page(). 2. Don't attempt to remov

[PATCH v6 0/3] x86/sgx: Fix two data races in EAUG/EREMOVE flows

2024-09-24 Thread Dmitrii Kuvaiskii
SGX runtimes such as Gramine may implement EDMM-based lazy allocation of enclave pages and may support MADV_DONTNEED semantics [1]. The former implies #PF-based page allocation, and the latter implies the usage of SGX_IOC_ENCLAVE_REMOVE_PAGES ioctl. EDMM-based lazy allocation and MADV_DONTNEED sem

Re: [PATCH 0/4] Process some MMIO-related errors without KVM exit

2024-09-24 Thread Ivan Orlov
On Mon, Sep 23, 2024 at 02:46:17PM -0700, Sean Christopherson wrote: > > > > > No. This is not architectural behavior. It's not even remotely > > > close to > > > architectural behavior. KVM's behavior isn't great, but making up > > > _guest visible_ > > > behavior is not going to happen. > > >

Re: [PATCH v3 0/3] selftests: livepatch: test livepatching a kprobed function

2024-09-24 Thread Petr Mladek
On Mon 2024-09-23 10:16:29, Shuah Khan wrote: > On 9/23/24 08:45, Marcos Paulo de Souza wrote: > > On Fri, 2024-09-20 at 13:56 +0200, Michael Vetter wrote: > > > This patchset adds a test for livepatching a kprobed function. > > > > > > Michael Vetter (3): > > >   selftests: livepatch: rename KLP

Re: [PATCH v3 0/3] selftests: livepatch: test livepatching a kprobed function

2024-09-24 Thread Petr Mladek
On Fri 2024-09-20 13:56:28, Michael Vetter wrote: > This patchset adds a test for livepatching a kprobed function. > > Michael Vetter (3): > selftests: livepatch: rename KLP_SYSFS_DIR to SYSFS_KLP_DIR > selftests: livepatch: save and restore kprobe state > selftests: livepatch: test livepatc

Re: [PATCH v3] mac802154: Fix potential RCU dereference issue in mac802154_scan_worker

2024-09-24 Thread Przemek Kitszel
On 9/24/24 08:58, Jiawei Ye wrote: In the `mac802154_scan_worker` function, the `scan_req->type` field was accessed after the RCU read-side critical section was unlocked. According to RCU usage rules, this is illegal and can lead to unpredictable behavior, such as accessing memory that has been u

Re: [PATCH] memfd: fuse_mnt: remove unused macro

2024-09-24 Thread kernel test robot
Hi Ba, kernel test robot noticed the following build warnings: [auto build test WARNING on shuah-kselftest/next] [also build test WARNING on shuah-kselftest/fixes linus/master v6.11 next-20240924] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch

[linus:master] [selftests] ecb8bd70d5: kernel-selftests.vDSO.vdso_standalone_test_x86.fail

2024-09-24 Thread kernel test robot
00 # selftests: vDSO: vdso_standalone_test_x86 # Segmentation fault not ok 5 selftests: vDSO: vdso_standalone_test_x86 # exit=139 The kernel config and materials to reproduce are available at: https://download.01.org/0day-ci/archive/20240924/202409241558.98e13f6f-oliver.s...@intel.com --

Re: [PATCH 0/4] Process some MMIO-related errors without KVM exit

2024-09-24 Thread Sean Christopherson
On Mon, Sep 23, 2024, Jack Allister wrote: > On Mon, 2024-09-23 at 10:04 -0700, Sean Christopherson wrote: > > > > On Mon, Sep 23, 2024, Ivan Orlov wrote: > > > Currently, KVM may return a variety of internal errors to VMM when > > > accessing MMIO, and some of them could be gracefully handled on

Re: [PATCH 0/4] Process some MMIO-related errors without KVM exit

2024-09-24 Thread Sean Christopherson
On Mon, Sep 23, 2024, Jack Allister wrote: > On Mon, 2024-09-23 at 10:04 -0700, Sean Christopherson wrote: > > > > On Mon, Sep 23, 2024, Ivan Orlov wrote: > > > Currently, KVM may return a variety of internal errors to VMM when > > > accessing MMIO, and some of them could be gracefully handled on

[PATCH v3] mac802154: Fix potential RCU dereference issue in mac802154_scan_worker

2024-09-24 Thread Jiawei Ye
In the `mac802154_scan_worker` function, the `scan_req->type` field was accessed after the RCU read-side critical section was unlocked. According to RCU usage rules, this is illegal and can lead to unpredictable behavior, such as accessing memory that has been updated or causing use-after-free issu