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>] [day] [month] [year] [list]
Message-ID: <20250501003150.309583-1-linux@treblig.org>
Date: Thu,  1 May 2025 01:31:50 +0100
From: linux@...blig.org
To: kuba@...nel.org,
	netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
	"Dr. David Alan Gilbert" <linux@...blig.org>
Subject: [RFC net-next] strparser: Remove unused strp_process

From: "Dr. David Alan Gilbert" <linux@...blig.org>

strp_process() was addded in 2017 in
commit bbb03029a899 ("strparser: Generalize strparser")

but never used.

Remove it.

....but, hmm I'm not sure how much other cleanup needs doing,
there's still a comment in strp_init() referencing strp_process
and it makes me think there might be other code handling the
'general mode' which strp_process seems to have been added for.

Suggestions?

Dave

Signed-off-by: Dr. David Alan Gilbert <linux@...blig.org>
---
 Documentation/networking/strparser.rst | 12 ------------
 include/net/strparser.h                |  3 ---
 net/strparser/strparser.c              | 13 -------------
 3 files changed, 28 deletions(-)

diff --git a/Documentation/networking/strparser.rst b/Documentation/networking/strparser.rst
index 8dc6bb04c710..e7729915d7a1 100644
--- a/Documentation/networking/strparser.rst
+++ b/Documentation/networking/strparser.rst
@@ -81,18 +81,6 @@ Functions
 
      ::
 
-	int strp_process(struct strparser *strp, struct sk_buff *orig_skb,
-			 unsigned int orig_offset, size_t orig_len,
-			 size_t max_msg_size, long timeo)
-
-    strp_process is called in general mode for a stream parser to
-    parse an sk_buff. The number of bytes processed or a negative
-    error number is returned. Note that strp_process does not
-    consume the sk_buff. max_msg_size is maximum size the stream
-    parser will parse. timeo is timeout for completing a message.
-
-    ::
-
 	void strp_data_ready(struct strparser *strp);
 
     The upper layer calls strp_tcp_data_ready when data is ready on
diff --git a/include/net/strparser.h b/include/net/strparser.h
index 0ed73e364faa..cc64e9d8c9e9 100644
--- a/include/net/strparser.h
+++ b/include/net/strparser.h
@@ -163,8 +163,5 @@ void strp_check_rcv(struct strparser *strp);
 int strp_init(struct strparser *strp, struct sock *sk,
 	      const struct strp_callbacks *cb);
 void strp_data_ready(struct strparser *strp);
-int strp_process(struct strparser *strp, struct sk_buff *orig_skb,
-		 unsigned int orig_offset, size_t orig_len,
-		 size_t max_msg_size, long timeo);
 
 #endif /* __NET_STRPARSER_H_ */
diff --git a/net/strparser/strparser.c b/net/strparser/strparser.c
index d946bfb424c7..2cd9c39910a5 100644
--- a/net/strparser/strparser.c
+++ b/net/strparser/strparser.c
@@ -314,19 +314,6 @@ static int __strp_recv(read_descriptor_t *desc, struct sk_buff *orig_skb,
 	return eaten;
 }
 
-int strp_process(struct strparser *strp, struct sk_buff *orig_skb,
-		 unsigned int orig_offset, size_t orig_len,
-		 size_t max_msg_size, long timeo)
-{
-	read_descriptor_t desc; /* Dummy arg to strp_recv */
-
-	desc.arg.data = strp;
-
-	return __strp_recv(&desc, orig_skb, orig_offset, orig_len,
-			   max_msg_size, timeo);
-}
-EXPORT_SYMBOL_GPL(strp_process);
-
 static int strp_recv(read_descriptor_t *desc, struct sk_buff *orig_skb,
 		     unsigned int orig_offset, size_t orig_len)
 {
-- 
2.49.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