[PATCH v3 6/6] module: add install target for modules.builtin.ranges

2024-05-16 Thread Kris Van Hees
When CONFIG_BUILTIN_MODULE_RANGES is enabled, the modules.builtin.ranges file should be installed in the module install location. Signed-off-by: Kris Van Hees Reviewed-by: Nick Alcock --- Changes since v2: - Include modules.builtin.ranges in modules install target --- scripts/Makefile.modinst

[PATCH v3 5/6] kbuild: generate modules.builtin.ranges when linking the kernel

2024-05-16 Thread Kris Van Hees
Signed-off-by: Kris Van Hees Reviewed-by: Nick Alcock --- Changes since v2: - 1st arg to generate_builtin_ranges.awk is now modules.builtin.modinfo - Use $(real-prereqs) rather than $(filter-out ...) --- scripts/Makefile.vmlinux | 16 1 file changed, 16 insertions(+) diff --g

[PATCH v3 4/6] module: script to generate offset ranges for builtin modules

2024-05-16 Thread Kris Van Hees
The offset range data for builtin modules is generated using: - modules.builtin.modinfo: associates object files with module names - vmlinux.map: provides load order of sections and offset of first member per section - vmlinux.o.map: provides offset of object file content per section - .*.c

[PATCH v3 3/6] kbuild: generate a linker map for vmlinux.o

2024-05-16 Thread Kris Van Hees
When CONFIG_BUILTIN_MODULE_RANGES is set, a linker map for vmlinux.o needs to be generated. The generation of offset range data for builtin modules depends on that linker map to know what offsets in an ELF section belong to an object file for a particular builtin module. Signed-off-by: Kris Van H

[PATCH v3 2/6] trace: add CONFIG_BUILTIN_MODULE_RANGES option

2024-05-16 Thread Kris Van Hees
The CONFIG_BUILTIN_MODULE_RANGES option controls whether offset range data is generated for kernel modules that are built into the kernel image. Signed-off-by: Kris Van Hees Reviewed-by: Nick Alcock Reviewed-by: Alan Maguire --- Changes since v2: - Add explicit dependency on FTRACE for CONFIG_

[PATCH v3 1/6] kbuild: add mod(name,file)_flags to assembler flags for module objects

2024-05-16 Thread Kris Van Hees
Module objects compiled from C source can be identified by the presence of -DKBUILD_MODFILE and -DKBUILD_MODNAME on their compile command lines. However, module objects from assembler source do not have this defines. Add $(modfile_flags) to modkern_aflags (similar to modkern_cflahs), and add $(mod

[PATCH v3 0/6] Generate address range data for built-in modules

2024-05-16 Thread Kris Van Hees
Especially for tracing applications, it is convenient to be able to refer to a symbol using a pair and to be able to translate an address into a pair. But that does not work if the module is built into the kernel because the object files that comprise the built-in module implementation are simpl

Re: [PATCH] vhost/vsock: always initialize seqpacket_allow

2024-05-16 Thread Jakub Kicinski
On Wed, 15 May 2024 11:05:43 -0400 Michael S. Tsirkin wrote: > There are two issues around seqpacket_allow: > 1. seqpacket_allow is not initialized when socket is >created. Thus if features are never set, it will be >read uninitialized. > 2. if VIRTIO_VSOCK_F_SEQPACKET is set and then clear

[PATCH] vringh: add MODULE_DESCRIPTION()

2024-05-16 Thread Jeff Johnson
8fd977f71c..73e153f9b449 100644 --- a/drivers/vhost/vringh.c +++ b/drivers/vhost/vringh.c @@ -1614,4 +1614,5 @@ EXPORT_SYMBOL(vringh_need_notify_iotlb); #endif +MODULE_DESCRIPTION("host side of a virtio ring"); MODULE_LICENSE("GPL"); --- base-commit: 7f094f0e3866f83ca705519b1e8f5a

Re: [PATCH RESEND v8 16/16] bpf: remove CONFIG_BPF_JIT dependency on CONFIG_MODULES of

2024-05-16 Thread Klara Modin
trace ]--- # bad: [dbd9e2e056d8577375ae4b31ada94f8aa3769e8a] Add linux-next specific files for 20240516 git bisect start 'next/master' # status: waiting for good commit(s), bad commit known # good: [8c06da67d0bd3139a97f301b4aa9c482b9d4f29e] Merge tag 'livepatching-for-

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-05-16 Thread David Hildenbrand
On 16.05.24 19:44, Guillaume Morin wrote: On 02 May 5:59, Guillaume Morin wrote: On 30 Apr 21:25, David Hildenbrand wrote: I tried to get the hugepd stuff right but this was the first I heard about it :-) Afaict follow_huge_pmd and friends were already DTRT I'll have to have a closer look a

