linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mihai Moldovan <ionic@ionic.de>
To: linux-arm-msm@vger.kernel.org, Manivannan Sadhasivam <mani@kernel.org>
Cc: Denis Kenzior <denkenz@gmail.com>,
	Eric Dumazet <edumazet@google.com>,
	Kuniyuki Iwashima <kuniyu@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Willem de Bruijn <willemb@google.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Simon Horman <horms@kernel.org>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH v2 08/10] net: qrtr: Drop remote {NEW|DEL}_LOOKUP messages
Date: Sat, 19 Jul 2025 20:59:28 +0200	[thread overview]
Message-ID: <ad089e97706b095063777f1eefe04d75cbb917f1.1752947108.git.ionic@ionic.de> (raw)
In-Reply-To: <cover.1752947108.git.ionic@ionic.de>

From: Denis Kenzior <denkenz@gmail.com>

These messages are explicitly filtered out by the in-kernel name
service (ns.c).  Filter them out even earlier to save some CPU cycles.

Signed-off-by: Denis Kenzior <denkenz@gmail.com>
Reviewed-by: Marcel Holtmann <marcel@holtmann.org>
Reviewed-by: Andy Gross <agross@kernel.org>
Signed-off-by: Mihai Moldovan <ionic@ionic.de>

---

v2:
  - rebase against current master
---
 net/qrtr/af_qrtr.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/net/qrtr/af_qrtr.c b/net/qrtr/af_qrtr.c
index c331bcc743ca..53cdf7d70fbe 100644
--- a/net/qrtr/af_qrtr.c
+++ b/net/qrtr/af_qrtr.c
@@ -560,6 +560,11 @@ int qrtr_endpoint_post(struct qrtr_endpoint *ep, const void *data, size_t len)
 	if (!size || len != ALIGN(size, 4) + hdrlen)
 		goto err;
 
+	/* Don't allow remote lookups */
+	if (cb->type == QRTR_TYPE_NEW_LOOKUP ||
+	    cb->type == QRTR_TYPE_DEL_LOOKUP)
+		goto err;
+
 	if ((cb->type == QRTR_TYPE_NEW_SERVER ||
 	     cb->type == QRTR_TYPE_RESUME_TX) &&
 	    size < sizeof(struct qrtr_ctrl_pkt))
-- 
2.50.0


  parent reply	other threads:[~2025-07-19 18:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-19 18:59 [PATCH v2 00/10] QRTR Multi-endpoint support Mihai Moldovan
2025-07-19 18:59 ` [PATCH v2 01/10] net: qrtr: ns: validate msglen before ctrl_pkt use Mihai Moldovan
2025-07-21 11:02   ` Casey Connolly
2025-07-21 11:53     ` Mihai Moldovan
2025-07-19 18:59 ` [PATCH v2 02/10] net: qrtr: allocate and track endpoint ids Mihai Moldovan
2025-07-19 18:59 ` [PATCH v2 03/10] net: qrtr: support identical node ids Mihai Moldovan
2025-07-19 23:22   ` kernel test robot
2025-07-19 18:59 ` [PATCH v2 04/10] net: qrtr: Report sender endpoint in aux data Mihai Moldovan
2025-07-19 18:59 ` [PATCH v2 05/10] net: qrtr: Report endpoint for locally generated messages Mihai Moldovan
2025-07-19 18:59 ` [PATCH v2 06/10] net: qrtr: Allow sendmsg to target an endpoint Mihai Moldovan
2025-07-19 18:59 ` [PATCH v2 07/10] net: qrtr: allow socket endpoint binding Mihai Moldovan
2025-07-19 18:59 ` Mihai Moldovan [this message]
2025-07-19 18:59 ` [PATCH v2 09/10] net: qrtr: ns: support multiple endpoints Mihai Moldovan
2025-07-19 18:59 ` [PATCH v2 10/10] net: qrtr: mhi: Report endpoint id in sysfs Mihai Moldovan
2025-07-20 10:54 ` [PATCH v2 00/10] QRTR Multi-endpoint support Ionic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ad089e97706b095063777f1eefe04d75cbb917f1.1752947108.git.ionic@ionic.de \
    --to=ionic@ionic.de \
    --cc=davem@davemloft.net \
    --cc=denkenz@gmail.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=willemb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).