From: Christian Brauner <brauner@kernel.org>
To: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Cc: amir73il@gmail.com, hu1.chen@intel.com, miklos@szeredi.hu,
malini.bhandaru@intel.com, tim.c.chen@intel.com,
mikko.ylinen@intel.com, lizhen.you@intel.com,
linux-unionfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 0/3] overlayfs: Optimize override/revert creds
Date: Wed, 24 Apr 2024 19:01:32 +0200 [thread overview]
Message-ID: <20240424-befund-unantastbar-9b0154bec6e7@brauner> (raw)
In-Reply-To: <20240403021808.309900-1-vinicius.gomes@intel.com>
On Tue, Apr 02, 2024 at 07:18:05PM -0700, Vinicius Costa Gomes wrote:
> Hi,
>
> Changes from RFC v3:
> - Removed the warning "fixes" patches, as they could hide potencial
> bugs (Christian Brauner);
> - Added "cred-specific" macros (Christian Brauner), from my side,
> added a few '_' to the guards to signify that the newly introduced
> helper macros are preferred.
> - Changed a few guard() to scoped_guard() to fix the clang (17.0.6)
> compilation error about 'goto' bypassing variable initialization;
>
> Link to RFC v3:
>
> https://lore.kernel.org/r/20240216051640.197378-1-vinicius.gomes@intel.com/
>
> Changes from RFC v2:
> - Added separate patches for the warnings for the discarded const
> when using the cleanup macros: one for DEFINE_GUARD() and one for
> DEFINE_LOCK_GUARD_1() (I am uncertain if it's better to squash them
> together);
> - Reordered the series so the backing file patch is the first user of
> the introduced helpers (Amir Goldstein);
> - Change the definition of the cleanup "class" from a GUARD to a
> LOCK_GUARD_1, which defines an implicit container, that allows us
> to remove some variable declarations to store the overriden
> credentials (Amir Goldstein);
> - Replaced most of the uses of scoped_guard() with guard(), to reduce
> the code churn, the remaining ones I wasn't sure if I was changing
> the behavior: either they were nested (overrides "inside"
> overrides) or something calls current_cred() (Amir Goldstein).
>
> New questions:
> - The backing file callbacks are now called with the "light"
> overriden credentials, so they are kind of restricted in what they
> can do with their credentials, is this acceptable in general?
Until we grow additional users, I think yes. Just needs to be
documented.
> - in ovl_rename() I had to manually call the "light" the overrides,
> both using the guard() macro or using the non-light version causes
> the workload to crash the kernel. I still have to investigate why
> this is happening. Hints are appreciated.
Do you have a reproducer? Do you have a splat from dmesg?
next prev parent reply other threads:[~2024-04-24 17:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-03 2:18 [PATCH v1 0/3] overlayfs: Optimize override/revert creds Vinicius Costa Gomes
2024-04-03 2:18 ` [PATCH v1 1/3] cred: Add a light version of override/revert_creds() Vinicius Costa Gomes
2024-04-03 2:18 ` [PATCH v1 2/3] fs: Optimize credentials reference count for backing file ops Vinicius Costa Gomes
2024-04-03 15:40 ` kernel test robot
2024-04-03 2:18 ` [PATCH v1 3/3] overlayfs: Optimize credentials usage Vinicius Costa Gomes
2024-04-12 12:36 ` [PATCH v1 0/3] overlayfs: Optimize override/revert creds Miklos Szeredi
2024-04-24 19:01 ` Vinicius Costa Gomes
2024-04-25 6:06 ` Amir Goldstein
2024-04-24 17:01 ` Christian Brauner [this message]
2024-04-24 19:15 ` Vinicius Costa Gomes
2024-04-25 9:20 ` Christian Brauner
2024-04-25 17:12 ` Vinicius Costa Gomes
2024-04-25 17:47 ` Nathan Chancellor
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=20240424-befund-unantastbar-9b0154bec6e7@brauner \
--to=brauner@kernel.org \
--cc=amir73il@gmail.com \
--cc=hu1.chen@intel.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=lizhen.you@intel.com \
--cc=malini.bhandaru@intel.com \
--cc=mikko.ylinen@intel.com \
--cc=miklos@szeredi.hu \
--cc=tim.c.chen@intel.com \
--cc=vinicius.gomes@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).