Re: [PATCH] KEYS: trusted: Rollback init_trusted() consistently

2023-10-10 Thread Sumit Garg
On Wed, 11 Oct 2023 at 04:46, Jarkko Sakkinen wrote: > > Do bind neither static calls nor trusted_key_exit() before a successful > init, in order to maintain a consistent state. In addition, depart the > init_trusted() in the case of a real error (i.e. getting back something > else than -ENODEV).

Re: [PATCH v2] KEYS: trusted: Remove redundant static calls usage

2023-10-10 Thread Sumit Garg
On Wed, 11 Oct 2023 at 00:35, Jarkko Sakkinen wrote: > > On Tue, 2023-10-10 at 11:28 -0700, Linus Torvalds wrote: > > On Thu, 5 Oct 2023 at 22:18, Sumit Garg wrote: > > > > > > Static calls invocations aren't well supported from module __init and > > > __exit functions. Especially the static call

Re: [PATCH v2] KEYS: trusted: Remove redundant static calls usage

2023-10-10 Thread Sumit Garg
On Tue, 10 Oct 2023 at 23:59, Linus Torvalds wrote: > > On Thu, 5 Oct 2023 at 22:18, Sumit Garg wrote: > > > > Static calls invocations aren't well supported from module __init and > > __exit functions. Especially the static call from cleanup_trusted() led > > to a crash on x86 kernel with CONFIG

Re: [PATCH v3 3/3] fs: store real path instead of fake path in backing file f_path

2023-10-10 Thread Al Viro
On Tue, Oct 10, 2023 at 08:14:15PM +0200, Miklos Szeredi wrote: > On Tue, 10 Oct 2023 at 19:41, Al Viro wrote: > > > > On Tue, Oct 10, 2023 at 05:55:04PM +0100, Al Viro wrote: > > > On Tue, Oct 10, 2023 at 03:34:45PM +0200, Miklos Szeredi wrote: > > > > On Tue, 10 Oct 2023 at 15:17, Amir Goldstein

Re: [PATCH v3 3/3] fs: store real path instead of fake path in backing file f_path

2023-10-10 Thread Al Viro
On Tue, Oct 10, 2023 at 09:28:41PM +0300, Amir Goldstein wrote: > > with making vm_user_file() do this: > > file = vma->vm_file; > > if (file && unlikely(file->f_mode & FMODE_BACKING)) > > file = backing_file(file)->user_file; > > return file; > > > > Voila.

[PATCH] KEYS: trusted: Rollback init_trusted() consistently

2023-10-10 Thread Jarkko Sakkinen
Do bind neither static calls nor trusted_key_exit() before a successful init, in order to maintain a consistent state. In addition, depart the init_trusted() in the case of a real error (i.e. getting back something else than -ENODEV). Reported-by: Linus Torvalds Closes: https://lore.kernel.org/l

Re: [PATCH v2] KEYS: trusted: Remove redundant static calls usage

2023-10-10 Thread Jarkko Sakkinen
On Tue, 2023-10-10 at 22:05 +0300, Jarkko Sakkinen wrote: > On Tue, 2023-10-10 at 11:28 -0700, Linus Torvalds wrote: > > On Thu, 5 Oct 2023 at 22:18, Sumit Garg wrote: > > > > > > Static calls invocations aren't well supported from module __init and > > > __exit functions. Especially the static c

Re: [PATCH v2] KEYS: trusted: Remove redundant static calls usage

2023-10-10 Thread Jarkko Sakkinen
On Tue, 2023-10-10 at 11:28 -0700, Linus Torvalds wrote: > On Thu, 5 Oct 2023 at 22:18, Sumit Garg wrote: > > > > Static calls invocations aren't well supported from module __init and > > __exit functions. Especially the static call from cleanup_trusted() led > > to a crash on x86 kernel with CON

Re: [PATCH v2] KEYS: trusted: Remove redundant static calls usage

2023-10-10 Thread Linus Torvalds
On Thu, 5 Oct 2023 at 22:18, Sumit Garg wrote: > > Static calls invocations aren't well supported from module __init and > __exit functions. Especially the static call from cleanup_trusted() led > to a crash on x86 kernel with CONFIG_DEBUG_VIRTUAL=y. > > However, the usage of static call invocatio

Re: [PATCH v3 3/3] fs: store real path instead of fake path in backing file f_path

2023-10-10 Thread Amir Goldstein
On Tue, Oct 10, 2023 at 9:21 PM Al Viro wrote: > > On Tue, Oct 10, 2023 at 08:57:21PM +0300, Amir Goldstein wrote: > > On Tue, Oct 10, 2023 at 8:41 PM Al Viro wrote: > > > > > > On Tue, Oct 10, 2023 at 05:55:04PM +0100, Al Viro wrote: > > > > On Tue, Oct 10, 2023 at 03:34:45PM +0200, Miklos Szere

