netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 00/10] net: better const qualifier awareness
@ 2023-03-17 15:55 Eric Dumazet
  2023-03-17 15:55 ` [PATCH net-next 01/10] udp: preserve const qualifier in udp_sk() Eric Dumazet
                   ` (10 more replies)
  0 siblings, 11 replies; 26+ messages in thread
From: Eric Dumazet @ 2023-03-17 15:55 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, Paolo Abeni
  Cc: netdev, David Ahern, Simon Horman, Willem de Bruijn,
	Matthieu Baerts, eric.dumazet, Eric Dumazet

This is a follow-up of d27d367d3b78 ("inet: better const qualifier awareness")

Adopting container_of_const() to perform (struct sock *)->(protocol sock *)
operation is allowing us to propagate const qualifier and thus detect
misuses at compile time.

Most conversions are trivial, because most protocols did not adopt yet
const sk pointers where it could make sense.

Only mptcp and tcp patches (end of this series) are requiring small
adjustments.

Thanks !

Eric Dumazet (10):
  udp: preserve const qualifier in udp_sk()
  af_packet: preserve const qualifier in pkt_sk()
  raw: preserve const qualifier in raw_sk()
  ipv6: raw: preserve const qualifier in raw6_sk()
  dccp: preserve const qualifier in dccp_sk()
  af_unix: preserve const qualifier in unix_sk()
  smc: preserve const qualifier in smc_sk()
  x25: preserve const qualifier in [a]x25_sk()
  mptcp: preserve const qualifier in mptcp_sk()
  tcp: preserve const qualifier in tcp_sk()

 include/linux/dccp.h     |  6 ++----
 include/linux/ipv6.h     |  5 +----
 include/linux/tcp.h      | 10 ++++++----
 include/linux/udp.h      |  5 +----
 include/net/af_unix.h    |  5 +----
 include/net/ax25.h       |  5 +----
 include/net/raw.h        |  5 +----
 include/net/tcp.h        |  2 +-
 include/net/x25.h        |  5 +----
 net/ipv4/tcp.c           |  2 +-
 net/ipv4/tcp_input.c     |  4 ++--
 net/ipv4/tcp_minisocks.c |  5 +++--
 net/ipv4/tcp_output.c    |  9 +++++++--
 net/ipv4/tcp_recovery.c  |  2 +-
 net/mptcp/protocol.c     |  2 +-
 net/mptcp/protocol.h     |  9 +++------
 net/packet/internal.h    |  5 +----
 net/smc/smc.h            |  5 +----
 security/lsm_audit.c     |  2 +-
 19 files changed, 36 insertions(+), 57 deletions(-)

-- 
2.40.0.rc2.332.ga46443480c-goog


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2023-03-18 12:30 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-17 15:55 [PATCH net-next 00/10] net: better const qualifier awareness Eric Dumazet
2023-03-17 15:55 ` [PATCH net-next 01/10] udp: preserve const qualifier in udp_sk() Eric Dumazet
2023-03-17 16:33   ` Simon Horman
2023-03-17 15:55 ` [PATCH net-next 02/10] af_packet: preserve const qualifier in pkt_sk() Eric Dumazet
2023-03-17 16:33   ` Simon Horman
2023-03-17 15:55 ` [PATCH net-next 03/10] raw: preserve const qualifier in raw_sk() Eric Dumazet
2023-03-17 16:33   ` Simon Horman
2023-03-17 15:55 ` [PATCH net-next 04/10] ipv6: raw: preserve const qualifier in raw6_sk() Eric Dumazet
2023-03-17 16:35   ` Simon Horman
2023-03-17 15:55 ` [PATCH net-next 05/10] dccp: preserve const qualifier in dccp_sk() Eric Dumazet
2023-03-17 16:36   ` Simon Horman
2023-03-17 15:55 ` [PATCH net-next 06/10] af_unix: preserve const qualifier in unix_sk() Eric Dumazet
2023-03-17 16:37   ` Simon Horman
2023-03-17 15:55 ` [PATCH net-next 07/10] smc: preserve const qualifier in smc_sk() Eric Dumazet
2023-03-17 17:01   ` Simon Horman
2023-03-17 20:05   ` Wenjia Zhang
2023-03-17 15:55 ` [PATCH net-next 08/10] x25: preserve const qualifier in [a]x25_sk() Eric Dumazet
2023-03-17 17:03   ` Simon Horman
2023-03-17 15:55 ` [PATCH net-next 09/10] mptcp: preserve const qualifier in mptcp_sk() Eric Dumazet
2023-03-17 17:05   ` Simon Horman
2023-03-17 17:32   ` Matthieu Baerts
2023-03-17 17:47     ` Eric Dumazet
2023-03-17 17:59       ` Matthieu Baerts
2023-03-17 15:55 ` [PATCH net-next 10/10] tcp: preserve const qualifier in tcp_sk() Eric Dumazet
2023-03-17 17:12   ` Simon Horman
2023-03-18 12:30 ` [PATCH net-next 00/10] net: better const qualifier awareness patchwork-bot+netdevbpf

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).