summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2026-07-02 12:29:08 +0200
committerPaolo Abeni <pabeni@redhat.com>2026-07-02 12:29:08 +0200
commit15fede6ca522fe192191df48856004497475b6a0 (patch)
tree51d8c66e4742fbfec0b49cb6299d362815658a87 /include/uapi
parentb8ea7da314c2efcb9c2f559ed65b7a36c869d68e (diff)
parentf4d5e3a5c7bc3d789b5138ef127ab27e0128e2da (diff)
Merge branch 'net-convert-udp-getsockopt-to-sockopt_t'
Breno Leitao says: ==================== net: convert UDP getsockopt to sockopt_t The leaf proto_ops getsockopt callbacks have been moving to the new getsockopt_iter()/sockopt_t interface. I was trying to get SMC into getsockop and retire .getsockopt, but, I found the best approach is to keep converting other protocols. This series starts the same conversion one layer down, at the struct proto getsockopt path, beginning with UDP. Example of the current code. static int udp_getsockopt(struct sock *sk, int level, int optname, char __user *optval, int __user *optlen) { if (level == SOL_UDP) return udp_lib_getsockopt(sk, level, optname, optval, optlen); return ip_getsockopt(sk, level, optname, optval, optlen); } We want udp_getsockopt to go to .getsockopt_iter, and there are two approaches in this case: 1) Create a patchset that moves both of them to getsockopt_iter, which is will be a huge change (ip_getsockopt() is used in many places) 2) Break this down, and transform from bottoms up. First udp_lib_getsockopt() up to the point we can easily convert others, such as ip_getsockopt(). I am taking the approach 2), so, the intermediate code will be something like: static int udp_getsockopt(struct sock *sk, int level, int optname, char __user *optval, int __user *optlen) { sockopt_t opt; int err; if (level != SOL_UDP) return ip_getsockopt(sk, level, optname, optval, optlen); // Convert optlen/optval in sockopt // (first patch) err = udp_lib_getsockopt(sk, level, optname, &opt); } The work is bottom-up and mergeable in small steps: a protocol's inner getsockopt helper is switched to sockopt_t behind its existing thin __user wrapper, one patch at a time. Once every inner helper speaks sockopt_t, a later series flips the shared struct proto.getsockopt and inet_connection_sock_af_ops.getsockopt signatures and drops the transitional wrappers. Signed-off-by: Breno Leitao <leitao@debian.org> ==================== Link: https://patch.msgid.link/20260630-getsockopt_phase2-v2-0-193335f3d4d1@debian.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/uapi')
0 files changed, 0 insertions, 0 deletions