mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Jason Gunthorpe <jgg@nvidia.com>, Leon Romanovsky <leonro@nvidia.com>
Cc: Leon Romanovsky <leon@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Yehyeong Lee <yhlee@isslab.korea.ac.kr>,
	Yong Liu <pkfxxxing@gmail.com>
Subject: linux-next: manual merge of the rdma tree with the rdma-fixes tree
Date: Thu, 19 Nov 2026 15:45:55 +0000	[thread overview]
Message-ID: <av8ZsxX4IWmJDOPG@sirena.org.uk> (raw)

[-- Attachment #1: Type: text/plain, Size: 2985 bytes --]

Hi all,

Today's linux-next merge of the rdma tree got conflicts in:

  drivers/infiniband/ulp/srpt/ib_srpt.h
  drivers/infiniband/ulp/srpt/ib_srpt.c

between commits:

  82d46dedf750a ("RDMA/srpt: bound the indirect descriptor table to the IU")
  013eb66a8ef25 ("RDMA/srpt: widen the indirect RDMA context counters")

from the rdma-fixes tree and commit:

  317128ea4f21c ("RDMA/srpt: Prevent uninitialized read buffer disclosure")

from the rdma tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --cc drivers/infiniband/ulp/srpt/ib_srpt.c
index a2af0882eff5a,fc530ddf489ce..0000000000000
--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
@@@ -1121,9 -1115,10 +1121,11 @@@ static int srpt_get_desc_tbl(struct srp
  	} else if (((srp_cmd->buf_fmt & 0xf) == SRP_DATA_DESC_INDIRECT) ||
  		   ((srp_cmd->buf_fmt >> 4) == SRP_DATA_DESC_INDIRECT)) {
  		struct srp_indirect_buf *idb = srpt_get_desc_buf(srp_cmd);
+ 		u64 total_len = 0;
  		int nbufs = be32_to_cpu(idb->table_desc.len) /
  				sizeof(struct srp_direct_buf);
 +		size_t desc_off = (uintptr_t)idb - (uintptr_t)srp_cmd;
+ 		int i;
  
  		if (nbufs >
  		    (srp_cmd->data_out_desc_cnt + srp_cmd->data_in_desc_cnt)) {
@@@ -1135,18 -1130,14 +1137,26 @@@
  			return -EINVAL;
  		}
  
 +		if (nbufs == 0) {
 +			pr_err("received SRP_CMD with an empty indirect descriptor table\n");
 +			return -EINVAL;
 +		}
 +
 +		if (desc_off + struct_size(idb, desc_list, nbufs) >
 +		    recv_ioctx->byte_len) {
 +			pr_err("received SRP_CMD indirect table (%d descriptors) that does not fit the %d-byte IU\n",
 +			       nbufs, recv_ioctx->byte_len);
 +			return -EINVAL;
 +		}
 +
+ 		for (i = 0; i < nbufs; i++)
+ 			total_len += be32_to_cpu(idb->desc_list[i].len);
+ 		if (total_len != be32_to_cpu(idb->len)) {
+ 			pr_err("SRP descriptor lengths total %llu does not match advertised length %u\n",
+ 			       total_len, be32_to_cpu(idb->len));
+ 			return -EINVAL;
+ 		}
+ 
  		*data_len = be32_to_cpu(idb->len);
  		return srpt_alloc_rw_ctxs(ioctx, idb->desc_list, nbufs,
  				sg, sg_cnt);
diff --cc drivers/infiniband/ulp/srpt/ib_srpt.h
index d9061aa65c1a8,78bba741489ec..0000000000000
--- a/drivers/infiniband/ulp/srpt/ib_srpt.h
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.h
@@@ -223,8 -224,9 +224,9 @@@ struct srpt_send_ioctx 
  	struct ib_cqe		rdma_cqe;
  	enum srpt_command_state	state;
  	struct se_cmd		cmd;
+ 	u32			buf_len;
 -	u8			n_rdma;
 -	u8			n_rw_ctx;
 +	int			n_rdma;
 +	int			n_rw_ctx;
  	bool			queue_status_only;
  	u8			sense_data[TRANSPORT_SENSE_BUFFER];
  };

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2026-11-19 15:45 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 15:45 Mark Brown [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-11-19 15:45 Mark Brown
2025-03-06  1:37 Stephen Rothwell
2025-03-06 10:24 ` Zhu Yanjun
2025-03-06 11:35   ` Zhu Yanjun
     [not found] ` <4d66668a-ff8e-48f6-a5e3-98ada08c5037@linux.dev>
2025-03-06 20:33   ` Stephen Rothwell
2023-09-28  1:38 Stephen Rothwell
2023-09-28  9:59 ` Leon Romanovsky
2022-01-06  0:44 Stephen Rothwell
2021-09-30  1:35 Stephen Rothwell
2021-10-01 13:52 ` Jason Gunthorpe
2019-08-23  2:22 Stephen Rothwell
2019-08-23 15:02 ` Jason Gunthorpe
2018-07-10  1:17 Stephen Rothwell
2018-07-10  5:19 ` Leon Romanovsky
2018-06-27  0:07 Stephen Rothwell
2018-06-27  5:50 ` Leon Romanovsky
2018-05-01  0:10 Stephen Rothwell
2018-05-01  0:55 ` Doug Ledford
2018-05-02 10:22   ` Leon Romanovsky
2018-05-02 14:00     ` Doug Ledford
2018-05-02 17:50       ` Jason Gunthorpe
2018-03-22  0:45 Stephen Rothwell
2018-01-17  1:51 Stephen Rothwell
2018-01-17  1:55 ` Stephen Rothwell
2018-01-17  3:03   ` Jason Gunthorpe

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=av8ZsxX4IWmJDOPG@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=jgg@nvidia.com \
    --cc=leon@kernel.org \
    --cc=leonro@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=pkfxxxing@gmail.com \
    --cc=yhlee@isslab.korea.ac.kr \
    /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

all inboxes | Powered by JetHome®