[Devel] [PATCH hci-8.1 v3 3/6] ve/printk: Specify ve in printks

Konstantin Khorenko khorenko at virtuozzo.com
Thu Nov 12 19:35:40 MSK 2026


I won't apply this version, please send v4 with the changes below.

On Mon, 12 Oct 2026 00:52:30 +0200, Vladimir Riabchun <vladimir.riabchun at virtuozzo.com> wrote:
> +	struct ve_struct *__ve = get_exec_env();			\
> +									\
> +	if (WARN_ON_ONCE((dst & VE_LOG) && !in_task()))			\
> +		__ve = get_ve0();					\

Item 1 of the cover letter reply: rename this local to a name no
caller uses, and write "(dst)".

Why: ve_failcount_inc() has its own "__ve" and passes ve_name(__ve)
in the varargs. Inside this macro that name now means the local. At
this patch and patch 4 a failcount hit from a host task (vzctl moving
a netdev into a CT at its netif limit) prints "CT0" and goes to the
host log only. Patch 5 hides it, but the local still captures any
"__ve" a caller passes.

> +struct log_state *__ve_log_state(struct ve_struct *ve)

Item 2 of the cover letter reply: make it static.

Why: only printk.c calls it. Here it has no prototype, patch 4 adds
one to internal.h.

> Introduce ve_printk helpers that accept VE structure,
> so we can provide correct VE where get_exec_env is unreliable.
>
> This is true for ve_printk_deferred functions, and their users.

Item 3 of the cover letter reply: say what changes for users and add
the Fixes tags.

Why: the second sentence does not parse. The visible fix is that the
conntrack table full, expectation table full and TCPMSS messages from
softirq go to the log of net->owner_ve, not to the CT that was
interrupted. Also, ve_printk_ratelimited() with VE_LOG outside task
context now warns and prints to the host log. The tags name commits
a335738ad21cf ("ve/netfilter: ve_printk for "nf_conntrack: table
full"") and bc279343e9663 ("ve/netfilter: Send iptables/netfilter
kernel error messages to Containers").

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team



More information about the Devel mailing list