All of lore.kernel.org
 help / color / mirror / Atom feed
From: Breno Leitao <leitao@debian.org>
To: "D. Wythe" <alibuda@linux.alibaba.com>,
	 Dust Li <dust.li@linux.alibaba.com>,
	Sidraya Jayagond <sidraya@linux.ibm.com>,
	 Wenjia Zhang <wenjia@linux.ibm.com>,
	Mahanta Jambigi <mjambigi@linux.ibm.com>,
	 Tony Lu <tonylu@linux.alibaba.com>,
	Wen Gu <guwen@linux.alibaba.com>,
	 "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	 Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	 Shuah Khan <shuah@kernel.org>
Cc: linux-rdma@vger.kernel.org, linux-s390@vger.kernel.org,
	 netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org,  kernel-team@meta.com
Subject: Re: [PATCH net-next 1/2] smc: convert to getsockopt_iter
Date: Mon, 8 Jun 2026 03:48:57 -0700	[thread overview]
Message-ID: <aiaeBuPC6e-rsaxY@gmail.com> (raw)
In-Reply-To: <20260605-getsockopt_smc-v1-1-65da62fa44c4@debian.org>

On Fri, Jun 05, 2026 at 05:13:25AM -0700, Breno Leitao wrote:
> Convert SMC socket's getsockopt implementation to use the new
> getsockopt_iter callback with sockopt_t.
> 
> Key changes:
> - Replace (char __user *optval, int __user *optlen) with sockopt_t *opt
> - Use opt->optlen for buffer length (input) and returned size (output)
> - Use copy_to_iter() instead of put_user()/copy_to_user()
> - Add linux/uio.h for copy_to_iter()
> 
> SMC is a proxy socket: only the SOL_SMC level is handled locally, while
> all other levels are forwarded to the underlying CLC (TCP) socket. That
> socket's getsockopt() still operates on __user buffers, so the
> pass-through is limited to user-backed iters: optval is reconstructed
> from iter_out, the original optlen pointer (preserved in sockopt_t) is
> forwarded, and the length reported by the clcsock is mirrored back into
> opt->optlen so the core writes the correct value to userspace.
> 
> Signed-off-by: Breno Leitao <leitao@debian.org>

Damn, this is not building. let me send a fixed version (v2).

--
pw-bot: cr

  reply	other threads:[~2026-06-08 10:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-05 12:13 [PATCH net-next 0/2] net/smc: convert getsockopt to getsockopt_iter Breno Leitao
2026-06-05 12:13 ` [PATCH net-next 1/2] smc: convert " Breno Leitao
2026-06-08 10:48   ` Breno Leitao [this message]
2026-06-05 12:13 ` [PATCH net-next 2/2] selftests: net: add SMC getsockopt_iter conversion test Breno Leitao

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=aiaeBuPC6e-rsaxY@gmail.com \
    --to=leitao@debian.org \
    --cc=alibuda@linux.alibaba.com \
    --cc=davem@davemloft.net \
    --cc=dust.li@linux.alibaba.com \
    --cc=edumazet@google.com \
    --cc=guwen@linux.alibaba.com \
    --cc=horms@kernel.org \
    --cc=kernel-team@meta.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mjambigi@linux.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    --cc=sidraya@linux.ibm.com \
    --cc=tonylu@linux.alibaba.com \
    --cc=wenjia@linux.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.