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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <5b4019594a93bc77b0e3298457c3d9ec0e08fbb5.1669072186.git.linux_oss@crudebyte.com>
Date:   Tue, 22 Nov 2022 00:03:58 +0100
From:   Christian Schoenebeck <linux_oss@...debyte.com>
To:     Dominique Martinet <asmadeus@...ewreck.org>,
        Stefano Stabellini <sstabellini@...nel.org>
Cc:     v9fs-developer@...ts.sourceforge.net, linux-kernel@...r.kernel.org,
        GUO Zihua <guozihua@...wei.com>
Subject: [PATCH 1/2] net/9p: distinguish zero-copy requests

Signed-off-by: Christian Schoenebeck <linux_oss@...debyte.com>
---
 include/net/9p/9p.h | 2 ++
 net/9p/client.c     | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h
index 13abe013af21..b0a6dec20b92 100644
--- a/include/net/9p/9p.h
+++ b/include/net/9p/9p.h
@@ -530,6 +530,7 @@ struct p9_rstatfs {
  * @tag: transaction id of the request
  * @offset: used by marshalling routines to track current position in buffer
  * @capacity: used by marshalling routines to track total malloc'd capacity
+ * @zc: whether zero-copy is used
  * @sdata: payload
  *
  * &p9_fcall represents the structure for all 9P RPC
@@ -546,6 +547,7 @@ struct p9_fcall {
 
 	size_t offset;
 	size_t capacity;
+	bool zc;
 
 	struct kmem_cache *cache;
 	u8 *sdata;
diff --git a/net/9p/client.c b/net/9p/client.c
index aaa37b07e30a..30dd82f49b28 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -680,6 +680,8 @@ p9_client_rpc(struct p9_client *c, int8_t type, const char *fmt, ...)
 	if (IS_ERR(req))
 		return req;
 
+	req->tc.zc = req->rc.zc = false;
+
 	if (signal_pending(current)) {
 		sigpending = 1;
 		clear_thread_flag(TIF_SIGPENDING);
@@ -778,6 +780,8 @@ static struct p9_req_t *p9_client_zc_rpc(struct p9_client *c, int8_t type,
 	if (IS_ERR(req))
 		return req;
 
+	req->tc.zc = req->rc.zc = true;
+
 	if (signal_pending(current)) {
 		sigpending = 1;
 		clear_thread_flag(TIF_SIGPENDING);
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