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: <20081112161156.25434.62126.stgit@paris.rdu.redhat.com>
Date:	Wed, 12 Nov 2008 11:11:56 -0500
From:	Eric Paris <eparis@...hat.com>
To:	linux-kernel@...r.kernel.org, malware-list@...ts.printk.net
Cc:	viro@...iv.linux.org.uk, alan@...rguk.ukuu.org.uk,
	arjan@...radead.org, greg@...ah.com, tytso@....edu,
	akpm@...ux-foundation.org
Subject: [PATCH =-v3 17/21] fanotify: add option to clear all fastpaths

fanotify users because of a change in decision policy may need to clear all
fastpath entries.  This simply adds a new setsockopt call which will do
exactly that.

Signed-off-by: Eric Paris <eparis@...hat.com>
---

 include/linux/fanotify.h   |    1 +
 net/fanotify/af_fanotify.c |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/linux/fanotify.h b/include/linux/fanotify.h
index 14ad6f9..b7ab01f 100644
--- a/include/linux/fanotify.h
+++ b/include/linux/fanotify.h
@@ -89,6 +89,7 @@ struct fanotify_so_access {
 /* fanotify setsockopt optvals */
 #define FANOTIFY_SET_FASTPATH	1
 #define FANOTIFY_SEND_RESPONSE	2
+#define FANOTIFY_CLEAR_ALL_FASTPATH	3
 
 #ifdef __KERNEL__
 
diff --git a/net/fanotify/af_fanotify.c b/net/fanotify/af_fanotify.c
index eef7e2a..7c98a22 100644
--- a/net/fanotify/af_fanotify.c
+++ b/net/fanotify/af_fanotify.c
@@ -192,6 +192,9 @@ static int fan_setsockopt(struct socket *sock, int level, int optname, char __us
 			return ret;
 		ret = fanotify_process_access_response(group, data.access.cookie, data.access.response);
 		break;
+	case FANOTIFY_CLEAR_ALL_FASTPATH:
+		fanotify_fastpath_clear_group(group);
+		break;
 	default:
 		return -ENOPROTOOPT;
 	}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