Re: [PATCH] vduse: avoid using __GFP_NOFAIL

2024-08-06 Thread Yongji Xie
On Wed, Aug 7, 2024 at 12:38 PM Jason Wang wrote: > > On Wed, Aug 7, 2024 at 11:13 AM Yongji Xie wrote: > > > > On Wed, Aug 7, 2024 at 10:39 AM Jason Wang wrote: > > > > > > On Tue, Aug 6, 2024 at 11:10 AM Yongji Xie > > > wrote: > > > > > > > > On Tue, Aug 6, 2024 at 10:28 AM Jason Wang wrot

Re: [PATCH] vduse: avoid using __GFP_NOFAIL

2024-08-06 Thread Yongji Xie
On Mon, Aug 5, 2024 at 4:21 PM Jason Wang wrote: > > Barry said [1]: > > """ > mm doesn't support non-blockable __GFP_NOFAIL allocation. Because > __GFP_NOFAIL without direct reclamation may just result in a busy > loop within non-sleepable contexts. > ""“ > > Unfortuantely, we do that under read

[PATCH v3 3/3] remoteproc: k3-dsp: Acquire mailbox handle during probe routine

2024-08-06 Thread Beleswar Padhi
Acquire the mailbox handle during device probe and do not release handle in stop/detach routine or error paths. This removes the redundant requests for mbox handle later during rproc start/attach. This also allows to defer remoteproc driver's probe if mailbox is not probed yet. Fixes: b8431920391d

[PATCH v3 2/3] remoteproc: k3-r5: Acquire mailbox handle during probe routine

2024-08-06 Thread Beleswar Padhi
Acquire the mailbox handle during device probe and do not release handle in stop/detach routine or error paths. This removes the redundant requests for mbox handle later during rproc start/attach. This also allows to defer remoteproc driver's probe if mailbox is not probed yet. Fixes: 1168af40b1ad

[PATCH v3 1/3] remoteproc: k3-r5: Use devm_rproc_alloc() helper

2024-08-06 Thread Beleswar Padhi
Use the device lifecycle managed allocation function. This helps prevent mistakes like freeing out of order in cleanup functions and forgetting to free on error paths. Signed-off-by: Beleswar Padhi --- drivers/remoteproc/ti_k3_r5_remoteproc.c | 6 ++ 1 file changed, 2 insertions(+), 4 deleti

[PATCH v3 0/3] Defer TI's Remoteproc's Probe until Mailbox is Probed

2024-08-06 Thread Beleswar Padhi
Hello All, This series adds deferred probe functionality in the TI's Remoteproc drivers. The remoteproc drivers are dependent on the omap-mailbox driver for mbox functionalities. Sometimes, the remoteproc driver could be probed before the mailbox driver leading to rproc boot failures. Thus, defer

Re: [PATCH] vduse: avoid using __GFP_NOFAIL

2024-08-06 Thread Jason Wang
On Wed, Aug 7, 2024 at 11:13 AM Yongji Xie wrote: > > On Wed, Aug 7, 2024 at 10:39 AM Jason Wang wrote: > > > > On Tue, Aug 6, 2024 at 11:10 AM Yongji Xie wrote: > > > > > > On Tue, Aug 6, 2024 at 10:28 AM Jason Wang wrote: > > > > > > > > On Mon, Aug 5, 2024 at 6:42 PM Yongji Xie > > > > wro

Re: [PATCH] vduse: avoid using __GFP_NOFAIL

2024-08-06 Thread Yongji Xie
On Wed, Aug 7, 2024 at 10:39 AM Jason Wang wrote: > > On Tue, Aug 6, 2024 at 11:10 AM Yongji Xie wrote: > > > > On Tue, Aug 6, 2024 at 10:28 AM Jason Wang wrote: > > > > > > On Mon, Aug 5, 2024 at 6:42 PM Yongji Xie wrote: > > > > > > > > On Mon, Aug 5, 2024 at 4:24 PM Jason Wang wrote: > > >

Re: [PATCH] vduse: avoid using __GFP_NOFAIL

2024-08-06 Thread Jason Wang
On Tue, Aug 6, 2024 at 11:10 AM Yongji Xie wrote: > > On Tue, Aug 6, 2024 at 10:28 AM Jason Wang wrote: > > > > On Mon, Aug 5, 2024 at 6:42 PM Yongji Xie wrote: > > > > > > On Mon, Aug 5, 2024 at 4:24 PM Jason Wang wrote: > > > > > > > > On Mon, Aug 5, 2024 at 4:21 PM Jason Wang wrote: > > > >

Re: [PATCH v2 3/3] tracing/kprobes: Use APIs that matches symbols without .XXX suffix

2024-08-06 Thread Song Liu
> On Aug 6, 2024, at 5:01 PM, Masami Hiramatsu wrote: > > On Tue, 6 Aug 2024 20:12:55 + > Song Liu wrote: > >> >> >>> On Aug 6, 2024, at 1:01 PM, Steven Rostedt wrote: >>> >>> On Tue, 6 Aug 2024 16:00:49 -0400 >>> Steven Rostedt wrote: >>> >>> + if (IS_ENABLED(CONFIG_LTO_CLANG)

Re: [PATCH v2 3/3] tracing/kprobes: Use APIs that matches symbols without .XXX suffix

2024-08-06 Thread Google
On Tue, 6 Aug 2024 20:12:55 + Song Liu wrote: > > > > On Aug 6, 2024, at 1:01 PM, Steven Rostedt wrote: > > > > On Tue, 6 Aug 2024 16:00:49 -0400 > > Steven Rostedt wrote: > > > > + if (IS_ENABLED(CONFIG_LTO_CLANG) && !addr) > > + addr = kallsyms_lookup_name_without_suffix(trace

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

2024-08-06 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 v3 12/16] module: Reformat struct for code style

2024-08-06 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 v3 11/16] module: Additional validation in elf_validity_cache_strtab

2024-08-06 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 v3 10/16] module: Factor out elf_validity_cache_strtab

2024-08-06 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 v3 09/16] module: Group section index calculations together

2024-08-06 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 v3 08/16] module: Factor out elf_validity_cache_index_str

2024-08-06 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 v3 07/16] module: Factor out elf_validity_cache_index_sym

2024-08-06 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 281cc1a7dee6..535

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

2024-08-06 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 6132

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

2024-08-06 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 252cfa9eee67..61325a7

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

2024-08-06 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 v3 03/16] module: Factor out elf_validity_cache_sechdrs

2024-08-06 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

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

2024-08-06 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 141a

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

2024-08-06 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 d9592195c5bb.

[syzbot] Monthly trace report (Aug 2024)

2024-08-06 Thread syzbot
Hello trace maintainers/developers, This is a 31-day syzbot report for the trace subsystem. All related reports/information can be found at: https://syzkaller.appspot.com/upstream/s/trace During the period, 2 new issues were detected and 0 were fixed. In total, 8 issues are still open and 37 have

Re: [PATCH v2 3/3] tracing/kprobes: Use APIs that matches symbols without .XXX suffix

2024-08-06 Thread Song Liu
> On Aug 6, 2024, at 1:01 PM, Steven Rostedt wrote: > > On Tue, 6 Aug 2024 16:00:49 -0400 > Steven Rostedt wrote: > > + if (IS_ENABLED(CONFIG_LTO_CLANG) && !addr) > + addr = kallsyms_lookup_name_without_suffix(trace_kprobe_symbol(tk)); > + So you do the lookup twice

Re: [PATCH v2 3/3] tracing/kprobes: Use APIs that matches symbols without .XXX suffix

2024-08-06 Thread Steven Rostedt
On Tue, 6 Aug 2024 16:00:49 -0400 Steven Rostedt wrote: > > >> + if (IS_ENABLED(CONFIG_LTO_CLANG) && !addr) > > >> + addr = kallsyms_lookup_name_without_suffix(trace_kprobe_symbol(tk)); > > >> + > > > > > > So you do the lookup twice if this is enabled? > > > > > > Why not just use "kallsym

Re: [PATCH v2 3/3] tracing/kprobes: Use APIs that matches symbols without .XXX suffix

2024-08-06 Thread Steven Rostedt
On Tue, 6 Aug 2024 19:35:07 + Song Liu wrote: > >> + if (IS_ENABLED(CONFIG_LTO_CLANG) && !addr) > >> + addr = kallsyms_lookup_name_without_suffix(trace_kprobe_symbol(tk)); > >> + > > > > So you do the lookup twice if this is enabled? > > > > Why not just use "kallsyms_lookup_name_without_

Re: [PATCH RESEND] tracing: Fix overflow in get_free_elt()

2024-08-06 Thread Steven Rostedt
On Mon, 5 Aug 2024 13:59:22 +0800 Tze-nan Wu wrote: > "tracing_map->next_elt" in get_free_elt() is at risk of overflowing. > > Once it overflows, new elements can still be inserted into the tracing_map > even though the maximum number of elements (`max_elts`) has been reached. > Continuing to in

Re: [PATCH v2 3/3] tracing/kprobes: Use APIs that matches symbols without .XXX suffix

2024-08-06 Thread Song Liu
Hi Steven, > On Aug 6, 2024, at 11:44 AM, Steven Rostedt wrote: > > On Fri, 2 Aug 2024 14:08:35 -0700 > Song Liu wrote: > >> Use the new kallsyms APIs that matches symbols name with .XXX >> suffix. This allows userspace tools to get kprobes on the expected >> function name, while the actual s

Re: [PATCH v2 3/3] tracing/kprobes: Use APIs that matches symbols without .XXX suffix

2024-08-06 Thread Steven Rostedt
On Fri, 2 Aug 2024 14:08:35 -0700 Song Liu wrote: > Use the new kallsyms APIs that matches symbols name with .XXX > suffix. This allows userspace tools to get kprobes on the expected > function name, while the actual symbol has a .llvm. suffix. > > This only effects kernel compile with CONFIG_L

Re: [GIT PULL] virtio: bugfix

2024-08-06 Thread pr-tracker-bot
The pull request you sent on Tue, 6 Aug 2024 13:57:22 -0400: > https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/d4560686726f7a357922f300fc81f5964be8df04 Thank you! -- Deet-doot-dot, I am a bo

Re: [PATCH vhost 2/7] vdpa/mlx5: Introduce error logging function

2024-08-06 Thread Eugenio Perez Martin
On Fri, Aug 2, 2024 at 9:24 AM Dragos Tatulea wrote: > > mlx5_vdpa_err() was missing. This patch adds it and uses it in the > necessary places. > > Signed-off-by: Dragos Tatulea > Reviewed-by: Tariq Toukan Acked-by: Eugenio Pérez > --- > drivers/vdpa/mlx5/core/mlx5_vdpa.h | 5 + > drive

[GIT PULL] virtio: bugfix

2024-08-06 Thread Michael S. Tsirkin
The following changes since commit 6d834691da474ed1c648753d3d3a3ef8379fa1c1: virtio_pci_modern: remove admin queue serialization lock (2024-07-17 05:43:21 -0400) 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

Re: [PATCH] uprobes: get rid of bogus trace_uprobe hit counter

2024-08-06 Thread Andrii Nakryiko
On Tue, Aug 6, 2024 at 12:37 AM Jiri Olsa wrote: > > On Mon, Aug 05, 2024 at 01:28:03PM -0700, Andrii Nakryiko wrote: > > trace_uprobe->nhit counter is not incremented atomically, so its value > > is bogus in practice. On the other hand, it's actually a pretty big > > uprobe scalability problem du

Re: [PATCH] uprobes: Improve scalability by reducing the contention on siglock

2024-08-06 Thread Oleg Nesterov
On 08/06, Liao, Chang wrote: > > You're absolutely right. handle_signlestep() has chance to handle _DENY_SIGANL > unless it followed by setting TIF_UPROBE in uprobe_deny_signal(). This means > _DENY_SIGNAL is likey replaced during next uprobe single-stepping. > > I believe introducing _DENY_SIGNAL

Re: [PATCH net-next v4 0/2] vsock: avoid queuing on intermediate queue if possible

2024-08-06 Thread Stefano Garzarella
On Tue, Aug 06, 2024 at 09:02:57AM GMT, Jakub Kicinski wrote: On Mon, 5 Aug 2024 10:39:23 +0200 Stefano Garzarella wrote: this series is marked as "Not Applicable" for the net-next tree: https://patchwork.kernel.org/project/netdevbpf/patch/20240730-pinna-v4-2-5c9179164...@outlook.com/ Actually

Re: [PATCH net-next v4 0/2] vsock: avoid queuing on intermediate queue if possible

2024-08-06 Thread Jakub Kicinski
On Mon, 5 Aug 2024 10:39:23 +0200 Stefano Garzarella wrote: > this series is marked as "Not Applicable" for the net-next tree: > https://patchwork.kernel.org/project/netdevbpf/patch/20240730-pinna-v4-2-5c9179164...@outlook.com/ > > Actually this is more about the virtio-vsock driver, so can you qu

Re: [PATCH v2 1/1] livepatch: Add using attribute to klp_func for using function show

2024-08-06 Thread zhang warden
> On Aug 5, 2024, at 14:46, zhangyongde.zyd wrote: > > From: Wardenjohn > > > static void klp_init_func_early(struct klp_object *obj, > struct klp_func *func) > { > + func->using = false; > kobject_init(&func->kobj, &klp_ktype_func); > list_add_tail(&func->node, &obj->func_list); > } I rev

Re: [RFC PATCH vhost] vhost-vdpa: Fix invalid irq bypass unregister

2024-08-06 Thread Dragos Tatulea
On 06.08.24 10:18, Dragos Tatulea wrote: > (Re-sending. I messed up the previous message, sorry about that.) > > On 06.08.24 04:57, Jason Wang wrote: >> On Mon, Aug 5, 2024 at 11:59 PM Dragos Tatulea wrote: >>> >>> On 05.08.24 05:17, Jason Wang wrote: On Fri, Aug 2, 2024 at 2:51 PM Dragos

Re: [PATCH net-next v12 04/14] mm: page_frag: add '_va' suffix to page_frag API

2024-08-06 Thread Yunsheng Lin
On 2024/8/6 8:52, Alexander Duyck wrote: > On Sun, Aug 4, 2024 at 10:00 AM Yunsheng Lin > wrote: >> >> On 8/3/2024 1:00 AM, Alexander Duyck wrote: >> > > As far as your API extension and naming maybe you should look like > something like bio_vec and borrow the naming from that si

[PATCH v5] x86/paravirt: Fix incorrect virt spinlock setting on bare metal

2024-08-06 Thread Chen Yu
The kernel can change spinlock behavior when running as a guest. But this guest-friendly behavior causes performance problems on bare metal. So there's a 'virt_spin_lock_key' static key to switch between the two modes. In theory, the static key is enabled by default (run in guest mode) and should

Re: [PATCH 5/8] uprobes: travers uprobe's consumer list locklessly under SRCU protection

2024-08-06 Thread Oleg Nesterov
On 08/05, Andrii Nakryiko wrote: > > On Mon, Aug 5, 2024 at 8:59 AM Oleg Nesterov wrote: > > > > > int uprobe_apply(struct uprobe *uprobe, struct uprobe_consumer *uc, bool > > > add) > > > { > > > struct uprobe_consumer *con; > > > - int ret = -ENOENT; > > > + int ret = -ENOENT, s

Re: [PATCH 2/8] uprobes: revamp uprobe refcounting and lifetime management

2024-08-06 Thread Oleg Nesterov
On 08/05, Andrii Nakryiko wrote: > > On Mon, Aug 5, 2024 at 6:44 AM Oleg Nesterov wrote: > > > > On 07/31, Andrii Nakryiko wrote: > > > > > > @@ -732,11 +776,13 @@ static struct uprobe *alloc_uprobe(struct inode > > > *inode, loff_t offset, > > > uprobe->ref_ctr_offset = ref_ctr_offset; > >

Re: [RFC PATCH vhost] vhost-vdpa: Fix invalid irq bypass unregister

2024-08-06 Thread Dragos Tatulea
(Re-sending. I messed up the previous message, sorry about that.) On 06.08.24 04:57, Jason Wang wrote: > On Mon, Aug 5, 2024 at 11:59 PM Dragos Tatulea wrote: >> >> On 05.08.24 05:17, Jason Wang wrote: >>> On Fri, Aug 2, 2024 at 2:51 PM Dragos Tatulea wrote: On Fri, 2024-08-02 at 11:29

Re: [PATCH] rust: add `module_params` macro

2024-08-06 Thread Benno Lossin
On 05.08.24 12:55, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On 02.08.24 12:27, Andreas Hindborg wrote: >>> At a higher level where the bindings supply the parsing functions, we >>> can decide that passing an argument without a value yields a default >>> parameter value. C does this for

Re: WARNING in free_event

2024-08-06 Thread Peter Zijlstra
On Mon, Aug 05, 2024 at 10:18:00AM +0800, Ubisectech Sirius wrote: > > Hello. > We are Ubisectech Sirius Team, the vulnerability lab of China > ValiantSec. Recently, our team has discovered a issue in Linux kernel > 6.8. Attached to the email were a PoC file of the issue. > I could not readily r

Re: [PATCH] uprobes: get rid of bogus trace_uprobe hit counter

2024-08-06 Thread Jiri Olsa
On Mon, Aug 05, 2024 at 01:28:03PM -0700, Andrii Nakryiko wrote: > trace_uprobe->nhit counter is not incremented atomically, so its value > is bogus in practice. On the other hand, it's actually a pretty big > uprobe scalability problem due to heavy cache line bouncing between CPUs > triggering the