[PATCH bpf-next v4 3/3] libbpf: Use mmap to parse vmlinux BTF from sysfs

2025-05-10 Thread Lorenz Bauer
Teach libbpf to use mmap when parsing vmlinux BTF from /sys. We don't apply this to fall-back paths on the regular file system because there is no way to ensure that modifications underlying the MAP_PRIVATE mapping are not visible to the process. Signed-off-by: Lorenz Bauer --- tools/lib/bpf/btf

[PATCH bpf-next v4 0/3] Allow mmap of /sys/kernel/btf/vmlinux

2025-05-10 Thread Lorenz Bauer
I'd like to cut down the memory usage of parsing vmlinux BTF in ebpf-go. With some upcoming changes the library is sitting at 5MiB for a parse. Most of that memory is simply copying the BTF blob into user space. By allowing vmlinux BTF to be mmapped read-only into user space I can cut memory usage

[PATCH bpf-next v4 1/3] btf: allow mmap of vmlinux btf

2025-05-10 Thread Lorenz Bauer
User space needs access to kernel BTF for many modern features of BPF. Right now each process needs to read the BTF blob either in pieces or as a whole. Allow mmaping the sysfs file so that processes can directly access the memory allocated for it in the kernel. remap_pfn_range is used instead of

[PATCH bpf-next v4 2/3] selftests: bpf: add a test for mmapable vmlinux BTF

2025-05-10 Thread Lorenz Bauer
Add a basic test for the ability to mmap /sys/kernel/btf/vmlinux. Ensure that the data is valid BTF and that it is padded with zero. Signed-off-by: Lorenz Bauer --- tools/testing/selftests/bpf/prog_tests/btf_sysfs.c | 81 ++ 1 file changed, 81 insertions(+) diff --git a/tool

Re: [PATCH v2 06/19] iommufd/viommu: Add IOMMU_VIOMMU_SET/UNSET_VDEV_ID ioctl

2025-05-10 Thread Alexey Kardashevskiy
On 10/5/25 08:07, Jason Gunthorpe wrote: On Fri, May 09, 2025 at 12:57:18PM +1000, Alexey Kardashevskiy wrote: On 7/5/25 22:24, Jason Gunthorpe wrote: On Wed, May 07, 2025 at 09:18:29PM +1000, Alexey Kardashevskiy wrote: We should not destroy the vdevice for something like that. In a CC

Re: [PATCH 4/9] CodingStyle: mention "typedef struct S {} S;" if typedef is used

2025-05-10 Thread Mauro Carvalho Chehab
Em Fri, 9 May 2025 23:34:25 +0300 Alexey Dobriyan escreveu: > Signed-off-by: Alexey Dobriyan > --- > Documentation/process/coding-style.rst | 14 ++ > 1 file changed, 14 insertions(+) > > diff --git a/Documentation/process/coding-style.rst > b/Documentation/process/coding-style.r

Re: [PATCH 3/3] KVM: arm64: selftests: arch_timer_edge_cases - workaround for AC03_CPU_14

2025-05-10 Thread Marc Zyngier
On Fri, 09 May 2025 15:33:12 +0100, Sebastian Ott wrote: > > arch_timer_edge_cases currently fails on ampere-one machines with > the following assertion failure: > > Test Assertion Failure > arm64/arch_timer_edge_cases.c:169: timer_condition == istatus > pid=11236 tid=11236 errno=4

[PATCH v3 1/1] selftests/mm/uffd: Refactor non-composite global vars into struct

2025-05-10 Thread Ujwal Kundur
Refactor macros and non-composite global variable definitions into a struct that is defined at the start of a test and is passed around instead of relying on global vars. Signed-off-by: Ujwal Kundur --- Changes since v2: - redo patch on mm-new branch Changes since v1: - indentation fixes - s

Re: [PATCH 1/9] CodingStyle: make Documentation/CodingStyle into symlink

2025-05-10 Thread Jonathan Corbet
Alexey Dobriyan writes: > Every time I open Documentation/CodingStyle it says the party moved > somewhere else. :-( > > Of course, I forget where it moved to by the next time. > > Signed-off-by: Alexey Dobriyan > --- No 0/9 cover letter? Just FYI, I won't apply coding-style patches without a s

[PATCH] params: Add support for static keys

2025-05-10 Thread Kent Overstreet
Static keys can now be a module parameter, e.g. module_param_named(foo, foo.key, static_key_t, 0644) bcachefs is now using this. Cc: Luis Chamberlain Cc: Petr Pavlu Cc: Sami Tolvanen Cc: Daniel Gomez Cc: linux-modu...@vger.kernel.org Signed-off-by: Kent Overstreet --- include/linux/jump_la

Re: [PATCH 8/9] CodingStyle: tell people how to split long "for" loops

2025-05-10 Thread David Laight
On Fri, 9 May 2025 23:34:29 +0300 Alexey Dobriyan wrote: > Signed-off-by: Alexey Dobriyan > --- > Documentation/process/coding-style.rst | 16 +++- > 1 file changed, 15 insertions(+), 1 deletion(-) > > diff --git a/Documentation/process/coding-style.rst > b/Documentation/process/