Re: [PATCH v3 3/3] fs: store real path instead of fake path in backing file f_path

2023-10-10 Thread Al Viro
On Tue, Oct 10, 2023 at 08:57:21PM +0300, Amir Goldstein wrote: > On Tue, Oct 10, 2023 at 8:41 PM Al Viro wrote: > > > > On Tue, Oct 10, 2023 at 05:55:04PM +0100, Al Viro wrote: > > > On Tue, Oct 10, 2023 at 03:34:45PM +0200, Miklos Szeredi wrote: > > > > On Tue, 10 Oct 2023 at 15:17, Amir Goldste

Re: [PATCH v3 3/3] fs: store real path instead of fake path in backing file f_path

2023-10-10 Thread Miklos Szeredi
On Tue, 10 Oct 2023 at 19:41, Al Viro wrote: > > On Tue, Oct 10, 2023 at 05:55:04PM +0100, Al Viro wrote: > > On Tue, Oct 10, 2023 at 03:34:45PM +0200, Miklos Szeredi wrote: > > > On Tue, 10 Oct 2023 at 15:17, Amir Goldstein wrote: > > > > > > > Sorry, you asked about ovl mount. > > > > To me it

Re: [PATCH v3 3/3] fs: store real path instead of fake path in backing file f_path

2023-10-10 Thread Amir Goldstein
On Tue, Oct 10, 2023 at 8:41 PM Al Viro wrote: > > On Tue, Oct 10, 2023 at 05:55:04PM +0100, Al Viro wrote: > > On Tue, Oct 10, 2023 at 03:34:45PM +0200, Miklos Szeredi wrote: > > > On Tue, 10 Oct 2023 at 15:17, Amir Goldstein wrote: > > > > > > > Sorry, you asked about ovl mount. > > > > To me i

Re: [PATCH v3 3/3] fs: store real path instead of fake path in backing file f_path

2023-10-10 Thread Al Viro
On Tue, Oct 10, 2023 at 05:55:04PM +0100, Al Viro wrote: > On Tue, Oct 10, 2023 at 03:34:45PM +0200, Miklos Szeredi wrote: > > On Tue, 10 Oct 2023 at 15:17, Amir Goldstein wrote: > > > > > Sorry, you asked about ovl mount. > > > To me it makes sense that if users observe ovl paths in writable map

Re: [PATCH v3 3/3] fs: store real path instead of fake path in backing file f_path

2023-10-10 Thread Al Viro
On Tue, Oct 10, 2023 at 03:34:45PM +0200, Miklos Szeredi wrote: > On Tue, 10 Oct 2023 at 15:17, Amir Goldstein wrote: > > > Sorry, you asked about ovl mount. > > To me it makes sense that if users observe ovl paths in writable mapped > > memory, that ovl should not be remounted RO. > > Anyway, I

Re: [PATCH v3 3/3] fs: store real path instead of fake path in backing file f_path

2023-10-10 Thread Amir Goldstein
On Tue, Oct 10, 2023 at 4:34 PM Miklos Szeredi wrote: > > On Tue, 10 Oct 2023 at 15:17, Amir Goldstein wrote: > > > Sorry, you asked about ovl mount. > > To me it makes sense that if users observe ovl paths in writable mapped > > memory, that ovl should not be remounted RO. > > Anyway, I don't se

Re: [PATCH v2] KEYS: trusted: Remove redundant static calls usage

2023-10-10 Thread Jarkko Sakkinen
On Tue, 2023-10-10 at 16:19 +0200, Ahmad Fatoum wrote: > Hello Jarkko, > > On 10.10.23 15:49, Jarkko Sakkinen wrote: > > On Tue, 2023-10-10 at 18:44 +0530, Sumit Garg wrote: > > > On Tue, 10 Oct 2023 at 18:03, Jarkko Sakkinen wrote: > > > > > > > > On Fri, 2023-10-06 at 10:48 +0530, Sumit Garg w

Re: [PATCH v2] KEYS: trusted: Remove redundant static calls usage

2023-10-10 Thread Ahmad Fatoum
Hello Jarkko, On 10.10.23 15:49, Jarkko Sakkinen wrote: > On Tue, 2023-10-10 at 18:44 +0530, Sumit Garg wrote: >> On Tue, 10 Oct 2023 at 18:03, Jarkko Sakkinen wrote: >>> >>> On Fri, 2023-10-06 at 10:48 +0530, Sumit Garg wrote: Static calls invocations aren't well supported from module __ini

Re: [PATCH v2] KEYS: trusted: Remove redundant static calls usage

