All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
From: Vladimir Riabchun <vladimir.riabchun@virtuozzo.com>
To: Konstantin Khorenko <khorenko@virtuozzo.com>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1 v5 5/5] ve/overlayfs: Override VE together with creds
Date: Mon, 16 Nov 2026 12:48:03 +0100	[thread overview]
Message-ID: <c73a6ce8-d765-40f0-91a0-e1a8862bd1e9@virtuozzo.com> (raw)
In-Reply-To: <179448942112.4060562.13453206168673800541.b4-review@b4>



On 11/12/26 14:17, Konstantin Khorenko wrote:
> I won't apply this version, please send v6 with the changes below.
> 
> On Tue, 10 Nov 2026 18:26:52 +0100, Vladimir Riabchun <vladimir.riabchun@virtuozzo.com> wrote:
>> Modify ovl_override_creds so that it returns both old cred and old VE.
>> This will also protect us from future rebase issues - all new users of
>> old_cred and ovl_override_creds will fail with compilation error.
> 
> - Item 8 of the cover letter reply: add a Fixes tag for ec01a90d0ef9
>    ("ovl: replace capable by ve_capable for indexing feature"), limit
>    this claim to ovl_override_creds() callers, say why cross-CT use
>    must fail, and fix "swich" and "Stroing".
> 
> ec01a90d0ef9 turned capable() into ve_capable() in
> ovl_can_decode_fh() and ovl_decode_real_fh(). That made the result
> depend on the VE, which is the bug.
> 
> The compile error catches new ovl_override_creds() callers only.
> ovl_creds() users, such as backing_file_ctx.cred in read/write/splice/
> mmap, still switch creds without the VE.

Yes, but it is a separate issue with other ve_capable users.
Created a task for it: https://virtuozzo.atlassian.net/browse/VSTOR-155347

> 
>> We don't allow cross-CT overlayfs usages, it is broken and reported
>> as -EINVAL. But we want to allow usage of host-owned overlayfs by CT.
> 
> "It is broken" does not say why the error is needed. If a CT-B task
> kept its own VE on a CT-A overlay, CT-A creds would be checked
> against CT-B's user namespace. That fails at run time, while the
> mount-time check passed, and it is the same oops again. Please say
> that in the message, since Pavel's "just skip the override" looks
> like the simpler choice otherwise.
> 
>> +	/*
>> +	 * We want to allow passing host overlayfs to CT.
>> +	 * It is fine to keep CT ve - host creds should work.
>> +	 * Cross-CT mounts are forbidden.
>> +	 */
>> +	if (IS_ERR(desc->ve) && PTR_ERR(desc->ve) != -EPERM)
>> +		return PTR_ERR(desc->ve);
> 
> - Item 1 of the cover letter reply: test only IS_ERR() here and in
>    ovl_revert_creds(), once override_ve() returns old_ve for the VE0
>    case. Fix the comment: mounting works, using the overlay from
>    another CT is refused.
> 
> The user-visible errno also changes then: stat, open and lookup on a
> foreign CT's overlay return EPERM rather than EINVAL. EINVAL there
> reads as a bad argument from the caller.

Two other comments will fix.

> 

-- 
Best regards, Riabchun Vladimir
Linux Kernel Developer, Virtuozzo

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

  reply	other threads:[~2026-11-16 11:49 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10 17:26 [Devel] [PATCH hci-8.1 v5 0/5] Fix kernel crash in overlayfs Vladimir Riabchun
2026-11-10 17:26 ` [Devel] [PATCH hci-8.1 v5 1/5] ve: Remove STOPPED state Vladimir Riabchun
2026-11-10 17:32   ` no-reply
2026-11-12 13:17   ` Konstantin Khorenko
2026-11-10 17:26 ` [Devel] [PATCH hci-8.1 v5 2/5] ve: Introduce override_ve/revert_ve helpers Vladimir Riabchun
2026-11-10 17:35   ` no-reply
2026-11-12 13:17   ` Konstantin Khorenko
2026-11-12 20:41     ` Vladimir Riabchun
2026-11-13 20:21       ` Konstantin Khorenko
2026-11-10 17:26 ` [Devel] [PATCH hci-8.1 v5 3/5] ve: Defer ve creds drop until ve is completely destroyed Vladimir Riabchun
2026-11-10 17:32   ` no-reply
2026-11-12 13:17   ` Konstantin Khorenko
2026-11-16 11:43     ` Vladimir Riabchun
2026-11-10 17:26 ` [Devel] [PATCH hci-8.1 v5 4/5] ovl: Keep creator VE in overlayfs superblock Vladimir Riabchun
2026-11-10 17:32   ` no-reply
2026-11-12 13:17   ` Konstantin Khorenko
2026-11-10 17:26 ` [Devel] [PATCH hci-8.1 v5 5/5] ve/overlayfs: Override VE together with creds Vladimir Riabchun
2026-11-10 17:37   ` no-reply
2026-11-10 17:54     ` Vladimir Riabchun
2026-11-12 13:17   ` Konstantin Khorenko
2026-11-16 11:48     ` Vladimir Riabchun [this message]
2026-11-11 12:51 ` [Devel] [PATCH hci-8.1 v5 0/5] Fix kernel crash in overlayfs Vasileios Almpanis
2026-11-12 13:17 ` Konstantin Khorenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c73a6ce8-d765-40f0-91a0-e1a8862bd1e9@virtuozzo.com \
    --to=vladimir.riabchun@virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=khorenko@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.