linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/4] net: Mark the sk parameter of routing functions as 'const'.
@ 2023-07-11 13:06 Guillaume Nault
  2023-07-11 13:06 ` [PATCH net-next 1/4] security: Constify sk in the sk_getsecid hook Guillaume Nault
  2023-07-14  7:40 ` [PATCH net-next 0/4] net: Mark the sk parameter of routing functions as 'const' patchwork-bot+netdevbpf
  0 siblings, 2 replies; 6+ messages in thread
From: Guillaume Nault @ 2023-07-11 13:06 UTC (permalink / raw)
  To: David Miller, Jakub Kicinski, Paolo Abeni, Eric Dumazet
  Cc: netdev, Paul Moore, Eric Paris, linux-security-module, selinux,
	David Ahern, Dmitry Kozlov

The sk_getsecid security hook prevents the use of a const sk pointer in
several routing functions. Since this hook should only read sk data,
make its sk argument const (patch 1), then constify the sk parameter of
various routing functions (patches 2-4).

Build-tested with make allmodconfig.

Guillaume Nault (4):
  security: Constify sk in the sk_getsecid hook.
  ipv4: Constify the sk parameter of ip_route_output_*().
  ipv6: Constify the sk parameter of several helper functions.
  pptp: Constify the po parameter of pptp_route_output().

 drivers/net/ppp/pptp.c        |  4 ++--
 include/linux/icmpv6.h        | 10 ++++------
 include/linux/lsm_hook_defs.h |  2 +-
 include/linux/security.h      |  5 +++--
 include/net/route.h           |  6 +++---
 net/ipv6/datagram.c           |  7 ++++---
 net/ipv6/icmp.c               |  6 ++----
 net/ipv6/mcast.c              |  8 +++-----
 security/security.c           |  2 +-
 security/selinux/hooks.c      |  4 ++--
 10 files changed, 25 insertions(+), 29 deletions(-)

-- 
2.39.2


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

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

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-11 13:06 [PATCH net-next 0/4] net: Mark the sk parameter of routing functions as 'const' Guillaume Nault
2023-07-11 13:06 ` [PATCH net-next 1/4] security: Constify sk in the sk_getsecid hook Guillaume Nault
2023-07-13  9:32   ` Simon Horman
2023-07-17 16:05   ` Paul Moore
2023-07-18 12:31     ` Guillaume Nault
2023-07-14  7:40 ` [PATCH net-next 0/4] net: Mark the sk parameter of routing functions as 'const' 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).