Re: [RFC][PATCH] uprobe: support for private hugetlb mappings

2024-05-16 Thread Guillaume Morin
On 02 May 5:59, Guillaume Morin wrote: > > On 30 Apr 21:25, David Hildenbrand wrote: > > > I tried to get the hugepd stuff right but this was the first I heard > > > about it :-) Afaict follow_huge_pmd and friends were already DTRT > > > > I'll have to have a closer look at some details (the huge

Re: [PATCH] vhost/vsock: always initialize seqpacket_allow

2024-05-16 Thread Eugenio Perez Martin
On Wed, May 15, 2024 at 5:05 PM Michael S. Tsirkin wrote: > > There are two issues around seqpacket_allow: > 1. seqpacket_allow is not initialized when socket is >created. Thus if features are never set, it will be >read uninitialized. > 2. if VIRTIO_VSOCK_F_SEQPACKET is set and then clear

[PATCH v2 6/6] selftests: livepatch: Test livepatching function using an external symbol

2024-05-16 Thread Lukas Hruska
The test proves that klp-convert works as intended and it is possible to livepatch a function that use an external symbol. Signed-off-by: Lukas Hruska --- .../testing/selftests/livepatch/functions.sh | 16 +- .../selftests/livepatch/test-extern.sh| 57 +++ .../selfte

[PATCH v2 5/6] documentation: Update on livepatch elf format

2024-05-16 Thread Lukas Hruska
Add a section to Documentation/livepatch/module-elf-format.rst describing how klp-convert works for fixing relocations. Signed-off-by: Lukas Hruska Reviewed-by: Petr Mladek Reviewed-by: Marcos Paulo de Souza --- Documentation/livepatch/module-elf-format.rst | 67 +++ 1 file cha

[PATCH v2 4/6] livepatch: Add sample livepatch module

2024-05-16 Thread Lukas Hruska
From: Josh Poimboeuf Add a new livepatch sample in samples/livepatch/ to make use of symbols that must be post-processed to enable load-time relocation resolution. As the new sample is to be used as an example, it is annotated with KLP_RELOC_SYMBOL macro. The livepatch sample updates the functio

[PATCH v2 2/6] livepatch: Add klp-convert tool

2024-05-16 Thread Lukas Hruska
Livepatches need to access external symbols which can't be handled by the normal relocation mechanism. It is needed for two types of symbols: + Symbols which can be local for the original livepatched function. The alternative implementation in the livepatch sees them as external symbols.

[PATCH v2 3/6] kbuild/modpost: integrate klp-convert

2024-05-16 Thread Lukas Hruska
From: Josh Poimboeuf Call klp-convert for the livepatch modules after the final linking. Also update the modpost tool so that it does not warn about unresolved symbols matching the expected format which will be then resolved by klp-convert. Signed-off-by: Josh Poimboeuf Signed-off-by: Lukas Hr

[PATCH v2 1/6] livepatch: Create and include UAPI headers

2024-05-16 Thread Lukas Hruska
From: Josh Poimboeuf Define klp prefixes in include/uapi/linux/livepatch.h, and use them for replacing hard-coded values in kernel/livepatch/core.c. Signed-off-by: Josh Poimboeuf Signed-off-by: Lukas Hruska Reviewed-by: Petr Mladek Reviewed-by: Marcos Paulo de Souza --- MAINTAINERS

