linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org,
	Christian Brauner <brauner@kernel.org>
Subject: Re: [PATCH] secretmem: move setting O_LARGEFILE and bumping users' count to the place where we create the file
Date: Mon, 16 Jun 2025 06:00:27 +0300	[thread overview]
Message-ID: <aE-Iy_UIFFP5fd3g@kernel.org> (raw)
In-Reply-To: <20250615144610.49c561aebe464f617a262343@linux-foundation.org>

On Sun, Jun 15, 2025 at 02:46:10PM -0700, Andrew Morton wrote:
> On Sun, 15 Jun 2025 01:35:07 +0100 Al Viro <viro@zeniv.linux.org.uk> wrote:
> 
> > [don't really care which tree that goes through; right now it's
> > in viro/vfs.git #work.misc, but if somebody prefers to grab it
> > through a different tree, just say so]
> 
> (cc Mike)
> 
> > --- a/mm/secretmem.c
> > +++ b/mm/secretmem.c
> > @@ -208,7 +208,7 @@ static struct file *secretmem_file_create(unsigned long flags)
> >  	}
> >  
> >  	file = alloc_file_pseudo(inode, secretmem_mnt, "secretmem",
> > -				 O_RDWR, &secretmem_fops);
> > +				 O_RDWR | O_LARGEFILE, &secretmem_fops);
> >  	if (IS_ERR(file))
> >  		goto err_free_inode;
> >  
> > @@ -222,6 +222,8 @@ static struct file *secretmem_file_create(unsigned long flags)
> >  	inode->i_mode |= S_IFREG;
> >  	inode->i_size = 0;
> >  
> > +	atomic_inc(&secretmem_users);
> > +
> >  	return file;
> >  
> >  err_free_inode:
> > @@ -255,9 +257,6 @@ SYSCALL_DEFINE1(memfd_secret, unsigned int, flags)
> >  		goto err_put_fd;
> >  	}
> >  
> > -	file->f_flags |= O_LARGEFILE;
> > -
> > -	atomic_inc(&secretmem_users);
> >  	fd_install(fd, file);
> >  	return fd;
> >  
> 
> Acked-by: Andrew Morton <akpm@linux-foundation.org>

Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
 
> Please retain this in the vfs tree.

-- 
Sincerely yours,
Mike.

  reply	other threads:[~2025-06-16  3:00 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-15  0:30 [PATCH] landlock: opened file never has a negative dentry Al Viro
2025-06-15  0:31 ` [PATCH] apparmor: file never has NULL f_path.mnt Al Viro
2025-06-15  0:32   ` [PATCH] don't duplicate vfs_open() in kernel_file_open() Al Viro
2025-06-15  0:33     ` [PATCH] proc_fd_getattr(): don't bother with S_ISDIR() check Al Viro
2025-06-15  0:35       ` [PATCH] secretmem: move setting O_LARGEFILE and bumping users' count to the place where we create the file Al Viro
2025-06-15  0:47         ` [bpf_iter] get rid of redundant 3rd argument of prepare_seq_file() Al Viro
2025-06-16  4:51           ` Yonghong Song
2025-06-17 17:31           ` Alexei Starovoitov
2025-06-17 21:53             ` Al Viro
2025-06-18  0:24               ` Alexei Starovoitov
2025-06-18  0:30           ` patchwork-bot+netdevbpf
2025-06-15 21:46         ` [PATCH] secretmem: move setting O_LARGEFILE and bumping users' count to the place where we create the file Andrew Morton
2025-06-16  3:00           ` Mike Rapoport [this message]
2025-06-16 14:21       ` (subset) [PATCH] proc_fd_getattr(): don't bother with S_ISDIR() check Christian Brauner
2025-06-15  2:03     ` [PATCH] binder_ioctl_write_read(): simplify control flow a bit Al Viro
2025-06-16 10:20       ` Greg Kroah-Hartman
2025-06-16 14:17     ` [PATCH] don't duplicate vfs_open() in kernel_file_open() Christian Brauner
2025-06-16 14:18     ` (subset) " Christian Brauner
2025-06-15  2:01   ` [PATCH] selinuxfs_fill_super(): don't bother with selinuxfs_info_free() on failures Al Viro
2025-06-16 14:19     ` Christian Brauner
2025-06-24 23:44     ` Paul Moore
2025-06-25  0:57       ` Al Viro
2025-06-16 14:16   ` [PATCH] apparmor: file never has NULL f_path.mnt Christian Brauner
2025-06-16 15:36     ` Ryan Lee
2025-06-16 14:16 ` [PATCH] landlock: opened file never has a negative dentry Christian Brauner
2025-06-17 10:03 ` Mickaël Salaün

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=aE-Iy_UIFFP5fd3g@kernel.org \
    --to=rppt@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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).