* [PATCH 76/79] apparmor: switch to new ctime accessors
[not found] ` <20230621144735.55953-1-jlayton@kernel.org>
@ 2023-06-21 14:46 ` Jeff Layton
2023-06-22 9:04 ` John Johansen
2023-06-21 14:46 ` [PATCH 77/79] security: " Jeff Layton
1 sibling, 1 reply; 9+ messages in thread
From: Jeff Layton @ 2023-06-21 14:46 UTC (permalink / raw)
To: Christian Brauner, John Johansen, Paul Moore, James Morris,
Serge E. Hallyn
Cc: Al Viro, Jan Kara, apparmor, linux-security-module, linux-kernel
In later patches, we're going to change how the ctime.tv_nsec field is
utilized. Switch to using accessor functions instead of raw accesses of
inode->i_ctime.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
security/apparmor/apparmorfs.c | 6 +++---
security/apparmor/policy_unpack.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
index 3d0d370d6ffd..8c72a94dd9e3 100644
--- a/security/apparmor/apparmorfs.c
+++ b/security/apparmor/apparmorfs.c
@@ -226,7 +226,7 @@ static int __aafs_setup_d_inode(struct inode *dir, struct dentry *dentry,
inode->i_ino = get_next_ino();
inode->i_mode = mode;
- inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
+ inode->i_atime = inode->i_mtime = inode_ctime_set_current(inode);
inode->i_private = data;
if (S_ISDIR(mode)) {
inode->i_op = iops ? iops : &simple_dir_inode_operations;
@@ -1557,7 +1557,7 @@ void __aafs_profile_migrate_dents(struct aa_profile *old,
if (new->dents[i]) {
struct inode *inode = d_inode(new->dents[i]);
- inode->i_mtime = inode->i_ctime = current_time(inode);
+ inode->i_mtime = inode_ctime_set_current(inode);
}
old->dents[i] = NULL;
}
@@ -2546,7 +2546,7 @@ static int aa_mk_null_file(struct dentry *parent)
inode->i_ino = get_next_ino();
inode->i_mode = S_IFCHR | S_IRUGO | S_IWUGO;
- inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
+ inode->i_atime = inode->i_mtime = inode_ctime_set_current(inode);
init_special_inode(inode, S_IFCHR | S_IRUGO | S_IWUGO,
MKDEV(MEM_MAJOR, 3));
d_instantiate(dentry, inode);
diff --git a/security/apparmor/policy_unpack.c b/security/apparmor/policy_unpack.c
index 4c188a44d65c..334d69b118a9 100644
--- a/security/apparmor/policy_unpack.c
+++ b/security/apparmor/policy_unpack.c
@@ -89,10 +89,10 @@ void __aa_loaddata_update(struct aa_loaddata *data, long revision)
struct inode *inode;
inode = d_inode(data->dents[AAFS_LOADDATA_DIR]);
- inode->i_mtime = inode->i_ctime = current_time(inode);
+ inode->i_mtime = inode_ctime_set_current(inode);
inode = d_inode(data->dents[AAFS_LOADDATA_REVISION]);
- inode->i_mtime = inode->i_ctime = current_time(inode);
+ inode->i_mtime = inode_ctime_set_current(inode);
}
}
--
2.41.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 77/79] security: switch to new ctime accessors
[not found] ` <20230621144735.55953-1-jlayton@kernel.org>
2023-06-21 14:46 ` [PATCH 76/79] apparmor: switch to new ctime accessors Jeff Layton
@ 2023-06-21 14:46 ` Jeff Layton
2023-06-23 14:15 ` Paul Moore
1 sibling, 1 reply; 9+ messages in thread
From: Jeff Layton @ 2023-06-21 14:46 UTC (permalink / raw)
To: Christian Brauner, Paul Moore, James Morris, Serge E. Hallyn
Cc: Al Viro, Jan Kara, linux-security-module, linux-kernel
In later patches, we're going to change how the ctime.tv_nsec field is
utilized. Switch to using accessor functions instead of raw accesses of
inode->i_ctime.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
security/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security/inode.c b/security/inode.c
index 6c326939750d..086280390793 100644
--- a/security/inode.c
+++ b/security/inode.c
@@ -145,7 +145,7 @@ static struct dentry *securityfs_create_dentry(const char *name, umode_t mode,
inode->i_ino = get_next_ino();
inode->i_mode = mode;
- inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
+ inode->i_atime = inode->i_mtime = inode_ctime_set_current(inode);
inode->i_private = data;
if (S_ISDIR(mode)) {
inode->i_op = &simple_dir_inode_operations;
--
2.41.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 76/79] apparmor: switch to new ctime accessors
2023-06-21 14:46 ` [PATCH 76/79] apparmor: switch to new ctime accessors Jeff Layton
@ 2023-06-22 9:04 ` John Johansen
0 siblings, 0 replies; 9+ messages in thread
From: John Johansen @ 2023-06-22 9:04 UTC (permalink / raw)
To: Jeff Layton, Christian Brauner, Paul Moore, James Morris,
Serge E. Hallyn
Cc: Al Viro, Jan Kara, apparmor, linux-security-module, linux-kernel
On 6/21/23 07:46, Jeff Layton wrote:
> In later patches, we're going to change how the ctime.tv_nsec field is
> utilized. Switch to using accessor functions instead of raw accesses of
> inode->i_ctime.
>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
lgtm
Acked-by: John Johansen <john.johansen@canonical.com>
> ---
> security/apparmor/apparmorfs.c | 6 +++---
> security/apparmor/policy_unpack.c | 4 ++--
> 2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
> index 3d0d370d6ffd..8c72a94dd9e3 100644
> --- a/security/apparmor/apparmorfs.c
> +++ b/security/apparmor/apparmorfs.c
> @@ -226,7 +226,7 @@ static int __aafs_setup_d_inode(struct inode *dir, struct dentry *dentry,
>
> inode->i_ino = get_next_ino();
> inode->i_mode = mode;
> - inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
> + inode->i_atime = inode->i_mtime = inode_ctime_set_current(inode);
> inode->i_private = data;
> if (S_ISDIR(mode)) {
> inode->i_op = iops ? iops : &simple_dir_inode_operations;
> @@ -1557,7 +1557,7 @@ void __aafs_profile_migrate_dents(struct aa_profile *old,
> if (new->dents[i]) {
> struct inode *inode = d_inode(new->dents[i]);
>
> - inode->i_mtime = inode->i_ctime = current_time(inode);
> + inode->i_mtime = inode_ctime_set_current(inode);
> }
> old->dents[i] = NULL;
> }
> @@ -2546,7 +2546,7 @@ static int aa_mk_null_file(struct dentry *parent)
>
> inode->i_ino = get_next_ino();
> inode->i_mode = S_IFCHR | S_IRUGO | S_IWUGO;
> - inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
> + inode->i_atime = inode->i_mtime = inode_ctime_set_current(inode);
> init_special_inode(inode, S_IFCHR | S_IRUGO | S_IWUGO,
> MKDEV(MEM_MAJOR, 3));
> d_instantiate(dentry, inode);
> diff --git a/security/apparmor/policy_unpack.c b/security/apparmor/policy_unpack.c
> index 4c188a44d65c..334d69b118a9 100644
> --- a/security/apparmor/policy_unpack.c
> +++ b/security/apparmor/policy_unpack.c
> @@ -89,10 +89,10 @@ void __aa_loaddata_update(struct aa_loaddata *data, long revision)
> struct inode *inode;
>
> inode = d_inode(data->dents[AAFS_LOADDATA_DIR]);
> - inode->i_mtime = inode->i_ctime = current_time(inode);
> + inode->i_mtime = inode_ctime_set_current(inode);
>
> inode = d_inode(data->dents[AAFS_LOADDATA_REVISION]);
> - inode->i_mtime = inode->i_ctime = current_time(inode);
> + inode->i_mtime = inode_ctime_set_current(inode);
> }
> }
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 01/79] fs: add ctime accessors infrastructure
[not found] ` <99b3c749-23d9-6f09-fb75-6a84f3d1b066@kernel.org>
@ 2023-06-22 10:14 ` Jeff Layton
0 siblings, 0 replies; 9+ messages in thread
From: Jeff Layton @ 2023-06-22 10:14 UTC (permalink / raw)
To: Damien Le Moal, Jeremy Kerr, Arnd Bergmann, Michael Ellerman,
Nicholas Piggin, Christophe Leroy, Heiko Carstens, Vasily Gorbik,
Alexander Gordeev, Christian Borntraeger, Sven Schnelle,
Greg Kroah-Hartman, Arve Hjønnevåg, Todd Kjos,
Martijn Coenen, Joel Fernandes, Christian Brauner, Carlos Llamas,
Suren Baghdasaryan, Dennis Dalessandro, Jason Gunthorpe,
Leon Romanovsky, Brad Warrum, Ritu Agarwal, Eric Van Hensbergen,
Latchesar Ionkov, Dominique Martinet, Christian Schoenebeck,
David Sterba, David Howells, Marc Dionne, Alexander Viro,
Ian Kent, Luis de Bethencourt, Salah Triki, Tigran A. Aivazian,
Eric Biederman, Kees Cook, Chris Mason, Josef Bacik, Xiubo Li,
Ilya Dryomov, Jan Harkes, coda, Joel Becker, Christoph Hellwig,
Nicolas Pitre, Rafael J. Wysocki, Tyler Hicks, Ard Biesheuvel,
Gao Xiang, Chao Yu, Yue Hu, Jeffle Xu, Namjae Jeon, Sungjong Seo,
Jan Kara, Theodore Ts'o, Andreas Dilger, Jaegeuk Kim,
OGAWA Hirofumi, Miklos Szeredi, Bob Peterson, Andreas Gruenbacher,
Richard Weinberger, Anton Ivanov, Johannes Berg, Mikulas Patocka,
Mike Kravetz, Muchun Song, David Woodhouse, Dave Kleikamp,
Tejun Heo, Trond Myklebust, Anna Schumaker, Chuck Lever,
Ryusuke Konishi, Anton Altaparmakov, Konstantin Komarov,
Mark Fasheh, Joseph Qi, Bob Copeland, Mike Marshall,
Martin Brandenburg, Luis Chamberlain, Iurii Zaikin, Tony Luck,
Guilherme G. Piccoli, Anders Larsen, Steve French,
Paulo Alcantara, Ronnie Sahlberg, Shyam Prasad N, Tom Talpey,
Sergey Senozhatsky, Phillip Lougher, Steven Rostedt,
Masami Hiramatsu, Evgeniy Dushistov, Hans de Goede,
Darrick J. Wong, Naohiro Aota, Johannes Thumshirn,
Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa, Hugh Dickins,
Andrew Morton, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, John Johansen, Paul Moore, James Morris,
Serge E. Hallyn, Stephen Smalley, Eric Paris, Juergen Gross,
Ruihan Li, Laurent Pinchart, Wolfram Sang, Udipto Goswami,
Linyu Yuan, John Keeping, Andrzej Pietrasiewicz, Dan Carpenter,
Yuta Hayama, Jozef Martiniak, Jens Axboe, Alan Stern,
Sandeep Dhavale, Dave Chinner, Johannes Weiner, ZhangPeng,
Viacheslav Dubeyko, Tetsuo Handa, Aditya Garg, Erez Zadok,
Yifei Liu, Yu Zhe, Matthew Wilcox (Oracle), Oleg Kanatov,
Dr. David Alan Gilbert, Jiangshan Yi, xu xin, Stefan Roesch,
Zhihao Cheng, Liam R. Howlett, Alexey Dobriyan, Minghao Chi,
Seth Forshee, Zeng Jingxiang, Bart Van Assche, Mimi Zohar,
Roberto Sassu, Zhang Yi, Tom Rix, Fabio M. De Francesco,
Chen Zhongjin, Zhengchao Shao, Rik van Riel, Jingyu Wang,
Hangyu Hua, linuxppc-dev, linux-kernel, linux-s390, linux-rdma,
linux-usb, v9fs, linux-fsdevel, linux-afs, autofs, linux-mm,
linux-btrfs, ceph-devel, codalist, ecryptfs, linux-efi,
linux-erofs, linux-ext4, linux-f2fs-devel, cluster-devel,
linux-um, linux-mtd, jfs-discussion, linux-nfs, linux-nilfs,
linux-ntfs-dev, ntfs3, ocfs2-devel, linux-karma-devel, devel,
linux-unionfs, linux-hardening, reiserfs-devel, linux-cifs,
samba-technical, linux-trace-kernel, linux-xfs, bpf, netdev,
apparmor, linux-security-module, selinux
On Thu, 2023-06-22 at 09:46 +0900, Damien Le Moal wrote:
> On 6/21/23 23:45, Jeff Layton wrote:
> > struct timespec64 has unused bits in the tv_nsec field that can be used
> > for other purposes. In future patches, we're going to change how the
> > inode->i_ctime is accessed in certain inodes in order to make use of
> > them. In order to do that safely though, we'll need to eradicate raw
> > accesses of the inode->i_ctime field from the kernel.
> >
> > Add new accessor functions for the ctime that we can use to replace them.
> >
> > Signed-off-by: Jeff Layton <jlayton@kernel.org>
>
> [...]
>
> > +/**
> > + * inode_ctime_peek - fetch the current ctime from the inode
> > + * @inode: inode from which to fetch ctime
> > + *
> > + * Grab the current ctime from the inode and return it.
> > + */
> > +static inline struct timespec64 inode_ctime_peek(const struct inode *inode)
>
> To be consistent with inode_ctime_set(), why not call this one inode_ctime_get()
In later patches fetching the ctime for presentation may have side
effects on certain filesystems. Using "peek" here is a hint that we want
to avoid those side effects in these calls.
> ? Also, inode_set_ctime() & inode_get_ctime() may be a little more natural. But
> no strong opinion about that though.
>
I like the consistency of the inode_ctime_* prefix. It makes it simpler
to find these calls when grepping, etc.
That said, my opinions on naming are pretty loosely-held, so if the
consensus is that the names should as you suggest, I'll go along with
it.
--
Jeff Layton <jlayton@kernel.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 00/79] fs: new accessors for inode->i_ctime
[not found] ` <2a5a069572b46b59dd16fe8d54e549a9b5bbb6eb.camel@kernel.org>
@ 2023-06-23 12:41 ` Christian Brauner
0 siblings, 0 replies; 9+ messages in thread
From: Christian Brauner @ 2023-06-23 12:41 UTC (permalink / raw)
To: Jeff Layton
Cc: Steven Rostedt, Jeremy Kerr, Arnd Bergmann, Michael Ellerman,
Nicholas Piggin, Christophe Leroy, Heiko Carstens, Vasily Gorbik,
Alexander Gordeev, Christian Borntraeger, Sven Schnelle,
Greg Kroah-Hartman, Arve Hjønnevåg, Todd Kjos,
Martijn Coenen, Joel Fernandes, Carlos Llamas, Suren Baghdasaryan,
Dennis Dalessandro, Jason Gunthorpe, Leon Romanovsky, Brad Warrum,
Ritu Agarwal, Eric Van Hensbergen, Latchesar Ionkov,
Dominique Martinet, Christian Schoenebeck, David Sterba,
David Howells, Marc Dionne, Alexander Viro, Ian Kent,
Luis de Bethencourt, Salah Triki, Tigran A. Aivazian,
Eric Biederman, Kees Cook, Chris Mason, Josef Bacik, Xiubo Li,
Ilya Dryomov, Jan Harkes, coda, Joel Becker, Christoph Hellwig,
Nicolas Pitre, Rafael J. Wysocki, Tyler Hicks, Ard Biesheuvel,
Gao Xiang, Chao Yu, Yue Hu, Jeffle Xu, Namjae Jeon, Sungjong Seo,
Jan Kara, Theodore Ts'o, Andreas Dilger, Jaegeuk Kim,
OGAWA Hirofumi, Miklos Szeredi, Bob Peterson, Andreas Gruenbacher,
Richard Weinberger, Anton Ivanov, Johannes Berg, Mikulas Patocka,
Mike Kravetz, Muchun Song, David Woodhouse, Dave Kleikamp,
Tejun Heo, Trond Myklebust, Anna Schumaker, Chuck Lever,
Ryusuke Konishi, Anton Altaparmakov, Konstantin Komarov,
Mark Fasheh, Joseph Qi, Bob Copeland, Mike Marshall,
Martin Brandenburg, Luis Chamberlain, Iurii Zaikin, Tony Luck,
Guilherme G. Piccoli, Anders Larsen, Steve French,
Paulo Alcantara, Ronnie Sahlberg, Shyam Prasad N, Tom Talpey,
Sergey Senozhatsky, Phillip Lougher, Masami Hiramatsu,
Evgeniy Dushistov, Hans de Goede, Darrick J. Wong, Damien Le Moal,
Naohiro Aota, Johannes Thumshirn, Alexei Starovoitov,
Daniel Borkmann, Andrii Nakryiko, Martin KaFai Lau, Song Liu,
Yonghong Song, John Fastabend, KP Singh, Stanislav Fomichev,
Hao Luo, Jiri Olsa, Hugh Dickins, Andrew Morton, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, John Johansen,
Paul Moore, James Morris, Serge E. Hallyn, Stephen Smalley,
Eric Paris, Juergen Gross, Ruihan Li, Laurent Pinchart,
Wolfram Sang, Udipto Goswami, Linyu Yuan, John Keeping,
Andrzej Pietrasiewicz, Dan Carpenter, Yuta Hayama,
Jozef Martiniak, Jens Axboe, Alan Stern, Sandeep Dhavale,
Dave Chinner, Johannes Weiner, ZhangPeng, Viacheslav Dubeyko,
Tetsuo Handa, Aditya Garg, Erez Zadok, Yifei Liu, Yu Zhe,
Matthew Wilcox (Oracle), Oleg Kanatov, Dr. David Alan Gilbert,
Jiangshan Yi, xu xin, Stefan Roesch, Zhihao Cheng,
Liam R. Howlett, Alexey Dobriyan, Minghao Chi, Seth Forshee,
Zeng Jingxiang, Bart Van Assche, Mimi Zohar, Roberto Sassu,
Zhang Yi, Tom Rix, Fabio M. De Francesco, Chen Zhongjin,
Zhengchao Shao, Rik van Riel, Jingyu Wang, Hangyu Hua,
linuxppc-dev, linux-kernel, linux-s390, linux-rdma, linux-usb,
v9fs, linux-fsdevel, linux-afs, autofs, linux-mm, linux-btrfs,
ceph-devel, codalist, ecryptfs, linux-efi, linux-erofs,
linux-ext4, linux-f2fs-devel, cluster-devel, linux-um, linux-mtd,
jfs-discussion, linux-nfs, linux-nilfs, linux-ntfs-dev, ntfs3,
ocfs2-devel, linux-karma-devel, devel, linux-unionfs,
linux-hardening, reiserfs-devel, linux-cifs, samba-technical,
linux-trace-kernel, linux-xfs, bpf, netdev, apparmor,
linux-security-module, selinux
On Wed, Jun 21, 2023 at 03:52:27PM -0400, Jeff Layton wrote:
> On Wed, 2023-06-21 at 15:21 -0400, Steven Rostedt wrote:
> > On Wed, 21 Jun 2023 10:45:05 -0400
> > Jeff Layton <jlayton@kernel.org> wrote:
> >
> > > Most of this conversion was done via coccinelle, with a few of the more
> > > non-standard accesses done by hand. There should be no behavioral
> > > changes with this set. That will come later, as we convert individual
> > > filesystems to use multigrain timestamps.
> >
> > BTW, Linus has suggested to me that whenever a conccinelle script is used,
> > it should be included in the change log.
> >
>
> Ok, here's what I have. I note again that my usage of coccinelle is
> pretty primitive, so I ended up doing a fair bit of by-hand fixing after
> applying these.
>
> Given the way that this change is broken up into 77 patches by
> subsystem, to which changelogs should I add it? I could add it to the
> "infrastructure" patch, but that's the one where I _didn't_ use it.
>
> Maybe to patch #79 (the one that renames i_ctime)?
That works. I can also put this into a merge commit or pr message.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 77/79] security: switch to new ctime accessors
2023-06-21 14:46 ` [PATCH 77/79] security: " Jeff Layton
@ 2023-06-23 14:15 ` Paul Moore
0 siblings, 0 replies; 9+ messages in thread
From: Paul Moore @ 2023-06-23 14:15 UTC (permalink / raw)
To: Jeff Layton
Cc: Christian Brauner, James Morris, Serge E. Hallyn, Al Viro,
Jan Kara, linux-security-module, linux-kernel
On Wed, Jun 21, 2023 at 10:49 AM Jeff Layton <jlayton@kernel.org> wrote:
>
> In later patches, we're going to change how the ctime.tv_nsec field is
> utilized. Switch to using accessor functions instead of raw accesses of
> inode->i_ctime.
>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
> security/inode.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/security/inode.c b/security/inode.c
> index 6c326939750d..086280390793 100644
> --- a/security/inode.c
> +++ b/security/inode.c
> @@ -145,7 +145,7 @@ static struct dentry *securityfs_create_dentry(const char *name, umode_t mode,
>
> inode->i_ino = get_next_ino();
> inode->i_mode = mode;
> - inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
> + inode->i_atime = inode->i_mtime = inode_ctime_set_current(inode);
In the process of looking at inode_ctime_set_current() I ran into the
same bug others noticed regarding inode_set_ctime()/inode_ctime_set();
assuming that gets fixed this looks fine to me.
Acked-by: Paul Moore <paul@paul-moore.com>
> inode->i_private = data;
> if (S_ISDIR(mode)) {
> inode->i_op = &simple_dir_inode_operations;
> --
> 2.41.0
--
paul-moore.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 00/79] fs: new accessors for inode->i_ctime
[not found] ` <20230621152141.5961cf5f@gandalf.local.home>
[not found] ` <2a5a069572b46b59dd16fe8d54e549a9b5bbb6eb.camel@kernel.org>
@ 2023-06-30 22:11 ` Luis Chamberlain
1 sibling, 0 replies; 9+ messages in thread
From: Luis Chamberlain @ 2023-06-30 22:11 UTC (permalink / raw)
To: Steven Rostedt, Julia Lawall, Takashi Iwai
Cc: Jeff Layton, Jeremy Kerr, Arnd Bergmann, Michael Ellerman,
Nicholas Piggin, Christophe Leroy, Heiko Carstens, Vasily Gorbik,
Alexander Gordeev, Christian Borntraeger, Sven Schnelle,
Greg Kroah-Hartman, Arve Hjønnevåg, Todd Kjos,
Martijn Coenen, Joel Fernandes, Christian Brauner, Carlos Llamas,
Suren Baghdasaryan, Dennis Dalessandro, Jason Gunthorpe,
Leon Romanovsky, Brad Warrum, Ritu Agarwal, Eric Van Hensbergen,
Latchesar Ionkov, Dominique Martinet, Christian Schoenebeck,
David Sterba, David Howells, Marc Dionne, Alexander Viro,
Ian Kent, Luis de Bethencourt, Salah Triki, Tigran A. Aivazian,
Eric Biederman, Kees Cook, Chris Mason, Josef Bacik, Xiubo Li,
Ilya Dryomov, Jan Harkes, coda, Joel Becker, Christoph Hellwig,
Nicolas Pitre, Rafael J. Wysocki, Tyler Hicks, Ard Biesheuvel,
Gao Xiang, Chao Yu, Yue Hu, Jeffle Xu, Namjae Jeon, Sungjong Seo,
Jan Kara, Theodore Ts'o, Andreas Dilger, Jaegeuk Kim,
OGAWA Hirofumi, Miklos Szeredi, Bob Peterson, Andreas Gruenbacher,
Richard Weinberger, Anton Ivanov, Johannes Berg, Mikulas Patocka,
Mike Kravetz, Muchun Song, David Woodhouse, Dave Kleikamp,
Tejun Heo, Trond Myklebust, Anna Schumaker, Chuck Lever,
Ryusuke Konishi, Anton Altaparmakov, Konstantin Komarov,
Mark Fasheh, Joseph Qi, Bob Copeland, Mike Marshall,
Martin Brandenburg, Iurii Zaikin, Tony Luck, Guilherme G. Piccoli,
Anders Larsen, Steve French, Paulo Alcantara, Ronnie Sahlberg,
Shyam Prasad N, Tom Talpey, Sergey Senozhatsky, Phillip Lougher,
Masami Hiramatsu, Evgeniy Dushistov, Hans de Goede,
Darrick J. Wong, Damien Le Moal, Naohiro Aota, Johannes Thumshirn,
Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa, Hugh Dickins,
Andrew Morton, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, John Johansen, Paul Moore, James Morris,
Serge E. Hallyn, Stephen Smalley, Eric Paris, Juergen Gross,
Ruihan Li, Laurent Pinchart, Wolfram Sang, Udipto Goswami,
Linyu Yuan, John Keeping, Andrzej Pietrasiewicz, Dan Carpenter,
Yuta Hayama, Jozef Martiniak, Jens Axboe, Alan Stern,
Sandeep Dhavale, Dave Chinner, Johannes Weiner, ZhangPeng,
Viacheslav Dubeyko, Tetsuo Handa, Aditya Garg, Erez Zadok,
Yifei Liu, Yu Zhe, Matthew Wilcox (Oracle), Oleg Kanatov,
Dr. David Alan Gilbert, Jiangshan Yi, xu xin, Stefan Roesch,
Zhihao Cheng, Liam R. Howlett, Alexey Dobriyan, Minghao Chi,
Seth Forshee, Zeng Jingxiang, Bart Van Assche, Mimi Zohar,
Roberto Sassu, Zhang Yi, Tom Rix, Fabio M. De Francesco,
Chen Zhongjin, Zhengchao Shao, Rik van Riel, Jingyu Wang,
Hangyu Hua, linuxppc-dev, linux-kernel, linux-s390, linux-rdma,
linux-usb, v9fs, linux-fsdevel, linux-afs, autofs, linux-mm,
linux-btrfs, ceph-devel, codalist, ecryptfs, linux-efi,
linux-erofs, linux-ext4, linux-f2fs-devel, cluster-devel,
linux-um, linux-mtd, jfs-discussion, linux-nfs, linux-nilfs,
linux-ntfs-dev, ntfs3, ocfs2-devel, linux-karma-devel, devel,
linux-unionfs, linux-hardening, reiserfs-devel, linux-cifs,
samba-technical, linux-trace-kernel, linux-xfs, bpf, netdev,
apparmor, linux-security-module, selinux
On Wed, Jun 21, 2023 at 03:21:41PM -0400, Steven Rostedt wrote:
> On Wed, 21 Jun 2023 10:45:05 -0400
> Jeff Layton <jlayton@kernel.org> wrote:
>
> > Most of this conversion was done via coccinelle, with a few of the more
> > non-standard accesses done by hand. There should be no behavioral
> > changes with this set. That will come later, as we convert individual
> > filesystems to use multigrain timestamps.
>
> BTW, Linus has suggested to me that whenever a conccinelle script is used,
> it should be included in the change log.
Sometimes people like the coccinelle included in the commit, sometimes
people don't [0], it really ends up being up to a subjective maintainer
preference. A compromise could be to use git notes as these are
optional, however if we want to go down that path we should try to make
a general consensus on it so we can send a consistent message.
[0] https://lore.kernel.org/all/20230512073100.GC32559@twin.jikos.cz/
Luis
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 01/79] fs: add ctime accessors infrastructure
[not found] ` <20230621144507.55591-2-jlayton@kernel.org>
[not found] ` <99b3c749-23d9-6f09-fb75-6a84f3d1b066@kernel.org>
@ 2023-06-30 22:12 ` Luis Chamberlain
2023-07-12 15:31 ` Randy Dunlap
2 siblings, 0 replies; 9+ messages in thread
From: Luis Chamberlain @ 2023-06-30 22:12 UTC (permalink / raw)
To: Jeff Layton
Cc: Jeremy Kerr, Arnd Bergmann, Michael Ellerman, Nicholas Piggin,
Christophe Leroy, Heiko Carstens, Vasily Gorbik,
Alexander Gordeev, Christian Borntraeger, Sven Schnelle,
Greg Kroah-Hartman, Arve Hjønnevåg, Todd Kjos,
Martijn Coenen, Joel Fernandes, Christian Brauner, Carlos Llamas,
Suren Baghdasaryan, Dennis Dalessandro, Jason Gunthorpe,
Leon Romanovsky, Brad Warrum, Ritu Agarwal, Eric Van Hensbergen,
Latchesar Ionkov, Dominique Martinet, Christian Schoenebeck,
David Sterba, David Howells, Marc Dionne, Alexander Viro,
Ian Kent, Luis de Bethencourt, Salah Triki, Tigran A. Aivazian,
Eric Biederman, Kees Cook, Chris Mason, Josef Bacik, Xiubo Li,
Ilya Dryomov, Jan Harkes, coda, Joel Becker, Christoph Hellwig,
Nicolas Pitre, Rafael J. Wysocki, Tyler Hicks, Ard Biesheuvel,
Gao Xiang, Chao Yu, Yue Hu, Jeffle Xu, Namjae Jeon, Sungjong Seo,
Jan Kara, Theodore Ts'o, Andreas Dilger, Jaegeuk Kim,
OGAWA Hirofumi, Miklos Szeredi, Bob Peterson, Andreas Gruenbacher,
Richard Weinberger, Anton Ivanov, Johannes Berg, Mikulas Patocka,
Mike Kravetz, Muchun Song, David Woodhouse, Dave Kleikamp,
Tejun Heo, Trond Myklebust, Anna Schumaker, Chuck Lever,
Ryusuke Konishi, Anton Altaparmakov, Konstantin Komarov,
Mark Fasheh, Joseph Qi, Bob Copeland, Mike Marshall,
Martin Brandenburg, Iurii Zaikin, Tony Luck, Guilherme G. Piccoli,
Anders Larsen, Steve French, Paulo Alcantara, Ronnie Sahlberg,
Shyam Prasad N, Tom Talpey, Sergey Senozhatsky, Phillip Lougher,
Steven Rostedt, Masami Hiramatsu, Evgeniy Dushistov,
Hans de Goede, Darrick J. Wong, Damien Le Moal, Naohiro Aota,
Johannes Thumshirn, Alexei Starovoitov, Daniel Borkmann,
Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
Hugh Dickins, Andrew Morton, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, John Johansen, Paul Moore,
James Morris, Serge E. Hallyn, Stephen Smalley, Eric Paris,
Juergen Gross, Ruihan Li, Laurent Pinchart, Wolfram Sang,
Udipto Goswami, Linyu Yuan, John Keeping, Andrzej Pietrasiewicz,
Dan Carpenter, Yuta Hayama, Jozef Martiniak, Jens Axboe,
Alan Stern, Sandeep Dhavale, Dave Chinner, Johannes Weiner,
ZhangPeng, Viacheslav Dubeyko, Tetsuo Handa, Aditya Garg,
Erez Zadok, Yifei Liu, Yu Zhe, Matthew Wilcox (Oracle),
Oleg Kanatov, Dr. David Alan Gilbert, Jiangshan Yi, xu xin,
Stefan Roesch, Zhihao Cheng, Liam R. Howlett, Alexey Dobriyan,
Minghao Chi, Seth Forshee, Zeng Jingxiang, Bart Van Assche,
Mimi Zohar, Roberto Sassu, Zhang Yi, Tom Rix,
Fabio M. De Francesco, Chen Zhongjin, Zhengchao Shao,
Rik van Riel, Jingyu Wang, Hangyu Hua, linuxppc-dev, linux-kernel,
linux-s390, linux-rdma, linux-usb, v9fs, linux-fsdevel, linux-afs,
autofs, linux-mm, linux-btrfs, ceph-devel, codalist, ecryptfs,
linux-efi, linux-erofs, linux-ext4, linux-f2fs-devel,
cluster-devel, linux-um, linux-mtd, jfs-discussion, linux-nfs,
linux-nilfs, linux-ntfs-dev, ntfs3, ocfs2-devel,
linux-karma-devel, devel, linux-unionfs, linux-hardening,
reiserfs-devel, linux-cifs, samba-technical, linux-trace-kernel,
linux-xfs, bpf, netdev, apparmor, linux-security-module, selinux
On Wed, Jun 21, 2023 at 10:45:06AM -0400, Jeff Layton wrote:
> struct timespec64 has unused bits in the tv_nsec field that can be used
> for other purposes. In future patches, we're going to change how the
> inode->i_ctime is accessed in certain inodes in order to make use of
> them. In order to do that safely though, we'll need to eradicate raw
> accesses of the inode->i_ctime field from the kernel.
>
> Add new accessor functions for the ctime that we can use to replace them.
>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Luis
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 01/79] fs: add ctime accessors infrastructure
[not found] ` <20230621144507.55591-2-jlayton@kernel.org>
[not found] ` <99b3c749-23d9-6f09-fb75-6a84f3d1b066@kernel.org>
2023-06-30 22:12 ` Luis Chamberlain
@ 2023-07-12 15:31 ` Randy Dunlap
2 siblings, 0 replies; 9+ messages in thread
From: Randy Dunlap @ 2023-07-12 15:31 UTC (permalink / raw)
To: Jeff Layton, linux-kernel@vger.kernel.org,
Linux FS-devel Mailing List, linux-um
Hi Jeff,
On arch/um/, (subarch i386 or x86_64), hostfs build fails with:
../fs/hostfs/hostfs_kern.c:520:36: error: incompatible type for arg
ument 2 of 'inode_set_ctime_to_ts'
../include/linux/fs.h:1499:73: note: expected 'struct timespec64' b
ut argument is of type 'const struct hostfs_timespec *'
--
~Randy
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-07-12 15:33 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230621144507.55591-1-jlayton@kernel.org>
[not found] ` <20230621144735.55953-1-jlayton@kernel.org>
2023-06-21 14:46 ` [PATCH 76/79] apparmor: switch to new ctime accessors Jeff Layton
2023-06-22 9:04 ` John Johansen
2023-06-21 14:46 ` [PATCH 77/79] security: " Jeff Layton
2023-06-23 14:15 ` Paul Moore
[not found] ` <20230621152141.5961cf5f@gandalf.local.home>
[not found] ` <2a5a069572b46b59dd16fe8d54e549a9b5bbb6eb.camel@kernel.org>
2023-06-23 12:41 ` [PATCH 00/79] fs: new accessors for inode->i_ctime Christian Brauner
2023-06-30 22:11 ` Luis Chamberlain
[not found] ` <20230621144507.55591-2-jlayton@kernel.org>
[not found] ` <99b3c749-23d9-6f09-fb75-6a84f3d1b066@kernel.org>
2023-06-22 10:14 ` [PATCH 01/79] fs: add ctime accessors infrastructure Jeff Layton
2023-06-30 22:12 ` Luis Chamberlain
2023-07-12 15:31 ` Randy Dunlap
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).