2023-10-10 Thread Jarkko Sakkinen
On Tue, 2023-10-10 at 18:44 +0530, Sumit Garg wrote: > On Tue, 10 Oct 2023 at 18:03, Jarkko Sakkinen wrote: > > > > On Fri, 2023-10-06 at 10:48 +0530, Sumit Garg wrote: > > > Static calls invocations aren't well supported from module __init and > > > __exit functions. Especially the static call f

Re: [PATCH v3 3/3] fs: store real path instead of fake path in backing file f_path

2023-10-10 Thread Miklos Szeredi
On Tue, 10 Oct 2023 at 15:17, Amir Goldstein wrote: > Sorry, you asked about ovl mount. > To me it makes sense that if users observe ovl paths in writable mapped > memory, that ovl should not be remounted RO. > Anyway, I don't see a good reason to allow remount RO for ovl in that case. > Is there

Re: [PATCH v3 3/3] fs: store real path instead of fake path in backing file f_path

2023-10-10 Thread Amir Goldstein
On Tue, Oct 10, 2023 at 4:10 PM Amir Goldstein wrote: > > On Tue, Oct 10, 2023 at 2:59 PM Miklos Szeredi wrote: > > > > On Mon, 9 Oct 2023 at 17:37, Amir Goldstein wrote: > > > > > static inline void put_file_access(struct file *file) > > > diff --git a/fs/open.c b/fs/open.c > > > index fe63e23

Re: [PATCH v2] KEYS: trusted: Remove redundant static calls usage

2023-10-10 Thread Sumit Garg
On Tue, 10 Oct 2023 at 18:03, Jarkko Sakkinen wrote: > > On Fri, 2023-10-06 at 10:48 +0530, Sumit Garg wrote: > > Static calls invocations aren't well supported from module __init and > > __exit functions. Especially the static call from cleanup_trusted() led > > to a crash on x86 kernel with CONF

Re: [PATCH v3 3/3] fs: store real path instead of fake path in backing file f_path

2023-10-10 Thread Amir Goldstein
On Tue, Oct 10, 2023 at 2:59 PM Miklos Szeredi wrote: > > On Mon, 9 Oct 2023 at 17:37, Amir Goldstein wrote: > > > static inline void put_file_access(struct file *file) > > diff --git a/fs/open.c b/fs/open.c > > index fe63e236da22..02dc608d40d8 100644 > > --- a/fs/open.c > > +++ b/fs/open.c > >

Re: [PATCH] tpm: nuvoton: Use i2c_get_match_data()

2023-10-10 Thread Jarkko Sakkinen
On Fri, 2023-10-06 at 16:42 -0500, Rob Herring wrote: > Use preferred i2c_get_match_data() instead of of_match_device() to > get the driver match data. With this, adjust the includes to explicitly > include the correct headers. > > Signed-off-by: Rob Herring Perhaps self-evident but to have a cl

Re: [PATCH v2] KEYS: trusted: Remove redundant static calls usage

2023-10-10 Thread Jarkko Sakkinen
On Fri, 2023-10-06 at 10:48 +0530, Sumit Garg wrote: > Static calls invocations aren't well supported from module __init and > __exit functions. Especially the static call from cleanup_trusted() led > to a crash on x86 kernel with CONFIG_DEBUG_VIRTUAL=y. > > However, the usage of static call invoc

Re: [PATCH v3 3/3] fs: store real path instead of fake path in backing file f_path

2023-10-10 Thread Miklos Szeredi
On Mon, 9 Oct 2023 at 17:37, Amir Goldstein wrote: > static inline void put_file_access(struct file *file) > diff --git a/fs/open.c b/fs/open.c > index fe63e236da22..02dc608d40d8 100644 > --- a/fs/open.c > +++ b/fs/open.c > @@ -881,7 +881,7 @@ static inline int file_get_write_access(struct file

Re: [PATCH v3 0/3] Reduce impact of overlayfs backing files fake path

2023-10-10 Thread Christian Brauner
On Mon, 09 Oct 2023 18:37:09 +0300, Amir Goldstein wrote: > Following v3 addresses Al's review comments on v2. > Applied to the vfs.misc branch of the vfs/vfs.git tree. Patches in the vfs.misc branch should appear in linux-next soon. Please report any outstanding bugs that were missed during rev

Re: [PATCH] fs: Pass AT_GETATTR_NOSEC flag to getattr interface function

2023-10-10 Thread Christian Brauner
On Mon, 02 Oct 2023 08:57:33 -0400, Stefan Berger wrote: > When vfs_getattr_nosec() calls a filesystem's getattr interface function > then the 'nosec' should propagate into this function so that > vfs_getattr_nosec() can again be called from the filesystem's gettattr > rather than vfs_getattr(). Th