[PATCH v2 0/5] livepatch: klp-convert tool - Minimal version

2024-05-16 Thread Lukas Hruska
Summary --- This is a significantly simplified version of the original klp-convert tool. The klp-convert code has never got a proper review and also clean ups were not easy. The last version was v7, see https://lore.kernel.org/r/20230306140824.3858543-1-joe.lawre...@redhat.com The main change

[PATCH] x86/paravirt: Disable virt spinlock when CONFIG_PARAVIRT_SPINLOCKS disabled

2024-05-16 Thread Chen Yu
Performance drop is reported when running encode/decode workload and BenchSEE cache sub-workload. Bisect points to commit ce0a1b608bfc ("x86/paravirt: Silence unused native_pv_lock_init() function warning"). When CONFIG_PARAVIRT_SPINLOCKS is disabled the virt_spin_lock_key is set to true on bare-me

RE: [PATCH] vhost: use pr_err for vq_err

2024-05-16 Thread Peng Fan
> Subject: Re: [PATCH] vhost: use pr_err for vq_err > > On Thu, May 16, 2024 at 03:46:29PM +0800, Peng Fan (OSS) wrote: > > From: Peng Fan > > > > Use pr_err to print out error message without enabling DEBUG. This > > could make people catch error easier. > > > > Signed-off-by: Peng Fan > > Thi

Re: [PATCH] vhost: use pr_err for vq_err

2024-05-16 Thread Michael S. Tsirkin
On Thu, May 16, 2024 at 03:46:29PM +0800, Peng Fan (OSS) wrote: > From: Peng Fan > > Use pr_err to print out error message without enabling DEBUG. This could > make people catch error easier. > > Signed-off-by: Peng Fan This isn't appropriate: pr_err must not be triggerable by userspace. If yo

Re: [REGRESSION][v6.8-rc1] virtio-pci: Introduce admin virtqueue

2024-05-16 Thread Jason Wang
On Thu, May 16, 2024 at 5:46 PM Catherine Redfield wrote: > > Feng, > > Thank you for providing your debugging steps; I used them on a gce image > locally and was not able to replicate the issue. I also attempted to > replicate in qemu/virsh using qemu-guest-agent to enable the S3 suspend > st

Re: [RFC PATCH v3 1/1] x86/sgx: Explicitly give up the CPU in EDMM's ioctl() to avoid softlockup

2024-05-16 Thread Jarkko Sakkinen
On Thu May 16, 2024 at 1:29 AM EEST, Haitao Huang wrote: > On Wed, 15 May 2024 16:55:59 -0500, Haitao Huang > wrote: > > > On Wed, 15 May 2024 01:55:21 -0500, Bojun Zhu > > wrote: > > > >> EDMM's ioctl()s support batch operations, which may be > >> time-consuming. Try to explicitly give up th

Re: [RFC PATCH v3 1/1] x86/sgx: Explicitly give up the CPU in EDMM's ioctl() to avoid softlockup

2024-05-16 Thread Jarkko Sakkinen
On Thu May 16, 2024 at 12:55 AM EEST, Haitao Huang wrote: > On Wed, 15 May 2024 01:55:21 -0500, Bojun Zhu > wrote: > > > EDMM's ioctl()s support batch operations, which may be > > time-consuming. Try to explicitly give up the CPU as the prefix > > operation at the every begin of "for loop" in >

Re: [PATCH] vhost/vsock: always initialize seqpacket_allow

2024-05-16 Thread Stefano Garzarella
On Wed, May 15, 2024 at 11:05:43AM GMT, Michael S. Tsirkin wrote: There are two issues around seqpacket_allow: 1. seqpacket_allow is not initialized when socket is created. Thus if features are never set, it will be read uninitialized. 2. if VIRTIO_VSOCK_F_SEQPACKET is set and then cleared,

[PATCH] vhost: use pr_err for vq_err

2024-05-16 Thread Peng Fan (OSS)
From: Peng Fan Use pr_err to print out error message without enabling DEBUG. This could make people catch error easier. Signed-off-by: Peng Fan --- drivers/vhost/vhost.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index bb75