lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240125-flsplit-v2-11-7485322b62c7@kernel.org>
Date: Thu, 25 Jan 2024 05:42:52 -0500
From: Jeff Layton <jlayton@...nel.org>
To: Christian Brauner <brauner@...nel.org>, 
 Alexander Viro <viro@...iv.linux.org.uk>, 
 Eric Van Hensbergen <ericvh@...nel.org>, 
 Latchesar Ionkov <lucho@...kov.net>, 
 Dominique Martinet <asmadeus@...ewreck.org>, 
 Christian Schoenebeck <linux_oss@...debyte.com>, 
 David Howells <dhowells@...hat.com>, Marc Dionne <marc.dionne@...istor.com>, 
 Xiubo Li <xiubli@...hat.com>, Ilya Dryomov <idryomov@...il.com>, 
 Alexander Aring <aahringo@...hat.com>, David Teigland <teigland@...hat.com>, 
 Miklos Szeredi <miklos@...redi.hu>, 
 Andreas Gruenbacher <agruenba@...hat.com>, 
 Trond Myklebust <trond.myklebust@...merspace.com>, 
 Anna Schumaker <anna@...nel.org>, Chuck Lever <chuck.lever@...cle.com>, 
 Neil Brown <neilb@...e.de>, Olga Kornievskaia <kolga@...app.com>, 
 Dai Ngo <Dai.Ngo@...cle.com>, Tom Talpey <tom@...pey.com>, 
 Jan Kara <jack@...e.cz>, Mark Fasheh <mark@...heh.com>, 
 Joel Becker <jlbec@...lplan.org>, Joseph Qi <joseph.qi@...ux.alibaba.com>, 
 Steve French <sfrench@...ba.org>, Paulo Alcantara <pc@...guebit.com>, 
 Shyam Prasad N <sprasad@...rosoft.com>, Namjae Jeon <linkinjeon@...nel.org>, 
 Sergey Senozhatsky <senozhatsky@...omium.org>, 
 Steven Rostedt <rostedt@...dmis.org>, 
 Masami Hiramatsu <mhiramat@...nel.org>, 
 Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, 
 Ronnie Sahlberg <ronniesahlberg@...il.com>
Cc: linux-kernel@...r.kernel.org, v9fs@...ts.linux.dev, 
 linux-afs@...ts.infradead.org, ceph-devel@...r.kernel.org, 
 gfs2@...ts.linux.dev, linux-fsdevel@...r.kernel.org, 
 linux-nfs@...r.kernel.org, ocfs2-devel@...ts.linux.dev, 
 linux-cifs@...r.kernel.org, linux-trace-kernel@...r.kernel.org, 
 Jeff Layton <jlayton@...nel.org>
Subject: [PATCH v2 11/41] filelock: add coccinelle scripts to move fields
 to struct file_lock_core

This patch creates two ".cocci" semantic patches in a top level cocci/
directory. These patches were used to help generate several of the
following patches. We can drop this patch or move the files to a more
appropriate location before merging.

Signed-off-by: Jeff Layton <jlayton@...nel.org>
---
 cocci/filelock.cocci | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 cocci/nlm.cocci      | 81 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 169 insertions(+)

