901-debloat_sock_diag.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. --- a/net/Kconfig
  2. +++ b/net/Kconfig
  3. @@ -89,6 +89,9 @@ source "net/netlabel/Kconfig"
  4. endif # if INET
  5. +config SOCK_DIAG
  6. + bool
  7. +
  8. config NETWORK_SECMARK
  9. bool "Security Marking"
  10. help
  11. --- a/net/core/Makefile
  12. +++ b/net/core/Makefile
  13. @@ -9,8 +9,9 @@ obj-$(CONFIG_SYSCTL) += sysctl_net_core.
  14. obj-y += dev.o ethtool.o dev_addr_lists.o dst.o netevent.o \
  15. neighbour.o rtnetlink.o utils.o link_watch.o filter.o \
  16. - sock_diag.o dev_ioctl.o tso.o
  17. + dev_ioctl.o tso.o
  18. +obj-$(CONFIG_SOCK_DIAG) += sock_diag.o
  19. obj-$(CONFIG_XFRM) += flow.o
  20. obj-y += net-sysfs.o
  21. obj-$(CONFIG_PROC_FS) += net-procfs.o
  22. --- a/net/ipv4/Kconfig
  23. +++ b/net/ipv4/Kconfig
  24. @@ -419,6 +419,7 @@ config INET_LRO
  25. config INET_DIAG
  26. tristate "INET: socket monitoring interface"
  27. + select SOCK_DIAG
  28. default y
  29. ---help---
  30. Support for INET (TCP, DCCP, etc) socket monitoring interface used by
  31. --- a/net/unix/Kconfig
  32. +++ b/net/unix/Kconfig
  33. @@ -22,6 +22,7 @@ config UNIX
  34. config UNIX_DIAG
  35. tristate "UNIX: socket monitoring interface"
  36. depends on UNIX
  37. + select SOCK_DIAG
  38. default n
  39. ---help---
  40. Support for UNIX socket monitoring interface used by the ss tool.
  41. --- a/net/netlink/Kconfig
  42. +++ b/net/netlink/Kconfig
  43. @@ -13,6 +13,7 @@ config NETLINK_MMAP
  44. config NETLINK_DIAG
  45. tristate "NETLINK: socket monitoring interface"
  46. + select SOCK_DIAG
  47. default n
  48. ---help---
  49. Support for NETLINK socket monitoring interface used by the ss tool.
  50. --- a/net/packet/Kconfig
  51. +++ b/net/packet/Kconfig
  52. @@ -18,6 +18,7 @@ config PACKET
  53. config PACKET_DIAG
  54. tristate "Packet: sockets monitoring interface"
  55. depends on PACKET
  56. + select SOCK_DIAG
  57. default n
  58. ---help---
  59. Support for PF_PACKET sockets monitoring interface used by the ss tool.