diff --git a/cocci/filelock.cocci b/cocci/filelock.cocci
new file mode 100644
index 000000000000..93fb4ed8341a
--- /dev/null
+++ b/cocci/filelock.cocci
@@ -0,0 +1,88 @@
+@@
+struct file_lock *fl;
+@@
+(
+- fl->fl_blocker
++ fl->fl_core.flc_blocker
+|
+- fl->fl_list
++ fl->fl_core.flc_list
+|
+- fl->fl_link
++ fl->fl_core.flc_link
+|
+- fl->fl_blocked_requests
++ fl->fl_core.flc_blocked_requests
+|
+- fl->fl_blocked_member
++ fl->fl_core.flc_blocked_member
+|
+- fl->fl_owner
++ fl->fl_core.flc_owner
+|
+- fl->fl_flags
++ fl->fl_core.flc_flags
+|
+- fl->fl_type
++ fl->fl_core.flc_type
+|
+- fl->fl_pid
++ fl->fl_core.flc_pid
+|
+- fl->fl_link_cpu
++ fl->fl_core.flc_link_cpu
+|
+- fl->fl_wait
++ fl->fl_core.flc_wait
+|
+- fl->fl_file
++ fl->fl_core.flc_file
+)
+
+@@
+struct file_lock fl;
+@@
+(
+- fl.fl_blocker
++ fl.fl_core.flc_blocker
+|
+- fl.fl_list
++ fl.fl_core.flc_list
+|
+- fl.fl_link
++ fl.fl_core.flc_link
+|
+- fl.fl_blocked_requests
++ fl.fl_core.flc_blocked_requests
+|
+- fl.fl_blocked_member
++ fl.fl_core.flc_blocked_member
+|
+- fl.fl_owner
++ fl.fl_core.flc_owner
+|
+- fl.fl_flags
++ fl.fl_core.flc_flags
+|
+- fl.fl_type
++ fl.fl_core.flc_type
+|
+- fl.fl_pid
++ fl.fl_core.flc_pid
+|
+- fl.fl_link_cpu
++ fl.fl_core.flc_link_cpu
+|
+- fl.fl_wait
++ fl.fl_core.flc_wait
+|
+- fl.fl_file
++ fl.fl_core.flc_file
+)
+
+@@
+struct file_lock *fl;
+struct list_head *li;
+@@
+- list_for_each_entry(fl, li, fl_list)
++ list_for_each_entry(fl, li, fl_core.flc_list)
diff --git a/cocci/nlm.cocci b/cocci/nlm.cocci
new file mode 100644
index 000000000000..bf22f0a75812
--- /dev/null
+++ b/cocci/nlm.cocci
@@ -0,0 +1,81 @@
+@@
+struct nlm_lock *nlck;
+@@
+(
+- nlck->fl.fl_blocker
++ nlck->fl.fl_core.flc_blocker
+|
+- nlck->fl.fl_list
++ nlck->fl.fl_core.flc_list
+|
+- nlck->fl.fl_link
++ nlck->fl.fl_core.flc_link
+|
+- nlck->fl.fl_blocked_requests
++ nlck->fl.fl_core.flc_blocked_requests
+|
+- nlck->fl.fl_blocked_member
++ nlck->fl.fl_core.flc_blocked_member
+|
+- nlck->fl.fl_owner
++ nlck->fl.fl_core.flc_owner
+|
+- nlck->fl.fl_flags
++ nlck->fl.fl_core.flc_flags
+|
+- nlck->fl.fl_type
++ nlck->fl.fl_core.flc_type
+|
+- nlck->fl.fl_pid
++ nlck->fl.fl_core.flc_pid
+|
+- nlck->fl.fl_link_cpu
++ nlck->fl.fl_core.flc_link_cpu
+|
+- nlck->fl.fl_wait
++ nlck->fl.fl_core.flc_wait
+|
+- nlck->fl.fl_file
++ nlck->fl.fl_core.flc_file
+)
+
+@@
+struct nlm_args *argp;
+@@
+(
+- argp->lock.fl.fl_blocker
++ argp->lock.fl.fl_core.flc_blocker
+|
+- argp->lock.fl.fl_list
++ argp->lock.fl.fl_core.flc_list
+|
+- argp->lock.fl.fl_link
++ argp->lock.fl.fl_core.flc_link
+|
+- argp->lock.fl.fl_blocked_requests
++ argp->lock.fl.fl_core.flc_blocked_requests
+|
+- argp->lock.fl.fl_blocked_member
++ argp->lock.fl.fl_core.flc_blocked_member
+|
+- argp->lock.fl.fl_owner
++ argp->lock.fl.fl_core.flc_owner
+|
+- argp->lock.fl.fl_flags
++ argp->lock.fl.fl_core.flc_flags
+|
+- argp->lock.fl.fl_type
++ argp->lock.fl.fl_core.flc_type
+|
+- argp->lock.fl.fl_pid
++ argp->lock.fl.fl_core.flc_pid
+|
+- argp->lock.fl.fl_link_cpu
++ argp->lock.fl.fl_core.flc_link_cpu
+|
+- argp->lock.fl.fl_wait
++ argp->lock.fl.fl_core.flc_wait
+|
+- argp->lock.fl.fl_file
++ argp->lock.fl.fl_core.flc_file
+)

-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